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

Discussion in 'Tổng hợp' started by bigbang, Nov 24, 2020.

  1. bigbang

    bigbang New Member

    Bài viết này sẽ hướng dẫn các bạn cấu hình vlan trên thiết bị switch Juniper theo mô hình ví dụ phía dưới.
    [​IMG]
    Theo mô hình ta sẽ có 2 switch EX2200, ta sẽ tạo 2 Vlan trên cả hai switch và cấu hình trunk port giữa 2 switch.

    1.Cấu hình Vlan 10 (Marketing) và Vlan 20 (Finance) trên cả 2 switch :

    +Trên Switch A :

    root@SW-A#set vlans marketing vlan-id 10 (Tạo VLAN tên marketing với VLAN-ID 10)
    root@SW-A#set vlans finance vlan-id 20 (Tạo VLAN tên finance với VLAN-ID 20)
    root@SW-A#commit

    +Trên Switch B :

    root@SW-B#set vlans marketing vlan-id 10
    root@SW-B#set vlans finance vlan-id 20
    root@SW-B#commit

    - Để xem lại Vlan đã tạo dùng lệnh.

    root@SW-A#run show vlans
    root@SW-B#run show vlans

    2.Cấu hình interface vào Vlan tướng ứng :

    +Trên Switch A :

    [edit interfaces ge-0/0/11]
    root@SW-A#set unit 0 family ethernet-switching vlan members marketing
    [edit interfaces ge-0/0/12]
    root@SW-A#set unit 0 family ethernet-switching vlan members marketing
    [edit interfaces ge-0/0/13]
    root@SW-A#set unit 0 family ethernet-switching vlan members finance
    [edit interfaces ge-0/0/14]
    root@SW-A#set unit 0 family ethernet-switching vlan members finance
    [edit interfaces ge-0/0/14]
    root@ SW-A#commit

    +Trên Switch B :

    [edit interfaces ge-0/0/11]
    root@SW-B#set unit 0 family ethernet-switching vlan members marketing
    [edit interfaces ge-0/0/12]
    root@SW-B#set unit 0 family ethernet-switching vlan members marketing
    [edit interfaces ge-0/0/13]
    root@SW-B#set unit 0 family ethernet-switching vlan members finance
    [edit interfaces ge-0/0/14]
    root@SW-B#set unit 0 family ethernet-switching vlan members finance
    [edit interfaces ge-0/0/14]
    root@ SW-B#commit

    3.Cấu hình Trunk port :

    + Trên Switch A :

    [edit interfaces ge-0/0/10]
    root@SW-A#set unit 0 family ethernet-switching port-mode trunk
    [edit interfaces ge-0/0/10]
    root@SW-A#set unit 0 family ethernet-switching vlan members all (tất cả các Vlan sẽ cho phép qua port trunk, nhưng sẽ không cho phép untagged frames)
    [edit interfaces ge-0/0/10]
    root@SW-A#set unit 0 family ethernet-switching native-vlan-id 10 (để switch cho phép untagged frames)

    + Trên Switch B :

    [edit interfaces ge-0/0/10]
    root@SW-B#set unit 0 family ethernet-switching port-mode trunk
    [edit interfaces ge-0/0/10]
    root@SW-B#set unit 0 family ethernet-switching vlan members all (tất cả các Vlan sẽ cho phép qua port trunk, nhưng sẽ không cho phép untagged frames)
    [edit interfaces ge-0/0/10]
    root@SW-B#set unit 0 family ethernet-switching native-vlan-id 10 (để switch cho phép untagged frames)

    - Để xem thông tin về native VLAN

    root@SW-A>show vlans native

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

     
  2. hand

    hand New Member

    Bác viết thêm bài định tuyến giữa các vlan nữa đi !
     

Share This Page