路由器基本配置

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/JM491987631/article/details/78075436

路由器基本配置

分以下5点

1. 最基本的配置

2. 设置路由器的时区、日期和时钟

3. 设置路由器接口的IP地址

4. 设置密码

5. 创建静态hostname表,然后使用该表对直连路由器进行telnet访问


(1)最基本的配置

重命名路由器

Router(config)#hostname r2

关闭域名查找

r2(config)#no ip domain-lookup

设置输入同步

r2(config)#line console 0
r2(config-line)#logging synchronous

设置执行会话时间为20分钟

r2(config-line)#exec-timeout 2000

(2)设置路由器的时区、日期和时钟

r1#sh clock
r1(config)#clock timezone beijing 8
r1#clock set 10:09:09 mar 31 2010

(3)设置路由器接口的IP地址

router(config)#int f0/1 //int为interface缩写,以f0/1口为例
router(config-if)#ip add 127.2.2.2 255.255.255.0

(4)设置密码

r3(config)#enable password 111   //设置enable的明文密码
r3(config)#enable secret password 222 //设置enable的密文密码
//如果明文密码,密文密码都设置了;密文的优先级较高,即密文密码有效

//设置本地密码,进入特权模式需要的密码 
r3(config)#line console 0
r3(config-line)#password cisco   

//设置远程登陆的密码
r3(config)#line vty     
r3(config)#line vty 0 4      //设置0~4口,共5个
r3(config-line)#password cisco   //将密码设为cisco

(5)创建静态hostname表,然后使用该表对直连路由器进行telnet访问

r3(config)#ip host r3 192.168.23.2
//设置之后,PC机就可以远程管理路由器了

猜你喜欢

转载自blog.csdn.net/JM491987631/article/details/78075436