GNS 3 模拟器
R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int f0/0
R1(config-if)#ip add 192.168.2.1 255.255.255.0 #配置接口IP地址
R1(config-if)#no shut #开启接口
R1(config-if)#ex
*Mar 1 00:06:18.167: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:06:19.167: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config)#int f0/1
R1(config-if)#ip add 192.168.1.1 255.255.255.0 #配置接口IP地址
R1(config-if)#no shut #开启接口
R1(config-if)#ex
*Mar 1 00:06:36.879: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:06:37.879: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2 #添加路由
R1(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.2 #添加路由
R1(config)#do show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
S 192.168.4.0/24 [1/0] via 192.168.2.2
C 192.168.1.0/24 is directly connected, FastEthernet0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
S 192.168.3.0/24 [1/0] via 192.168.2.2
R1(config)#
R2>en
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int f0/0
R2(config-if)#ip add 192.168.2.2 255.255.255.0 #配置接口IP地址
R2(config-if)#no shut #开启接口
R2(config-if)#ex
R2(config)#int f0/
*Mar 1 00:08:49.555: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:08:50.555: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config)#int f0/1
R2(config-if)#ip add 192.168.3.1 255.255.255.0 #配置接口IP地址
R2(config-if)#no shut #开启接口
R2(config-if)#ex
R2(config)#ip route
*Mar 1 00:09:09.459: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:09:10.459: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1 #添加路由
R2(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2 #添加路由
R2(config)#do show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
S 192.168.4.0/24 [1/0] via 192.168.3.2
S 192.168.1.0/24 [1/0] via 192.168.2.1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/1
R2(config)#
R3>en
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int f0/0
R3(config-if)#ip add 192.168.3.2 255.255.255.0 #配置接口IP地址
R3(config-if)#no shut #开启接口
R3(config-if)#ex
R3(config)#int f0
*Mar 1 00:06:18.167: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:06:19.167: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R3(config)#int f0/1
R3(config-if)#ip add 192.168.4.1 255.255.255.0 #配置接口IP地址
R3(config-if)#no shut #开启接口
R3(config-if)#ex
R3(config)#ip
*Mar 1 00:06:36.879: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:06:37.879: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R3(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.1 #添加路由
R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1 #添加路由
R3(config)#do show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.4.0/24 is directly connected, FastEthernet0/1
S 192.168.1.0/24 [1/0] via 192.168.3.1
S 192.168.2.0/24 [1/0] via 192.168.3.1
C 192.168.3.0/24 is directly connected, FastEthernet0/0
R3(config)#
原文:http://blog.51cto.com/10316297/2110953