路由器配置命令

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

路由器的配置命令

Router> (用户模式)

Router>enable (进入特权模式)

Router# (特权模式)

Router#configure terminal (进入全局配置模式)

Router(config)# (全局配置模式)

Router(config)#hostname XXX (设置路由器主机名)

Router(config)#enable password 123 (设置特权非密口令)

Router(config)#enable secret 123 (设置特权加密口令)

Router(config)#interface f0/6 (进入端口配置模式)

Router(config-if)# (端口配置模式)

Router(config)#line consode 0 (进入控制台端口)

Router(config)#line vty 0 4 (进入虚拟终端配置模式)

Router(config- line)# (虚拟终端配置模式)

Router(config)#router rip (进入rip路由协议配置模式)

Router(config-router) ( rip路由协议配置模式)

Router(config-router)network (设置参与RIP协议的网络地址,不支持可变长掩码,只有IP网络号)

Router(config)#router ospf 63 (进入ospf路由协议配置模式)

Router(config-router) # ( ospf路由协议配置模式)

Router#write memory (保存配置到路由器的NVRAM中)

Router#write network tftp (保存配置到TFTP服务器中)

Router#write erase (删除路由配置)

设置模式(setup) 刚出厂第一次建立配置文件

RXBOOT模式密码丢失,进入可以恢复密码

exit逐级退出 end 或ctrl+z 直接退至特权模式

基本命令:telnet ping trace show

telnet 可以由一台路由器登录到另一台路由器,最多支持5个连接。

ping 可以通过echo协议判断网络的连接情况。

trace 查询网络上数据传输流向的理想工具,测试转发分组的每一步,不可达***,退出Ctrl-Shinf-6

show 查看了解路由器的各种信息。

R1>show flash 查看FLASH

R1>show clock 查看时钟

R1>show version 查看路由器软件、硬件版本

在特权模式查看:

R1#show configuration 查看路由器配置

R1#show ip route 查看路由表

R1#show ip protocols 查看路由协议的详细信息

配置方式:

1.使用控制端口(console)配置

2.使用AUX端口连接一台Modem,通过拨号远程配置路由器.

3.使用telnet远程登录到路由器上配置.

4.使用TFTP服务,拷贝配件文件,修改配置文件的形式配置路由器

5.通过网络管理协议SNMP修改路由器配置文件进行配置.

远程虚拟终端配置:

Router(config)#line vty 0 4 (进入虚拟终端配置模式)

Router(config-line)#pasword 7 zzz123 (配置远程虚拟终端登录密码)

Router(config-line)#

路由器是互联不同的逻辑子网的设备,因此,他的每个接口都必须配置唯一的逻辑地址(IP),telnet登录时,可以使用任意一个处于激活状态的接品的IP,所以路由器不需要单独配置设备管理地址,远程登录时只需要密码即可.

Router(config)#hostname R1 命名路由器R1

R1(config)#

Router(config)#enable secret xxx123 超级用户加密密码

Router(config)#enable password 7 aaa123 超级用户明文密码

Router#write memory 保存路由器配置到NVRAM中

Router#write network tftp 保存路由器配置到TFTP中

Router#write erase 清除路由器配置

Router(config)#interface g0/8

Router(config-if)#description To-shenzhen 描述,连接到深圳

Router(config)#interface pos 3/0

Router(config)#bandwidth 2500000 设置接口带宽,以kbps为单位

Router(config)#interface g0/10

Router(config-if)#ip address 配置接口IP地址

Router(config)#interface g0/10

Router(config-if)# no shutdown 开启接口

标准以太网

Router(config)#interface E0 进入标准以太网E接口

Router(config-if)#description To-shanghai 连接到上海

Router(config-if)#ip address 端口IP地址

Router(config-if)#bandwidth 1000 带宽1G

Router(config-if)#exit

Router(config)#exit

Router#

快速以太网

Router(config)#inerface f2/1 进入快速以太网f接口

Router(config-if)#description To-beijing 连接到北京

Router(config-if)#ip address 端口IP地址

Router(config-if)#bandwidth 2000000 带宽2G

Router(config-if)#duplex full 模式为全双工(full双工hull半双工auto自动)

Router(config-if)#no ip directed-broadcast 禁止定向子网广播

Router(config-if)#no ip proxy-arp 不作arp代理

Router(config-if)#no shutdown 开启端口.

Router(config-if)#exit 退出

千兆以太网

Router(config)#inerface g0/1 进入千兆以太网g接口

Router(config-if)#description To-beijing 连接到北京

Router(config-if)#ip address 端口IP地址

Router(config-if)#bandwidth 2500000 带宽

Router(config-if)#duplex full 模式为全双工(full双工hull半双工auto自动)

Router(config-if)#no ip directed-broadcast 禁止定向子网广播

Router(config-if)#no ip proxy-arp 不作arp代理

Router(config-if)#no shutdown 开启端口.

Router(config-if)#exit 退出

配置POS接口

Pos是packet over SONET/SDH的缩写,是一种利用SONT/SDH提供的高速传输通道直接传送IP数据包的技术,

POS技术支持光纤介质,是一种高速先进的广域网连接技术.链路层协议主要有PPP和HDLC,目前可以提供155M,622M,和10G的传输速率接口.接口配置参数有接口带宽,接口地址,接口链路层协议,接口帧格式,接口CRC校验和flag(帧头中净负荷类型标志位),要注意接口参数的一致性.

Router(config)#inerface POS3/0 进入快速以太网f接口

Router(config-if)#description To-beijing 连接到北京

Router(config-if)#bandwidth 带宽10G

Router(config-if)#ip address 端口IP地址

Router(config-if)#crc 32 (可选的crc校验位是16和32)

Router(config-if)#pos framing shd (可选的帧格式是shd和sonet)

Router(config-if)#no ip directed-broadcast 禁止定向子网广播

Router(config-if)#pos flag s1 s0 2 (注意:s1 s0 =00 表示sonet 帧数据, s1 s0 =10<十进制2> 表示sonet 帧数据) Router(config-if)#no ip proxy-arp 不作arp代理

Router(config-if)#no shutdown 开启端口.

Router(config-if)#exit 退出

POS接口实例配置:(2011年9月网考试题)

某园区网用的POS技术与Internet相连,POS接口的帧格式是SONET。路由协议的选择方案是:园区网内部采用OSPF动态路由协议,园区网与Internet的连接使用静态路由。

相关文档
最新文档