1. 程式人生 > >Cisco靜態路由表配置

Cisco靜態路由表配置

Route0

Router>en

Router#config t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int f0/0

Router(config-if)#ip add 192.168.0.2 255.255.255.0

Router(config-if)#no sh

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#exi

Router(config)#int f0/1

Router(config-if)#ip add 10.1.5.2 255.255.255.0

Router(config-if)#no sh

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config-if)#exi

Router(config)#

Router(config)#ip route 10.1.5.0 255.255.255.0 f0/1

Router(config)#ip route 192.168.1.0 255.255.255.0 f0/1

Route1

Router>en

Router#config t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int f0/0

Router(config-if)#ip add 10.1.5.1 255.255.255.0

Router(config-if)#no sh u

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exi

Router(config)#int f0/1

Router(config-if)#ip add 192.168.1.2 255.255.255.0

Router(config-if)#no sh

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config-if)#exi

Router(config)#ip route 192.168.0.0 255.255.255.0 f0/0

Router(config)#ip route 10.1.5.0 255.255.255.0 f0/0

Router(config)#

PC0

IP:192.168.0.1

GW(閘道器):192.168.0.2

PC1

IP:192.168.1.1

GW(閘道器):192.168.1.2