- 相關(guān)推薦
交換機(jī)Trunk端口配置「案例」
runk端口的配置步驟如下:
一 組網(wǎng)需求:
1.SwitchA與SwitchB用trunk互連,相同VLAN的PC之間可以互訪,不同VLAN的PC之間禁止互訪;
2.PC1與PC2之間在不同VLAN,通過設(shè)置上層三層交換機(jī)SwitchB的VLAN接口10的IP地址為10.1.1.254/24,VLAN接口20的IP地址為20.1.1.254/24可以實(shí)現(xiàn)VLAN間的互訪。
二 組網(wǎng)圖:
1.VLAN內(nèi)互訪,VLAN間禁訪
交換機(jī)Trunk端口配置
2.通過三層交換機(jī)實(shí)現(xiàn)VLAN間互訪
交換機(jī)Trunk端口配置
三 配置步驟:
實(shí)現(xiàn)VLAN內(nèi)互訪VLAN間禁訪配置過程
SwitchA相關(guān)配置:
1.創(chuàng)建(進(jìn)入)VLAN10,將E0/1加入到VLAN10
[SwitchA]vlan 10
[SwitchA-vlan10]port Ethernet 0/1
2.創(chuàng)建(進(jìn)入)VLAN20,將E0/2加入到VLAN20
[SwitchA]vlan 20
[SwitchA-vlan20]port Ethernet 0/2
3.將端口G1/1配置為Trunk端口,并允許VLAN10和VLAN20通過
[SwitchA]interface GigabitEthernet 1/1
[SwitchA-GigabitEthernet1/1]port link-type trunk
[SwitchA-GigabitEthernet1/1]port trunk permit vlan 10 20
SwitchB相關(guān)配置:
1.創(chuàng)建(進(jìn)入)VLAN10,將E0/10加入到VLAN10
[SwitchB]vlan 10
[SwitchB-vlan10]port Ethernet 0/10
2.創(chuàng)建(進(jìn)入)VLAN20,將E0/20加入到VLAN20
[SwitchB]vlan 20
[SwitchB-vlan20]port Ethernet 0/20
3.將端口G1/1配置為Trunk端口,并允許VLAN10和VLAN20通過 [SwitchB]interface GigabitEthernet 1/1
[SwitchB-GigabitEthernet1/1]port link-type trunk [SwitchB-GigabitEthernet1/1]port trunk permit vlan 10 20
通過三層交換機(jī)實(shí)現(xiàn)VLAN間互訪的配置
SwitchA相關(guān)配置:
1.創(chuàng)建(進(jìn)入)VLAN10,將E0/1加入到VLAN10
[SwitchA]vlan 10
[SwitchA-vlan10]port Ethernet 0/1
2.創(chuàng)建(進(jìn)入)VLAN20,將E0/2加入到VLAN20
[SwitchA]vlan 20
[SwitchA-vlan20]port Ethernet 0/2
3.將端口G1/1配置為Trunk端口,并允許VLAN10和VLAN20通過 [SwitchA]interface GigabitEthernet 1/1
[SwitchA-GigabitEthernet1/1]port link-type trunk [SwitchA-GigabitEthernet1/1]port trunk permit vlan 10 20
SwitchB相關(guān)配置:
1.創(chuàng)建VLAN10
[SwitchB]vlan 10
2.設(shè)置VLAN10的虛接口地址
[SwitchB]interface vlan 10
[SwitchB-int-vlan10]ip address 10.1.1.254 255.255.255.0
3.創(chuàng)建VLAN20
[SwitchB]vlan 20
4.設(shè)置VLAN20的虛接口地址
[SwitchB]interface vlan 20
[SwitchB-int-vlan20]ip address 20.1.1.254 255.255.255.0
5.將端口G1/1配置為Trunk端口,并允許VLAN10和VLAN20通過
[SwitchA]interface GigabitEthernet 1/1
[SwitchA-GigabitEthernet1/1]port link-type trunk
[SwitchA-GigabitEthernet1/1]port trunk permit vlan 10 20
【交換機(jī)Trunk端口配置「案例」】相關(guān)文章:
交換機(jī)VLAN接口靜態(tài)IP地址配置「案例」03-30
三層交換機(jī)端口配置ip地址及綁定MAC地址的方法07-14
交換機(jī)端口鏈路類型解讀03-30
常用交換機(jī)典型配置詳解12-30
思科三層交換機(jī)配置08-21
思科交換機(jī)基本配置命令大全04-02
華為交換機(jī)的啟動及基本配置實(shí)驗(yàn)10-26
三層交換機(jī)配置步驟10-26