Cyber_Security_Notes/A. 第一阶段/拓扑练习/0822_VLAN聚合.md
2024-08-22 18:19:21 +08:00

2.5 KiB

VLAN聚合

image-20240822175016583

一、配置PC的IP、子网掩码、网关

二、配置二层交换机

  • SW2

    <Huawei>u t m
    <Huawei>sys
    [Huawei]sys SW2
    [SW2]vlan batch 10 20 30
    [SW2]port-group 1
    [SW2-port-group-1]group-member g0/0/2 g0/0/3
    [SW2-port-group-1]port link-type access
    [SW2-port-group-1]port def v 10
    [SW2-port-group-1]q
    [SW2]int g0/0/1
    [SW2-GigabitEthernet0/0/1]port link-type trunk 
    [SW2-GigabitEthernet0/0/1]p t a v all
    [SW2-GigabitEthernet0/0/1]q
    [SW2]q
    <SW2>save
    
  • SW3

    <Huawei>u t m
    <Huawei>sys
    [Huawei]sys SW3
    [SW3]v b 10 20 30
    [SW3]port-group 1
    [SW3-port-group-1]group-member g0/0/2 g0/0/3
    [SW3-port-group-1]port link-type access 
    [SW3-port-group-1]port def v 20
    [SW3-port-group-1]q
    [SW3]int g0/0/1
    [SW3-GigabitEthernet0/0/1]port link-type trunk 
    [SW3-GigabitEthernet0/0/1]p t a v all
    [SW3-GigabitEthernet0/0/1]q
    [SW3]q
    <SW3>save
    
  • SW4

    <Huawei>u t m
    <Huawei>sys
    [Huawei]sys SW4
    [SW4]v b 10 20 30
    [SW4]port-group 1
    [SW4-port-group-1]group-member g0/0/2 g0/0/3
    [SW4-port-group-1]port link-type access 
    [SW4-port-group-1]port def v 30
    [SW4-port-group-1]q
    [SW4]int g0/0/1
    [SW4-GigabitEthernet0/0/1]port l	
    [SW4-GigabitEthernet0/0/1]port link-t t
    [SW4-GigabitEthernet0/0/1]p t a v all
    [SW4-GigabitEthernet0/0/1]q
    [SW4]q
    <SW4>save
    

三、配置三层交换机

  • SW1

    <Huawei>u t m
    <Huawei>sys
    [Huawei]sy SW1
    [SW1]v b 10 20 30 100
    [SW1]vlan 100
    [SW1-vlan100]aggregate-vlan 
    [SW1-vlan100]access-vlan 10 20 30
    [SW1-vlan100]q
    [SW1]int vlanif 100
    [SW1-Vlanif100]ip a 192.168.100.254 24
    [SW1-Vlanif100]arp-proxy inter-sub-vlan-proxy enable 
    [SW1-Vlanif100]q
    [SW1]port-group group-member g0/0/1 to g0/0/3
    [SW1-port-group]port link-type trunk 
    [SW1-port-group]port t a v 10 20 30
    

四、测试

  • PING

    PC6>ping 192.168.100.1
    
    Ping 192.168.100.1: 32 data bytes, Press Ctrl_C to break
    From 192.168.100.6: Destination host unreachable
    From 192.168.100.1: bytes=32 seq=1 ttl=127 time=78 ms
    From 192.168.100.1: bytes=32 seq=2 ttl=127 time=78 ms
    From 192.168.100.1: bytes=32 seq=3 ttl=127 time=94 ms
    From 192.168.100.1: bytes=32 seq=4 ttl=127 time=78 ms
    From 192.168.100.1: bytes=32 seq=5 ttl=127 time=78 ms
    
    --- 192.168.100.1 ping statistics ---
      5 packet(s) transmitted
      5 packet(s) received
      0.00% packet loss
      round-trip min/avg/max = 78/81/94 ms