实例讲解广域网路由基本技术
我们假定读者对IP协议有一定程度的了解(不了解IP协议永远无法维护一个IP网络),比如至少懂得IP地址的结构、类别和子网、子网掩码的概念,并且具有一定的计算机基础知识。在配置路由器时,只要将计算机的串口通过路由器自带的专用电缆接到Console口,使用诸如超级终端或者Netterm之类的软件即可。
我们已经有了上例的经验,则很容易根据相同的原理配置这个路由器。
首先进入路由器:
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
Router(config)#exit
其他项目同“例一”。
地址配置:
Router#conf t
Router(config)#int e0
Router(config-if)#description the LAN port link to my local network(端口说明)
Router(config-if)#ip add 202.96.199.1 255.255.255.0
Router(config-if)#no shutdown(激活端口)
Router(config-if)#exit
Router(config)#int s0
Router(config-if)#description the WAN port link to Internet(端口说明)
Router(config-if)#ip add 202.98.0.2 255.255.255.252
Router(config-if)#no shutdown(激活端口)
Router(config-if)#exit
路由配置:
Router(config)#ip route 0.0.0.0 0.0.0.0 202.98.0.1
(定义默认静态路由,所有的远程访问通过网关,IP为对端广域网IP地址)
Router(config)#exit
Router#wr m
配置完成。
这里是本网路由器配置清单。
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#
实例3:使用Cisco路由器对大型网络(例如ISP网络)进行扩容
当然,设计管理大型网络的路由非常复杂,一般都是由经过高级培训的专业人士进行。而且,大型网络一般都采用像Cisco 7507这样的高档路由器。在这里顺便简单讲述,主要是让大家开阔一下视野,了解一下其他的路由协议。
这时,与例2唯一的不同就是路由配置,不能采用静态路由协议而应该相应地采用非常优秀的OSPF动态路由协议并结合RIP协议。
假设具体网络参数如下:
项目本地网络
网络号202.96.199.0
子网掩码255.255.255.0
OSPF编号100
OSPF域202.96.192.0——202.96.207.255,16个C
那么应该这样配置:
Router(config)#router ospf 100(配置OSPF路由)
Router(config-router)#summary-address 202.96.199.0 255.255.255.0
Router(config-router)#redistribute connnected metric-type 1 subnets
Router(config-router)#redistribute static(通过OSPF协议广播静态路由)
Router(config-router)#network 202.96.192.0 0.0.15.255 area 0.0.0.0
Router(config-router)#area 0.0.0.0 authentiication message-digest
Router(config-router)#exit
Router(config)#router rip(配置RIP路由)
Router(config-router)#redistribute ospf 100 metric 1(通过RIP协议广播OSPF路由)
Router(config-router)#passive-interface Serial 0(不在Serial 0上使用)
Router(config-router)#network 202.101.199.0(定义本网络)
Router(config-router)#exit
Router(config)exit
- 本文关键词:

