目標:鏈路聚合 Ip 配置 vlan劃分(筆記摘要)
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 分別處在不同的閘道器中