路由器配置实例(一)
路由器配置实例: 1、从用户模式到接口模式 router>enable router#config terminal Enter configuration commands, on router(config)#intface e0 router(config-if)#exit router(config)#end router#exit router> 2、配置console(进入链路模式的配置)如:配置虚拟终端 router>enable router#config terminal Enter configuration commands, on router(config-if)#line console 0 router(config-line)#line vty 0 4 router(config-line)#exit router(config)#exit router#exit router> 3、修改交换机名: switch>enable switch#config terminal Enter configuration commands, on switch(config)#hostname sdxx_sw sdxx_sw(config)#exit sdxx_sw#eixt sdxx_sw#exit 4、交换机的IP地址的配置(2950): switch>enable switch#config terminal Enter configuration commands, on switch(config)#int vlan 1 switch(config-if)#ip add? switch(config-if)#ip add 192.168.1.1 255.255.255.0 switch(config-if)#exit switch(config)#ip default-gateway 192.168.1.1 switch(config)#exit switch#exit switch> 5、查看交换机当前及保存的运行数据 switch#show running-config(当前的信息) router#show starup-config(保存的信息) 6、配置路由的密码: Console的密码 router>enable router#config terminal Enter configuration commands, on router(config)#line console 0 router(config-line)#login % Login disabled on line 1, until password is set % Login disabled on line 2, until password is set % Login disabled on line 3, until password is set % Login disabled on line 4, until password is set router(config-line)#password tt router(config-line)#exit router(config)#exit router#exit router> telnet的密码 router> router>enable router#config terminal Enter configuration commands, on router(config)#line vty 0 4 router(config-line)#login % Login disabled on line 1, until password is set % Login disabled on line 2, until password is set % Login disabled on line 3, until password is set % Login disabled on line 4, until password is set router(config-line)#password tt router(config-line)#exit router(config)#exit router#exit router 特权模式密码
router#exit router>enable router#config terminal Enter configuration commands, on router(config)#enable password tttt \\设置不加密密码,在进入路由时能用show running,能看得见。 router(config)#enable secret yyyy \\设置加密密码(在进入特权模式时输入是看不见的,如果有两个密码,则两个不能一样且以加密密码为准。 router(config)#exit router#exit router> router>enable password:tttt The password is error ! router>enable password:yyyy router#config terminal Enter configuration commands, on router(config)#no enable password \\删除密码 router(config)#exit router#exit router>enable router#config terminal Enter configuration commands, on router(config)#no enable secret \\删除密码 router(config)#exit router#exit router>
|