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)路由 , 通過(guò)網(wǎng)關(guān)到達(dá)對(duì)端局域網(wǎng)絡(luò) , IP為對(duì)端廣域網(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(端口說(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 shutdown
Router-B(config-if)#exit
Router-B(config)#int s0
Router-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.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)路由 , 通過(guò)網(wǎng)關(guān)到達(dá)對(duì)端局域網(wǎng)絡(luò) , IP為對(duì)端廣域網(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#
實(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)目 用戶網(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
專線速率 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 t
Router(config)#ip host Router
Router(config)#nameserver 202.96.202.96
Router(config)#nameserver 202.96.96.202
推薦閱讀
- 實(shí)例:橋接技術(shù)巧解路由器配置IP參數(shù)問題
- 靜態(tài)與動(dòng)態(tài)路由概念及實(shí)例說(shuō)明
- 實(shí)例講解路由器的一般配置及調(diào)試
- 路由網(wǎng)絡(luò)地址轉(zhuǎn)換NAT配置實(shí)例
- 玉米粗縮病需“防避”結(jié)合
- 防控草莓炭疽病需保護(hù)、治療相結(jié)合
- 蘋果缺素癥的防治
- CISCOAUXBACK-TO-BACK實(shí)例
- 無(wú)線路由器經(jīng)常斷線故障分析處理實(shí)例
- AS5300配置實(shí)例
