平台中心的路由器为两台3640,一台主,另一台为拨号备份。
一、路由器基本设置
首先用一台PC通过串口用Cisco提供的黑色(或天蓝色)扁平线(console线)连到路由器的Console口,运行超级终端,将超级终端设置为9600 baud, 8 data bits, no parity, 1 stop bit。
第一次启动路由器回进入对话配制模式,按CTRL+C退出。按回车键直到出现Router>。输入enable进入privileged模式:
Router> enable
Router#
设置路由器的基本配制,如HOSTNAME等
Router#conf t
Router(config)#hostname HOSTNAME ;配置主机名
Router(config)#enable password password ;配置特权口令
Router(config)#line vty 0 4
Router(config-line)#password password ;配置远程登录口令
Router(config-line)#login
Router(config-line)#end
Router#write ;保存已有配置
注:路由器的主机名为 地名拼音+路由器型号+A[主](B[从]) ;
例如:北京平台的路由器主3640的路由器HOSTNAME为:
BEIJING3640A
设置路由器以太口IP地址
每台路由器有两个以太口,一个用于连VLAN2,另一个用于路由器之间的互联。查看本地平台IP地址规划表,找出这两个端口的ip地址。
Router#conf t
Router(config)#interface fa(e)mod_num/port_num ;进入端口配置状态,fa表示快速以太网口,e表示10M网口
Router(config-if)#ip addr Ethernet_ip_addr ;配置端口IP地址
Router(config-if)#end
Router#write ;保存已有配置
设置CE1
CE1又称Channelized E1(信道化的E1),它由32个DS0信道组成,吞吐量为2.048M。E1使用高密度双极性3(HDB3)编码。根据电气标准的不同,E1又分平衡的和非平衡两种,在中国,除及少数地区(厦门)使用平衡的E1外,大多数地区使用非平衡E1。
CE1由32个Timeslot(时系)组成,除第一个时系(0时系)用来传输信令外,其余的31个时系都可以用来传输数据(1~31)。每个时系都有64kbps的吞吐量,各个时系可单独使用或和其他的时系捆绑起来使用以加大吞吐量。
下面,我们将介绍如何配置E1线路。
第一步 配制E1前,我们应该首先将线路、设备连接好。
第二步 检查各个设备的显示灯状态。
HDSL MODEM:
HDSL MODEM是由数据通信局提供的高速MODEM设备,各个地区的HDSL MODEM的型号各不相同,我们应该阅读电信局提供的相关的说明书,来判断MODEM上灯和面板的状态是否正常。
路由器:
CE1端口上一般有四个信号灯来描述端口的状态,分别为:
ENABLE(绿)
LOCAL ALARM(黄)
REMOTE ALARM(黄)
CARRIER DECETE(绿)
一般来说,线路正常时,两个绿色的灯会亮,两个黄灯都会灭,如果灯的状态异常的话,则请检查线路的连接情况,并检查CAB-E1-BNC是否是好的,线序表如下:
CE1/PRI End |
Network End |
DB-15 |
BNC |
Pin |
Signal |
Signal |
9 |
TX Tip |
TX Tip |
2 |
TX Ring |
TX Shield |
8 |
RX Tip |
RX Tip |
15 |
RX Ring |
RX Shield |
如果在确认线路和线路连接没有问题的情况下,还是有黄灯亮着(如:LOACL ALARM),则联系数据局,请他们做一下线路的环路测试,并确认DDN设备上配置正确。
第三步 配置E1
Router> enable ;进入特权模式
Password: <password>
Router#
Router# configure terminal ;进入配置模式
Router(config)# controller e1 1/0 ;选择CE1/PRI端口来配置,例子中的端口为SLOT 1,UNIT 1。
Router(config-controller)# framing no-crc4 ;指定帧格式,在中国一般是no-crc4
Router(config-controller)# linecode hdb3 ;指定线路的编码格式,在中国一般是 hdb3
Router(config-controller)# channel-group 0 timeslots 1 ;指定channel group所对应的时系,例子中channel group 0对应时系1,一个时系是64K,如果要128K则要映射两个时系,如channel-group 1 timeslots 2-3,在指定时系时我们要和数据局的网关沟通,确定哪个时系通到何处。
Router(config-controller)# interface serial 1/0:0 ;把每个channel-group看成一个虚拟的串口来配置,指slot 号,unit号,channel-group号。
Router(config-if)# ip address 10.1.15.1 255.255.255.0 ;配置这个端口的IP地址。
Router(config-if)# end
Router#wr ;保存已有配置
第四部 检查配置是否正确
用sh controller E1 ;sh interface 1/0:0等命令来检查端口是否已正常工作(UP)。
通过PING对端地址来检查链路是否已能正常通信。
配置ISDN备份
在主线路故障的情况下,服务商端的路由器会激活ISDN拨号备份,ISDN拨号具有建立连接速度快,带宽高等特点。
在平台处,有一台专门的路由器来处理ISDN拨号接入,它有很多的EI/PRI端口,在申请相应的ISDN PRI线路时,电信局会为我们的每个E1/PRI线路分配一个电话号码。服务商端的路由器只要拨这个号码,就可以和平台的拨号备份路由器建立ISDN连接。
ISDN PRI的连接和E1连接相同,详细的连接图请参照上面的E1连接图。
设置ISDN的PRI配置如下:
第一步、第二步同上;
第三部 配置ISDN PRI
Router> enable ;进入特权模式
Password: <password>
Router#
Router# configure terminal ;进入配置模式
Router(config)#isdn switch-type primary-net5 ;设定ISDN PRI的类型,在中国一般是primary-net5。
Router(config)# controller e1 1/0 ;选择CE1/PRI端口来配置,例子中的端口为SLOT 1,UNIT 1。
Router(config-controller)# framing no-crc4 ;指定帧格式,在中国一般是no-crc4
Router(config-controller)# linecode hdb3 ;指定线路的编码格式,在中国一般是 hdb3
Router(config-controller)# clock source line primary
or
Router(config-controller)# clock source line secondary ;指定E1线路的时钟源,其中一个E1线为主时钟源和最稳定的时钟源,其他的作为第二时钟
Router(config-controller)# pri-group timeslots 1-31 ;指定所有要加入pri-group的timeslot。
当输入这个命令后,系统会出现这样的LOG
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1:15, changed state to down
%LINK-3-UPDOWN: Interface Serial1/0:15, changed state to up
注示:In the previous example, the line-protocol status for timeslot 16 (listed in the output as timeslot 15) represents the entire PRI group.
Each PRI group is presented to the system as a serial interface that can be configured individually.
Router(config-controller)# interface serial 1/0:15 ;给PRI端口指定IP地址。
Router(config-if)# ip address 10.1.15.1 255.255.255.0
注示: For channelized E1 ISDN PRI, the PRI group is configured by using timeslot 16, which is recognized by the system as timeslot 15.
Router(config-if)# no shutdown ;激活端口
Router(config-if)# isdn switch-type primary-net5 ;指定ISDN类型
Router(config-if)# dialer rotary-group 1 ;指定轮循组号
Router(config-if)# encapsulation ppp ;封装PPP协议
Router(config-if)# interface Dialer1 ;设置相应的拨号轮循组
Router(config-if)# encapsulation ppp
Router(config-if)# dialer in-band
Router(config-if)# dialer idle-timeout 3600
Router(config-if)# dialer-group 1
Router(config-if)# peer default ip address pool default
Router(config-if)# ppp authentication chap pap
Router(config-if)# ppp multilink
Router(config-if)# exit
Router(config)# ip local pool default 172.16.1.2 172.16.1.31 ;设置IP地址槽。
Router(config)# dialer-list 1 protocol ip permit ;设置IP是可以拨号的协议
Router(config)# router eigrp 100 ;设置动态路由协议
Router(config-router)#network 10.0.0.0
配置HSRP
对主路由器和备份路由器的以太口(VLAN2)配置HSRP。
所有参与冗余路由的路由器构成一个HSRP组,组员共享一个虚拟IP。
规定如下:
主路由器的实际IP地址为10.2.16.252
备份路由器的实际IP地址为10.2.16.253
虚拟IP地址为10.2.16.254
在各HSRP组中,主路由器的优先级为200,备份路由器的优先级为100
A) 主路由器配置:
Router (Config)# interface FA0/1 ;
Router (Config-if)# standby 1 ip 10.2.16.254
Router (Config-if)# standby 1 priority 200
Router (Config-if)# standby 1 preempt 3
Router (Config-if)# standby 1 timers 5 15
Router (Config-if)# standby 1 authentication LIMING
Router (Config-if)# ^Z
Router #wr m
B) 备份路由器配置:
Router (Config)# interface FA0/1 ;
Router (Config-if)# standby 1 ip 10.2.16.254
Router (Config-if)# standby 1 priority 100
Router (Config-if)# standby 1 preempt 3
Router (Config-if)# standby 1 timers 5 15
Router (Config-if)# standby 1 authentication LIMING
Router (Config-if)# ^Z
Router #wr m
配置服务商端的路由器
服务商端的路由器的配置主要为DDN和ISDN拨号备份以及动态路由协议的配置。下面将给出某个服务商端路由器完整的配置:
Current configuration:
!
version 11.3
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname beijing1
!
enable password cisco
!
username beijing1 password 0 liming
isdn switch-type basic-net3
!
!
interface Ethernet0
ip address 10.3.30.1 255.255.0.0
!
interface Serial0
ip address 10.1.30.2 255.255.255.252
no ip mroute-cache
!
interface Serial1
no ip address
shutdown
!
interface BRI0
ip address 10.1.30.10 255.255.255.252
encapsulation ppp
no ip mroute-cache
dialer map ip 10.1.30.9 name beijing1 broadcast
dialer load-threshold 1 either
dialer-group 1
ppp authentication chap pap
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.1.30.1
ip route 10.30.0.0 255.255.0.0 10.1.30.9 120
!
dialer-list 1 protocol ip permit
!
!
!
!
line con 0
password cisco
login
line aux 0
line vty 0 4
password cisco
login
!
end
|