欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

結(jié)合實(shí)例講解廣域網(wǎng)路由基本技術(shù)

 更新時(shí)間:2007年09月19日 10:20:40   作者:  
我們假定讀者對(duì)IP協(xié)議有一定程度的了解(不了解IP協(xié)議永遠(yuǎn)無(wú)法維護(hù)一個(gè)IP網(wǎng)絡(luò)),比如至少懂得IP地址的結(jié)構(gòu)、類(lèi)別和子網(wǎng)、子網(wǎng)掩碼的概念,并且具有一定的計(jì)算機(jī)基礎(chǔ)知識(shí)。在配置路由器時(shí),只要將計(jì)算機(jī)的串口通過(guò)路由器自帶的專(zhuān)用電纜接到Console口,使用諸如超級(jí)終端或者Netterm之類(lèi)的軟件即可。
            


    網(wǎng)絡(luò)中的只有一塊網(wǎng)卡(一個(gè)IP地址)任何一臺(tái)主機(jī)只能直接訪(fǎng)問(wèn)本子網(wǎng)內(nèi)的機(jī)器。而路由器相當(dāng)于一臺(tái)由多個(gè)網(wǎng)卡的主機(jī),每一塊網(wǎng)卡可以直接與一個(gè)子網(wǎng)通信。根據(jù)上圖我們知道,兩個(gè)網(wǎng)絡(luò)相連主要是通過(guò)在其間建立一個(gè)廣域網(wǎng)互聯(lián)子網(wǎng)來(lái)進(jìn)行。這個(gè)子網(wǎng)中只有兩臺(tái)機(jī)器,即兩邊的路由器,當(dāng)然它的子網(wǎng)掩碼就是255.255.255.252。只要路由器A、B的Seiral口在同一個(gè)子網(wǎng),由于它們的Ethernet口分別屬于A、B兩網(wǎng),我們就在A、B網(wǎng)之間建立了一條通道。網(wǎng)絡(luò)A中的主機(jī)只要將網(wǎng)關(guān)設(shè)為路由器A,其信息即可通過(guò)路由器A、B轉(zhuǎn)發(fā)到B網(wǎng)。

    我們?cè)诶又惺褂玫氖菓?yīng)用最廣泛的Cisco 2501路由器,這種路由器物理結(jié)構(gòu)簡(jiǎn)單,網(wǎng)絡(luò)接口只有兩個(gè)Serial口和一個(gè)Ethernet口,卻支持完整的路由功能。采用的協(xié)議為T(mén)CP/IP,因?yàn)楝F(xiàn)在使用其他諸如IPX、Netbeui之類(lèi)的協(xié)議已經(jīng)是非常的不合時(shí)宜。

    實(shí)例1:通過(guò)Cisco 2501連接A局域網(wǎng)與B局域網(wǎng)

   假設(shè)實(shí)驗(yàn)條件如下:

    A網(wǎng):202.96.199.0——202.96.199.255
    B網(wǎng):202.97.76.0——202.97.76.31
    DNS Server:202.96.199.2(主),202.96.199.3(備)
    所屬域:xxx.com
    廣域網(wǎng)互聯(lián):需要一個(gè)包含4個(gè)IP地址(2個(gè)可用IP)的子網(wǎng),
    定為:202.98.0.0——202.98.0.3,其中202.98.0.1給A網(wǎng),202.98.0.2給B網(wǎng)
    互聯(lián)專(zhuān)線(xiàn)速率:128kbps

    具體網(wǎng)絡(luò)參數(shù)分配表如下:
   

    項(xiàng)目

    A網(wǎng)

    B網(wǎng)

    網(wǎng)絡(luò)號(hào)

    202.96.199.0

    202.97.76.0

    子網(wǎng)掩碼

    255.255.255.0

    255.255.255.224

    所屬域

    xxx.com

    yyy.com

    以太網(wǎng)地址

    202.96.199.1

    202.97.76.1

    互聯(lián)地址

    202.98.0.1

    202.98.0.2

    專(zhuān)線(xiàn)速率

    128kbps

    同左

    域名服務(wù)器

    主:202.96.199.2
    備:202.96.199.3

    同左

