Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_cli_config_gen): Add MPLS Tunnel Support for Traceroute and PMTU Discovery #4219

Merged
merged 9 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# mpls-2

## Table of Contents

- [Management](#management)
- [Management Interfaces](#management-interfaces)
- [MPLS](#mpls)
- [MPLS and LDP](#mpls-and-ldp)

## Management

### Management Interfaces

#### Management Interfaces Summary

##### IPv4

| Management Interface | Description | Type | VRF | IP Address | Gateway |
| -------------------- | ----------- | ---- | --- | ---------- | ------- |
| Management1 | oob_management | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 |

##### IPv6

| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway |
| -------------------- | ----------- | ---- | --- | ------------ | ------------ |
| Management1 | oob_management | oob | MGMT | - | - |

#### Management Interfaces Device Configuration

```eos
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
```

## MPLS

### MPLS and LDP

#### MPLS and LDP Summary

| Setting | Value |
| -------- | ---- |
| MPLS IP Enabled | True |
| LDP Enabled | False |
| LDP Router ID | - |
| LDP Interface Disabled Default | False |
| LDP Transport-Address Interface | - |
| ICMP TTL-Exceeded Tunneling Enabled | True |

#### MPLS and LDP Device Configuration

```eos
!
mpls ip
!
mpls ldp
shutdown
!
mpls icmp ttl-exceeded tunneling
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# mpls-3

## Table of Contents

- [Management](#management)
- [Management Interfaces](#management-interfaces)
- [MPLS](#mpls)
- [MPLS and LDP](#mpls-and-ldp)

## Management

### Management Interfaces

#### Management Interfaces Summary

##### IPv4

| Management Interface | Description | Type | VRF | IP Address | Gateway |
| -------------------- | ----------- | ---- | --- | ---------- | ------- |
| Management1 | oob_management | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 |

##### IPv6

| Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway |
| -------------------- | ----------- | ---- | --- | ------------ | ------------ |
| Management1 | oob_management | oob | MGMT | - | - |

#### Management Interfaces Device Configuration

```eos
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
```

## MPLS

### MPLS and LDP

#### MPLS and LDP Summary

| Setting | Value |
| -------- | ---- |
| MPLS IP Enabled | True |
| LDP Enabled | False |
| LDP Router ID | 192.168.1.2 |
| LDP Interface Disabled Default | True |
| LDP Transport-Address Interface | - |

#### MPLS and LDP Device Configuration

```eos
!
mpls ip
!
mpls ldp
interface disabled default
router-id 192.168.1.2
```
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ interface Loopback0
| LDP Router ID | 192.168.1.1 |
| LDP Interface Disabled Default | True |
| LDP Transport-Address Interface | Loopback0 |
| ICMP Fragmentation-Needed Tunneling Enabled | True |

#### MPLS and LDP Device Configuration

Expand All @@ -120,6 +121,8 @@ mpls ldp
router-id 192.168.1.1
no shutdown
transport-address interface Loopback0
!
mpls icmp fragmentation-needed tunneling
```

### MPLS Interfaces
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
!RANCID-CONTENT-TYPE: arista
!
transceiver qsfp default-mode 4x10G
!
hostname mpls-2
!
no enable password
no aaa root
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
!
mpls ip
!
mpls ldp
shutdown
!
mpls icmp ttl-exceeded tunneling
!
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
!RANCID-CONTENT-TYPE: arista
!
transceiver qsfp default-mode 4x10G
!
hostname mpls-3
!
no enable password
no aaa root
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
!
mpls ip
!
mpls ldp
interface disabled default
router-id 192.168.1.2
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ mpls ldp
no shutdown
transport-address interface Loopback0
!
mpls icmp fragmentation-needed tunneling
!
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# test for mpls.ldp.shutdown: true and mpls.icmp.ttl_exceeded_tunneling: true
mpls:
ip: true
ldp:
interface_disabled_default: false
shutdown: true
icmp:
ttl_exceeded_tunneling: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# test for mpls.ldp.shutdown and mpls.icmp not defined
mpls:
ip: true
ldp:
interface_disabled_default: true
router_id: 192.168.1.2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ mpls:
router_id: 192.168.1.1
shutdown: false
transport_address_interface: Loopback0
icmp:
fragmentation_needed_tunneling: true

ethernet_interfaces:
- name: Ethernet1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ monitor-sessions
monitor-telemetry-influx
monitor-telemetry-postcard-policy
mpls
mpls-2
mpls-3
none_configuration
ntp
object-tracking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;router_id</samp>](## "mpls.ldp.router_id") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;shutdown</samp>](## "mpls.ldp.shutdown") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;transport_address_interface</samp>](## "mpls.ldp.transport_address_interface") | String | | | | Interface Name. |
| [<samp>&nbsp;&nbsp;icmp</samp>](## "mpls.icmp") | Dictionary | | | | Enables the LSRs to generate ICMP reply messages and deliver them to the originating host. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;fragmentation_needed_tunneling</samp>](## "mpls.icmp.fragmentation_needed_tunneling") | Boolean | | | | Enables the MPLS tunneling of MTU exceeded ICMP replies (fragmentation needed, packet too big). |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ttl_exceeded_tunneling</samp>](## "mpls.icmp.ttl_exceeded_tunneling") | Boolean | | | | Enables the MPLS tunneling of TTL exceeded ICMP replies. |

=== "YAML"

Expand All @@ -27,4 +30,13 @@

# Interface Name.
transport_address_interface: <str>

# Enables the LSRs to generate ICMP reply messages and deliver them to the originating host.
icmp:

# Enables the MPLS tunneling of MTU exceeded ICMP replies (fragmentation needed, packet too big).
fragmentation_needed_tunneling: <bool>

# Enables the MPLS tunneling of TTL exceeded ICMP replies.
ttl_exceeded_tunneling: <bool>
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
| LDP Router ID | {{ mpls.ldp.router_id | arista.avd.default('-') }} |
| LDP Interface Disabled Default | {{ mpls.ldp.interface_disabled_default | arista.avd.default('-') }} |
| LDP Transport-Address Interface | {{ mpls.ldp.transport_address_interface | arista.avd.default('-') }} |
{% if mpls.icmp.fragmentation_needed_tunneling is arista.avd.defined %}
| ICMP Fragmentation-Needed Tunneling Enabled | {{ mpls.icmp.fragmentation_needed_tunneling }} |
{% endif %}
{% if mpls.icmp.ttl_exceeded_tunneling is arista.avd.defined %}
| ICMP TTL-Exceeded Tunneling Enabled | {{ mpls.icmp.ttl_exceeded_tunneling }} |
{% endif %}

#### MPLS and LDP Device Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,12 @@ mpls ldp
transport-address interface {{ mpls.ldp.transport_address_interface }}
{% endif %}
{% endif %}
{% if mpls.icmp.fragmentation_needed_tunneling is arista.avd.defined(true) or mpls.icmp.ttl_exceeded_tunneling is arista.avd.defined(true) %}
!
{% if mpls.icmp.fragmentation_needed_tunneling is arista.avd.defined(true) %}
mpls icmp fragmentation-needed tunneling
{% endif %}
{% if mpls.icmp.ttl_exceeded_tunneling is arista.avd.defined(true) %}
mpls icmp ttl-exceeded tunneling
{% endif %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -13119,6 +13119,27 @@
"^_.+$": {}
},
"title": "LDP"
},
"icmp": {
"description": "Enables the LSRs to generate ICMP reply messages and deliver them to the originating host.",
"type": "object",
"properties": {
"fragmentation_needed_tunneling": {
"type": "boolean",
"description": "Enables the MPLS tunneling of MTU exceeded ICMP replies (fragmentation needed, packet too big).",
"title": "Fragmentation Needed Tunneling"
},
"ttl_exceeded_tunneling": {
"type": "boolean",
"description": "Enables the MPLS tunneling of TTL exceeded ICMP replies.",
"title": "TTL Exceeded Tunneling"
}
},
"additionalProperties": false,
"patternProperties": {
"^_.+$": {}
},
"title": "ICMP"
}
},
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7759,6 +7759,18 @@ keys:
transport_address_interface:
description: Interface Name.
type: str
icmp:
description: Enables the LSRs to generate ICMP reply messages and deliver
them to the originating host.
type: dict
keys:
fragmentation_needed_tunneling:
type: bool
description: Enables the MPLS tunneling of MTU exceeded ICMP replies (fragmentation
needed, packet too big).
ttl_exceeded_tunneling:
type: bool
description: Enables the MPLS tunneling of TTL exceeded ICMP replies.
name_server:
deprecation:
warning: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,13 @@ keys:
transport_address_interface:
description: Interface Name.
type: str
icmp:
description: Enables the LSRs to generate ICMP reply messages and deliver them to the originating host.
type: dict
keys:
fragmentation_needed_tunneling:
type: bool
description: Enables the MPLS tunneling of MTU exceeded ICMP replies (fragmentation needed, packet too big).
ttl_exceeded_tunneling:
type: bool
description: Enables the MPLS tunneling of TTL exceeded ICMP replies.
Original file line number Diff line number Diff line change
Expand Up @@ -31027,6 +31027,27 @@
"^_.+$": {}
},
"title": "LDP"
},
"icmp": {
"description": "Enables the LSRs to generate ICMP reply messages and deliver them to the originating host.",
"type": "object",
"properties": {
"fragmentation_needed_tunneling": {
"type": "boolean",
"description": "Enables the MPLS tunneling of MTU exceeded ICMP replies (fragmentation needed, packet too big).",
"title": "Fragmentation Needed Tunneling"
},
"ttl_exceeded_tunneling": {
"type": "boolean",
"description": "Enables the MPLS tunneling of TTL exceeded ICMP replies.",
"title": "TTL Exceeded Tunneling"
}
},
"additionalProperties": false,
"patternProperties": {
"^_.+$": {}
},
"title": "ICMP"
}
},
"additionalProperties": false,
Expand Down
Loading