[ 永遠的UNIX::UNIX技術資料的寶庫 ]   GB | BIG5

首頁 > 網絡管理 > 互聯網技術 > 正文
TCP/IP網絡設計實例參考
本文出自:http://www.net130.com 作者: 田玉林 (2002-02-23 07:20:00)
本人曾參與設計過一個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地址,這是為了節約地址空間和便以擴充。


(http://www.fanqiang.com)     進入【UNIX論壇

相關文章
TCP/IP遠程訪問操作:rwho,rlogin,rcp和rsh (2002-01-29 20:00:44)
常用TCP/IP守護進程 (2001-08-25 07:05:00)
TCP/IP基礎 (2001-07-22 16:08:16)
網絡管理員指南 -5.設置TCP/IP網絡 -9>檢查ARP表格 (2001-07-11 22:08:00)
網絡管理員指南 -5.設置TCP/IP網絡 -8>用netstat 檢查 -3)顯示連接 (2001-07-11 21:04:00)
網絡管理員指南 -5.設置TCP/IP網絡 -8>用netstat 檢查 -2)顯示接口統計 (2001-07-11 20:10:00)
網絡管理員指南 -5.設置TCP/IP網絡 -8>用netstat 檢查 -1)顯示路由表格 (2001-07-11 19:00:00)
網絡管理員指南 -5.設置TCP/IP網絡 -7>關 ifconfig (2001-07-11 18:08:00)
網絡管理員指南 -5.設置TCP/IP網絡 -6>為IP的接口配置 -6)虛擬接口 (2001-07-11 17:04:00)
網絡管理員指南 -5.設置TCP/IP網絡 -6>為IP的接口配置 -5)PLIP,SLIP 和 PPP 接口 (2001-07-11 16:10:00)

===更多相關===
 

★  樊強制作 歡迎分享  ★