应一个朋友的需求,另外,觉得实际工程中也可能要用到,因此撰写了关于网络两端网段重叠的处理方法的实例文章。
一、拓扑及网段分布如下:
备注:其中的S2016和S2008在此处是作为PC的功能使用的,S2016的IP是74.40.88.200/24缺省网关指向路由器A 74.40.88.254/24 。S2008的IP是74.40.88.1/28 缺省网关指向路由器C 74.40.88.1/28。此2机器的配置不再列出。图中S3100作为普通交换机使用,未任何配置。
二、不用NAT双向映射的试验结果
备注:此时路由器A所在的网段不能是用74.40.88.1-74.40.88.16范围内的IP地址,因为该范围属于74.40.88.0/28。
配置如下:其中红色部分为关键配置
路由器A:
#sysname AR2810-A #cpu-usage cycle 1min #router id 1.1.1.1 #radius scheme system #domain system #local-user admin password cipher .]@USE=B,53Q=^Q`MAF4<1!! service-type telnet terminal level 3 service-type ftp #interface Aux0 async mode flow #interface Ethernet0/0 ip address 74.40.88.254 255.255.255.0 #interface Serial0/0 clock DTECLK1 link-protocol ppp ip address dhcp-alloc #interface Serial2/0 clock DTECLK1 link-protocol ppp #interface Serial3/0 clock DTECLK1 link-protocol ppp #interface NULL0 #info-center synchronous #FTP server enable #ip route-static 74.40.88.0 255.255.255.240 74.40.88.253 preference 60 #user-interface con 0 idle-timeout 0 0 user-interface aux 0 user-interface vty 0 4 authentication-mode scheme ? #return |
路由器B:
#sysname AR2810-B #cpu-usage cycle 1min #router id 2.2.2.2 #radius scheme system #domain system #local-user admin password cipher .]@USE=B,53Q=^Q`MAF4<1!! service-type telnet terminal level 3 service-type ftp #interface Aux0 async mode flow #interface Ethernet0/0 ip address 74.40.88.253 255.255.255.0 arp-proxy enable #interface Serial0/0 ? link-protocol ppp ip address 192.168.1.1 255.255.255.252 #interface NULL0 #info-center synchronous #FTP server enable #ip route-static 74.40.88.0 255.255.255.240 192.168.1.2 preference 60 #user-interface con 0 idle-timeout 0 0 user-interface aux 0 user-interface vty 0 4 authentication-mode scheme #return |
路由器C:
#sysname AR1810-C #cpu-usage cycle 1min #router id 3.3.3.3 #radius scheme system #domain system #local-user admin password cipher .]@USE=B,53Q=^Q`MAF4<1!! service-type telnet terminal level 3 service-type ftp #interface Aux0 async mode flow #interface Ethernet0/0 ip address 74.40.88.1 255.255.255.240 #interface Serial0/0 clock DTECLK1 link-protocol ppp ip address 192.168.1.2 255.255.255.252 #interface NULL0 #info-center synchronous #FTP server enable #ip route-static 74.40.88.0 255.255.255.0 192.168.1.1 preference 60 #user-interface con 0 idle-timeout 0 0 user-interface aux 0 user-interface vty 0 4 authentication-mode scheme #return |
以上配置经测试可以互通:
S2016(PC1): [S2016]ping 74.40.88.2 PING 74.40.88.2: 56 data bytes, press CTRL+C to break Reply from 74.40.88.2: bytes=56 Sequence=1 ttl=253 time = 91 ms Reply from 74.40.88.2: bytes=56 Sequence=2 ttl=253 time = 103 ms Reply from 74.40.88.2: bytes=56 Sequence=3 ttl=253 time = 86 ms Reply from 74.40.88.2: bytes=56 Sequence=4 ttl=253 time = 91 ms Reply from 74.40.88.2: bytes=56 Sequence=5 ttl=253 time = 93 ms — 74.40.88.2 ping statistics — 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 86/92/103 ms [S2016] S2008(PC2): [S2008]ping 74.40.88.200 PING 74.40.88.200: 56 data bytes, press CTRL+C to break Reply from 74.40.88.200: bytes=56 Sequence=1 ttl=253 time = 91 ms Reply from 74.40.88.200: bytes=56 Sequence=2 ttl=253 time = 94 ms Reply from 74.40.88.200: bytes=56 Sequence=3 ttl=253 time = 87 ms Reply from 74.40.88.200: bytes=56 Sequence=4 ttl=253 time = 90 ms Reply from 74.40.88.200: bytes=56 Sequence=5 ttl=253 time = 94 ms — 74.40.88.200 ping statistics — 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 87/91/94 ms [S2008] |
我们一直都在努力坚持原创.......请不要一声不吭,就悄悄拿走。
我原创,你原创,我们的内容世界才会更加精彩!
【所有原创内容版权均属TechTarget,欢迎大家转发分享。但未经授权,严禁任何媒体(平面媒体、网络媒体、自媒体等)以及微信公众号复制、转载、摘编或以其他方式进行使用。】
微信公众号

TechTarget
官方微博

TechTarget中国
作者
相关推荐
-
关于网络两端网段重叠的处理方法(下)
应一个朋友的需求,另外,觉得实际工程中也可能要用到,因此撰写了关于网络两端网段重叠的处理方法的实例文章。