主页 PC知识 网管技术 黑客帝国 安全技术 开放系统 程序设计 搜索 技术论坛

 

相关联接
 
RHU本级分类

路由技术
交换技术
网管天地
网络攻防
安全资讯
OICQ攻略
无线技术
解决方案

 
RHU阅读排行
·MAC地址三步全接触之巧“取”MAC
·WLAN知识扫盲 无线局域网名词解析
·一招技巧在手 轻轻松松切换IP地址
·巧妙运用 IP安全策略保护重要数据
·网络最经典命令行 安全工作者的必杀技
·SQL Server数据库实用小技巧集合
·SQL Server日志清除的两种方法
·SQL Server中删除重复数据的几个方法
·用“运行为”保护好管理员账户
·化繁为简 网络参数设置切换全接触

 
 
RHU最新文章
·路由器固件在升级过程中损坏如何修复
·IPv4网络和IPv6网络互连技术对比介绍
·GMail Labs新成果:直接把邮件转换成Google文档
·虚拟世界的专属通道—VPN
·思科路由器出现崩溃的原因解析
·Cisco网络模拟器GNS3发布v0.6版本
·网管心得:网络丢包究竟为何
·经验:网络连接不稳 有可能源自线缆短路
·应用交付替负载均衡 欲与路由分庭抗礼
·动态和静态IP地址引起的VPN问题

 
 
RHU相关搜索









 
 
RHU广而告之

 
 
>您的位置:首页 -> 网管技术-> 网管天地
实战:关于网络两端网段重叠的处理方法

作者:RHU-TAC编辑员 来自:RHU网络采集 时间:2008-10-5 双击滚屏 收藏本页 字体:


点击 查看RHU2004全年文章


一、拓扑及网段分布如下:
  备注:其中的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]
三、采用NAT方式的配置:

  备注:此时2端的地址使用无试验2的限制。但是需要额外的地址池。这样分配给74.40.88.0/24段的地址池是;172.16.0.0/24;分配给74.40.88.0/28网段的地址池是10.0.0.0/28。

  这样当PC1访问PC2的时候用10.0.0.2(最后一个IP字节相对应),同理PC2访问PC1的时候用172.16.0.200(最后一个IP字节相对应)。
  配置如下:其中红色部分为关键配置
  路由器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 10.0.0.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
  #nat static inside ip 74.40.88.1 74.40.88.254 global ip 172.16.0.0 255.255.255.0
  #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
  #                                        ?
  interface Serial0/0
  link-protocol ppp
  ip address 192.168.1.1 255.255.255.252
  nat outbound static
  #interface NULL0
  #info-center synchronous
  #FTP server enable
  #
  ip route-static 10.0.0.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
  #nat static inside ip 74.40.88.1 74.40.88.15 global ip 10.0.0.0 255.255.255.240
  #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
  nat outbound static
  #interface NULL0
  #info-center synchronous
  #FTP server enable
  #ip route-static 172.16.0.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 10.0.0.2
  PING 10.0.0.2: 56  data bytes, press CTRL+C to break
  Reply from 10.0.0.2: bytes=56 Sequence=1 ttl=253 time = 91 ms
  Reply from 10.0.0.2: bytes=56 Sequence=2 ttl=253 time = 100 ms
  Reply from 10.0.0.2: bytes=56 Sequence=3 ttl=253 time = 88 ms
  Reply from 10.0.0.2: bytes=56 Sequence=4 ttl=253 time = 91 ms
  Reply from 10.0.0.2: bytes=56 Sequence=5 ttl=253 time = 93 ms

  --- 10.0.0.2 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 88/92/100 ms

  <S2016>
  S2008(PC2):
  <S2008>ping 172.16.0.200
  PING 172.16.0.200: 56  data bytes, press CTRL+C to break
  Reply from 172.16.0.200: bytes=56 Sequence=1 ttl=252 time = 90 ms
  Reply from 172.16.0.200: bytes=56 Sequence=2 ttl=252 time = 93 ms
  Reply from 172.16.0.200: bytes=56 Sequence=3 ttl=252 time = 111 ms
  Reply from 172.16.0.200: bytes=56 Sequence=4 ttl=252 time = 112 ms
  Reply from 172.16.0.200: bytes=56 Sequence=5 ttl=252 time = 108 ms

  --- 172.16.0.200 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 90/102/112 ms

  <S2008>

  四、采用主机路由条目指定
  备注:此方法即在PC,及经过的所有路径上配置相应的主机路由,因配置较点较多工作量大,也容易出问题并且不利于排错,此处不做研究。
  tu.jpg (15.21 KB) 2008-6-14 17:50



OVER

[1] 页 RedHyphone.Union 投稿邮箱
[特别声明]:
本站文章大多搜索转载自网络中,如果侵犯了您的权利,请告之我们。本站将立即删除。
本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。
查看评论】【向上滚屏】【关闭窗口】【 打印
-相关文章
  • 企业局域网本地路由器配置五则方法
  • 路由协议介绍以及教你如何选择路由协议
  • 教你识别各种交换机的数据接口类型
  • 网络的核心所在 交换机漏洞全面了解
  • 用透明桥接方式解决路由器IP配置问题
  • -文章评论 (关闭)
    ·还没有相关的评论!

    网上大名:
    红旋风网络技术联盟 RHUTech.Union
     
    Copyright © 2000-2007 RedHyphone.Union All Rights Reserved. 红旋风联盟版权所有.皖ICP备05011033号
    中国红旋风网络技术联盟 | www.RedHyphone.net
    Mailto:Redhyphone@gamil.com