MPLS Service
此内容尚不支持你的语言。
show mpls table
Section titled “show mpls table”[Command] show mpls table
[Purpose] View MPLS label information
[View] System view
[Use Cases]
sonic# show mpls table Inbound Label Type Nexthop Outbound Label ----------------------------------------------- 16 LDP 10.1.1.1 implicit-null 17 LDP 10.1.1.1 implicit-null 18 LDP 10.1.1.1 16mpls enable
Section titled “mpls enable”[Command] mpls enable
[Purpose] Enable mpls function
[View] System configuration view
[Use Cases]
sonic# configuresonic(config)# interface ethernet 18sonic(config-if-18)# mpls enablefilter-list
Section titled “filter-list”[Command] filter-listfilter-name**{seqnumberpermit {ip-address|any}|permit {ip-address|any}|remarkString}**
[Purpose] Configure MPLS label filtering policies based on IPv4 address families
[Parameter]
| Parameter | Description |
|---|---|
| seq number | Configure the rule ID. If not configured, the default increment for each dispatch is 5. Configuration range: 1 to 4,294,967,295 |
| permit ip-address | Configure MPLS label filtering conditions, supporting IP address filtering in both A.B.C.D/M and A.B.C.D formats. |
| permit any | Configure Transparent MPLS Label Filtering Policy |
| remark String | Set description information for the tag policy |
[View] System configuration view
[Use Cases]
sonic# configuresonic(config)# filter-list test permit 1.1.1.1ipv6 filter-list
Section titled “ipv6 filter-list”[Command] ipv6 filter-listfilter-name**{seqnumberpermit {ipv6-address|any}|permit {ipv6-address|any}|remarkString}**
[Purpose] Configure MPLS label filtering policies based on IPv6 address families
[Parameter]
| Parameter | Description |
|---|---|
| seq number | Configure the rule ID. If not configured, the default increment for each dispatch is 5. Configuration range: 1 to 4,294,967,295 |
| permit ip-address | Configure MPLS label filtering conditions, supporting IP address filtering in bothX:X::X:X/M and X:X::X:X formats. |
| permit any | Configure Transparent MPLS Label Filtering Policy |
| remark String | Set description information for the tag policy |
[View] System configuration view
[Use Cases]
sonic# configuresonic(config)# ipv6 filter-list test permit fe80::1mpls ldp
Section titled “mpls ldp”[Command] mpls ldp
[Purpose] Enter MPLS LDP view
[View] System configuration view
[Use Cases]
sonic(config)# mpls ldpsonic(config-ldp)#Static MPLS Configuration
Section titled “Static MPLS Configuration”ip route
Section titled “ip route”[Command] ip routeA.B.C.D/M|A.B.C.D gwlabelnumber
[Purpose] Configure IPv4 Route Forwarding with MPLS Labeling
[Parameter]
| Parameter | Description |
|---|---|
| A.B.C.D/M|A.B.C.D | IPv4 address or network segment |
| gw | Next hop address of the router |
| number | MPLS label ID to be marked, configuration range: 16 to 1048575 |
[View] System configuration view
[Use Cases]
sonic# configuresonic(config)# ip route 1.1.1.1/24 1.1.1.1 label 100ipv6 route
Section titled “ipv6 route”[Command] ipv6 routeA.B.C.D/M|A.B.C.D gwlabelnumber
[Purpose] Configure IPv6 Route Forwarding with MPLS Labeling
[Parameter]
| Parameter | Description |
|---|---|
| X:X::X:X/M | IPv6 network segment |
| gw | Next hop address of the router |
| number | MPLS label ID to be marked, configuration range: 16 to 1048575 |
[View] System configuration view
[Use Cases]
sonic# configuresonic(config)# ipv6 route 2000::/64 2024::1 label 100mpls lsp
Section titled “mpls lsp”[Command] mpls lspnumber A.B.C.D|X:X::X:X**{number|explicit-null|implicit-null}**
[Purpose] Configure MPLS Static Label Processing Policy
[Parameter]
| Parameter | Description |
|---|---|
| number | MPLS label ID to be marked, configuration range: 16 to 1048575 |
| A.B.C.D|X:X::X:X | IPv4 or IPv6 address of the next hop |
| explicit-null | The MPLS label in the neighbor notification message will be set to explicit-null (0). Upon receiving the message, the neighbor will automatically drop this MPLS label. |
| implicit-null | Inform the neighbor that it is currently the second-to-last hop in the MPLS path and pop the MPLS label here. |
[View] System configuration view
[Use Cases]
sonic# configuresonic(config)# mpls lsp 100 10.1.1.2 200MPLS LDP Configuration
Section titled “MPLS LDP Configuration”show mpls ldp neighbor
Section titled “show mpls ldp neighbor”[Command] show mpls ldp neighbor
[Purpose] View MPLS LDP Neighbor Relationships
[View] System view
[Use Cases]
sonic# show mpls ldp neighborAF ID State Remote Address Uptimeipv4 2.2.2.2 OPERATIONAL 2.2.2.2 01:02:51show mpls ldp binding
Section titled “show mpls ldp binding”[Command] show mpls ldp binding
[Purpose] View MPLS LDP label information
[Parameter]
| Parameter | Description |
|---|---|
| Local Label | How locally marked MPLS labels are applied to packets and communicated to neighbors |
| Remote Label | Received from the neighbor regarding how to mark MPLS labels on packets |
| In Use | If it being used by the device |
| imp-null | Inform other neighbors that this is the final MPLS node in the local network, instructing them to drop the MPLS label when transmitting packets. |
[View] System view
[Use Cases]
sonic# show mpls ldp bindingAF Destination Nexthop Local Label Remote Label In Useipv4 1.1.1.1/32 2.2.2.2 imp-null 20 noipv4 2.2.2.2/32 2.2.2.2 17 imp-null yesipv4 3.3.3.3/32 2.2.2.2 18 16 yesipv4 10.1.1.0/24 2.2.2.2 imp-null imp-null noipv4 16.0.0.0/24 2.2.2.2 19 17 yesipv4 20.1.1.0/24 2.2.2.2 16 imp-null yesipv4 192.168.1.0/24 2.2.2.2 20 imp-null yesipv4 192.168.2.0/24 2.2.2.2 imp-null 22 noipv4 192.168.3.0/24 2.2.2.2 21 18 yesshow mpls ldp neighbor detail
Section titled “show mpls ldp neighbor detail”[Command] show mpls ldp neighbor detail
[Purpose] View MPLS LDP Neighbor Negotiation Parameters
[View] System view
[Use Cases]
sonic# show mpls ldp neighbor detailPeer LDP Identifier: 2.2.2.2:0 TCP connection: 1.1.1.1:646 - 2.2.2.2:34173 Authentication: none Session Holdtime: 180 secs; KeepAlive interval: 60 secs State: OPERATIONAL; Downstream-Unsolicited Up time: 01:05:38 Messages sent/rcvd: - Keepalive Messages: 64/66 - Address Messages: 3/1 - Address Withdraw Messages: 1/0 - Notification Messages: 0/0 - Capability Messages: 0/0 - Label Mapping Messages: 15/11 - Label Request Messages: 0/0 - Label Withdraw Messages: 0/0 - Label Release Messages: 0/0 - Label Abort Request Messages: 0/0 Capabilities Sent: - Dynamic Announcement (0x0506) - Typed Wildcard (0x050B) - Unrecognized Notification (0x0603) Capabilities Received: - Dynamic Announcement (0x0506) - Typed Wildcard (0x050B) - Unrecognized Notification (0x0603) LDP Discovery Sources: IPv4: Interface: Ethernet16mpls ldp
Section titled “mpls ldp”[Command] mpls ldp
[Purpose] Enable MPLS LDP on the interface
[View] Interface configuraton view
[Use Cases]
sonic# configuresonic(config)# interface ethernet 1sonic(config-if-1)# mpls ldpdual-stack cisco-interop
Section titled “dual-stack cisco-interop”[Command] dual-stack cisco-interop
[Purpose] Enable MPLS LDP dual-stack neighbor establishment
[View] MPLS LDP configuration view
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# dual-stack cisco-interoprouter-id
Section titled “router-id”[Command] router-idip-address
[Purpose] Configure the router-id of MPLS LDP
[Parameter]
| Parameter | Description |
|---|---|
| ip-address | Name the router-id in the format of an ipv4 address |
[View] MPLS LDP configuration view
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# router-id 1.1.1.1dual-stack transport-connection prefer ipv4
Section titled “dual-stack transport-connection prefer ipv4”[Command] dual-stack transport-connection prefer ipv4
[Purpose] MPLS dual stack uses IPv4 to transmit LDP information
[Notes] Dual-stack neighbor establishment defaults to transmitting LDP information over IPv6.
[View] MPLS LDP configuration view
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# dual-stack transport-connection prefer ipv4discovery hello {holdtime|interval}
Section titled “discovery hello {holdtime|interval}”[Command] **rdiscovery hello {holdtime|interval}**VALUE
[Purpose] Configure the keepalive period and transmission interval for MPLS LDP Hell packets
[Parameter]
| Parameter | Description |
|---|---|
| holdtime | Set the keepalive interval for hello packets |
| interval | Set the transmission interval for hello packets |
| VALUE | Time (Unit: seconds), Configuration Range: 1-65535 |
[View] MPLS LDP configuration view
[Notes] The keepalive period and transmission interval configured for hello packets in this view take effect globally. The keepalive period for hello packets is determined through negotiation with the peer device, adopting the minimum value from both ends as the keepalive period.
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# discovery hello interval 10sonic(config-ldp)# discovery hello holdtime 20address-family
Section titled “address-family”[Command] address-familyipv4|ipv6
[Purpose] Enter the ipv4 or ipv6 address-family
[View] System configuration view
[Use Cases]
sonic# configuresonic(config-ldp)# address-family ipv4sonic(config-ldp-af)#ordered-control
Section titled “ordered-control”[Command] ordered-control
[Purpose] Configure MPLS LDP for Label Ordering Control Mode
[View] System configuration view
[Use Cases]
sonic# configuresonic(config)# ordered-controlneighbor
Section titled “neighbor”[Command] neighborLDP-ID**{passwordString|session {holdtime|interval}Time|ttl-security {disable|hopsHops}}**
[Purpose] Configure relevant parameters for the specified LDP neighbor
[Parameter]
| Parameter | Description |
|---|---|
| LDP-ID | Specify the router-id of the LDP neighbor |
| password String | To establish an LDP neighbor, the keys at both ends must match for successful neighbor establishment |
| session interval Time | Set the interval for sending LDP Keepalive messages to specified neighbors. Configuration range: 5 to 65535, unit: seconds. Default: 60 seconds. |
| session holdtime Time | Set the LDP Keepalive aging period for specified neighbors. Configuration range: 15 to 65535 seconds. Unit: seconds. Default: 300 seconds. |
| ttl-security hops Hops | Set the hop count for specifying remote neighbors. If exceeded, the neighbor relationship is terminated. Configuration range: 1-254. Default: disabled. |
| ttl-security disable | Disable hop count restrictions with specified remote neighbors |
[View] MPLS LDP configuration view
[Notes] A timeout in either the LDP Keepalive or LDP Hello message will cause the neighbor relationship to break.
When configuring hop count with a remote neighbor, the neighbor relationship is maintained if only one party meets the hop count setting.
The priority of the LDP Keepalive message interval specified in the neighbor configuration takes precedence over the LDP Keepalive message interval configured in the address family configuration view.
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# neighbor 192.168.15.119 ttl-security hops 100sonic(config-ldp)# neighbor 192.168.15.119 session interval 60sonic(config-ldp)# neighbor 192.168.15.119 password 123456exit-address-family
Section titled “exit-address-family”[Command] exit-address-family
[Purpose] Exit Address Family Configuration Mode
[View] MPLS LDP address-family configuration view
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# address-family ipv4sonic(config-ldp-af)# exit-address-familydiscovery {hello holdtime|interval}
Section titled “discovery {hello holdtime|interval}”[Command] **discovery {hello holdtime|interval}**Time
[Purpose] Configure address family-based LDP hello message transmission and aging cycle
[Parameter]
| Parameter | Description |
|---|---|
| holdtime Time | Configure the aging period for LDP Hello messages. Range: 1 to 65535, unit: seconds. Default: 15 seconds. |
| interval Time | Configure the transmission interval for LDP hello packets. Range: 1 to 65535, unit: seconds. Default: 5 seconds. |
[View] MPLS LDP address-family configuration view
[Use Cases]
sonic(config)# mpls ldpsonic(config-ldp)# address-family ipv4sonic(config-ldp-af)# discovery hello holdtime 10discovery transport-address
Section titled “discovery transport-address”[Command] discovery transport-addressip-address
[Purpose] Configure the IPv4/IPv6 addresses advertised by the LDP address family
[Parameter]
| Parameter | Description |
|---|---|
| ip-address | This parameter is typically configured as the IP address of the interconnect interface. |
[View] MPLS LDP address-family configuration view
[Use Cases]
sonic(config)# mpls ldpsonic(config-ldp)# address-family ipv4sonic(config-ldp-af)# discovery transport-address 100.1.1.1neighbor
Section titled “neighbor”[Command] neighborip-addresstargeted
[Purpose] Establish a neighbor relationship with a remote LDP neighbor
[Parameter]
| Parameter | Description |
|---|---|
| ip-address | IP information advertised externally by the peer during neighbor establishment |
[View] MPLS LDP address-family configuration view
[Notes] The IP address configured here is the one advertised when establishing the LDP neighbor, not a custom router ID.
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# address-family ipv4sonic(config-ldp-af)# neighbor 100.1.3.2 targetedttl-security disable
Section titled “ttl-security disable”[Command] ttl-security disable
[Purpose] Disable ttl-security
[View] MPLS LDP address-family configuration view
[Notes] This command must be executed when using MPLS IPv6 scenarios.
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# address-family ipv6sonic(config-ldp-af)# ttl-security disablesession {holdtime|interval}
Section titled “session {holdtime|interval}”[Command] **session {holdtime|interval}**Time
[Purpose] Configuring LDP Keepalive Message Transmission and Aging Periods Based on Address Families
[Parameter]
| Parameter | Description |
|---|---|
| holdtime Time | Configuration Range: 15–65535, Unit: seconds, Default Value: 300 seconds |
| interval Time | Configuration Range: 5 to 65535, Unit: seconds, Default Value: 60 seconds |
[View] MPLS LDP address-family configuration view
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# address-family ipv4sonic(config-ldp-af)# session interval 60label local advertise {to
Section titled “label local advertise {to”[Command] label local advertise {tofilter-name**|forfilter-name|explicit-null|explicit-null forfilter-name}**
[Purpose] MPLS Label Policy for Local Reception or Declaration Based on Address Family Binding
[Parameter]
| Parameter | Description |
|---|---|
| filter-name | Name of the MPLS Neighbor Filtering Policy |
| to filter-name | Only send MPLS label information for neighbors that meet the filtering criteria |
| for filter-name | Send only MPLS label information for routes that meet the filtering criteria |
| explicit-null | Enable MPLS label popping at the last-hop device |
| explicit-null for filter-name | MPLS label last-hop pop occurs only on routes that comply with the filtering policy |
[View] MPLS LDP address-family configuration view
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# address-family ipv6sonic(config-ldp-af)# label local advertise explicit-null for testlabel local allocate {host-routes|for
Section titled “label local allocate {host-routes|for”[Command] label local allocate {host-routes|forfilter-name**}**
[Purpose] Address Family-Based Binding of Local Marking MPLS Labeling Policy
[Parameter]
| Parameter | Description |
|---|---|
| host-routes | Enable MPLS label assignment only for local host routing. |
| for filter-name | Assign MPLS labels only to routes that match the filtering policy. |
[View] MPLS LDP address-family configuration view
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# address-family ipv6sonic(config-ldp-af)# label local allocate for testlabel remote accept {from
Section titled “label remote accept {from”[Command] label remote accept {fromfilter-name**|forfilter-name}**
[Purpose] MPLS Labeling Strategy Based on Address Family Binding Neighbor Route Declaration
[Parameter]
| Parameter | Description |
|---|---|
| from filter-name | Only receive MPLS label information advertised by neighbors that comply with the filtering policy. |
| for filter-name | Only accept MPLS label information that conforms to the filtering policy routing. |
[View] MPLS LDP address-family configuration view
[Use Cases]
sonic# configuresonic(config)# mpls ldpsonic(config-ldp)# address-family ipv6sonic(config-ldp-af)# label remote acceptMPLS L2VPN Configuration
Section titled “MPLS L2VPN Configuration”show mpls l2vpn
Section titled “show mpls l2vpn”[Command] show mpls l2vpn
[Purpose] View MPLS L2VPN information
[View] Syetem view
[Use Cases]
sonic# show mpls l2vpnVPN Name VPN Type AC Interface Pseudowires---------- ---------- -------------- -------------test vpls Vlan100 220show mpls pseudowires
Section titled “show mpls pseudowires”[Command] show mpls pseudowires
[Purpose] View MPLS PW information
[View] Syetem view
[Use Cases]
sonic# show mpls pseudowiresInterface Neighbor Labels Protocol Status0 20.2.2.1 16/17 static UPshow mpls pseudowires detail
Section titled “show mpls pseudowires detail”[Command] show mpls pseudowires detail
[Purpose] View detailed output information for MPLS PWs
[View] Syetem view
[Use Cases]
sonic(config-if-16)# do show mpls pseudowires detailInterface: 220 Neighbor: 3.3.3.3 Local Label: 16 Remote Label: 21 Protocol: ldp VC-ID: 1 Status: Up Next Hop: 10.1.1.1, via Ethernet16 Next Hop label: 18pseudowire static
Section titled “pseudowire static”[Command] spseudowire staticname
[Purpose] Configure static password
[View] Syetem configuration view
[Notes] Manually specify the address of the remote PE and statically configure the MPLS labels for both ingress and egress directions of the PW. After binding the L2VPN instance, this provides a virtual connection for packet forwarding between different sites.
[Use Cases]
sonic# configuresonic(config)# pseudowire static pw1mpls label local
Section titled “mpls label local”[Command] mpls label localnumberremotenumber
[Purpose] Configure the local and remote labels for static pseudowires
[Parameter]
| Parameter | Description |
|---|---|
| number | Value range: 16–1048575 |
[View] PW configuration view
[Use Cases]
sonic# configuresonic(config)# pseudowire static pw1sonic(config-static-pw)# mpls label local 16 remote 17neighbor {A.B.C.D|X:X::X:X}
Section titled “neighbor {A.B.C.D|X:X::X:X}”[Command] neighbor {A.B.C.D|X:X::X:X }
[Purpose] Configure the static remote neighbor address for the static PW.
[Parameter]
| Parameter | Description |
|---|---|
| A.B.C.D | Remote PW’s IPv4 neighbor address |
| X:X::X:X | Remote PW’s IPv6 neighbor address |
[View] PW configuration view
[Use Cases]
sonic# configuresonic(config)# pseudowire static pw1sonic(config-static-pw)# neighbor 10.1.1.1pseudowire
Section titled “pseudowire”[Command] npseudowirename
[Purpose] Configure Dynamic PW
[Parameter]
| Parameter | Description |
|---|---|
| name | Custom PW Name, String type |
[View] System configuration view
[Use Cases]
sonic# configuresonic(config)# pseudowire pw[Command] pw-idID
[Purpose] Configure the dynamic PW’s pw-id
[Parameter]
| Parameter | Description |
|---|---|
| ID | Allowable value range: 1–4,294,967,295 |
[View] PW configuration view
[Notes] The PW-ID configured on PE devices connected to adjacent ends must be consistent for the PW state to be up.
[Use Cases]
sonic# configuresonic(config)# pseudowire pw1sonic(config-pw)# pw-id 1neighbor lsr-id
Section titled “neighbor lsr-id”[Command] neighbor lsr-idA.B.C.D
[Purpose] Configure dynamic PW lsr-id
[Parameter]
| Parameter | Description |
|---|---|
| A.B.C.D | PW Neighbor’s IPv4 Address |
[View] PW configuration view
[Use Cases]
sonic# configuresonic(config)# pseudowire pw1sonic(config-pw)# neighbor lsr-id 1.1.1.1pw-status disable
Section titled “pw-status disable”[Command] pw-status disable no pw-status disable
[Purpose] Modify the status of the dynamic password
[View] PW configuration view
[Use Cases]
sonic# configuresonic(config)# pseudowire pw1sonic(config-pw)# pw-status disable[Command] L2vpnnametype {vpls|vpws}
[Purpose] Configure different L2VPN types—VPLS and VPWS—based on specific usage scenarios.
[Parameter]
| Parameter | Description |
|---|---|
| vpls | Virtual Private LAN Service (VPLS) is a point-to-multipoint Layer 2 Virtual Private Network (L2VPN). |
| vpws | Virtual Private Network service is a point-to-point L2VPN. |
[View] System configuration view
[Use Cases]
sonic# configuresonic(config)# l2vpn VPLS type vplsmember pseudowire
Section titled “member pseudowire”[Command] member pseudowirename
[Purpose] Add PW members to the existing L2VPN.
[Parameter]
| Parameter | Description |
|---|---|
| name | Static or Dynamic PW Name |
[View] L2VPN configuration view
[Use Cases]
sonic# configuresonic(config)# l2vpn VPLS type vplssonic(config-l2vpn)# member pseudowire pw1member interface {ethernet|vlan|link-aggregation}
Section titled “member interface {ethernet|vlan|link-aggregation}”[Command] member interface {ethernet|vlan|link-aggregation}
[Purpose] Add an AC interface to the existing L2VPN.
[Parameter]
| Parameter | Description |
|---|---|
| ethernet | Physical interface |
| vlan | Vlan interface |
| link-aggregation | Lag interface |
[Notes] VPLS only supports VLAN interfaces, while VPWS only supports physical interfaces and LAG interfaces.
[View] L2VPN configuration view
[Use Cases]
sonic# configuresonic(config)# l2vpn VPLS type vplssonic(config-l2vpn)# member interface ethernet 1MPLS L3VPN Configuration
Section titled “MPLS L3VPN Configuration”[Command] show {ipv4|ipv6} route vrf all
[Purpose] View the routing and MPLS label information for all VRFs currently configured on the device.
[View] System configuration view
[Use Cases]
sonic# show ip route vrf allCodes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure
VRF l3vpn:B> 10.1.0.1/32 [200/0] via 3.3.3.3 (vrf default) (recursive), label 144, weight 1, 01:46:43 * via 10.1.1.1, Ethernet16 (vrf default), label 16/144, weight 1, 01:46:43B> 90.0.0.0/24 [200/0] via 3.3.3.3 (vrf default) (recursive), label 144, weight 1, 01:46:43 * via 10.1.1.1, Ethernet16 (vrf default), label 16/144, weight 1, 01:46:43B> 192.168.1.0/24 [200/0] via 3.3.3.3 (vrf default) (recursive), label 144, weight 1, 01:46:43 * via 10.1.1.1, Ethernet16 (vrf default), label 16/144, weight 1, 01:46:43B> 192.168.2.0/24 [200/0] via 3.3.3.3 (vrf default) (recursive), label 144, weight 1, 01:46:43 * via 10.1.1.1, Ethernet16 (vrf default), label 16/144, weight 1, 01:46:43B> 192.168.3.0/24 [200/0] via 3.3.3.3 (vrf default) (recursive), label 144, weight 1, 01:46:43 * via 10.1.1.1, Ethernet16 (vrf default), label 16/144, weight 1, 01:46:43B> 192.168.6.0/24 [200/0] via 3.3.3.3 (vrf default) (recursive), label 144, weight 1, 01:46:43 * via 10.1.1.1, Ethernet16 (vrf default), label 16/144, weight 1, 01:46:43
VRF default:S>* 0.0.0.0/0 [1/0] via 192.168.2.1, Ethernet1, weight 1, 03:39:43C>* 1.1.1.1/32 is directly connected, Loopback0, 03:39:29O>* 2.2.2.2/32 [110/20] via 10.1.1.1, Ethernet16, label implicit-null, weight 1, 01:46:51O>* 3.3.3.3/32 [110/20] via 10.1.1.1, Ethernet16, label 16, weight 1, 01:46:51O 10.1.1.0/24 [110/10] is directly connected, Ethernet16, weight 1, 01:47:47C>* 10.1.1.0/24 is directly connected, Ethernet16, 01:47:47O>* 16.0.0.0/24 [110/20] via 10.1.1.1, Ethernet16, label 17, weight 1, 01:46:51O>* 20.1.1.0/24 [110/10010] via 10.1.1.1, Ethernet16, label implicit-null, weight 1, 01:46:52O>* 192.168.1.0/24 [110/20] via 10.1.1.1, Ethernet16, label implicit-null, weight 1, 01:46:51C>* 192.168.2.0/24 is directly connected, Ethernet1, 03:39:43O>* 192.168.3.0/24 [110/20] via 10.1.1.1, Ethernet16, label 18, weight 1, 01:46:51address-family {ipv4|ipv6} vpn
Section titled “address-family {ipv4|ipv6} vpn”[Command] saddress-family {ipv4|ipv6} vpn
[Purpose] Enter ipv4/ipv6 MPLS VPN view
[View] BGP configuration view
[Use Cases]
sonic# configuresonic(config)# router bgp 200sonic(config-router)# address-family ipv6 vpnsonic(config-router-af)#neighbor {A.B.C.D|X:X::X:X} activate
Section titled “neighbor {A.B.C.D|X:X::X:X} activate”[Command] neighbor {A.B.C.D|X:X::X:X } activate
[Purpose] Activate the MPLS VPN neighbor. Once activated, the neighbor can propagate MPLS VPN routes.
[View] MPLS VPN configuration view
[Use Cases]
sonic# configuresonic(config)# router bgp 200sonic(config-router)# address-family ipv6 vpnsonic(config-router-af)# neighbor 1111::1 activatelabel vpn export {auto|allocation-mode {per-vrf|per-nexthop}|
Section titled “label vpn export {auto|allocation-mode {per-vrf|per-nexthop}|”[Command] label vpn export {auto|allocation-mode {per-vrf|per-nexthop}|Label-number}
[Purpose] Configure MPLS VPN Label Assignment Method
[Parameter]
| Parameter | Description |
|---|---|
| auto | Automatically assign MPLS labels to routes |
| allocation-mode | per-vrf Routes are assigned labels based on the VRF; routes within the same VRF are assigned the same label. |
| allocation-mode | per-nexthop Assign labels based on the next hop of the route; routes with the same next hop are assigned the same label. |
| Label-number | Manually set the MPLS label assigned to the route |
[View] BGP configuration view
[Use Cases]
sonic# configuresonic(config)# router bgp 200 vrf 1sonic(config-router)# address-family ipv6 unicastsonic(config-router-af)# label vpn export autompls bgp l3vpn-multi-domain-switching
Section titled “mpls bgp l3vpn-multi-domain-switching”[Command] mpls bgp l3vpn-multi-domain-switching
[Purpose] Redistribute labeled L3VPN routes from the AS to neighboring ASes
[View] Interface configuration view
[Notes]
The mpls bgp l3vpn-multi-domain-switching configuration on an interface is used to convert VPN labels into BGP labels. However, it must be configured before BGP is configured; otherwise, it will not take effect. It is recommended that after configuring this command on an interface, the user be prompted to execute clear bgp * to reset all BGP sessions and regenerate BGP labels.
[Use Cases]
sonic# configuresonic(config)# interface ethernet 2sonic(config-if-2)# mpls bgp l3vpn-multi-domain-switchingrd vpn export {
Section titled “rd vpn export {”[Command] rd vpn export {as-number:number|ip-address:number}
[Purpose] Configuring RD Parameters for an MPLS VPN
[Parameter]
| Parameter | Description |
|---|---|
| as-number:number | HQoS configuration file name |
| ip-address:number | RD parameter configuration format, for example: 1.1.1.1:2 |
[View] BGP configuration view
[Notes] RD parameters are designed to resolve conflicts where internal networks at both ends of a VPN share the same route segment. RD is combined with the VPN prefix (VPNv4 address) to form a unique VPNv4 address. This combination of RD and VPN prefix creates a new routing entry, enabling each VPN route to be uniquely identified.
[Use Cases]
sonic# configuresonic(config)# router bgp 200 vrf 1sonic(config-router)# address-family ipv6 unicastsonic(config-router-af)# rd vpn export 2:2rt vpn {import|export|both} {A.B.C.D:MN|EF:OPQR|GHJK:MN}
Section titled “rt vpn {import|export|both} {A.B.C.D:MN|EF:OPQR|GHJK:MN}”[Command] rt vpn {import|export|both} {A.B.C.D:MN |EF:OPQR |GHJK:MN }
[Purpose] Configuring the RT Parameters for an MPLS VPN
[Parameter]
| Parameter | Description |
|---|---|
| import | Configure RT parameters for receiving VPN routes |
| export | Configure RT parameters for sending VPN routes |
| both | Configure RT parameters for both receiving and sending VPN routes simultaneously. |
| A.B.C.D:MN | RT parameter format, for example: 1.1.1.1:22 |
| EF:OPQR | RT parameter format, for example: 11:2222 |
| GHJK:MN | RT parameter format, for example: 1111:22 |
[View] BGP configuration view
[Notes] RT parameters control the identifiers used for exporting and importing VPN routes, ensuring that VPN routes are correctly sent and received between different VPNs.
[Use Cases]
sonic# configuresonic(config)# router bgp 200 vrf 1sonic(config-router)# address-family ipv6 unicastsonic(config-router-af)# rt vpn both 2:2{export|import} vpn
Section titled “{export|import} vpn”[Command] {export|import} vpn
[Purpose] Export/Import VPN Routes
[View] BGP configuration view
[Use Cases]
sonic# configuresonic(config)# router bgp 200 vrf 1sonic(config-router)# address-family ipv6 unicastsonic(config-router-af)# import vpnsonic(config-router-af)# export vpn