1、确定所要配置的网络组网及相关ip规划,然后进行具体的配置。
2、首先进行路由器的端口ip配置,下面以路由器R2为例,R1与R3的配置命令类似,只用修改IP即可:R2#co荏鱿胫协nf t (configure terminal的简写)R2(config)#int f 0/0 (interface fastEthernet f 0/0,进入该接口配置模式)R2(config-if)#ip add 192.168.12.2 255.255.255.0 (接口配置ip地址)R2(config-if)#no shut (激活接口)R2(config-if)#int f 0/1R2(config-if)#ip add 192.168.21.1 255.255.255.0R2(config-if)#no shutR2(config-if)#int s 1/0R2(config-if)#ip add 192.168.23.2 255.255.255.0R2(config-if)#no shutR2(config-if)#endR2#show ip route(查看路由表)
3、配置完成后,通过命令"show ip interface brief"查看路由的各接口ip配置是否正确。并验证与非直连网段的互通性,由于此时还没有到非直连网段的路由,故此时不通。
4、在路由器上启动rip协议:R2#conf tR2(config)#router r坡纠课柩ip(进入rip协议配置)R2(c泠贾高框onfig-router)#version 2 (启用rip v2版本)R2(config-router)#no auto (关闭路由自动汇总)R2(config-router)#network 192.168.12.0 (通过RIP宣告该网段)R2(config-router)#network 192.168.21.0R2(config-router)#network 192.168.23.0R2(config-router)#end
5、rip配置完成后,通过"show ip route"查看路由表中存在有"R"标识的rip协议路由。
6、再次验证费直连网络的互通性,此时可以相互通信。