CISCO单臂路由

使用工具:Cisco Packet Tracer 5.3

路由器:2811
交换机:2960-24
 

规划
Router0: f0/0     连接交换机
Switch0: f0/24    trunk

       f0/1     pc0

       f0/2     pc1

       f0/3     pc3

 
路由器配置
Router>enable
Router#conf t

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

Router(config)#int f0/0

Router(config-if)#no shutdown

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

Router(config-if)#int f0/0.1

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

Router(config-subif)#encapsulation dot1Q 10

Router(config-subif)#ip address 192.168.1.1 255.255.255.0

Router(config-if)#int f0/0.2

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

Router(config-subif)#encapsulation dot1Q 20

Router(config-subif)#ip address 192.168.2.1 255.255.255.0

Router(config-if)#int f0/0.3

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

Router(config-subif)#encapsulation dot1Q 30

Router(config-subif)#ip address 192.168.3.1 255.255.255.0

Router(config-subif)#end
Router#
 
交换机配置
Switch>enable
Switch#conf t

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

Switch(config)#vlan 10

Switch(config-vlan)#vlan 20

Switch(config-vlan)#vlan 30

Switch(config-vlan)#exit

Switch(config)#int f0/1

Switch(config-if)#switchport access vlan 10

Switch(config-if)#int f0/2

Switch(config-if)#switchport access vlan 20

Switch(config-if)#int f0/3

Switch(config-if)#switchport access vlan 30

Switch(config-if)#int f0/24

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport trunk allowed vlan all

Switch(config-if)#end
Switch#
 
PC机
PC0 192.168.1.2 255.255.255.0 192.168.1.1
PC1 192.168.2.2 255.255.255.0 192.168.2.1
PC2 192.168.3.2 255.255.255.0 192.168.3.1
 
 
能够ping通即可

你可能感兴趣的:(职场,Cisco,路由,休闲,单臂)