当前位置:文档之家› 路由器配置手册

路由器配置手册

路由器配置手册一·CISCO路由器简介1.1 统一采用IOS操作系统,操作具有一致性。

1.2 CISCO IOS操作环境。

ROM monitor > Failure of password recoveryBootROM router(boot) > Flash image upgradeCisco IOS router > Normal operation1.3 Command Modes命令模式。

User EXEC Router> user accessPrivileged EXEC Router# System adminstrationConfiguration mode Router(config)# Modify configurationSetup Prompted dialog Create the initialconfiguration二配置前的准备工作2.1 用终端或仿真终端接入CONSOLE口。

终端或仿真终端配置信息如下:9600 baud 8 data bits no parity 2 stop bits (9600,8/N/2)2.2 用TELNET命令在网上进行设置。

系统管理员可在网上用telnet address命令进行远程配置。

三配置方法3.1 Auto install3.2 setup3.3 config 命令行设置-四配置IP地址4.1采用 (3.1 /3.2) 方法进行配置。

4.2 config命令行方式进行设置4.2.1 首先启动ROUTER 进入router > 模式。

键入Enable 进入router # 模式然后键入config 进入router(config)# 模式4.2.2 选择要配置的路由器端口Router(config) # interface端口号进入端口设置状态Router(config-if)此时用命令IP address <IP地址> <掩码>设定路由器端口IP地址五配置ip路由协议 (RIP ,OSPF ,BGP ,STATICS)在globle模式下配置例图见附图。

5.1静态路由IP route 目的网络地址子网掩码端口号例:在RA1上配RA2的路由IP route 10.0.210.4 255.255.255.252 E05.2 RIP2设置以路器A1为例进行如下设置router rip ;enable ripversion 2 ;选择版本2network 10.86.16.0 ;相关子网地址network 10.85.1.4network 10.85.1.85.3 OSPF设置以路由器D为例进行如下配置router ospf 200 ;enable ospf 进程号为200redistribute bgp 200 subnets ;network 10.0.210.4 0.0.0.3 area 1 ;相关子网地址及区域号network 10.185.1.16 0.0.0.3 area 15.4 BGP设置以路由器A2和D为例A2:router bgp 100 ;enable bgp 设置自治域号network 10.0.210.4 mask 255.255.255.252 ;相关子网地址及子网掩码network 10.80.0.0 mask 255.240.0.0 ; 这些地址由bgp发到邻居路由器redistribute ripneighbor 10.0.210.6 remote-as 200 ;设置远程相连自治域边界路由器端口D2:router bgp 200network 10.0.210.4 mask 255.255.255.252network 10.0.32.0 mask 255.255.240.0network 10.185.1.16 mask 255.255.255.252network 10.0.1.0 mask 255.255.255.252neighbor 10.0.210.5 remote-as 100六 radius认证的设置6.1 radius的简述RADIUS的全称为(Remote Access Dail-In User Service),它是对远程拨号用户访问进行认证的一种协议。

主要进行Authentication Authorization Accounting (AAA) 三方面的工作。

6.2 radius的配置具体配置如下:aaa new-mode ;enable radiusradius-server host <address> ;指明radius server在网上的地址radius-server key <string> ;建立一个网上传输密aaa authentication login default radius local ;进行login认证,若radiusserver未找到从本地数据库内查找aaa authentication ppp default radius localaaa authorization network radius local ;授权检测aaa accounting network start-stop radius ;计帐检测七路由器软件升级方法7.1 改变操作环境在global config mode设置: config -reg 0x2101reload 进入Boot Rom 模式:router(boot)>7.2 运行tftp server在网上运行tftp server,使升级文件可以传输。

7.3 升级版本命令如下:copy tftp flash ;将tftp server上的文件传入路由器的flash memoy中copy flash tftp ; j将flash中的文件备份到tftp server中八配置路由器的一些注意事项8.1拨号用户的配置。

cisco 2509/2511的异步串行通讯口在配置modem时,modem需设置成自动应答方式。

具体方法如下:用超级终端进入modem AT 命令方式,键入ats0=1 设置自动应答方式,然后键入at&w 将设置写入寄存器。

8.2 RIP & BGP的设置当一个运行RIP路由协议的子网,做为一个自治域,用BGP协议接入另一自治域时。

此子网内所有路由器需添加参数: ip classless。

同时在与边界路由器直接相连的路由器上需添加一个缺省网关。

设置如下:ip 0.0.0.0 0.0.0.0 边界路由器地址。

8.3 v.35电缆直连的设置在相关的端口上设置时钟速率:clock rate < speed> .8.4 loopback端口的设置loopback端口是一个虚拟端口,端口状态始终处于UP。

通过它可以使由BGP 相连的AS之间始终保持连系,不会由于边界路由器端口状态的改变而发生变化。

其具体配置如下:interface loopback <number>九常用的路由器命令 (见附录)十问与答10.1如何检测网络是否通畅?A:在网络主机上采用命令ping <ip地址> 来逐端检测网端。

10.2如何查看路由器配置信息?A:在EXEC模式下用show config命令。

10.3如何查看路由器路由信息?A:在EXEC模式下用show ip route 命令。

10.4如何查看路由器端口信息?A:在EXEX模式下用show int <端口号> 命令。

10.5为什么端口协议已经配置,状态仍然是down?A:在CONFIG模式下,选择该端口,执行no shutdwon命令。

10.6 config模式有几种状态,对应那些操作?A:config模式有以下几种状态:·globle config 全局配置操作exec模式键入config t·interface config 端口配置操作config模式键入int <端口号>·line config 线路配置操作config模式键入line <线路号>·router config 路由配置操作config模式键入router<路由协议>十一网络实验简介本实验模拟广东视聆通网络情况。

将网络划分为AS 100和AS 200 .AS 100内动态路由协议采用RIP,AS 200内采用OSPF。

两个自治域间采用BGP协议互连。

该实验主要测试目的在于,测试一个采用RIP协议的网络能否划分自治域,并与其它自治域相连。

