.

Comment configurer une route statique?


Routage statique ou dynamique?

Pour le routage statique, les tables sont remplies manuellement. Il est utilisé sur des petits réseaux ou sur des réseaux d'extrémité.
Avec le routage dynamique, les tables sont remplies automatiquement. On configure un protocole qui va se charger d'établir la topologie et de remplir les tables de routage. On utilise un protocole de routage dynamique sur des réseaux plus importants. Le routage dynamique permet également une modification automatique des tables de routage en cas de rupture d'un lien sur un routeur. Il permet également de choisir la meilleure route disponible pour aller d'un réseau à un autre.
Exemple de protocole de routage : BGP (utilisé sur l'Internet), RIP, OSPF, IS-IS

Rappel: Configuration d'une route par défaut

La passerelle par défaut dans l'exemple suivant est : 192.168.3.1
R4(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.1

Suppression de la route par défaut

R4(config)#no ip route 0.0.0.0 0.0.0.0 192.168.3.1

Configuration d'une route statique

Dans la commande suivante, le réseau à atteindre est le réseau 192.168.2.0/24 et l'interface utilisée pour joindre le réseau est ethernet 1/0.
On peut aussi utiliser l'adresse IP du prochain routeur.
R4(config)#ip route 192.168.2.0 255.255.255.0 ethernet 1/0
R4(config)#
Autre possibilité:
R4(config)#ip route 192.168.2.0 255.255.255.0 10.0.0.2
R4(config)#

Suppression de la route statique

R4(config)#no ip route 192.168.2.0 255.255.255.0 ethernet 1/0
R4(config)#

Affichage de la table de routage

R4#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is 192.168.3.1 to network 0.0.0.0

10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Ethernet1/0
S 192.168.2.0/24 [1/0] via 10.0.0.2
C 192.168.3.0/24 is directly connected, FastEthernet2/0
S* 0.0.0.0/0 [1/0] via 192.168.3.1
R4#
On remarque sur cette sortie de commande les réseaux directement connectés (C), les routes statiques (s) et la route par défaut.

Exemple de configuration

routage statique

Extrait du fichier de configuration de R4 et R5

R4#sh run
Building configuration...

interface Ethernet1/0
ip address 10.0.0.1 255.255.255.0
duplex half
!
interface FastEthernet2/0
ip address 192.168.3.2 255.255.255.0
duplex auto
speed auto
!
ip route 0.0.0.0 0.0.0.0 192.168.3.1
ip route 192.168.2.0 255.255.255.0 10.0.0.2

R5#sh run
Building configuration...

interface Ethernet1/0
ip address 10.0.0.2 255.255.255.0
duplex half

interface FastEthernet2/0
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
ip route 0.0.0.0 0.0.0.0 10.0.0.1

Affichage des tables de routage

R4#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is 192.168.3.1 to network 0.0.0.0

10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Ethernet1/0
S 192.168.2.0/24 [1/0] via 10.0.0.2
C 192.168.3.0/24 is directly connected, FastEthernet2/0
S* 0.0.0.0/0 [1/0] via 192.168.3.1
R4#
R5(config)#do show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.0.0.1 to network 0.0.0.0

10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Ethernet1/0
C 192.168.2.0/24 is directly connected, FastEthernet2/0
S* 0.0.0.0/0 [1/0] via 10.0.0.1
R5(config)#

Related Posts:

  • ccna 1 final exam v4.0 answers 2013 CCNA Exploration 1: Network Fundamentals v4.0 - Final Exam Answers – Full - 2013-2014 1. Which of the following are the address ranges of the private IP addresses? (Choose three.) 10.0.0.0 to 10.255.255.255 200.100.50.… Read More
  • VPN Client - Cisco Use VPN Client for Highly Secure Connectivity VPN Client - Cisco   Establish encrypted VPN tunnels with the Cisco VPN Client for highly secure remote connectivity for your mobile employees or teleworkers. … Read More
  • CCNA 2 Chapter 3 v5.0 Exam Answers 2013 CCNA 2 Chapter 3 v5.0 Exam Answers 2013 1 A network administrator is determining the best placement of VLAN trunk links. Which two types of point-to-point connections utilize VLAN trunking?​ (Choose two.) between two sw… Read More
  • How to Pick the Best VPN Service How to Pick the Best VPN Service VPN is an acronym for Virtual Private Network which provides basically a safe connection that keeps the hackers and scammers at a bar from your network. There are two VPN t… Read More
  • CCNA 1 Chapter 2 Answers 2013 CCNA 1 Chapter 2 v5.0 Exam Answers 2013 1. Refer to the exhibit. A switch was configured as shown. A ping to the default gateway was issued, but the ping was not successful. Other switches in the same network can ping th… Read More