Configuration du routage ospf - routeur Cisco - TRI INFO

Techniques des Réseaux Informatiques

Breaking

&width=339&height=255&colorscheme=light&show_faces=true&show_border=false&stream=false&header=false' style='border: none; overflow: hidden; background: #fff; width: 339px; height: 200px;'>
&width=339&height=255&colorscheme=light&show_faces=true&show_border=false&stream=false&header=false' style='border: none; overflow: hidden; background: #fff; width: 339px; height: 200px;'>

Sunday, 26 May 2019

Configuration du routage ospf - routeur Cisco

Comment configurer le protocole OSPF sur un routeur Cisco
Image result for ccna

Configuration IP de l'interface de loopback

R1(config)#interface loopback 0
R1(config-if)#ip address 172.16.0.1 255.255.255.0

Activation du protocole de routage OSPF et des réseaux participant aux annonces

Le numéro du processus ospf est 100. L'adresse IP de l'interface connectée à un autre routeur est 10.0.3.1/24 et le numéro de l'aire est 0.
R1(config)#router ospf 100
R1(config-router)#network 10.0.3.0 0.0.0.255 area 0
R1(config-router)#network 10.0.0.0 0.0.0.255 area 0

Affichage des informations concernant ospf

R1#show ip ospf
Routing Process "ospf 100" with ID 172.16.0.1
Start time: 00:18:40.612, Time elapsed: 00:08:28.352
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs

Afficher les voisins ospf

R1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
172.16.0.3 1 FULL/BDR 00:00:39 10.0.3.2 FastEthernet2/0
172.16.0.2 1 FULL/DR 00:00:39 10.0.0.2 FastEthernet1/0
R1#
R1#
R1#show ip ospf neighbor detail
Neighbor 172.16.0.3, interface address 10.0.3.2
In the area 0 via interface FastEthernet2/0
Neighbor priority is 1, State is FULL, 34 state changes
DR is 10.0.3.1 BDR is 10.0.3.2
Options is 0x12 in Hello (E-bit, L-bit)
Options is 0x52 in DBD (E-bit, L-bit, O-bit)
LLS Options is 0x1 (LR)
Dead timer due in 00:00:35
Neighbor is up for 00:11:57

Redistribution de route dans ospf

Redistribution des routes connectées:
R2(config)#router ospf 100
R2(config-router)#redistribute connected

Redistribution d'une route par défaut

Configuration d'une route par défaut puis redistribution dans ospf:
R4(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.2
R1(config)#router ospf 100
R1(config-router)#redistribute static
R1(config-router)#default-information originate

Authentification

R1(config)#router ospf 100
R1(config-router)#area 0 authentication message-digest
R1(config-router)#exit
R1(config)#int fa 1/0
R1(config-if)#ip ospf message-digest-key 1 md5 passworD
R1(config-if)#int fa 2/0
R1(config-if)#ip ospf message-digest-key 1 md5 passworD
R1(config-if)#

Exemple de configuration OSPF

exemple routage ospf

Extrait du fichier de configuration

Routeur R1
R1#sh run
Building configuration...

interface Loopback0
ip address 172.16.0.1 255.255.255.0
!
interface FastEthernet1/0
ip address 10.0.0.1 255.255.255.0
ip ospf message-digest-key 1 md5 passworD
duplex auto
speed auto
!
interface FastEthernet1/1
ip address 192.168.3.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 10.0.3.1 255.255.255.0
ip ospf message-digest-key 1 md5 passworD
duplex auto
speed auto
!
router ospf 100
log-adjacency-changes
area 0 authentication message-digest
redistribute static
network 10.0.0.0 0.0.0.255 area 0
network 10.0.3.0 0.0.0.255 area 0
default-information originate
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.3.2
Routeur R2
R2#sh run
Building configuration...

interface Loopback0
ip address 172.16.0.2 255.255.255.0
!
interface FastEthernet1/0
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/1
ip address 10.0.0.2 255.255.255.0
ip ospf message-digest-key 1 md5 passworD
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 10.0.2.2 255.255.255.0
ip ospf message-digest-key 1 md5 passworD
duplex auto
speed auto
!
router ospf 100
log-adjacency-changes
area 0 authentication message-digest
redistribute connected
network 10.0.0.0 0.0.0.255 area 0
network 10.0.2.0 0.0.0.255 area 0
!
Routeur R3
R3#sh run
Building configuration...

interface Loopback0
ip address 172.16.0.3 255.255.255.0
!
interface FastEthernet1/0
ip address 10.0.3.2 255.255.255.0
ip ospf message-digest-key 1 md5 passworD
duplex auto
speed auto
!
interface FastEthernet1/1
ip address 10.0.2.1 255.255.255.0
ip ospf message-digest-key 1 md5 passworD
duplex auto
speed auto
!
router ospf 100
log-adjacency-changes
area 0 authentication message-digest
network 10.0.2.0 0.0.0.255 area 0
network 10.0.3.0 0.0.0.255 area 0

Table de routage des routeurs

Routeur R1
R1#sh 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.2 to network 0.0.0.0

172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 3 subnets
O 10.0.2.0 [110/2] via 10.0.0.2, 00:03:24, FastEthernet1/0
C 10.0.3.0 is directly connected, FastEthernet2/0
C 10.0.0.0 is directly connected, FastEthernet1/0
O E2 192.168.2.0/24 [110/20] via 10.0.0.2, 00:03:24, FastEthernet1/0
C 192.168.3.0/24 is directly connected, FastEthernet1/1
S* 0.0.0.0/0 [1/0] via 192.168.3.2
R1#
Routeur R2
R2#sh 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

172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 3 subnets
C 10.0.2.0 is directly connected, FastEthernet2/0
O 10.0.3.0 [110/2] via 10.0.2.1, 00:07:29, FastEthernet2/0
[110/2] via 10.0.0.1, 00:00:08, FastEthernet1/1
C 10.0.0.0 is directly connected, FastEthernet1/1
C 192.168.2.0/24 is directly connected, FastEthernet1/0
O*E2 0.0.0.0/0 [110/1] via 10.0.0.1, 00:00:57, FastEthernet1/1
R2#
Routeur R3
R3#sh 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.2.2 to network 0.0.0.0

172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 3 subnets
C 10.0.2.0 is directly connected, FastEthernet1/1
C 10.0.3.0 is directly connected, FastEthernet1/0
O 10.0.0.0 [110/2] via 10.0.2.2, 00:04:10, FastEthernet1/1
O E2 192.168.2.0/24 [110/20] via 10.0.2.2, 00:20:34, FastEthernet1/1
O*E2 0.0.0.0/0 [110/1] via 10.0.2.2, 00:01:43, FastEthernet1/1
R3#

No comments:

Post a Comment

Post Top Ad