首先進(jìn)入路由器:將你的計(jì)算機(jī)串行口連接到路由器的Console口,使用Netterm或者超級(jí)終端之類(lèi)的軟件登錄。

    Router>en:passwd:******(輸入超級(jí)口令)

    全局配置:(A、B網(wǎng)相同)

    Router#conf terminal(切換到配置狀態(tài))Router(config)#enable secret my-root-password(定義超級(jí)口令)Router(config)#ip host Router-A(定義路由器名,B網(wǎng)為Router-B)Router(config)#ip domain-name xxx.com(定義所屬域名稱(chēng),B網(wǎng)為yyy.com)Router(config)#nameserver 202.96.199.2(定義主域名服務(wù)器)Router(config)#nameserver 202.96.199.3(定義備域名服務(wù)器)Router(config)#ip classlessRouter(config)#line vty 0 4(定義5個(gè)telnet虛終端,即可以同時(shí)有5個(gè)人登錄本路由器)Router(config-line)#password my-telnet-password(定義telnet口令)Router(config-line)#exitRouter(config)#exit

    地址和路由配置:

    /****** A網(wǎng)路由器 ******/Router-A#conf t(切換到配置狀態(tài))Router-A(config)#int e0(配置Ethernet 0口)Router-A(config-if)#description the LAN port link to my local network(端口說(shuō)明)Router-A(config-if)#ip add 202.96.199.1 255.255.255.0(定義以太網(wǎng)IP地址,子網(wǎng)掩碼表示為C類(lèi)網(wǎng)絡(luò))Router-A(config-if)#no shutdown(激活端口)Router-A(config-if)#exitRouter-A(config)#int s0(配置Serial 0口)Router-A(config-if)#description the  WAN port link to Router-B(端口說(shuō)明)Router-A(config-if)#ip add 202.98.0.1 255.255.255.252(定義互聯(lián)廣域網(wǎng)IP地址)Router-A(config-if)#bandwidth 128(定義端口速率,單位:kbps)Router-A(config-if)#no shutdown(激活端口)Router-A(config-if)#exitRouter-A(config)#ip route 202.97.76.0 255.255.255.224 202.98.0.2(定義靜態(tài)路由,通過(guò)網(wǎng)關(guān)到達(dá)對(duì)端局域網(wǎng)絡(luò),IP為對(duì)端廣域網(wǎng)IP地址)Router-A(config)#exitRouter-A#wr m(保存配置)/****** B網(wǎng)路由器 ******/Router-B#conf tRouter-B(config)#int e0Router-B(config-if)#description the LAN port link to my local network(端口說(shuō)明)Router-B(config-if)#ip add 202.97.76.1 255.255.255.224(定義以太網(wǎng)IP地址,子網(wǎng)掩碼表示為擁有32個(gè)地址的子網(wǎng))Router-B(config-if)#no shutdownRouter-B(config-if)#exitRouter-B(config)#int s0Router-B(config-if)#description the  WAN port link to Router-A(端口說(shuō)明)Router-B(config-if)#ip add 202.98.0.2 255.255.255.252Router-B(config-if)#bandwidth 128Router-B(config-if)#no shutdownRouter-B(config-if)#exitRouter-B(config)#ip route 202.96.199.0 255.255.255.0 202.98.0.1(定義靜態(tài)路由,通過(guò)網(wǎng)關(guān)到達(dá)對(duì)端局域網(wǎng)絡(luò),IP為對(duì)端廣域網(wǎng)IP地址)Router-B(config)#exitRouter-B#wr m(保存配置)

配置完成。

這里是A網(wǎng)、B網(wǎng)路由器配置清單。
Router A:

        Router-A#sh run         Building Configuration...        Current configuration        version 11.2        service udp-small-servers        service tcp-small-servers        hostname Router-A        enable secret test-a        ip subnet-zero        interface Ethernet0          description the  LAN port link to my local network          ip address 202.96.199.1 255.255.255.0        interface Serial0          description the  WAN port link to Router-B          ip address 202.98.0.1 255.255.255.252          bandwidth 128        interface Serial1          no ip address          shutdown        ip domain-name xxx.com        ip name-server 202.96.199.2        ip name-server 202.96.199.3        ip classless        ip route 202.97.76.0 255.255.255.224 202.98.0.2        line con 0        line aux 0        line vty 0 4          password telnet-a          login        end        Router-A# Rouer B:
Router-B#sh run         Building Configuration...        Current configuration        version 11.2        service udp-small-servers        service tcp-small-servers        hostname Router-B        enable secret test-b        ip subnet-zero        interface Ethernet0          description the  LAN port link to my local network          ip address 202.97.76.1 255.255.255.224        interface Serial0          description the  WAN port link to Router-A          ip address 202.98.0.2 255.255.255.252          bandwidth 128        interface Serial1          no ip address          shutdown        ip domain-name yyy.com        ip name-server 202.96.199.2        ip name-server 202.96.199.3        ip classless        ip route  202.96.199.0 255.255.255.0 202.98.0.1        line con 0        line aux 0        line vty 0 4          password telnet-b          login        end        Router-B#

