计算机网络
工具软件
配置路由器R1Router>enRouter#conf tRouter(config)#hostname R1 改名R1(config)#int s 0/3/0 进入接口模式R1(config-if)#description link to R2 描述连接到R2R1(config-if)#ip address 192.168.2.1 255.255.255.0端口赋予IP地址R1(config-if)#encapsulation ppp 配置PPP协议R1(config-if)#ppp authentication chap 要求进行CHAP认证R1(config-if)#no shut 激活R1(config-if)#
配置路由器1R1(config-if)#R1(config-if)#exitR1(config)#username lm password lm简单的密码:enable passwordR1(config)#exitR1#R1#copy running-config startup-config把当前设备的运行配置保存到flash上去,以便下一次重启后系统能够还原到当前配置。
配置路由器2Router>enRouter#conf tRouter(config)#hostname R2R2(config)#username lim password limR2(config)#int s 0/3/0R2(config-if)#description link to R1R2(config-if)#ip address 192.168.2.2 255.255.255.0R2(config-if)#encapsulation pppR2(config-if)#ppp authentication chapR2(config-if)#no shut
启用RIP路由协议,两个路由器要配置RIP。配置路由器R1:R1#conf tR1(config)#router rip 使用router rip全局配置命令R1(config-router)#version 2R1(config-router)#network 192.168.1.0R1(config-router)#network 192.168.2.0R1(config-router)#endR1#起用RIP动态协议,宣告192.168.1.0 和192.168.2.0 网段,RIP版本为2
启用RIP路由协议,两个路由器要配置RIP。配置路由器R2:R2>enR2#conf tR2(config)#router ripR2(config-router)#version 2R2(config-router)#network 192.168.1.0R2(config-router)#network 192.168.2.0R2(config-router)#end
查看R1的配置R1#show running-config
查看R2的配置R2#show running-config
计算机IP 地址自行配置