拓扑图:
配置终端IP:
Pc1:
Pc2:
Pc3:
配置R1:
IP的配置:
Ethernet0/0/0:
[R1]interface Ethernet0/0/0
[R1-Ethernet0/0/0]ip address 172.16.1.1 24
Serial0/0/0:
[R1-Ethernet0/0/0]interface Serial0/0/0
[R1-Serial0/0/0]ip address 192.168.12.1 24
Serial0/0/1:
[R1]interface Serial0/0/1
[R1-Serial0/0/1]ip address 192.168.15.1 24
NextHop的配置:
[R1]ip route-static 10.1.1.0 24 192.168.12.2
[R1]ip route-static 172.16.2.0 24 192.168.15.2
配置R2:
IP的配置:
Ethernet0/0/0:
[R2]interface Ethernet0/0/0
[R2-Ethernet0/0/0]ip address 10.1.1.1 24
Serial0/0/0:
[R2-Ethernet0/0/0]interface Serial0/0/0
[R2-Serial0/0/0]ip address 192.168.12.2 24
NextHop的配置:
[R2]ip route-static 172.16.1.0 24 192.168.12.1
[R2]ip route-static 172.16.2.0 24 192.168.12.1
配置R3:
IP的配置:
Ethernet0/0/0:
[R3]interface Ethernet0/0/0
[R3-Ethernet0/0/0]ip address 172.16.2.1 24
Serial0/0/0:
[R3-Ethernet0/0/0]interface Serial0/0/0
[R3-Serial0/0/0]ip address 192.168.15.2 24
NextHop的配置:
[R3]ip route-static 172.16.1.0 24 192.168.15.1
[R3]ip route-static 10.1.1.0 24 192.168.15.1
拓展:
比较copper线与Serial线的区别:
拓扑图:
终端IP的配置:
Pc1:
Pc2:
Pc3:
Pc4:
路由器的配置:
R1:
Ethernet0/0/0:
[R1]int Ethernet0/0/0
[R1-Ethernet0/0/0]ip address 172.16.1.1 24
Serial0/0/0:
[R1-Ethernet0/0/0]int Serial0/0/0
[R1-Serial0/0/0]ip address 192.168.12.1 24
NextHop的配置:
[R1]ip rou 10.1.1.0 24 192.168.12.2
R2:
Ethernet0/0/0:
[Huawei]int Ethernet0/0/0
[Huawei-Ethernet0/0/0]ip address 10.1.1.1 24
Serial0/0/0:
[Huawei-Ethernet0/0/0]int Serial0/0/0
[Huawei-Serial0/0/0]ip address 192.168.12.2 24
NextHop的配置:
[R3]ip rou 172.16.1.0 24 192.168.12.1
R3:
Ethernet0/0/0:
[R3]int Ethernet0/0/0
[R3-Ethernet0/0/0]ip address 172.16.2.1 24
Ethernet0/0/1:
[R3]int e0/0/1
[R3-Ethernet0/0/1]ip address 192.168.15.1 24
NextHop的配置:
[R3]ip rou 10.1.2.0 24 192.168.15.2
R4:
Ethernet0/0/0:
[R4]int Ethernet0/0/0
[R4-Ethernet0/0/0]ip address 10.1.2.1 24
Ethernet0/0/1:
[R4-Ethernet0/0/0]int e0/0/1
[R4-Ethernet0/0/1]ip address 192.168.15.2 24
NextHop的配置:
[R4]ip rou 172.16.2.0 24 192.168.15.1
区别总结:
区别一:
当在配置NextHop时,
将ip rou 10.1.1.0 24 192.168.12.2 改为ip rou 10.1.1.0 24 s0/0/0,及改变下一跳的配置类型,将下一跳的端口IP改为下一跳的端口号后,会发现连接Serial线的,终端设备通信情况不变,而连接copper线的,终端设备将无法通信。
区别二:
当配置NextHop都为端口IP时,
Serial线:全程可通信。
copper线:终端设备无法与直连路由器的转发端口通信。