Hướng dẫn cấu hình Ethernet Ring Protection Switching trên JunOS

Hướng dẫn cấu hình Ethernet Ring Protection Switching trên JunOS

Tổng quan: Hãy làm theo các bước dưới đây để cấu hình chuyển mạch bảo vệ vòng Ethernet (ERPS) trên thiết bị của bạn.

Cấu hình Ethernet Ring Protection Switching

Mô hình kế thừa được mô tả như sau:

[edit protocols]

protection-group {

    ethernet-ring ring-name (

        node-id mac-address;

        ring-protection-link-owner;

        east-interface {

            control-channel channel-name {

            ring-protection-link-end;}

        west-interface {

            node-id mac-address;

            control-channel channel-name {

            ring-protection-link-end;}

        data-channel {

            vlan number;}

        guard-interval number;

        restore-interval number;}}

Đối với mỗi vòng (ring), cần cấu hình một nhóm bảo vệ (protection group). Mỗi node có thể chứa nhiều vòng Ethernet, vì vậy cần có nhiều nhóm bảo vệ tương ứng với các vòng Ethernet liên quan.

Ba tham số thời gian (restore-interval, guard-interval, và hold-interval) có thể được cấu hình ở cấp độ nhóm bảo vệ. Đây là các cấu hình toàn cục và sẽ được áp dụng cho tất cả các vòng Ethernet nếu các vòng đó không có cấu hình cụ thể hơn cho các giá trị này. Nếu không có tham số nào được cấu hình ở cấp độ nhóm bảo vệ, thì cấu hình toàn cục của tham số đó sẽ sử dụng giá trị mặc định.

Ví dụ: Cấu hình Ring Protection Switching Ethernet trên Router dòng MX

Ví dụ này mô tả cách cấu hình chuyển mạch bảo vệ vòng Ethernet trên một router dòng MX.

Yêu cầu

Ví dụ này sử dụng các thành phần phần cứng và phần mềm sau:

  • Router node 1 chạy hệ điều hành Junos OS với hai cổng Gigabit Ethernet.
  • Router node 2 chạy hệ điều hành Junos OS với hai cổng Gigabit Ethernet.
  • Router node 3 chạy hệ điều hành Junos OS với hai cổng Gigabit Ethernet.

Tổng quan về Vòng Ethernet và Topology

Phần này mô tả ví dụ cấu hình cho một vòng gồm ba node. Topology của vòng được minh họa trong Hình 1.

Hình 1: Ví dụ về Three-Node Ring Topology

Topology (Kiến trúc liên kết mạng)

Phần cấu hình dưới đây chỉ áp dụng cho kênh RAPS (Ring Automatic Protection Switching – Kênh tự động chuyển mạch bảo vệ cho vòng). Bridge domain dành cho lưu lượng người dùng vẫn là bridge domain thông thường. Ngoại lệ duy nhất là: nếu một bridge domain chứa một cổng thuộc vòng (ring port), thì bắt buộc phải chứa cả cổng còn lại của cùng vòng đó.

Cấu hình Three-Node Ring

Để cấu hình Ethernet Ring Protection Switching (ERPS) cho một vòng gồm ba node, hãy thực hiện các bước sau:

Cấu hình Ring Protection Switching trên Three-Node Ring

Quy trình từng bước

  • Cấu hình Node 1

interfaces {

     ge-1/0/1 {

          vlan-tagging;

          encapsulation flexible-ethernet-services;

          unit 1 {

               encapsulation vlan-bridge;

               vlan-id 100;}}

     ge-1/2/4 {

          vlan-tagging;

          encapsulation flexible-ethernet-services;

          unit 1 {

               encapsulation vlan-bridge;

               vlan-id 100;}}}

bridge-domains {

    bd1 {

         domain-type bridge;

         interface ge-1/2/4.1;

         interface ge-1/0/1.1;}}

protocols {

    protection-group {

        ethernet-ring pg101 {

        node-id 00:01:01:00:00:01;

        ring-protection-link-owner;

            east-interface {

                 control-channel ge-1/0/1.1;

                 ring-protection-link-end;}

            west-interface {

                control-channel ge-1/2/4.1;}}}}

protocols {

    oam {

          ethernet {

              connectivity-fault-management {

                  action-profile rmep-defaults {

                      default-action {

                           interface-down;}}

                  maintenance-domain d1 {

                       level 0;

                       maintenance-association 100 {

                            mep 1 {

                                interface ge-1/0/1;

                                remote-mep 2 {

                                    action-profile rmep-defaults;}}}}

                 maintenance-domain d2 {

                     level 0;

                     maintenance-association 100 {

                         mep 1 {

                             interface ge-1/2/4;

                             remote-mep 2 {

                                 action-profile rmep-defaults;}}}}}}}}

  • Cấu hình Node 2

interfaces {

    ge-1/0/2 {

        vlan-tagging;

        encapsulation flexible-ethernet-services;

        unit 1 {

             encapsulation vlan-bridge;

             vlan-id 100;}}

    ge-1/2/1 {

        vlan-tagging;

        encapsulation flexible-ethernet-services;

        unit 1 {

            encapsulation vlan-bridge;

            vlan-id 100;}}}

bridge-domains {

    bd1 {

        domain-type bridge;

        interface ge-1/2/1.1;

        interface ge-1/0/2.1;}}

protocols {

    protection-group {

        ethernet-ring pg102 {

            east-interface {

                control-channel ge-1/0/2.1;}

            west-interface {

                control-channel ge-1/2/1.1;}}}}

protocols {

    oam {

        ethernet {

            connectivity-fault-management {

                action-profile rmep-defaults {

                    default-action {

                        interface-down;}}

                maintenance-domain d1 {

                    level 0;

                    maintenance-association 100 {

                        mep 2 {

                            interface ge-1/2/1;

                            remote-mep 1 {

                                action-profile rmep-defaults;}}}}

                maintenance-domain d3 {

                    level 0;

                    maintenance-association 100 {

                        mep 1 {

                            interface ge-1/0/2;

                            remote-mep 2 {

                                action-profile rmep-defaults;}}}}}}}}

  • Cấu hình Node 3

interfaces {

    ge-1/0/4 {

        vlan-tagging;

        encapsulation flexible-ethernet-services;

        unit 1 {

             encapsulation vlan-bridge;

             vlan-id 100;}}

    ge-1/0/3 {

        vlan-tagging;

        encapsulation flexible-ethernet-services;

        unit 1 {

            encapsulation vlan-bridge;

            vlan-id 100;}}}

bridge-domains {

    bd1 {

        domain-type bridge;

        interface ge-1/0/4.1;

        interface ge-1/0/3.1;}}

protocols {

    protection-group {

        ethernet-ring pg103 {

            east-interface {

                control-channel ge-1/0/3.1;}

            west-interface {

                control-channel ge-1/0/4.1;}}}}

protocols {

    oam {

        ethernet {

            connectivity-fault-management {

                action-profile rmep-defaults {

                    default-action {

                        interface-down;}}

                maintenance-domain d2 {

                    level 0;

                    maintenance-association 100 {

                        mep 2 {

                            interface ge-1/0/4;

                            remote-mep 1 {

                                action-profile rmep-defaults;}}}}

                maintenance-domain d3 {

                    level 0;

                    maintenance-association 100 {

                        mep 2 {

                            interface ge-1/0/3;

                            remote-mep 1 {

                                action-profile rmep-defaults;}}}}}}}}

Ví dụ: Kết quả đầu ra của Ethernet RPS

Phần này cung cấp các ví dụ về kết quả đầu ra (output) dựa trên cấu hình được trình bày trong phần Ví dụ: Cấu hình Chuyển mạch Bảo vệ Vòng Ethernet trên Router dòng MX. Các lệnh show được sử dụng trong các ví dụ này có thể giúp xác minh cấu hình và kiểm tra hoạt động chính xác của hệ thống.

Trạng thái bình thường — Node giữ vai trò RPL Owner (Ring Protection Link Owner)

Nếu vòng mạng không có sự cố, lệnh show sẽ trả về kết quả sau cho Node 1:

user@node1> show protection-group ethernet-ring aps

Ethernet Ring Name  Request/state  No Flush  Ring Protection Link Blocked 

pg101               NR             No        Yes                       

Originator  Remote Node ID

Yes

user@node1> show protection-group ethernet-ring interface

Ethernet ring port parameters for protection group pg101

Interface    Control Channel  Forward State  Ring Protection Link End 

ge-1/0/1     ge-1/0/1.1       discarding     Yes                     

ge-1/2/4     ge-1/2/4.1       forwarding     No                     

Signal Failure  Admin State

Clear          IFF ready

Clear          IFF ready

user@node1> show protection-group ethernet-ring node-state

Ethernet ring    APS State    Event         Ring Protection Link Owner

pg101            idle         NR-RB         Yes                        

Restore Timer  Quard Timer  Operation state

disabled       disabled    operational

user@node1> show protection-group ethernet-ring statistics group-name pg101

Ethernet Ring statistics for PG pg101

RAPS sent                        : 1

RAPS received                    : 0

Local SF happened:               : 0

Remote SF happened:              : 0

NR event happened:               : 0

NR-RB event happened:            : 1

Trạng thái bình thường — Các Node còn lại

Đối với Node 2 và Node 3, kết quả đầu ra (output) sẽ giống nhau:

user@node2> show protection-group ethernet-ring aps

Ethernet Ring Name  Request/state  No Flush  Ring Protection Link Blocked

pg102               NR             No        Yes                       

Originator  Remote Node ID

No          00:01:01:00:00:01

user@node2> show protection-group ethernet-ring interface

Ethernet ring port parameters for protection group pg102

Interface    Control Channel  Forward State  Ring Protection Link End

ge-1/2/1     ge-1/2/1.1       forwarding     No                      

ge-1/0/2     ge-1/0/2.1       forwarding     No                      

Signal Failure  Admin State

Clear          IFF ready

Clear          IFF ready

user@node2> show protection-group ethernet-ring node-state

Ethernet ring    APS State    Event         Ring Protection Link Owner

pg102            idle         NR-RB         No                       

Restore Timer  Quard Timer  Operation state

disabled       disabled    operational

user@node2> show protection-group ethernet-ring statistics group-name pg102

Ethernet Ring statistics for PG pg101

RAPS sent                        : 0

RAPS received                    : 1

Local SF happened:               : 0

Remote SF happened:              : 0

NR event happened:               : 0

NR-RB event happened:            : 1

Tình huống sự cố — Node giữ vai trò RPL Owner

Nếu vòng mạng xảy ra sự cố đường truyền giữa Node 2 và Node 3, thì lệnh show trên Node 1 sẽ cho kết quả đầu ra như sau:

user@node1> show protection-group ethernet-ring aps

Ethernet Ring Name  Request/state  No Flush  Ring Protection Link Blocked 

pg101               SF             NO        No                          

Originator  Remote Node ID

No          00:01:02:00:00:01

user@node1> show protection-group ethernet-ring interface

Ethernet ring port parameters for protection group pg101

Interface    Control Channel  Forward State  Ring Protection Link End 

ge-1/0/1     ge-1/0/1.1       forwarding     Yes                     

ge-1/2/4     ge-1/2/4.1       forwarding     No             

Signal Failure  Admin State

Clear           IFF ready

Clear           IFF ready

user@node1> show protection-group ethernet-ring node-state

Ethernet ring    APS State    Event         Ring Protection Link Owner

pg101            protected    SF            Yes                       

Restore Timer  Quard Timer  Operation state

disabled       disabled     operational

user@node1> show protection-group ethernet-ring statistics group-name pg101

Ethernet Ring statistics for PG pg101

RAPS sent                        : 1

RAPS received                    : 1

Local SF happened:               : 0

Remote SF happened:              : 1

NR event happened:               : 0

NR-RB event happened:            : 1

Tình huống sự cố — Các Node còn lại

Đối với Node 2 và Node 3, kết quả đầu ra sẽ giống nhau:

user@node2> show protection-group ethernet-ring aps

Ethernet Ring Name  Request/state  No Flush  Ring Protection Link Blocked 

pg102               SF             No        No                          

Originator  Remote Node ID

Yes         00:00:00:00:00:00

user@node2> show protection-group ethernet-ring interface

Ethernet ring port parameters for protection group pg102

Interface    Control Channel  Forward State  Ring Protection Link End

ge-1/2/1     ge-1/2/1.1       forwarding     No                       

ge-1/0/2     ge-1/0/2.1       discarding     No 

Signal Failure  Admin State

Clear           IFF ready

set             IFF ready

user@node2> show protection-group ethernet-ring node-state

Ethernet ring    APS State    Event         Ring Protection Link Owner 

pg102            idle         NR-RB         No                         

Restore Timer  Quard Timer  Operation state

disabled       disabled     operational

user@node2> show protection-group ethernet-ring statistics group-name pg102

Ethernet Ring statistics for PG pg101

RAPS sent                        : 1

RAPS received                    : 1

Local SF happened:               : 1

Remote SF happened:              : 0

NR event happened:               : 0

NR-RB event happened:            : 1

 

Chúc các bạn thực hiện thành công. Hi vọng bài viết này sẽ giúp ích cho các bạn trong công việc. Nếu bạn có vấn đề gì thắc mắc đừng ngần ngại liên hệ với chúng tôi theo thông tin dưới đây để được hỗ trợ thêm.

Hẹn gặp lại các bạn trong các bài viết tiếp theo!

CÔNG TY CỔ PHẦN DỊCH VỤ CÔNG NGHỆ DATECH

• Địa chỉ: Số 23E4 KĐT Cầu Diễn, Tổ 7, Phú Diễn, Bắc Từ Liêm, Hà Nội

• Điện thoại: 02432012368

• Hotline: 098 115 6699

• Email: info@datech.vn

• Website: https://datech.vn