R1配置
Router(config)#ho r1
r1(config)#int lo0
r1(config-if)#ip add 1.1.1.1 255.255.255.0
r1(config-if)#int e0/0
r1(config-if)#ip ad 61.134.1.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#int s1/2
r1(config-if)#ip ad 192.168.0.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#int s1/3
r1(config-if)#ip ad 172.16.0.1 255.255.255.0
r1(config-if)#no sh
r1#sh ip int bri
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 61.134.1.1 YES manual up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 192.168.0.1 YES manual up up
Serial1/3 172.16.0.1 YES manual up up
Serial3/0 unassigned YES unset administratively down down
Serial3/1 unassigned YES unset administratively down down
Serial3/2 unassigned YES unset administratively down down
Serial3/3 unassigned YES unset administratively down down
Loopback0 1.1.1.1 YES manual up up
r1#
R2配置
r2(config)#int lo0
r2(config-if)#ip ad 2.2.2.2 255.255.255.0
r2(config-if)#int e0/0
r2(config-if)#ip add 61.134.1.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#int s2/1
r2(config-if)#ip add 192.168.0.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#int s2/3
r2(config-if)#ip add 10.0.0.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#^Z
r2#sh ip int bri
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 61.134.1.2 YES manual up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
Serial2/0 unassigned YES unset administratively down down
Serial2/1 192.168.0.2 YES manual up up
Serial2/2 unassigned YES unset administratively down down
Serial2/3 10.0.0.2 YES manual up up
Serial3/0 unassigned YES unset administratively down down
Serial3/1 unassigned YES unset administratively down down
Serial3/2 unassigned YES unset administratively down down
Serial3/3 unassigned YES unset administratively down down
Loopback0 2.2.2.2 YES manual up up
r2#
R3配置
r3(config)#int lo0
r3(config-if)#ip add 3.3.3.3 255.255.255.0
r3(config-if)#int e0/0
r3(config-if)#ip add 61.134.1.3 255.255.255.0
r3(config-if)#no sh
r3(config-if)#int s3/2
r3(config-if)#ip add 10.0.0.3 255.255.255.0
r3(config-if)#int s3/1
r3(config-if)#ip add 172.16.0.3 255.255.255.0
r3(config-if)#no sh
r3(config-if)#int
r3(config-if)#int s3/2
r3(config-if)#no sh
r3(config-if)#^Z
r3#sh ip int bri
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 61.134.1.3 YES manual up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
Serial3/0 unassigned YES unset administratively down down
Serial3/1 172.16.0.3 YES manual up up
Serial3/2 10.0.0.3 YES manual up up
Serial3/3 unassigned YES unset administratively down down
Loopback0 3.3.3.3 YES manual up up
测试连通性
r1#ping 192.168.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/42/64 ms
打开debug看更为详细的ping的过程
r1#debug ip icmp
ICMP packet debugging is on
r1#ping 192.168.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/29/48 ms
r1#
00:11:13: ICMP: echo reply rcvd, src 192.168.0.2, dst 192.168.0.1
00:11:13: ICMP: echo reply rcvd, src 192.168.0.2, dst 192.168.0.1
00:11:13: ICMP: echo reply rcvd, src 192.168.0.2, dst 192.168.0.1
00:11:13: ICMP: echo reply rcvd, src 192.168.0.2, dst 192.168.0.1
00:11:13: ICMP: echo reply rcvd, src 192.168.0.2, dst 192.168.0.1
关闭debug信息
r1#u all
All possible debugging has been turned off