天下网吧 >> 网吧方案 >> 方案实例 >> 正文

TCP/IP网络设计实例参考


  本人曾参与设计过一个TCP/IP网络,现将设计过程写出来,供大家参考。
  第一步:了解环境
  首先,获取网络地址,被分配一A类网段,地址在此表示为:A.X.0.0/16(A表示A类地址,X表示任意,16表示连续16位1,以下类同)。
  其次,弄清都要干些什么,这个网络中,现阶段需互联的机构为60个,每个机构均要组建局域网。在这些机构中,有一个管理机构(其局域网上主机数目前为100个,并且以后还可能增加几十个),有59个下属机构(其中14个下属机构局域网上主机数不超过10个,以后还可能增加1至3个;其余45个下属机构局域网上主机数不超过2个,以后还可能增加1至2个)。管理机构局域网需和59个下属机构局域网互联,有2个下属机构局域网之间需互联,其余下属机构局域网之间不需要互联。
  
  然后,设置冗余策略,互联网的主用线路为帧中继(FR),备用线路为电话线(PSTN)。当主用线路路由不可用时(本端路由器端口坏、电缆坏及调制解调器坏,或者帧中继不可用、远端路由器端口、电缆及调制解调器等故障),应能自动切换到备用线路路由。
  第二步:方案设计
  请看最终设计的网络拓扑如图。
  下属机构局域网
  整个网络IP地址使用变长子网掩码(VLSM),以充分利用IP地址资源,并实现IP地址类聚(SUMMARY)。管理机构局域网IP地址为A.X.Y.0/24;14个下属机构局域网IP地址为A.X.(Y+1).M/28,其中M为16n+1~16n+14,n为0~15;45个下属机构局域网IP地址为A.X.(Y+3).M/29和A.X.(Y+4).M/29,其中M为8n+1~8n+6,n为0~31;局域网之间的互联IP地址为A.X.Z.M/26,其中M为64n+1~64n+62,n为0~3。
  
  为管理机构申请两条端口速率512kbps的FR线路,14个下属机构各申请一条端口速率为64kbps的FR线路,在该端口上申请两条CIR值为16kbps的PVC,分别对应管理机构两条FR线路;45个下属机构各申请一条端口速率为64kbps的FR线路,在该端口上申请两条CIR值为8kbps的PVC,分别对应管理机构两条FR线路。
  
  在主用线路上使用OSPF路由协议,在备用线路上使用静态路由。之所以使用OSPF路由协议,一是因为59个下属机构使用不同厂家的路由器,二是因为OSPF路由协议支持主用线路上的两条路由,可在两条FR线路上实现均衡负载和互为备份(当两条FR线路没有一起坏时)。
  
  备用线路上使用PPP协议,可以选用PAP和CHAP认证协议。当主用线路不可用时,管理机构和下属机构均可使用备用线路拨入对方;当主用线路恢复后,自动切换到FR,Modem自动挂机。管理机构路由器上的8条电话线申请电话连选功能,任意一条电话线,只要处于空闲状态,均可以和任意一个下属机构建立连接。
  仅当有数据要发送时才使用备用线路建立连接,而当间隔一定时间无数据发送时,路由器便令Modem挂机。
  第三步:路由器配置
  路由器具体配置情况请见以下的路由器配置命令:
  Router1(Cisco路由器)的配置:
  ip subnet-zero
  interface Ethernet0
  ip address 16.112.44.98 255.255.255.0
  no ip route-cache
  no ip mroute-cache
  media-type 10BaseT
  interface Serial0
  no ip address
  encapsulation frame-relay
  frame-relay lmi-type ansi
  interface Serial0.1
  ip address 16.112.224.62 255.255.255.192
  ip ospf network point-to-multipoint
  frame-relay map ip 16.112.224.1 50 broadcast
  interface Serial1
  no ip address
  encapsulation frame-relay
  frame-relay lmi-type ansi
  interface Serial1.1
  ip address 16.112.224.126 255.255.255.192
  ip ospf network point-to-multipoint
  frame-relay map ip 16.112.224.65 51 broadcast
  router ospf 1
  network 16.112.0.0 0.0.255.255 area 0
  ip classless
  ip route 16.112.45.0 255.255.255.240 16.112.44.99 120
  Router2(Cisco路由器)的配置:
  hostname user
  ip subnet-zero
  interface Ethernet0
  ip address 16.112.44.99 255.255.255.0
  media-type 10BaseT
  interface Serial0
  dialer rotary-group 1
  interface Serial7
  dialer rotary-group 1
  interface Dialer1
  ip address 16.112.225.62 255.255.255.252
  encapsulation ppp
  dialer in-band
  dialer wait-for-carrier-time 60
  dialer map ip 16.112.225.1 name user1 2000001
  dialer-group 1
  ppp authentication chap
  router ospf 1
  network 16.112.0.0 0.0.255.255 area 0
  redistribute static subnets
  ip classless
  ip route 16.112.45.0 255.255.255.240 16.112.225.1 120
  access-list 101 deny ospf any any
  access-list 101 permit ip any any
  dialer-list 1 list 101
  username user1 password password1
  Router3(Cisco路由器)的配置:
  hostname user1
  ip subnet-zero
  interface Ethernet0
  ip address 16.112.45.14 255.255.255.240
  interface Serial0
  no ip address
  encapsulation frame-relay
  frame-relay lmi-type ansi
  interface Serial0.1
  ip address 16.112.224.1 255.255.255.192
  ip ospf network point-to-multipoint
  frame-relay map ip 16.112.224.62 50 broadcast
  interface Serial0.2
  ip address 16.112.224.65 255.255.255.192
  ip ospf network point-to-multipoint
  frame-relay map ip 16.112.224.126 51 broadcast
  interface Serial1
  ip address 16.112.225.1 255.255.255.192
  encapsulation ppp
  dialer in-band
  dialer wait-for-carrier-time 60
  dialer string 2000000
  dialer-group 1
  pulse-time 1
  ppp authentication chap
  router ospf 1
  network 16.112.0.0 0.0.255.255 area 0
  ip classless
  ip route 16.112.44.0 255.255.255.0 16.112.225.62 120
  access-list 101 deny ospf any any
  access-list 101 permit ip any any
  dialer-list 1 list 101
  username user password password
  Router3(博达路由器)的配置:
  nodename user1
  ospf enable
  e0
  ip add 16.112.45.14 255.255.255.240
  quit
  s0
  encapsulate framerelay
  ip add 16.112.224.1 255.255.255.192
  ip add 16.112.224.65 255.255.255.192
  map add 16.112.224.62 pvc 50 broadcast
  map add 16.112.224.126 pvc 51 broadcast
  fr lmi_type ansi
  ospf network point-to-multipoint
  quit
  s1
  encapsulate ppp
  line dial
  port sync
  ip add 16.112.225.1 255.255.255.192
  map add 16.112.225.62 2000000
  ppp auth chap
  ppp chap user user
  quit
  route add 16.112.44.0 255.255.255.0 16.112.225.1 120
  user add user password password
  ospf network add 16.112.0.0 0
  第四步:探讨如何改进
  1.本案例的路由协议是“主动备静”,也可以配置成“全动态”或者划分出几个管理域。
  2.我们用的备份协议是同步PPP,也可以配置成异步PPP。
  3.在这个网络中的FR端口使用了子端口方式或多个IP地址,这是为了节约地址空间和便于以后扩充。
  
  
  

本文来源:天下网吧 作者:网吧方案

声明
声明:本站所发表的文章、评论及图片仅代表作者本人观点,与本站立场无关。若文章侵犯了您的相关权益,请及时与我们联系,我们会及时处理,感谢您对本站的支持!联系Email:support@txwb.com,系统开号,技术支持,服务联系QQ:1175525021本站所有有注明来源为天下网吧或天下网吧论坛的原创作品,各位转载时请注明来源链接!
天下网吧·网吧天下