Router#show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0 192.168.1.1 YES manual up up GigabitEthernet0/1 unassigned YES unset administratively down down GigabitEthernet0/2 unassigned YES unset administratively down down GigabitEthernet0/3 unassigned YES unset administratively down down
Router#ping 192.168.1.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 2/2/4 ms
(2)路由器R2
1 2 3 4 5 6
Router#show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0 192.168.1.3 YES manual up up GigabitEthernet0/1 unassigned YES unset administratively down down GigabitEthernet0/2 unassigned YES unset administratively down down GigabitEthernet0/3 unassigned YES unset administratively down down
# R1: 通过出接口方式配置路由 ip route 192.168.1.0 255.255.255.0 Gi0/0
Router#show ip route Codes: L - local, 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, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.0.0/24 is directly connected, GigabitEthernet0/0 L 192.168.0.1/32 is directly connected, GigabitEthernet0/0 S 192.168.1.0/24 is directly connected, GigabitEthernet0/0
(2)R2 路由
仅仅配置了2个接口的IP地址
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Router#show ip route Codes: L - local, 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, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.0.0/24 is directly connected, GigabitEthernet0/0 L 192.168.0.2/32 is directly connected, GigabitEthernet0/0 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.1.0/24 is directly connected, GigabitEthernet0/1 L 192.168.1.2/32 is directly connected, GigabitEthernet0/1
Router>ping 192.168.0.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 3/4/7 ms
此时可以观察到R1路由与R3路由实现了互通。
3.3 ARP 变化
当我们R1与R3未进行通信时,此时R3的ARP表的情况是这样的:
1 2 3 4
Router#show ip arp Protocol Address Age (min) Hardware Addr Type Interface Internet 192.168.1.2 62 506e.b500.1701 ARPA GigabitEthernet0/0 Internet 192.168.1.3 - 502e.cd00.1800 ARPA GigabitEthernet0/0
当完成上述实例通信时,两者互通,此时查看R3的ARP表如下:
1 2 3 4 5
Router#show ip arp Protocol Address Age (min) Hardware Addr Type Interface Internet 192.168.0.1 1 506e.b500.1701 ARPA GigabitEthernet0/0 Internet 192.168.1.2 65 506e.b500.1701 ARPA GigabitEthernet0/0 Internet 192.168.1.3 - 502e.cd00.1800 ARPA GigabitEthernet0/0