Experimental topology
R1(config)#int lo 0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#ex
R1(config)#int f0/0
R1(config-if)#ip add 192.168.12.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#
*Mar 1 00:15:25.539: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:15:26.539: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#do sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.12.1 YES manual up up
Loopback0 1.1.1.1 YES manual up up
R1(config-if)#
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int lo 0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#int f0/0
R2(config-if)#ip add 192.168.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#
*Mar 1 00:17:28.315: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:17:29.315: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config-if)#int f1/0
R2(config-if)#ip add 192.168.23.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#
*Mar 1 00:17:53.699: %LINK-3-UPDOWN: Interface FastEthernet1/0, changed state to up
*Mar 1 00:17:54.699: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
R2(config-if)#do sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.12.2 YES manual up up
FastEthernet1/0 192.168.23.1 YES manual up up
Loopback0 2.2.2.2 YES manual up up
R2(config-if)#
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int lo 0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#int f1/0
R3(config-if)#ip add 192.168.23.2 255.255.255.0
R3(config-if)#no sh
R3(config-if)#do sh p
*Mar 1 00:19:51.587: %LINK-3-UPDOWN: Interface FastEthernet1/0, changed state to up
*Mar 1 00:19:52.587: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
R3(config-if)#do sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet1/0 192.168.23.2 YES manual up up
Loopback0 3.3.3.3 YES manual up up
R3(config-if)#
Verify connectivity with R1 and R3 from R2
R2#ping 192.168.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 20/32/56 ms
R2#ping 192.168.23.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 20/32/44 ms
R2 #
But the lo mouth doesn't work
R1#ping 3.3.3.3 sour
R1#ping 3.3.3.3 source lo 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
.....
Success rate is 0 percent (0/5)
Start configuring routing protocols
R1 #
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 100
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 192.168.12.1 0.0.0.0 area 0
R1(config-router)#end
R1 #
*Mar 1 01:01:21.491: %SYS-5-CONFIG_I: Configured from console by console
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 100
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 192.168.12.2 0.0.0.0 area 0
R2(config-router)#network 2.2.2.2 0.0.0.0 a 0
R2(config-router)#network 192.168.23.1 0.0.0.0 a 1
R3(config)#router ospf 100
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 192.168.23.2 0.0.0.0 a 1
R3(config-router)#network
*Mar 1 01:07:21.891: %OSPF-5-ADJCHG: Process 100, Nbr 2.2.2.2 on FastEthernet1/0 from LOADING to FULL, Loading Done
R3(config-router)#network 3.3.3.3 0.0.0.0 a 1
It can already be seen that the neighbor with the process of 100 is 2.2.2.2 and the status has been up.
Take a look at R1
R1#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/BDR 00:00:37 192.168.12.2 FastEthernet0/0
R1 #
The neighbor relationship has been established, and the status is 2.2.2.2 is the BDR standby election router
On R2, R1 is the main elector
R2#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:37 192.168.12.1 FastEthernet0/0
3.3.3.3 1 FULL/BDR 00:00:37 192.168.23.2 FastEthernet1/0
R2 #
Test from R1 to R3
R1#ping 192.168.23.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/34/44 ms
R1#ping 3.3.3.3 source loopback 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/49/68 ms
R1 #
all good
From the point of view of R2, R3 is a BDR, increase the interface permissions directly connected to R3, and then clear the ospf process
R2(config)#int f1/0
R2(config-if)#ip ospf priority 2
R2(config)#end
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
R2 #
*Mar 1 12:33:51.728: %OSPF-5-ADJCHG: Process 100, Nbr 1.1.1.1 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 12:33:51.764: %OSPF-5-ADJCHG: Process 100, Nbr 3.3.3.3 on FastEthernet1/0 from FULL to DOWN, Neighbor Down: Interface down or detached
R2 #
*Mar 1 12:34:00.112: %OSPF-5-ADJCHG: Process 100, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
*Mar 1 12:34:00.836: %OSPF-5-ADJCHG: Process 100, Nbr 3.3.3.3 on FastEthernet1/0 from LOADING to FULL, Loading Done
R3 is already the primary election route for area 1
Configure the IPV6 interface address
R1(config)#ipv6 unicast-routing
R1(config)#int f0/0
R1(config-if)#ipv6 address 2001:12:12::1/64
R1(config-if)#
R2(config)#ipv6 unicast-routing
R2(config)#int f0/0
R2(config-if)#ipv6 address 2001:12:12::2/64
R2(config-if)#no sh
R2(config-if)#do ping 2001:12:12::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:12:12::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/27/44 ms
R2(config)#int f1/0
R2(config-if)#ipv6 address 2001:23:23::1/64
R2(config-if)#no sh
R3(config)#ipv6 unicast-routing
R3(config)#int f1/0
R3(config-if)#ipv6 ad
R3(config-if)#ipv6 address 2001:23:23::2/64
R3(config-if)#no sh
R3(config-if)#do ping 2001:23:23::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:23:23::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/27/44 ms
R3(config-if)#
Accurately announce IPv6 routing addresses
R1(config)#ipv6 router ospf 200
R1(config-rtr)#router-id 1.1.1.1
R1(config-rtr)#int f0/0
R1(config-if)#ipv6 ospf 200 area 0
The only difference is that IPV6 is configured on the interface and IPV4 is configured on the routing interface
R2(config)#ipv6 router ospf 200
R2(config-rtr)#rou
R2(config-rtr)#router-id 2.2.2.2
R2(config-rtr)#int f0/0
R2(config-if)#ipv6 os
R2(config-if)#ipv6 ospf ?
R2(config-if)#ipv6 ospf 200 area 0
R2(config)#int f1/0
R2(config-if)#ipv6 ospf 200 area 1
R3(config)#ipv6 router ospf 200
R3(config-rtr)#router-id 3.3.3.3
R3(config-rtr)#int f1/0
R3(config-if)#ipv6 ospf 200 area 1
R3(config-if)#e
R3#sh run int f1/0
Building configuration...
Current configuration : 150 bytes
!
interface FastEthernet1/0
ip address 192.168.23.2 255.255.255.0
duplex auto
speed auto
ipv6 address 2001:23:23::2/64
ipv6 ospf 200 area 1
end
View IPv6 neighbors on each route
R1#sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/BDR 00:00:32 3 FastEthernet0/0
R1 #
R2#sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
1.1.1.1 1 FULL/DR 00:00:38 3 FastEthernet0/0
3.3.3.3 1 FULL/BDR 00:00:31 3 FastEthernet1/0
R2 #
R3#sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/DR 00:00:39 4 FastEthernet1/0
Authenticate from R1 to R3
R1#ping 2001:23:23::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:23:23::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/41/48 ms
R1 #
R3#ping 2001:12:12::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:12:12::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/44/48 ms
R3#