Skip to content
Open
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
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ repos:
args: ["./modules/model/examples/model_file"]
- id: terraform-docs-system
args: ["./examples/system"]
- id: terraform-docs-system
args: ["./examples/ipv6_pim"]
- id: terraform-docs-system
args: ["."]
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ module "iosxe" {
| [iosxe_flow_monitor.flow_monitor](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/flow_monitor) | resource |
| [iosxe_flow_record.flow_record](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/flow_record) | resource |
| [iosxe_interface_ethernet.ethernet](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_ethernet) | resource |
| [iosxe_interface_ipv6_pim.ethernet_ipv6_pim](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_ipv6_pim) | resource |
| [iosxe_interface_ipv6_pim.loopback_ipv6_pim](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_ipv6_pim) | resource |
| [iosxe_interface_ipv6_pim.port_channel_ipv6_pim](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_ipv6_pim) | resource |
| [iosxe_interface_ipv6_pim.vlan_ipv6_pim](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_ipv6_pim) | resource |
| [iosxe_interface_loopback.loopback](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_loopback) | resource |
| [iosxe_interface_mpls.ethernet_mpls](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_mpls) | resource |
| [iosxe_interface_mpls.loopback_mpls](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_mpls) | resource |
Expand Down Expand Up @@ -154,6 +158,7 @@ module "iosxe" {
| [iosxe_interface_switchport.ethernet_switchport](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_switchport) | resource |
| [iosxe_interface_switchport.port_channel_switchport](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_switchport) | resource |
| [iosxe_interface_vlan.vlan](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/interface_vlan) | resource |
| [iosxe_ipv6_pim.ipv6_pim](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/ipv6_pim) | resource |
| [iosxe_license.license](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/license) | resource |
| [iosxe_line.line](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/line) | resource |
| [iosxe_lldp.lldp](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/lldp) | resource |
Expand Down
57 changes: 57 additions & 0 deletions examples/ipv6_pim/.terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
version: ">= 0.14.0"

formatter: markdown table

content: |-
# IPv6 PIM Configuration Example

This example demonstrates VRF-aware IPv6 PIM configuration for TRM (Tenant Routed Multicast) deployments.

## Features

- Global IPv6 PIM RP configuration
- VRF-aware IPv6 PIM with isolated multicast domains
- Interface-level IPv6 PIM on Loopbacks and VLANs
- Multiple VRFs with independent RP addresses
- Different multicast group ranges per VRF

## Usage

To run this example you need to execute:

```bash
$ terraform init
$ terraform plan
$ terraform apply
```

Note that this example will create resources. Resources can be destroyed with `terraform destroy`.

## Configuration

#### `ipv6_pim.nac.yaml`

```yaml
{{ include "./ipv6_pim.nac.yaml" }}
```

#### `main.tf`

```hcl
{{ include "./main.tf" }}
```

## Scenario

This configuration demonstrates a complete TRM deployment with:
- 2 VRFs (BLUE, GREEN) with isolated multicast domains
- Global RP: 2001:db8::100 with group range ff70::/12
- VRF BLUE RP: 2001:db8:1::100 with group range ff71::/12
- VRF GREEN RP: 2001:db8:2::100 with group range ff72::/12
- 3 RP Loopbacks with high DR priority
- 3 Multicast VLANs with per-VRF isolation

output:
file: README.md
mode: replace

167 changes: 167 additions & 0 deletions examples/ipv6_pim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<!-- BEGIN_TF_DOCS -->
# IPv6 PIM Configuration Example

This example demonstrates VRF-aware IPv6 PIM configuration for TRM (Tenant Routed Multicast) deployments.

## Features

- Global IPv6 PIM RP configuration
- VRF-aware IPv6 PIM with isolated multicast domains
- Interface-level IPv6 PIM on Loopbacks and VLANs
- Multiple VRFs with independent RP addresses
- Different multicast group ranges per VRF

## Usage

To run this example you need to execute:

```bash
$ terraform init
$ terraform plan
$ terraform apply
```

Note that this example will create resources. Resources can be destroyed with `terraform destroy`.

## Configuration

#### `ipv6_pim.nac.yaml`

```yaml
---
iosxe:
devices:
- name: Router1
host: 10.1.1.1
configuration:
system:
hostname: Router1
ipv6_unicast_routing: true

# VRF Configuration
vrfs:
- name: BLUE
address_family_ipv6:
enable: true
- name: GREEN
address_family_ipv6:
enable: true

# Global and VRF-aware IPv6 PIM Configuration
ipv6_pim:
# Global IPv6 PIM RP
rp_address: 2001:db8::100
rp_address_access_list: ff70::/12
rp_address_bidir: false

# Per-VRF IPv6 PIM RP Configuration
vrfs:
- vrf: BLUE
rp_address: 2001:db8:1::100
rp_address_access_list: ff71::/12
rp_address_bidir: false

- vrf: GREEN
rp_address: 2001:db8:2::100
rp_address_access_list: ff72::/12
rp_address_bidir: false

# Interface Configuration
interfaces:
loopbacks:
# Global RP Loopback
- id: 100
description: "IPv6 PIM RP - Global"
ipv6:
enable: true
addresses:
- prefix: 2001:db8::100/128
pim:
pim: true
dr_priority: 100

# VRF BLUE RP Loopback
- id: 101
description: "IPv6 PIM RP - VRF BLUE"
vrf_forwarding: BLUE
ipv6:
enable: true
addresses:
- prefix: 2001:db8:1::100/128
pim:
pim: true
dr_priority: 100

# VRF GREEN RP Loopback
- id: 102
description: "IPv6 PIM RP - VRF GREEN"
vrf_forwarding: GREEN
ipv6:
enable: true
addresses:
- prefix: 2001:db8:2::100/128
pim:
pim: true
dr_priority: 100

vlans:
# Global VLAN with IPv6 PIM
- id: 10
description: "IPv6 Multicast VLAN - Global"
ipv6:
enable: true
addresses:
- prefix: 2001:db8:10::1/64
pim:
pim: true
bfd: false
bsr_border: false
dr_priority: 10

# VRF BLUE VLAN with IPv6 PIM
- id: 20
description: "IPv6 Multicast VLAN - VRF BLUE"
vrf_forwarding: BLUE
ipv6:
enable: true
addresses:
- prefix: 2001:db8:20::1/64
pim:
pim: true
dr_priority: 20

# VRF GREEN VLAN with IPv6 PIM
- id: 30
description: "IPv6 Multicast VLAN - VRF GREEN"
vrf_forwarding: GREEN
ipv6:
enable: true
addresses:
- prefix: 2001:db8:30::1/64
pim:
pim: true
dr_priority: 30
```

#### `main.tf`

```hcl
module "iosxe" {
source = "netascode/nac-iosxe/iosxe"
version = ">= 0.1.0"

yaml_files = ["ipv6_pim.nac.yaml"]
}

```

## Scenario

This configuration demonstrates a complete TRM deployment with:
- 2 VRFs (BLUE, GREEN) with isolated multicast domains
- Global RP: 2001:db8::100 with group range ff70::/12
- VRF BLUE RP: 2001:db8:1::100 with group range ff71::/12
- VRF GREEN RP: 2001:db8:2::100 with group range ff72::/12
- 3 RP Loopbacks with high DR priority
- 3 Multicast VLANs with per-VRF isolation
<!-- END_TF_DOCS -->
113 changes: 113 additions & 0 deletions examples/ipv6_pim/ipv6_pim.nac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
iosxe:
devices:
- name: Router1
host: 10.1.1.1
configuration:
system:
hostname: Router1
ipv6_unicast_routing: true

# VRF Configuration
vrfs:
- name: BLUE
address_family_ipv6:
enable: true
- name: GREEN
address_family_ipv6:
enable: true

# Global and VRF-aware IPv6 PIM Configuration
ipv6_pim:
# Global IPv6 PIM RP
rp_address: 2001:db8::100
rp_address_access_list: ff70::/12
rp_address_bidir: false

# Per-VRF IPv6 PIM RP Configuration
vrfs:
- vrf: BLUE
rp_address: 2001:db8:1::100
rp_address_access_list: ff71::/12
rp_address_bidir: false

- vrf: GREEN
rp_address: 2001:db8:2::100
rp_address_access_list: ff72::/12
rp_address_bidir: false

# Interface Configuration
interfaces:
loopbacks:
# Global RP Loopback
- id: 100
description: "IPv6 PIM RP - Global"
ipv6:
enable: true
addresses:
- prefix: 2001:db8::100/128
pim:
pim: true
dr_priority: 100

# VRF BLUE RP Loopback
- id: 101
description: "IPv6 PIM RP - VRF BLUE"
vrf_forwarding: BLUE
ipv6:
enable: true
addresses:
- prefix: 2001:db8:1::100/128
pim:
pim: true
dr_priority: 100

# VRF GREEN RP Loopback
- id: 102
description: "IPv6 PIM RP - VRF GREEN"
vrf_forwarding: GREEN
ipv6:
enable: true
addresses:
- prefix: 2001:db8:2::100/128
pim:
pim: true
dr_priority: 100

vlans:
# Global VLAN with IPv6 PIM
- id: 10
description: "IPv6 Multicast VLAN - Global"
ipv6:
enable: true
addresses:
- prefix: 2001:db8:10::1/64
pim:
pim: true
bfd: false
bsr_border: false
dr_priority: 10

# VRF BLUE VLAN with IPv6 PIM
- id: 20
description: "IPv6 Multicast VLAN - VRF BLUE"
vrf_forwarding: BLUE
ipv6:
enable: true
addresses:
- prefix: 2001:db8:20::1/64
pim:
pim: true
dr_priority: 20

# VRF GREEN VLAN with IPv6 PIM
- id: 30
description: "IPv6 Multicast VLAN - VRF GREEN"
vrf_forwarding: GREEN
ipv6:
enable: true
addresses:
- prefix: 2001:db8:30::1/64
pim:
pim: true
dr_priority: 30
7 changes: 7 additions & 0 deletions examples/ipv6_pim/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module "iosxe" {
source = "netascode/nac-iosxe/iosxe"
version = ">= 0.1.0"

yaml_files = ["ipv6_pim.nac.yaml"]
}

11 changes: 11 additions & 0 deletions examples/ipv6_pim/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
terraform {
required_version = ">= 1.8.0"

required_providers {
iosxe = {
source = "CiscoDevNet/iosxe"
version = ">= 0.10.2"
}
}
}

Loading
Loading