Now that all devices are connected we can start by configuring OSPF (so that each router knows about each other network). (On the R1 we are going to use the process ID of 1)
R1(config)#router ospf 1
R1(config-router)#network 10.1.1.0 0.0.0.3 area 0
R1(config-router)#network 10.2.2.0 0.0.0.3 area 0
R1(config-router)#network 209.165.200.224 0.0.0.31 area 0
Task 5
Next we will move to R2 and configure OSPF the output is:
R2(config)#router ospf 1
R2(config-router)#network 192.168.10.0 0.0.0.255 area 0
R2(config-router)#network 10.1.1.0 0.0.0.3 area 0
Task 6
The last router (R3) is ready to be configured with OSPF (Again remember to use the process ID of 1)
R3(config)#router ospf 1
R3(config-router)#network 10.2.2.0 0.0.0.3 area 0
R3(config-router)#network 192.168.30.0 0.0.0.255 area 0
Task 7
With OSPF setup you want to verify that you have full network connectivity (Every device should be able to ping each other) This is R1’s output of the command show ip route.
R1#show 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 not set
O 192.168.30.0/24 [110/65] via 10.2.2.1, 00:00:31, Serial1/2
O 192.168.10.0/24 [110/65] via 10.1.1.1, 00:00:31, Serial1/1
209.165.200.0/29 is subnetted, 1 subnets
C 209.165.200.224 is directly connected, Loopback0
10.0.0.0/30 is subnetted, 2 subnets
C 10.2.2.0 is directly connected, Serial1/2
C 10.1.1.0 is directly connected, Serial1/1
R1#
Task 8
This output of R2 when issuing the command show ip route also R2.
R2#show 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 not set
O 192.168.30.0/24 [110/129] via 10.1.1.2, 00:01:08, Serial1/0
C 192.168.10.0/24 is directly connected, FastEthernet0/0
209.165.200.0/32 is subnetted, 1 subnets
O 209.165.200.225 [110/65] via 10.1.1.2, 00:01:08, Serial1/0
10.0.0.0/30 is subnetted, 2 subnets
O 10.2.2.0 [110/128] via 10.1.1.2, 00:01:08, Serial1/0
C 10.1.1.0 is directly connected, Serial1/0
R2#
Task 9
This output of R3 when issuing the command show ip route also R3.
R3#show 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 not set
C 192.168.30.0/24 is directly connected, FastEthernet0/0
O 192.168.10.0/24 [110/129] via 10.2.2.2, 00:01:33, Serial1/0
209.165.200.0/32 is subnetted, 1 subnets
O 209.165.200.225 [110/65] via 10.2.2.2, 00:01:33, Serial1/0
10.0.0.0/30 is subnetted, 2 subnets
C 10.2.2.0 is directly connected, Serial1/0
O 10.1.1.0 [110/128] via 10.2.2.2, 00:01:33, Serial1/0
R3#
Task 10
Type the command show interface serial1/1 in R1 notice in the output the encapsulation type, which is HDLC.
R1#show interface serial1/1
Serial1/1 is up, line protocol is up
Hardware is M4T
Internet address is 10.1.1.2/30
MTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, crc 16, loopback not set
Keepalive set (10 sec)
...........
This is the default encapsulation on serial interfaces with Cisco Routers.
To change the encapsulation from HDLC to PPP on R1, go to the interface of the serial connection and type encapsulation ppp.
R1(config)#interface serial 1/1
R1(config-if)#encapsulation ppp
Notice how OSPF is going down because of the different encapsulation. R2 is still running HDLC, therefore, the link is down.
R1(config-if)#
*Mar 1 00:22:40.431: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.10.1 on Serial1/1 from FULL to DOWN, Neighbor Down: Interface down or detached
R1(config-if)#
*Mar 1 00:22:43.419: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
Change R2 to the proper encapsulation type so communication between the routers are again connected and to get OSPF working again.
This example on R2 notice that once the encapsulation was changed to PPP the link went back up and OSPF found an adjacent neighbor.
R2(config-if)#
*Mar 1 00:24:43.471: %OSPF-5-ADJCHG: Process 1, Nbr 209.165.200.225 on Serial1/0 from LOADING to FULL, Loading Done
R2(config-if)#
*Mar 1 00:24:46.087: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R2(config-if)#
Task 11
Now we can also give the encapsulation protocol (PPP) some authentication.
To set up PAP the username and password must match the other router. So for this example, R1’s username is R1 and the password is knowing.
R1(config)#username R2 password knowing
R1(config)#interface Serial1/1
R1(config-if)#ppp authentication pap
And for R2, we have :
R2(config)#username R1 password knowing
R2(config)#interface Serial1/0
R2(config-if)#ppp authentication pap
Task 12
Check the connectivity of 2 PCs.
PC-1> ping 192.168.30.10
84 bytes from 192.168.30.10 icmp_seq=1 ttl=61 time=52.507 ms
84 bytes from 192.168.30.10 icmp_seq=2 ttl=61 time=36.504 ms
84 bytes from 192.168.30.10 icmp_seq=3 ttl=61 time=38.005 ms
84 bytes from 192.168.30.10 icmp_seq=4 ttl=61 time=39.005 ms
84 bytes from 192.168.30.10 icmp_seq=5 ttl=61 time=52.507 ms
PC-1>