在路由器配置一個vlan1的地址172.16.0.1,然後把pc的閘道器設為172.16.0.1,就可以ping通10.0.0.2 ,你路由器的那頭肯定還要有一個裝置。Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#int vlan 1Router(config-if)#ip addr 172.16.0.1 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface Vlan1, changed state to upRouter(config-if)#int f0/3/0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/3/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to upRouter(config-if)#int g0/0Router(config-if)#ip addr 10.0.0.2 255.255.255.0Router(config-if)#no shut
在路由器配置一個vlan1的地址172.16.0.1,然後把pc的閘道器設為172.16.0.1,就可以ping通10.0.0.2 ,你路由器的那頭肯定還要有一個裝置。Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#int vlan 1Router(config-if)#ip addr 172.16.0.1 255.255.255.0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface Vlan1, changed state to upRouter(config-if)#int f0/3/0Router(config-if)#no shutRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/3/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to upRouter(config-if)#int g0/0Router(config-if)#ip addr 10.0.0.2 255.255.255.0Router(config-if)#no shut