2018 9-4
目標:鏈路聚合 Ip 配置 vlan劃分
實例
要求:1 PC1&PC3屬於VLAN5、
2 PC2&PC4 屬於VLAN6
3 所有的PC網關配置在R1上
4 實現所有PC互通
將線路連接並給個PC機配置IP 和子網掩碼
LSW3配置
- 配置 0/0/6
port link-type access
/*在只有一個VLAN通過的情況下接口設置成access*/
port default vlan 6
/*設置0/0/6的接口爲vlan6*/
- 配置 0/0/5
port link-type access
/*設置接口爲access*/
port default vlan 5
設置接口爲vlan5
(3)配置 0/0/2
interface GigabitEthernet0/0/2
port link-type trunk
/*在多個vlan通過的條件下要將接口設置成trunk接口*/
port trunk allow-pass vlan 2 to 2094
(4)配置 0/0/1接口
port link-type trunk
port trunk allow-pass vlan 2 to 4094
配置LSW4
配置0/0/1接口
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
配置0/0/5接口
interface Ethernet0/0/5
port link-type access
port default vlan 5
配置0/0/6接口
port link-type access
port default vlan 6
配置LSW1
配置0/0/1接口
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
配置0/0/2接口
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
聚合0/0/10和0/0/9
interface Eth-Trunk11
/*設置聚合接口,類型爲Trunk並且將聚合接口的名字設置成11*/
trunkport GigabitEthernet 0/0/9 0/0/10
/*將0/0/9 和0/0/10 的接口進行聚合*/
port trunk allow-pass vlan all
/*允許所有VLAN通過*/
/*設置聚合
配置0/0/24接口
port link-type access
port default vlan 5
配置LSW2
配置0/0/1接口
port link-type trunk
port trunk allow-pass vlan 2 to 2094
配置0/0/2接口
port link-type trunk
port trunk allow-pass vlan 2 to 4094
聚合0/0/9和0/0/10接口
interface Eth-Trunk 12
trunkport GigabitEthernet 0/0/10 0/0/9
port trunk allow-pass
配置0/0/24接口
port link-type access
port default vlan 6
配置路由器
配置G0/0/1接口
interface gthernet0/0/1
ip address 10.0.1.100 24
配置E0/0/0接口
interface Ethernet0/0/1
ip address 10.0.5.100 24
配置G0/0/0接口
interface GigabitEthernet0/0/0
ip address 10.0.2.100 255.255.255.0
注意事項
鏈路聚合的刪除:
首先進入鏈路聚合口,將各個接口的命令撤回 undo trunkport GigabitEthernet + 接口號
再刪除鏈路聚合口 unde interface Eth-Trunk 12 +聚合口號
將接口加入鏈路聚合的方法 : 再接口頁面輸入 命令eth-trunk +接口號
IP地址必須與網關對應
PC1和PC2 分別處在不同的網關中