實(shí)例2:通過(guò)Cisco 2501將你的局域網(wǎng)接入Internet


假設(shè)實(shí)驗(yàn)條件如下:

    本網(wǎng)IP地址為:202.96.199.0——202.96.199.255
    DNS Server:202.96.202.96(主),202.96.96.202(備)
    ISP分配的廣域網(wǎng)互聯(lián)IP地址為202.98.0.2

具體網(wǎng)絡(luò)參數(shù)分配表如下:

    項(xiàng)目

    用戶(hù)網(wǎng)絡(luò)

    ISP網(wǎng)絡(luò)

    網(wǎng)絡(luò)號(hào)

    202.96.199.0

     

    子網(wǎng)掩碼

    255.255.255.0

     

    所屬域

    xxx.com

     

    以太網(wǎng)地址

    202.96.199.1

     

    互聯(lián)地址

    202.98.0.2

    202.98.0.1

    專(zhuān)線(xiàn)速率

    128kbps

    同左

    域名服務(wù)器

    主:202.96.202.96
    備:202.96.96.202

     

我們已經(jīng)有了上例的經(jīng)驗(yàn),則很容易根據(jù)相同的原理配置這個(gè)路由器。
 

首先進(jìn)入路由器:

    Router>en:passwd:

    全局配置:

    Router#conf tRouter(config)#ip host RouterRouter(config)#nameserver 202.96.202.96Router(config)#nameserver 202.96.96.202Router(config)#exit其他項(xiàng)目同“例一”。

    地址配置:

    Router#conf tRouter(config)#int e0Router(config-if)#description the  LAN port link to my local network(端口說(shuō)明)Router(config-if)#ip add 202.96.199.1 255.255.255.0Router(config-if)#no shutdown(激活端口)Router(config-if)#exitRouter(config)#int s0Router(config-if)#description the  WAN port link to Internet(端口說(shuō)明)Router(config-if)#ip add 202.98.0.2 255.255.255.252Router(config-if)#no shutdown(激活端口)Router(config-if)#exit

    路由配置:

    Router(config)#ip route 0.0.0.0 0.0.0.0 202.98.0.1(定義默認(rèn)靜態(tài)路由,所有的遠(yuǎn)程訪(fǎng)問(wèn)通過(guò)網(wǎng)關(guān),IP為對(duì)端廣域網(wǎng)IP地址)Router(config)#exitRouter#wr m

配置完成。

這里是本網(wǎng)路由器配置清單。
Router#sh run 
Building Configuration...
Current configuration
version 11.2
service udp-small-servers
service tcp-small-servers
hostname Router
enable secret test
ip subnet-zero
interface Ethernet0
description the LAN port link to my local network
ip address 202.96.199.1 255.255.255.0
interface Serial0
description the WAN port link to Internet
ip address 202.98.0.2 255.255.255.252
bandwidth 128
interface Serial1
no ip address
shutdown
ip domain-name xxx.com
ip name-server 202.96.202.96
ip name-server 202.96.96.202
ip classless
ip route 0.0.0.0 0.0.0.0 202.98.0.1
line con 0
line aux 0
line vty 0 4
password telnet
login
end
Router# 

實(shí)例3:使用Cisco路由器對(duì)大型網(wǎng)絡(luò)(例如ISP網(wǎng)絡(luò))進(jìn)行擴(kuò)容


     當(dāng)然,設(shè)計(jì)管理大型網(wǎng)絡(luò)的路由非常復(fù)雜,一般都是由經(jīng)過(guò)高級(jí)培訓(xùn)的專(zhuān)業(yè)人士進(jìn)行。而且,大型網(wǎng)絡(luò)一般都采用像Cisco 7507這樣的高檔路由器。在這里順便簡(jiǎn)單講述,主要是讓大家開(kāi)闊一下視野,了解一下其他的路由協(xié)議。

這時(shí),與例2唯一的不同就是路由配置,不能采用靜態(tài)路由協(xié)議而應(yīng)該相應(yīng)地采用非常優(yōu)秀的OSPF動(dòng)態(tài)路由協(xié)議并結(jié)合RIP協(xié)議。

假設(shè)具體網(wǎng)絡(luò)參數(shù)如下:

    項(xiàng)目

    本地網(wǎng)絡(luò)

    網(wǎng)絡(luò)號(hào)

    202.96.199.0

    子網(wǎng)掩碼

    255.255.255.0

    OSPF編號(hào)

    100

    OSPF域

    202.96.192.0——202.96.207.255,16個(gè)C