测试环境网络图见附图:各点配置如下:路由器A2配置:hostname a2!enable secret 5 $1$kJyk$CfMLfg87wovmbVp5lHUfk/enable password cisco!!interface Loopback0ip address 10.0.2.1 255.255.255.252!interface Ethernet0ip address 10.86.16.2 255.255.240.0ip rip send version 2ip rip receive version 2!interface Ethernet1ip address 10.0.210.5 255.255.255.252 ip rip send version 2ip rip receive version 2!interface Serial0no ip addressshutdown!interface Serial1no ip addressshutdown!router ripversion 2redistribute bgp 100network 10.0.0.0!router bgp 100network 10.0.210.4 mask 255.255.255.252 network 10.80.0.0 mask 255.240.0.0redistribute ripneighbor 10.0.210.6 remote-as 200!ip classless!line con 0line aux 0line vty 0 4password ciscologin!end路由器D的配置:d#sh confUsing 1069 out of 32762 bytes!version 11.0service udp-small-serversservice tcp-small-servers!hostname d!enable secret 5 $1$EBoX$3AWqea9PpP9xTgr49gqLy. enable password cisco!!interface Loopback0description Loopback Interface of Routerip address 10.0.1.1 255.255.255.252no ip mroute-cache!interface Ethernet0description Core Region Router in Guangzhou ip address 10.0.210.6 255.255.255.252no ip mroute-cache!interface Serial0ip address 10.185.1.17 255.255.255.252no ip mroute-cacheip ospf network broadcastclockrate 9600!interface Serial1no ip addressno ip mroute-cacheip ospf network broadcastshutdown!router ospf 200redistribute bgp 200 subnetsnetwork 10.0.210.4 0.0.0.3 area 1network 10.185.1.16 0.0.0.3 area 1!router bgp 200network 10.0.210.4 mask 255.255.255.252network 10.0.32.0 mask 255.255.240.0network 10.185.1.16 mask 255.255.255.252network 10.0.1.0 mask 255.255.255.252neighbor 10.0.210.5 remote-as 100!ip classlessip ospf name-lookup!line con 0line aux 0transport input allline vty 0 4password ciscologin!end路由器B的配置:b#sh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static routeGateway of last resort is 10.85.1.5 to network 0.0.0.010.0.0.0/8 is variably subnetted, 7 subnets, 2 masksR 10.0.2.0/30 [120/2] via 10.85.1.5, 00:00:25, Serial0C 10.88.16.0/20 is directly connected, Ethernet0R 10.86.16.0/20 [120/1] via 10.85.1.5, 00:00:25, Serial0R 10.87.16.0/20 [120/2] via 10.85.1.5, 00:00:25, Serial0R 10.85.1.8/30 [120/1] via 10.85.1.5, 00:00:25, Serial0C 10.85.1.4/30 is directly connected, Serial0R 10.0.210.4/30 [120/2] via 10.85.1.5, 00:00:25, Serial0R* 0.0.0.0/0 [120/1] via 10.85.1.5, 00:00:00, Serial0b#sh confUsing 572 out of 32762 bytes!version 11.1service udp-small-serversservice tcp-small-servers!hostname b!!!interface Ethernet0ip address 10.88.16.1 255.255.240.0 ip rip send version 2ip rip receive version 2!interface Serial0ip address 10.85.1.6 255.255.255.252 ip rip send version 2ip rip receive version 2clockrate 9600!interface Serial1ip address 10.85.1.13 255.255.255.252 ip rip send version 2ip rip receive version 2clockrate 9600!router ripversion 2network 10.0.0.0!ip classless!line con 0line 1 8line aux 0line vty 0 4password ciscologin!end/******************************************************************* *****/路由器A1的配置:a1#sh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODRGateway of last resort is 10.86.16.2 to network 0.0.0.010.0.0.0/8 is variably subnetted, 7 subnets, 2 masksR 10.0.2.0/30 [120/1] via 10.86.16.2, 00:00:23, Ethernet0R 10.88.16.0/20 [120/1] via 10.85.1.6, 00:00:27, Serial0C 10.86.16.0/20 is directly connected, Ethernet0R 10.87.16.0/20 [120/1] via 10.85.1.10, 00:00:24, Serial1C 10.85.1.8/30 is directly connected, Serial1C 10.85.1.4/30 is directly connected, Serial0R 10.0.210.4/30 [120/1] via 10.86.16.2, 00:00:23, Ethernet0S* 0.0.0.0/0 [1/0] via 10.86.16.2a1#sh confUsing 600 out of 32762 bytes!version 11.2!hostname a1!enable secret 5 $1$PKCA$FzjiYXenZNipsGuOcpwAg0enable password cisco!!interface Ethernet0ip address 10.86.16.1 255.255.240.0ip rip send version 2ip rip receive version 2!interface Serial0ip address 10.85.1.5 255.255.255.252ip rip send version 2ip rip receive version 2!interface Serial1ip address 10.85.1.9 255.255.255.252ip rip send version 2ip rip receive version 2clockrate 9600!router ripversion 2network 10.0.0.0!ip classlessip route 0.0.0.0 0.0.0.0 10.86.16.2!line con 0line aux 0line vty 0 4password ciscologin!enda1#/*****************************************************/路由器B1的配置:b1#sh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static routeGateway of last resort is not set10.0.0.0/8 is variably subnetted, 4 subnets, 3 masksO E2 10.0.0.0/8 [110/1] via 10.185.1.17, 00:34:51, Serial0C 10.0.32.0/20 is directly connected, Ethernet0C 10.185.1.16/30 is directly connected, Serial0O 10.0.210.4/30 [110/74] via 10.185.1.17, 00:53:25, Serial0 b1#sh confUsing 441 out of 32762 bytes!version 11.1service udp-small-serversservice tcp-small-servers!hostname b1!!!interface Ethernet0ip address 10.0.32.1 255.255.240.0!interface Serial0ip address 10.185.1.18 255.255.255.252ip ospf network broadcast!interface Serial1no ip addressshutdown!router ospf 200network 10.0.32.0 0.0.0.3 area 1network 10.185.1.16 0.0.0.3 area 1!no ip classless!line con 0line 1 8line aux 0line vty 0 4login!end路由器C的配置:!hostname c!enable secret 5 $1$IoKm$0ai6l75ThSs0zeR9T90W3/ enable password cisco!!interface Ethernet0ip address 10.87.16.1 255.255.240.0ip rip send version 2ip rip receive version 2!interface Serial0ip address 10.85.1.14 255.255.255.252ip rip send version 2clockrate 9600!interface Serial1ip address 10.85.1.10 255.255.255.252ip rip send version 2ip rip receive version 2!router ripversion 2network 10.0.0.0!ip classless!line con 0line 1 16transport input allline aux 0transport input allline vty 0 4password ciscologin!end。

相关主题