不同vlan之间通信地三种方式.doc


文档分类:通信/电子
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

特别说明:文档预览什么样,下载就是什么样。举报非法文档有奖

1/18
1/18
下载所得到的文件列表
不同vlan之间通信地三种方式.doc
文档介绍
word
word
2 / 18
word
不同vlan间的通信简单配置
1.单臂路由(图)
环境:一台路由器,一台二层交换机,两台pc机 二层交换机的配置一般模式:Switch>
输入enable进入特权模式:Switch>enable
输入configure terminal进入全局配置模式:
Switch#configure terminal
Enter configuration mands, one per line.  End with TL/Z.
创建vlan 10 和 vlan 20:
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
Switch(config-vlan)# exit
word
word
2 / 18
word
进入接口配置模式:
Switch(config)#interface fastEthernet 0/1
把0/1变成trunk口〔默认是access口〕
Switch(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Switch(config-if)#exit
进入接口配置模式分别把对应的接口,参加对应的vlan:
Switch(config)#interface fastEthernet 1/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#interface fastEthernet 2/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
到此二层交换机配置完毕!
路由器的配置:
word
word
3 / 18
word
Router>
Router>enable
Router#configure terminal
Enter configuration mands, one per line.  End with TL/Z.
Router(config)#inter fas 0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown
注意:单臂路由的配置父接口一定要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)#exit
%LINK-5-CHANGED: Interface FastEthernet0/0.10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.10, changed state to up
Router(config-subif)#encapsulation dot1Q 10
word
word
4 / 18
word
Router(config-subif)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0.20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.20, changed state to up
% Configuring IP routing on a LAN subinterface is only allowed if that
subinterface is already configured as part
内容来自淘豆网www.taodocs.com转载请标明出处.