[Huawei] Cấu hình Vlan routing trên Switch Huawei

Thảo luận trong 'Tổng hợp' bắt đầu bởi 37nguyenson, 26/10/21.

  1. 37nguyenson

    37nguyenson Member

    Bài viết này sẽ hướng dẫn các bạn cấu hình Vlan routing trên thiết bị Switch Huawei theo mô hình ví dụ phía dưới.

    [​IMG]

    1. Tạo Vlan trên các switch và đưa port vào Vlan trên switch 2 và 3 :

    + Switch 1 :

    <Sw1>system-view
    [Sw1]vlan 10
    [Sw1]vlan 20


    + Switch 2 :

    <Sw2>system-view
    [Sw2]vlan 10
    [Sw2]vlan 20
    [Sw2]interface GigabitEthernet 0/0/1
    [Sw2-GigabitEthernet0/0/1]port link-type access
    [Sw2-GigabitEthernet0/0/1]port default vlan 10
    [Sw2-GigabitEthernet0/0/2]quit
    [Sw2]interface GigabitEthernet 0/0/2
    [Sw2-GigabitEthernet0/0/2]port link-type access
    [Sw2-GigabitEthernet0/0/2]port default vlan 20
    [Sw2-GigabitEthernet0/0/2]quit


    + Switch 3 :

    <Sw3>system-view
    [Sw3]vlan 10
    [Sw3]vlan 20
    [Sw2]interface GigabitEthernet 0/0/1
    [Sw2-GigabitEthernet0/0/1]port link-type access
    [Sw2-GigabitEthernet0/0/1]port default vlan 10
    [Sw2-GigabitEthernet0/0/2]quit
    [Sw2]interface GigabitEthernet 0/0/2
    [Sw2-GigabitEthernet0/0/2]port link-type access
    [Sw2-GigabitEthernet0/0/2]port default vlan 20
    [Sw2-GigabitEthernet0/0/2]quit


    2. Cấu hình Link aggregation và trunking :

    + Switch 1 :

    [Sw1]interface Eth-Trunk 0
    [Sw1-Eth-Trunk0]mode lacp-static
    [Sw1-Eth-Trunk0]trunkport GigabitEthernet 0/0/3
    [Sw1-Eth-Trunk0]trunkport GigabitEthernet 0/0/4
    [Sw1-Eth-Trunk0]quit
    [Sw1]interface Eth-Trunk 1
    [Sw1-Eth-Trunk1]mode lacp-static
    [Sw1-Eth-Trunk1]trunkport GigabitEthernet 0/0/5
    [Sw1-Eth-Trunk1]trunkport GigabitEthernet 0/0/6


    + Switch 2 :

    [Sw2]interface Eth-Trunk 0
    [Sw2-Eth-Trunk0]mode lacp-static
    [Sw2-Eth-Trunk0]trunkport GigabitEthernet 0/0/3
    [Sw2-Eth-Trunk0]trunkport GigabitEthernet 0/0/4


    + Switch 3 :

    [Sw3]interface Eth-Trunk 0
    [Sw3-Eth-Trunk0]mode lacp-static
    [Sw3-Eth-Trunk0]trunkport GigabitEthernet 0/0/5
    [Sw3-Eth-Trunk0]trunkport GigabitEthernet 0/0/6


    - Kiểm tra cấu hình vừa tạo.

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    - Cấu hình interface Eth-Trunk là port trunk và cho phép vlan trên nó.

    + Switch 1 :

    [Sw1]interface Eth-Trunk 0
    [Sw1-Eth-Trunk0]port link-type trunk
    [Sw1-Eth-Trunk0]port trunk allow-pass vlan all
    [Sw1-Eth-Trunk0]quit
    [Sw1]interface Eth-Trunk 1
    [Sw1-Eth-Trunk1]port link-type trunk
    [Sw1-Eth-Trunk1]port trunk allow-pass vlan all


    + Switch 2 :

    [Sw2]interface Eth-Trunk 0
    [Sw2-Eth-Trunk0]port link-type trunk
    [Sw2-Eth-Trunk0]port trunk allow-pass vlan all


    + Switch 3 :

    [Sw3]interface Eth-Trunk 0
    [Sw3-Eth-Trunk0]port link-type trunk
    [Sw3-Eth-Trunk0]port trunk allow-pass vlan all


    - Kiểm tra cấu hình vừa tạo.

    [​IMG]

    [​IMG]

    [​IMG]

    3.Cấu hình địa chỉ IP cho interface Vlan 10 và 20 :

    [Sw1]interface Vlanif 10
    [Sw1-Vlanif10]ip address 192.168.10.1 24
    [Sw1-Vlanif10]quit
    [Sw1]interface Vlanif 20
    [Sw1-Vlanif20]ip address 192.168.20.1 24


    - Kiểm tra cấu hình.

    [​IMG]

    4.Kiểm tra kết nối từ trên Host :

    - Kiểm tra kết nối từ Host 1 đến các Host còn lại.

    [​IMG]

    [​IMG]

    [​IMG]

    !!! Cảm ơn các bạn đã theo dõi bài viết !!!
     

trang này