0% found this document useful (0 votes)
12 views28 pages

ROUTQGE OSPF V2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views28 pages

ROUTQGE OSPF V2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

ROUTAGE OSPF V2 @ip v4

1 Creer cette topologie

2 Ajouter les interfaces serial pour les trois routeurs


Voici la topologie en générale

On commence par configurer les interfaces

R1

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int g
Router(config)#int gigabitEthernet 0/0
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#no ip domain-lookup
R1(config)#int g
R1(config)#int gigabitEthernet 0/0
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to


up

R1(config-if)#ip add 172.16.1.1 255.255.255.0


R1(config-if)#exit
R1(config)#int s
R1(config)#int serial 0/0/0
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down


R1(config-if)#ip add 172.16.3.1 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#exit
R1(config)#int s
R1(config)#int serial 0/0/1
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down


R1(config-if)#ip add 192.168.10.6 255.255.255.252
R1(config-if)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#sh running-config
Building configuration...

Current configuration : 787 bytes


!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!

no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX1524CB4M-
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
interface GigabitEthernet0/0
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
ip address 172.16.3.1 255.255.255.252
clock rate 64000
!
interface Serial0/0/1
ip address 192.168.10.6 255.255.255.252
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

R1#copy running-config startup-config


Destination filename [startup-config]?
Building configuration...
[OK]
R1#
POUR LE RETOUR R2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#no ip domain-lookup
R1(config)#int gi
R1(config)#int gigabitEthernet 0/0
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to


up

R1(config-if)#ip add 172.16.1.1 255.255.255.0


R1(config-if)#exit
R1(config)#int gigabitEthernet 0/0
R1(config-if)#ip add 172.16.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#
R1 con0 is now available

Press RETURN to get started.

R1>
R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#hostname R2
R2(config)#no ip domain-lookup
R2(config)#int g
R2(config)#int gigabitEthernet 0/0
R2(config-if)#no shutdown
R2(config-if)#ip add 172.16.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int s
R2(config)#int serial 0/0/0
R2(config-if)#no shutdown

