CCNA OSPF experiment

7e061cd5179347c59abccff1ab1c04fa

fc152ff80e1c4d9b8cae160ea4909a39

92896ffb977748d2900b4c9a60270b13

ba427b2907534aee8cea90b17b94bb1f

20c51fa404bf41a9b2798e02186205ad

64bbe61d311343549006596aeb08b985

b3071150497646b596a7de60eb31e273

e6f55436350d4771bec1ed1443c94bf4

9dfcf8cbc54840f7b48076786cde9891

dbf897408242490e97dd91d3f8f421f3

9443a181f9cb45ad82f3c6c06c8b9784

4ed92237c2f3422e9db4394ac3cd0f52

0530275084484be2884fb5bed78d4d5a

Experimental topology

0524c25cf3d2431b930544d3c1835ca3

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)#

b171d5cc81f748c78c6d7430bd986bfa

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)#

bc165c322eae4d13a0446dbfa6243505

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)#

d5e76f1542804bae983e4ea6ea749404

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 #

e37a7bca1bed4207910a0611afff7c6b

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

464353e3b9c54e8e91d9004d61963c1c

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

e0a8fa403694427c885fe8bb7c253ee5

71b05a0359ee4ffea1d0a5532c7e6d32

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#

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325346605&siteId=291194637