Routing Protocols
(OSPF Configuration
In A Single Area)
Objective
Understanding the Routing Updates using the Open Shortest Path First (OSPF) in a single area.
The demonstrations include:
- OSPF configuration in a point-to-point topology.
- OSPF configuration in a broadcast-multiaccess environment.
i. Point-to-Point Topology
The specifications of point-to-point topology are
- Router dynamically detects its neighboring router using the hello packets.
- No Election: Adjacency is automatic as soon as the two routers can communicate.
- OSPF packets are always sent as a multicast to 224.0.0.5
Diagram
Procedure
- Configuring & Assigning the IP addresses on the routers R1 & R2.
- Check the routing table on both the routers.
- Enable the OSPF protocol on both routers so that hosts on the both routers can communicate with each other.
- Verifying the Routing protocols on the Router.
- Check the routing table on both the routers after enabling the OSPF on both sides.
- Verifying the OSPF neighbors on the routers.
- Verifying the OSPF interfaces on the routers.
- Verifying the OSPF database on the routers.
- Verifying the connection of both hosts.
Configuration
Step 1(A): Assigning the IP addresses on the Router R1.
R1(config)#interface serial 0
R1(config-if)#ip address 15.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#clock rate 64000 (Clock Rate will set only DCE Interface)
R1(config-if)#exit
R1(config)#interface ethernet 0
R1(config-if)#ip address 10.0.0.20 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#end
Step 1(B): Assigning the IP addresses on the Router R2.
R2(config)#interface serial 0
R2(config-if)#ip address 15.0.0.2 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#end
R2(config)#interface ethernet 0
R2(config-if)#ip address 20.0.0.2 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
Step 2(A): Check the Routing table of the Router R1.
RA#sh ip route
C 10.0.0.0/8 is directly connected, Ethernet0
C 15.0.0.0/8 is directly connected, Serial0
Step 2(B): Check the Routing table of the Router R2.
RB#sh ip route
C 20.0.0.0/8 is directly connected, Ethernet0
C 15.0.0.0/8 is directly connected, Serial0
Step 3(A): Enable the OSPF protocol on the Router R1.
RA(config)#router ospf 64
RA(config-router)#network 10.0.0.0 0.255.255.255 area 0 (Network to be advertised)
RA(config-router)#network 15.0.0.0 0.255.255.255 area 0 (Network to be advertised)
Step 3(B): Enable the OSPF protocol on the Router R2.
RB(config)#router ospf 64
RB(config-router)#network 15.0.0.0 0.255.255.255 area 0 (Network to be advertised)
RB(config-router)#network 20.0.0.0 0.255.255.255 area 0 (Network to be advertised)
Step 4(A): Check the Routing Protocol on the Router R1.
RA#show ip protocols
Routing Protocol is "ospf 64"
Redistributing: ospf 64
Routing for Networks:
10.0.0.0
15.0.0.0
Routing Information Sources:
Gateway Distance Last Update
20.0.0.20 110 00:10:52
Distance: (default is 110)
Step 4(B): Check the Routing Protocol on the Router R2.
RB#show ip protocols
Routing Protocol is "ospf 64"
Redistributing: ospf 64
Routing for Networks:
15.0.0.0
20.0.0.0
Routing Information Sources:
Gateway Distance Last Update
15.0.0.1 110 00:12:17
Distance: (default is 110)
Step 5(A): Check the Routing table of the Router R2 after enabling OSPF.
RA#sh ip route
O 20.0.0.0/8 [110/74] via 15.0.0.2, 00:22:17 , Serial0
C 10.0.0.0/8 is directly connected, Ethernet0
C 15.0.0.0/8 is directly connected, Serial0
Step 5(B): Check the Routing table of the Router R2 after enabling OSPF.
RB#sh ip route
C 20.0.0.0/8 is directly connected, Ethernet0
O 10.0.0.0/8 [110/74] via 15.0.0.1, 00:20:57 , Serial0
C 15.0.0.0/8 is directly connected, Serial0
Step 6(A): Verifying the OSPF neighbors on the Router R1.
RA#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
20.0.0.20 1 FULL/ - 00:00:36 15.0.0.2 Serial0
Step 6(B): Verifying the OSPF neighbors on the Router R2.
RB#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
15.0.0.1 1 FULL/ - 00:00:36 15.0.0.1 Serial0
Step 7(A): Verifying the OSPF interfaces on the Router R1.
RA#show ip ospf interface
Ethernet0 is up, line protocol is up
Internet Address 10.0.0.20/8, Area 0
Process ID 64, Router ID 15.0.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR , Priority 1
Designated Router (ID) 15.0.0.1, Interface address 10.0.0.20
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<Output Omitted>
Serial0 is up, line protocol is up
Internet Address 15.0.0.1/8, Area 0
Process ID 64, Router ID 15.0.0.1, Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<Output Omitted>
Step 7(B): Verifying the OSPF interfaces on the Router R2.
RB#show ip ospf interface
Ethernet0 is up, line protocol is up
Internet Address 20.0.0.20/8, Area 0
Process ID 64, Router ID 20.0.0.20, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR , Priority 1
Designated Router (ID) 20.0.0.20, Interface address 20.0.0.20
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<Output Omitted>
Serial0 is up, line protocol is up
Internet Address 15.0.0.2/8, Area 0
Process ID 64, Router ID 20.0.0.20, Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<Output Omitted>
Step 8(A): Verifying the OSPF database on the Router R1.
RA#show ip ospf database
OSPF Router with ID (15.0.0.1) (Process ID 64)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
15.0.0.1 15.0.0.1 2040 0x80000004 0x7C99 3
20.0.0.20 20.0.0.20 708 0x80000006 0x9957 3
Step 8(B): Verifying the OSPF database on the Router R2.
RB#show ip ospf database
OSPF Router with ID (20.0.0.20) (Process ID 64)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
15.0.0.1 15.0.0.1 105 0x80000005 0x7A9A 3
20.0.0.20 20.0.0.20 820 0x80000006 0x9957 3
Step 9: Verifying the connection of Host ‘A’ & Host ‘B’.
C:\>ping 20.0.0.1
Pinging 20.0.0.1 with 32 bytes of data:
Reply from 20.0.0.1: bytes=32 time=20ms TTL=254
Reply from 20.0.0.1: bytes=32 time=20ms TTL=254
Reply from 20.0.0.1: bytes=32 time=10ms TTL=254
Reply from 20.0.0.1: bytes=32 time=10ms TTL=254
Ping statistics for 20.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 20ms, Average = 15ms
The specifications of broadcast-multi-access environment are
- Router dynamically detects its neighboring router using the hello packets.
- DR/BDR Election: Adjacency is automatic as soon as the two routers can communicate.
- OSPF packets are always sent as a multicast to 224.0.0.5
Diagram
Procedure
- Configuring & Assigning the IP addresses on the routers R1 & R2.
- Check the routing table on both the routers.
- Enable the OSPF protocol on both routers so that hosts on the both routers can communicate with each other.
- Verifying the Routing protocols on the Router.
- Check the routing table on both the routers after enabling the OSPF on both sides.
- Verifying the OSPF neighbors on the routers.
- Verifying the OSPF interfaces on the routers.
- Verifying the OSPF database on the routers.
Configuration
Step 1(A): Assigning the IP addresses on the Router R1.
R1(config)#interface ethernet 0
R1(config-if)#ip address 10.0.0.10 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#end
Step 1(B): Assigning the IP addresses on the Router R2.
R2(config)#interface ethernet 0
R2(config-if)#ip address 10.0.0.20 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
Step 2(A): Check the Routing table of the Router R1.
RA#sh ip route
C 10.0.0.0/8 is directly connected, Ethernet0
Step 2(B): Check the Routing table of the Router R2.
RB#sh ip route
C 10.0.0.0/8 is directly connected, Ethernet0
Step 3(A): Enable the OSPF protocol on the Router R1.
RA(config)#router ospf 64
RA(config-router)#network 10.0.0.0 0.255.255.255 area 0 (Network to be advertised)
Step 3(B): Enable the OSPF protocol on the Router R2.
RB(config)#router ospf 64
RB(config-router)#network 10.0.0.0 0.255.255.255 area 0 (Network to be advertised)
Step 4(A): Check the Routing Protocol on the Router R1.
RA#show ip protocols
Routing Protocol is "ospf 64"
Redistributing: ospf 64
Routing for Networks:
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 110)
Step 4(B): Check the Routing Protocol on the Router R2.
RB#show ip protocols
Routing Protocol is "ospf 64"
Redistributing: ospf 64
Routing for Networks:
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 110)
Step 5(A): Check the Routing table of the Router R2 after enabling OSPF.
RA#sh ip route
C 10.0.0.0/8 is directly connected, Ethernet0
Step 5(B): Check the Routing table of the Router R2 after enabling OSPF.
RB#sh ip route
C 10.0.0.0/8 is directly connected, Ethernet0
Step 6(A): Verifying the OSPF neighbors on the Router R1.
RA#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.0.0.20 1 FULL/BDR 00:00:30 10.0.0.20 Ethernet0
Step 6(B): Verifying the OSPF neighbors on the Router R2.
RB#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.0.0.10 1 FULL/DR 00:00:32 10.0.0.10 Ethernet0
Step 7(A): Verifying the OSPF interfaces on the Router R1.
RA#show ip ospf interface
Ethernet0 is up, line protocol is up
Internet Address 10.0.0.10/8, Area 0
Process ID 64, Router ID 10.0.0.10, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR , Priority 1
Designated Router (ID) 10.0.0.10, Interface address 10.0.0.10
Backup Designated router (ID) 10.0.0.20, Interface address 10.0.0.20
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<Output Omitted>
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.0.0.20 (Backup Designated Router)
Step 7(B): Verifying the OSPF interfaces on the Router R2.
RB#show ip ospf interface
Ethernet0 is up, line protocol is up
Internet Address 10.0.0.20/8, Area 0
Process ID 64, Router ID 10.0.0.20, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 10.0.0.10, Interface address 10.0.0.10
Backup Designated router (ID) 10.0.0.20, Interface address 10.0.0.20
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.0.0.10 (Designated Router)
Step 8(A): Verifying the OSPF database on the Router R1.
RA#show ip ospf database
OSPF Router with ID (10.0.0.10) (Process ID 64)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.0.0.10 10.0.0.10 754 0x80000002 0xB424 1
10.0.0.20 10.0.0.20 754 0x80000002 0xA01A 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.0.0.10 10.0.0.10 754 0x80000001 0x548B
Step 8(B): Verifying the OSPF database on the Router R2.
RB#show ip ospf database
OSPF Router with ID (10.0.0.20) (Process ID 64)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.0.0.10 10.0.0.10 1061 0x80000002 0xB424 1
10.0.0.20 10.0.0.20 181 0x80000003 0xC11F 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.0.0.10 10.0.0.10 1062 0x80000001 0x548B
No comments:
Post a Comment