1、不同vlan不同⽹段互通
创建vlan
[Huawei]vlan batch 10 20
配置接⼝加⼊vlan
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 20
查看当前接⼝配置信息
[Huawei-GigabitEthernet0/0/2]dis this
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
配置vlanif接⼝IP地址
[Huawei]int Vlanif 10
[Huawei-Vlanif10]ip address 192.168.1.254 24
[Huawei]interface Vlanif 20
[Huawei-Vlanif20]ip address 192.168.2.254 24
检查配置结果:
主机192.168.1.1/24 WG:192.168.1.254
主机192.168.2.1/24 WG:192.168.2.254
配置完成后,1段和2段⽹络互通。
查看vlan信息
[sw5700]dis vlan
The total number of vlans is : 3 //有三个vlan
-
-------------------------------------------------------------------------------
缓期U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------VID Type Ports
--------------------------------------------------------------------------------
1 common UT:GE0/0/3(D) GE0/0/4(D) GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D) GE0/0/9(D) GE0/0/10(D)
GE0/0/11(D) GE0/0/12(D) GE0/0/13(D) GE0/0/14(D)
GE0/0/15(D) GE0/0/16(D) GE0/0/17(D) GE0/0/18(D)
GE0/0/19(D) GE0/0/20(D) GE0/0/21(D) GE0/0/22(D)
GE0/0/23(D) GE0/0/24(D)
10 common UT:GE0/0/1(U)
20 common UT:GE0/0/2(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
2、trunk说明
允许两个vlan互通
交换机1配置如下:
[Huawei]vlan 10
读大学读什么[Huawei]vlan batch 10 20 //批量创建指定vlan号的命令
[Huawei]int g0/0/1张馨予不雅
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei]int g0/0/24
[Huawei-GigabitEthernet0/0/24]port link-type trunk
[Huawei-GigabitEthernet0/0/24]port trunk allow-pass vlan 10 20 [Huawei-GigabitEthernet0/0/24]port trunk pvid vlan 10
交换机2配置如下:
[Huawei]vlan 20
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 20
[Huawei]int g0/0/24
李飞是谁[Huawei-GigabitEthernet0/0/24]port link-type trunk
[Huawei-GigabitEthernet0/0/24]port trunk allow-pass vlan 10 20 [Huawei-GigabitEthernet0/0/24]port trunk pvid vlan 20 [Huawei]dis vlan
天天向上唐嫣The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:GE0/0/2(D) GE0/0/3(D) GE0/0/4(D) GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D) GE0/0/9(D)
GE0/0/10(D) GE0/0/11(D) GE0/0/12(D) GE0/0/13(D)
GE0/0/14(D) GE0/0/15(D) GE0/0/16(D) GE0/0/17(D)
GE0/0/18(D) GE0/0/19(D) GE0/0/20(D) GE0/0/21(D)
GE0/0/22(D) GE0/0/23(D)
TG:GE0/0/24(U)
10 common TG:GE0/0/24(U)
20 common UT:GE0/0/1(U) GE0/0/24(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
[Huawei]
演员秦怡3、链路聚合
链路聚合能够提⾼链路带宽,增强⽹络可⽤性,⽀持负载分担。
1、⼿⼯负载分担模式下所有活动接⼝都参与数据的转发,分担负载流量。
2、LACP模式⽀持链路备份。
3.1、⼿⼯负载均衡
交换机1设置:
sys
[Huawei]sysname sw1
[sw1]interface Eth-Trunk 1
[sw1-Eth-Trunk1]mode manual load-balance
[sw1-Eth-Trunk1]int g0/0/23
[sw1-GigabitEthernet0/0/23]eth-trunk 1
[sw1-GigabitEthernet0/0/23]int g0/0/24
[sw1-GigabitEthernet0/0/24]eth-trunk 1
交换机2设置同上
查看
[sw1]disp eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8 Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------PortName Status Weight
GigabitEthernet0/0/23 Up 1
GigabitEthernet0/0/24 Up 1
3.2、LACP聚合
发布评论