那么應(yīng)該這樣配置:

    Router(config)#router ospf 100(配置OSPF路由)Router(config-router)#summary-address 202.96.199.0 255.255.255.0Router(config-router)#redistribute connnected metric-type 1 subnetsRouter(config-router)#redistribute static(通過(guò)OSPF協(xié)議廣播靜態(tài)路由)Router(config-router)#network 202.96.192.0 0.0.15.255 area 0.0.0.0Router(config-router)#area 0.0.0.0 authentiication message-digestRouter(config-router)#exitRouter(config)#router rip(配置RIP路由)Router(config-router)#redistribute ospf 100 metric 1(通過(guò)RIP協(xié)議廣播OSPF路由)Router(config-router)#passive-interface Serial 0(不在Serial 0上使用)Router(config-router)#network 202.101.199.0(定義本網(wǎng)絡(luò))Router(config-router)#exitRouter(config)exit

    同時(shí),采用OSPF協(xié)議時(shí)應(yīng)該在廣域網(wǎng)端口上加入授權(quán)機(jī)制:

    Router(config)#int s0Router(config-if)#ip ospf message-digest-key keywordRouter(config-if)#exitRouter(config)#exitRouter#wr m

    更大型的網(wǎng)絡(luò)會(huì)采用BGP邊緣路由協(xié)議,假設(shè)具體網(wǎng)絡(luò)參數(shù)如下:

    項(xiàng)目

    本地網(wǎng)絡(luò)

    遠(yuǎn)程網(wǎng)絡(luò)

    AS(自治域)

    20000

    4000

    本地BGP網(wǎng)絡(luò)

    202.96.192.0——202.96.207.255,16個(gè)C
    202.97.0.0——202.97.15.255,16個(gè)C
    202.98.128.0——202.98.159.255,32個(gè)C
     

     

    互聯(lián)地址

    202.100.4.2

    202.100.4.1

    則本地路由器配置方法為:

    Router(config)#router bgp 20000(定義本BGP管理的AS--自治域編號(hào))Router(config-router)#no synchronizationRouter(config-router)#network 202.96.192.0 mask 255.255.240.0(定義本AS--自治域包含的網(wǎng)絡(luò))Router(config-router)#network 202.97.0.0 mask 255.255.240.0Router(config-router)#network 202.98.128.0 mask 255.255.224.0Router(config-router)#neighbor 202.100.4.1 remote-as 4000(定義到遠(yuǎn)端AS--自治域的網(wǎng)關(guān)IP)Router(config-router)#exitRouter(config)#exitRouter#wr m

    配置完成。

實(shí)用技術(shù)


一、使用口令加密機(jī)制:

    Router(config)#service password-encryption(路由器密碼將以暗碼顯示)

二、配置http server,以便從瀏覽器訪(fǎng)問(wèn)路由器:

    Router(config)#ip http server

三、訪(fǎng)問(wèn)控制:

    Router(config)#access-list 101 permit ip 10.150.0.0 0.0.255.255 any
    (允許10.150.0.0——10.150.255.255訪(fǎng)問(wèn))

    Router(config)#access-list 101 deny ip 10.151.0.0 0.0.255.255 any
    (禁止10.151.0.0——10.150.255.255訪(fǎng)問(wèn))

四、負(fù)載分擔(dān):

    要實(shí)現(xiàn)負(fù)載分擔(dān)必須使用動(dòng)態(tài)路由協(xié)議,以O(shè)SPF為例,只要將兩條路由的代價(jià)(cost)設(shè)為相等,即可自動(dòng)實(shí)現(xiàn)。

    默認(rèn)的OSPF代價(jià)為廣域網(wǎng)線(xiàn)路64,局域網(wǎng)線(xiàn)路30,設(shè)置路徑代價(jià)的命令為:
    Router(config-if)#ip ospf cost xx。

五、常用命令:

    Router#help/?(獲得幫助)
    Router#sh run(顯示路由器當(dāng)前配置)
    Router#sh int Xn(接口名稱(chēng),例如Ethernet 0、Serial 1等,顯示接口狀態(tài))
    Router#sh ip route(顯示當(dāng)前路由)
    Router#wr m(儲(chǔ)存配置,以便下次重啟時(shí)使用)
    Router#reload(重啟路由器)
    Router#ping ip-address(測(cè)試與其他主機(jī)的連接)
    Router#telnet host(登錄其它主機(jī))

文章錄入:csh    責(zé)任編輯:csh 

相關(guān)文章

最新評(píng)論