實現pc0能與pc1、pc2、pc3通訊
1.先配置使得vlan內通訊,vlan間通訊隔離
對switch0
switch>ena
switch#conf t
enter configuration commands, one per line. end with cntl/z.
switch(config)#vlan 10
switch(config-vlan)#exit
switch(config)#vlan 20
switch(config-vlan)#exit
switch(config)#int f0/23
switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 20
switch(config-if)#int f0/24
switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 10
switch(config-if)#int f0/1
switch(config-if)#switchport mode trunk
switch(config-if)#
%lineproto-5-updown: line protocol on inte***ce fastethernet0/1, changed state to down
%lineproto-5-updown: line protocol on inte***ce fastethernet0/1, changed state to up
switch(config-if)#switchport trunk allowed vlan all
switch(config-if)#no shutdown
對switch1
switch>ena
switch#conf t
enter configuration commands, one per line. end with cntl/z.
switch(config)#vlan 10
switch(config-vlan)#exit
switch(config)#vlan 20
switch(config-vlan)#exit
switch(config-if)#int f0/24
switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 10
switch(config-if)#int f0/23
switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 20
switch(config-if)#int f0/1
switch(config-if)#switchport mode trunk
switch(config-if)#
%lineproto-5-updown: line protocol on inte***ce fastethernet0/1, changed state to down
%lineproto-5-updown: line protocol on inte***ce fastethernet0/1, changed state to up
switch(config-if)#switchport trunk allowed vlan all
switch(config-if)#no shutdown
對三層交換機
switch>ena
switch#conf t
enter configuration commands, one per line. end with cntl/z.
switch(config)#vlan 10
switch(config-vlan)#exit
switch(config)#vlan 20
switch(config-vlan)#exit
switch(config)#int f0/1
switch(config-if)#switchport mode trunk //直接設定trunk口
command rejected: an inte***ce whose trunk encapsulation is "auto" can not be configured to "trunk" mode.
switch(config-if)#switchport trunk allowed vlan all
switch(config-if)#no shutdown
switch(config-if)#int f0/2
switch(config-if)#switchport trunk encapsulation dot1q //以dot1q封裝埠
switch(config-if)#switchport mode trunk //將埠設定為trunk模式
switch(config-if)#switchport trunk allowed vlan all
switch(config-if)#no shutdown
switch(config-if)#end
此時已經配置完成vlan內可以通訊,vlan間通訊隔離
先設定主機ip
2.在三層交換機上配svi
switch>ena
switch#conf t
enter configuration commands, one per line. end with cntl/z.
switch(config)#int vlan 10
switch(config-if)#
%link-5-changed: inte***ce vlan10, changed state to up
%lineproto-5-updown: line protocol on inte***ce vlan10, changed state to up
switch(config-if)#ip add 192.168.10.1 255.255.255.0
switch(config-if)#no shutdown
switch(config-if)#exit
switch(config)#int vlan 20
switch(config-if)#
%link-5-changed: inte***ce vlan20, changed state to up
%lineproto-5-updown: line protocol on inte***ce vlan20, changed state to up
switch(config-if)#ip add 192.168.20.1 255.255.255.0
switch(config-if)#no shutdown
switch(config-if)#exit
3.在三層交換機上開啟路由功能
switch(config)#ip routing
4.設定主機閘道器(相應vlan svi)
pc0:192.168.10.1
pc1:192.168.20.1
pc2:192.168.10.1
pc3:192.168.20.1
對pc0
已實現vlan間通訊
三層交換機 三層交換機實現跨VLAN間通訊
關於vlan間的通訊,如何實現不同vlan的通訊互訪?案例要求 若企業中有2個部門 銷售部和技術部 2個部門pc機ip位址在不同網段 其中銷售部的pc機分散連線在2臺交換機上,配置交換機使得銷售部pc能夠實現相互通訊,而且銷售部和技術部之間也能相互通訊。在本實驗中,我們將pc1和pc3分別連線到sw...
三層交換機實現Vlan間的
建立vlan步驟 第一步 3560 switch enable switch vlan database switch vlan vtp domain zzx 2960 switch enable switch configure terminal switch config vtp domain ...
通過三層交換機實現vlan間互通
實驗拓撲圖 一 配置思科2960交換機 建立vlan switch switch enable switch vlan database switch vlan vlan 10 name vlan10 vlan 10 added name vlan10 switch vlan vlan 20 nam...