路由器配置 - 1 - - 1 - 路由器的配置命令 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 159
0 (设置参与 RIP 协议的网络地址,不支持可变长掩码,只有 IP 网络号) Router(config)#router ospf 63 (进入 ospf 路由协议配置模式) Router(config-router) # ( ospf 路由协议配置模式) Router#write memory (保存配置到路由器的 NVRAM 中) Router#write network tftp (保存配置到 TFTP 服务器中) Router#writ