You are on page 1of 4

OSPF

R1(config)#int fa0/0

R1(config-if)#ip add 192.168.10.1 255.255.255.240

R1(config-if)#no sh

R1(config-if)#int s1/0

R1(config-if)#ip add 10.0.0.1 255.255.255.252

R1(config-if)#no sh

R1(config-if)#exit

R2#config t

R2(config)#int fa0/0

R2(config-if)#ip add 192.168.10.2 255.255.255.240

R2(config-if)#no sh

R2(config)#int loopback 1

R2(config-if)#ip add 2.2.2.2 255.255.255.0


R3(config)#int s1/0

R3(config-if)#ip add 10.0.0.2 255.255.255.252

R3(config-if)#no sh

R3(config-if)#int s1/1

R3(config-if)#ip add 10.0.0.5 255.255.255.252

R3(config-if)#no sh

R4#config t

R4(config)#int s1/1

R4(config-if)#ip add 10.0.0.6 255.255.255.252

R4(config-if)#no sh

Enable OSPF on router R1, R2, R3 & R4

R1#config t

R1(config)#router ospf 1

R1(config-router)#network 192.168.10.0 0.0.0.15 area 0

R1(config-router)#network 10.0.0.0 0.0.0.3 area 0

R2(config)#router ospf 1
R2(config-router)#network 2.2.2.0 0.0.0.255 area 0

R2(config-router)#network 192.168.10.0 0.0.0.15 area 0

R3(config)#router ospf 1

R3(config-router)#network 10.0.0.0 0.0.0.3 area 0

R3(config-router)#network 10.0.0.4 0.0.0.3 area 1

R4(config)#router ospf 1

R4(config-router)#network 10.0.0.4 0.0.0.3 area 1

R1(config)#int loopback 1

R1(config-if)#ip add 1.1.1.1 255.255.255.0

R1(config)#router ospf 1
R1(config-router)#network 1.1.1.0 0.0.0.255 area 0

R3(config)#int loopback 1

R3(config-if)#ip add 3.3.3.3 255.255.255.0

R3(config-if)#exit

R3(config)#int loopback 2

R3(config-if)#ip add 5.5.5.5 255.255.255.0

R3(config-if)#exit

R3(config)#router ospf 1

R3(config-router)#network 5.5.5.0 0.0.0.255 area 1

R3(config-router)#network 3.3.3.0 0.0.0.255 area 0

R4(config)#int loopback 1

R4(config-if)#ip add 4.4.4.4 255.255.255.0

R4(config-if)#exit

R4(config)#router ospf 1

R4(config-router)#network 4.4.4.0 0.0.0.255 area 1

Verification

#SH IP PROTOCOLS

#Sh ip route

O = INTRA AREA ROUTE.

O IA = INTER AREA ROUTE.

#Sh ip ospf database

#sh ip ospf neighbour

Change the RID of router .

R1(config)#router ospf 1

R1(config-router)#router-id 0.0.0.1

Reload or use "clear ip ospf process" command, for this to take effect

R1(config-router)#end

R1#clear ip ospf process

Verify

#Sh ip ospf database


R2#sh ip ospf database

OSPF Router with ID (192.16.10.2) (Process ID 1)

Router Link States (Area 0) LSA1

Link ID ADV Router Age Seq# Checksum Link count

0.0.0.1 0.0.0.1 55 0x80000004 0x008A5B 5

10.0.0.5 10.0.0.5 449 0x80000006 0x00024D 3

192.16.10.2 192.16.10.2 20 0x80000006 0x0099C2 2

Net Link States (Area 0) LSA 2

Link ID ADV Router Age Seq# Checksum

192.168.20.2 192.16.10.2 61 0x80000001 0x00A55A

Summary Net Link States (Area 0) LSA3

Link ID ADV Router Age Seq# Checksum

4.4.4.4 10.0.0.5 1639 0x80000001 0x00E4F7

5.5.5.5 10.0.0.5 1405 0x80000001 0x0034E4

10.0.0.4 10.0.0.5 531 0x80000002 0x00D40D

You might also like