Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#router rip Switch(config-router)#ne Switch(config-router)#network 192.168.5.0 Switch(config-router)#ver Switch(config-router)#version 2 Switch(config-router)#end
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial3/0, changed stateto up ip address 192.169.3.1255.255.255.0 Router(config-if)#ip address 192.169.3.1 255.255.255.0 Router(config-if)#exit Router(config)#router ospf 1 Router(config-router)#ne Router(config-router)#net Router(config-router)#network 192.169.3.0 0.0.0.255 area 0 Router(config-router)#end Router#
设置se3/0端口的下一跳
1 2 3 4 5
Router>enable Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip route 192.169.1.0 255.255.255.0 192.169.3.2 Router(config)#exit
配置Router0
设置下一跳 配置完毕
连通性测试
用PC4去pingPC1,PC0,PC2
配置成功
version 3
更新了单臂路由 单臂路由
配置Switch
初始化vlan划分
1 2 3 4 5 6 7 8
Switch> Switch>enable Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vlan 50 Switch(config-vlan)#exit Switch(config)#vlan 60 Switch(config-vlan)#exit
Router>enable Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router Router(config)#router rip Router(config-router)#network 192.170.2.0 Router(config-router)#network 192.170.1.0 Router(config-router)#network 192.170.3.0 Router(config-router)#exit Router(config)#end