日志标签:单臂路由

单臂路由的配置

分类:网络技术日期:2010-11-25 - 22:37:08评论:4条作者:老谢

单臂路由的配置

Switch>enable
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#exit
Switch(config)#int fa 0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#int fa 0/3
Switch(config-if)#switchport access vlan 3
Switch(config-if)#int fa 0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#end

路由器

Router>enable
Router#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa 0/0
Router(config-if)#no shutdown
 
%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)#int fa 0/0.1
 
%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to 
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip add 192.168.1.1 255.255.255.0
Router(config-subif)#exit
Router(config)#int fa 0/0.2
 
%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to 
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip add 192.168.2.1 255.255.255.0
Router(config-subif)#end