路由器基础配置R1#show clock //查看配置的时钟。
R1#sh history //查看在路由器上最近输入的命令。
R1#sh terminal //查看终端历史记录的大小。
R1#terminal history size 22 //将历史记录的大小改为 22 条。
R1#sh version //显示路由器的版本信息。
R1#sh session //显示会话记录,经常在终端上使用。
R1#sh startup-config //显示下次路由器重新加载时将要使用的配置。
R1#sh running-config //显示当前的配置信息。
R1#copy run star //保存当前的配置作为启动时的配置。





R1>en
R1#sh cont s 0
R1#sh cont s 1
R1#conf t
R1(config)#int s0
R1(config-if)#ip add 172.16.10.2 255.255.255.0
R1(config-if)#no shut
R1(config-if)#clock rate 64000 //DCE 端必须配置时钟。
R1(config-if)#int s1
R1(config-if)#ip add 172.16.20.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#clock rate 64000
R1(config-if)# //Ctrl+Shift+6,X R2
R2>en
R2#sh cont s 0
R2#conf t
R2(config)#int s0
R2(config-if)#ip add 172.16.20.2 255.255.255.0
R2(config)#no shut
R2(config)#end



3.配置 RIP 协议
R1#sh ip route
R2#conf t
R2(config)#router rip
R2(config-router)#network 192.168.10.0
R2(config-router)#network 192.168.20.0
R2(config-router)# Ctrl+Shift+6,X R3
R3(config)#router rip
R3(config-router)#network 192.168.20.0
R3(config-router)#end
R3#sh ip route
R3#sh ip protocols
R3#ping 192.168.10.1
R3#debug ip rip //查看路由器发送和接收的路由更新。
R3#undebug all //关闭 dubug。