R2(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

R2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

R2(config-if)#ip add 172.16.3.2 255.255.255.252


R2(config-if)#exit
R2(config)#int s
R2(config)#int serial 0/0/1
R2(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down


R2(config-if)#ip add 192.168.10.9 255.255.255.252
R2(config-if)#clock rate 64000
R2(config-if)#exit
R2(config)#exit
R2#
%SYS-5-CONFIG_I: Configured from console by console

R2#sh running-config
Building configuration...
Current configuration : 787 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX1524A92Q-
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 172.16.2.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
ip address 172.16.3.2 255.255.255.252
!
interface Serial0/0/1
ip address 192.168.10.9 255.255.255.252
clock rate 64000
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

R2#copy running-config startup-config


Destination filename [startup-config]?
Building configuration...
[OK]
R2#
POUR LE ROUTEUR R3
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip domain-lookup
Router(config)#int g
Router(config)#int gigabitEthernet 0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to


up

Router(config-if)#ip add 192.168.1.1 255.255.255.0


Router(config-if)#exit
Router(config)#int s
Router(config)#int serial 0/0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

Router(config-if)#ip add 192.168.10.10 255.255.255.252


Router(config-if)#exit
Router(config)#int s
Router(config)#int serial 0/0/1
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up

Router(config-if)#ip add
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up

% Incomplete command.
Router(config-if)#ip add 192.168.10.5 255.255.255.252
Router(config-if)#clock rate 64000
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#sh running-config
Building configuration...

Current configuration : 775 bytes


!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX15241LXS-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
ip address 192.168.10.10 255.255.255.252
!
interface Serial0/0/1
ip address 192.168.10.5 255.255.255.252
clock rate 64000
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
en
Router#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Router#
CONFIGURATION DES HOTES
PC1
PC0

PC3
On peut teste localement connecter

On passe à la configuration OSPF

Configuration du routeur R1

Adresse loopback identifiant du routeur dans le réseau

R1

R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface loopback1

R1(config-if)#
%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up


R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console
sh running-config
Building configuration...

Current configuration : 843 bytes


!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX1524CB4M-
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback1
ip address 1.1.1.1 255.255.255.0
!
interface GigabitEthernet0/0
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
ip address 172.16.3.1 255.255.255.252
clock rate 64000
!
interface Serial0/0/1
ip address 192.168.10.6 255.255.255.252
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

R1#
R1#
R2

R2>en
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int loo
R2(config)#int loopback 1

R2(config-if)#
%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

R2(config-if)#ip add 2.2.2.2 255.255.255.0


R2(config-if)#exit
R2(config)#exit
R2#
%SYS-5-CONFIG_I: Configured from console by console

R2#sh running-config
Building configuration...

Current configuration : 843 bytes


!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX1524A92Q-
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback1
ip address 2.2.2.2 255.255.255.0
!
interface GigabitEthernet0/0
ip address 172.16.2.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
ip address 172.16.3.2 255.255.255.252
!
interface Serial0/0/1
ip address 192.168.10.9 255.255.255.252
clock rate 64000
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

R2#

R2
Router>
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int loop
Router(config)#int loopback 1

Router(config-if)#
%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

Router(config-if)#ip add 3.3.3.3 255.255.255.0


Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#sh running-config
Building configuration...

Current configuration : 831 bytes


!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
--More--

R3

Router>
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int loop
Router(config)#int loopback 1

Router(config-if)#
%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

Router(config-if)#ip add 3.3.3.3 255.255.255.0


Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#sh running-config
Building configuration...

Current configuration : 831 bytes


!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
--More--

CONFIGURATION DU ROUTEUR R1 OSPF

Pour retrouver le masque generique

/24 masque

255.255.255.0

11111111.11111111.111111111.00000000

Masque generique 1 devient 0 et 0 devient 1

00000000.00000000.00000000.11111111 0.0.0.255

/30 masque

255.255.255.252

11111111.11111111.11111111.11111100

Son generique

00000000.00000000.00000000.00000011 0.0.0.3

CONFIG DU ROUTEUR R1

R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 10
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 172.16.1.0 0.0.0.255 area 0
R1(config-router)#network 172.16.3.0 0.0.0.3 area 0
R1(config-router)#network 192.168.10.4 0.0.0.3 area 0
R1(config-router)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console
sh running-config
Building configuration...
Current configuration : 1011 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX1524CB4M-
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback1
ip address 1.1.1.1 255.255.255.0
!
interface GigabitEthernet0/0
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
ip address 172.16.3.1 255.255.255.252
clock rate 64000
!
interface Serial0/0/1
ip address 192.168.10.6 255.255.255.252
!
interface Vlan1
no ip address
shutdown
!
router ospf 10
router-id 1.1.1.1
log-adjacency-changes
network 172.16.1.0 0.0.0.255 area 0
network 172.16.3.0 0.0.0.3 area 0
network 192.168.10.4 0.0.0.3 area 0
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

R1#
R1#
R1#
R1#
R1#
R1#clear ip ospf processes
^
% Invalid input detected at '^' marker.
R1#clear ip ospf process
Reset ALL OSPF processes? [no]: yes

R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 10
R1(config-router)#passive-interface gi
R1(config-router)#passive-interface gigabitEthernet 0/0
R1(config-router)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#copy running-config startup-config


Destination filename [startup-config]?
Building configuration...
[OK]
R1#
R1#
Config du routeur R2

R2>en
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 10
R2(config-router)#router-id 2.2.2.2
R2(config-router)#pass
R2(config-router)#passive-interface g0/0
R2(config-router)#network172.16.2.0 0.0.0.255 area 0
^
% Invalid input detected at '^' marker.
R2(config-router)#network 172.16.2.0 0.0.0.255 area 0
R2(config-router)#network 172.16.3.0 0.0.0.3 area 0
R2(config-router)#
00:52:20: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/0 from LOADING to
FULL, Loading Done

R2(config-router)#network 192.168.10.8 0.0.0.3 area 0


R2(config-router)#end
R2#
%SYS-5-CONFIG_I: Configured from console by console

R2#sh running-config
Building configuration...
Current configuration : 1049 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX1524A92Q-
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback1
ip address 2.2.2.2 255.255.255.0
!
interface GigabitEthernet0/0
ip address 172.16.2.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
ip address 172.16.3.2 255.255.255.252
!
interface Serial0/0/1
ip address 192.168.10.9 255.255.255.252
clock rate 64000
!
interface Vlan1
no ip address
shutdown
!
router ospf 10
router-id 2.2.2.2
log-adjacency-changes
passive-interface GigabitEthernet0/0
network 172.16.2.0 0.0.0.255 area 0
network 172.16.3.0 0.0.0.3 area 0
network 192.168.10.8 0.0.0.3 area 0
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

R2#
R2#
R2#
R2#
R2#
R2#
R2#
R2#
R2#
R2#
R2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: yes

R2#
00:56:04: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/0 from FULL to DOWN,
Neighbor Down: Adjacency forced to reset

00:56:04: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/0 from FULL to DOWN,
Neighbor Down: Interface down or detached

R2#
00:56:09: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/0 from LOADING to
FULL, Loading Done

POUR LE ROUTEUR R3
Router>
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 10
Router(config-router)#router-id 3.3.3.3
Router(config-router)#passi
Router(config-router)#passive-interface g0/0
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#network 192.168.10.4 0.0.0.3 area 0
Router(config-router)#
01:01:08: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/1 from LOADING to
FULL, Loading Done

Router(config-router)#network 192.168.10.8 0.0.0.3 area 0


Router(config-router)#
01:01:30: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial0/0/0 from LOADING to
FULL, Loading Done

Router(config-router)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#copy running-config
% Incomplete command.
Router#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Router#clear ip ospf process
Reset ALL OSPF processes? [no]: yes

Router#
01:02:52: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial0/0/0 from FULL to DOWN,
Neighbor Down: Adjacency forced to reset

01:02:52: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial0/0/0 from FULL to DOWN,
Neighbor Down: Interface down or detached

01:02:52: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/1 from FULL to DOWN,
Neighbor Down: Adjacency forced to reset

01:02:52: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/1 from FULL to DOWN,
Neighbor Down: Interface down or detached

Router#
01:02:56: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial0/0/0 from LOADING to
FULL, Loading Done

01:03:02: %OSPF-5-ADJCHG: Process 10, Nbr 1.1.1.1 on Serial0/0/1 from LOADING to


FULL, Loading Done

Router#sh ip route
Codes: L - local, 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, E - EGP
i - IS-IS, 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 not set

3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


C 3.3.3.0/24 is directly connected, Loopback1
L 3.3.3.3/32 is directly connected, Loopback1
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
O 172.16.1.0/24 [110/65] via 192.168.10.6, 00:02:44, Serial0/0/1
O 172.16.2.0/24 [110/65] via 192.168.10.9, 00:02:25, Serial0/0/0
O 172.16.3.0/30 [110/128] via 192.168.10.6, 00:02:25, Serial0/0/1
[110/128] via 192.168.10.9, 00:02:25, Serial0/0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0
192.168.10.0/24 is variably subnetted, 4 subnets, 2 masks
--More--Router>

You might also like