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

實例講解廣域網(wǎng)路由基礎(chǔ)

 更新時間:2007年09月19日 10:20:30   作者:  
網(wǎng)絡(luò)實例
- -
- - - -
- - ------------ ------------- - -
- A network - router-a ============== router-b - B network -
- - ------------ ------------- - -
- - - -
- -
|←----局域網(wǎng)----→|←---廣域互聯(lián)子網(wǎng)---→|←----局域網(wǎng)-----→|

網(wǎng)絡(luò)中的只有一塊網(wǎng)卡(一個IP地址)任何一臺主機只能直接訪問本子網(wǎng)內(nèi)的機器。而路由器相當于一臺由多個網(wǎng)卡的主機,每一塊網(wǎng)卡可以直接與一個子網(wǎng)通信。根據(jù)上圖我們知道,兩個網(wǎng)絡(luò)相連主要是通過在其間建立一個廣域網(wǎng)互聯(lián)子網(wǎng)來進行。這個子網(wǎng)中只有兩臺機器,即兩邊的路由器,當然它的子網(wǎng)掩碼就是255.255.255.252。只要路由器A、B的Seiral口在同一個子網(wǎng),由于它們的Ethernet口分別屬于A、B兩網(wǎng),我們就在A、B網(wǎng)之間建立了一條通道。網(wǎng)絡(luò)A中的主機只要將網(wǎng)關(guān)設(shè)為路由器A,其信息即可通過路由器A、B轉(zhuǎn)發(fā)到B網(wǎng)。
  我們在例子中使用的是應(yīng)用最廣泛的Cisco 2501路由器,這種路由器物理結(jié)構(gòu)簡單,網(wǎng)絡(luò)接口只有兩個Serial口和一個Ethernet口,卻支持完整的路由功能。采用的協(xié)議為TCP/IP,因為現(xiàn)在使用其他諸如IPX、Netbeui之類的協(xié)議已經(jīng)是非常的不合時宜。
實例1:通過Cisco 2501連接A局域網(wǎng)與B局域網(wǎng)

--------------------------------------------------------------------------------
假設(shè)實驗條件如下:
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):需要一個包含4個IP地址(2個可用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)專線速率:128kbps

具體網(wǎng)絡(luò)參數(shù)分配表如下:
項目 A網(wǎng) B網(wǎng)
網(wǎng)絡(luò)號 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
專線速率 128kbps 同左
域名服務(wù)器 主:202.96.199.2
備:202.96.199.3 同左
 首先進入路由器:將你的計算機串行口連接到路由器的Console口,使用Netterm或者超級終端之類的軟件登錄。

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

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

Router#conf terminal(切換到配置狀態(tài))
Router(config)#enable secret my-root-password(定義超級口令)
Router(config)#ip host Router-A(定義路由器名,B網(wǎng)為Router-B)
Router(config)#ip domain-name xxx.com(定義所屬域名稱,B網(wǎng)為yyy.com)
Router(config)#nameserver 202.96.199.2(定義主域名服務(wù)器)
Router(config)#nameserver 202.96.199.3(定義備域名服務(wù)器)
Router(config)#ip classless
Router(config)#line vty 0 4
(定義5個telnet虛終端,即可以同時有5個人登錄本路由器)
Router(config-line)#password my-telnet-password(定義telnet口令)
Router(config-line)#exit
Router(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(端口說明)
Router-A(config-if)#ip add 202.96.199.1 255.255.255.0
(定義以太網(wǎng)IP地址,子網(wǎng)掩碼表示為C類網(wǎng)絡(luò))
Router-A(config-if)#no shutdown(激活端口)
Router-A(config-if)#exit
Router-A(config)#int s0(配置Serial 0口)
Router-A(config-if)#description the WAN port link to Router-B(端口說明)
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)#exit
Router-A(config)#ip route 202.97.76.0 255.255.255.224 202.98.0.2
(定義靜態(tài)路由,通過網(wǎng)關(guān)到達對端局域網(wǎng)絡(luò),IP為對端廣域網(wǎng)IP地址)
Router-A(config)#exit
Router-A#wr m(保存配置)

/****** B網(wǎng)路由器 ******/
Router-B#conf t
Router-B(config)#int e0
Router-B(config-if)#description the LAN port link to my local network(端口說明)
Router-B(config-if)#ip add 202.97.76.1 255.255.255.224
(定義以太網(wǎng)IP地址,子網(wǎng)掩碼表示為擁有32個地址的子網(wǎng))
Router-B(config-if)#no shutdown
Router-B(config-if)#exit
Router-B(config)#int s0
Router-B(config-if)#description the WAN port link to Router-A(端口說明)
Router-B(config-if)#ip add 202.98.0.2 255.255.255.252
Router-B(config-if)#bandwidth 128
Router-B(config-if)#no shutdown
Router-B(config-if)#exit
Router-B(config)#ip route 202.96.199.0 255.255.255.0 202.98.0.1
(定義靜態(tài)路由,通過網(wǎng)關(guān)到達對端局域網(wǎng)絡(luò),IP為對端廣域網(wǎng)IP地址)
Router-B(config)#exit
Router-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#

[1]

文章錄入:csh    責任編輯:csh 

相關(guān)文章

最新評論