How to Configure OSPF in Cisco

 

Configure OSPF in Cisco

R1 Initial Contigure

R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int e0/0
R1(config-if)#no sh
R1(config-if)#ip add
R1(config-if)#ip address
*Apr 4 10:30:32.875: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Apr 4 10:30:34.159: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
R1(config-if)#ip address 192.168.1.1 255.255.255.0

R1(config-if)#ip ospf 10 area 0
R1(config-if)#int e0/1
R1(config-if)#no sh
R1(config-if)#ip add
R1(config-if)#ip address 10.1
*Apr 4 10:30:53.515: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up
R1(config-if)#ip address 10.10.10
*Apr 4 10:30:54.535: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up
R1(config-if)#ip address 10.10.10.1 255.255.255.0
R1(config-if)#ip ospf 10 area 0

R1#

*Apr  4 11:12:28.751: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.2.1 on Ethernet0/1 from LOADING to FULL, Loading Done

R2 Initial Configure

R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int e0/0
R2(config-if)#no sh
R2(config-if)#ip add
R2(config-if)#ip address
*Apr 4 10:32:35.719: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Apr 4 10:32:36.727: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
R2(config-if)#ip address 10.10.10.2 255.255.255.0

R2(config-if)#ip ospf 10 area 0
R2(config-if)#int e0/2
R2(config-if)#no sh
R2(config-if)#ip add
R2(config-if)#ip address
*Apr 4 10:32:56.775: %LINK-3-UPDOWN: Interface Ethernet0/2, changed state to up
*Apr 4 10:32:57.775: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to up
R2(config-if)#ip address 192.168.2.1 255.255.255.0

R2(config-if)#ip ospf 10 area 0

R2#

*Apr  4 11:12:29.699: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.1.1 on Ethernet0/0 from LOADING to FULL, Loading Done

Verification

R1#show ip route

R1#show ip route

Check From PC1

PC1> ping 192.168.2.2
84 bytes from 192.168.2.2 icmp_seq=1 ttl=62 time=13.357 ms
84 bytes from 192.168.2.2 icmp_seq=2 ttl=62 time=8.892 ms
84 bytes from 192.168.2.2 icmp_seq=3 ttl=62 time=3.419 ms
84 bytes from 192.168.2.2 icmp_seq=4 ttl=62 time=13.381 ms
84 bytes from 192.168.2.2 icmp_seq=5 ttl=62 time=7.394 ms

 

Related posts

Leave a Comment