Skip to content

Network

The Network configuration section of the Data Model defines how to create networks and update supported network parameters.

From the network section, you can perform some of, but not limited to, the following operations:

  • Creating a new network
  • Modifying supported settings of an existing network such as VLAN ID, VLAN name, VLAN/SVI interface description, gateway settings, DHCP relay settings, and attachments
  • Associating a network with specific switches and switchports in the fabric

After a network is created, name (the data model key used to identify the network) and net_id (VXLAN L2VNID / VNI) cannot be updated. If either value needs to change, delete and recreate the network.

This does not prevent updates to supported switch-facing values such as VLAN ID, vlan_name, VLAN/SVI interface description (int_desc), gateway settings, DHCP relay settings, or attachments.

Diagram
NameTypeConstraintMandatoryDefault Value
networksList[networks]No
network_attach_groupsList[network_attach_groups]No

NameTypeConstraintMandatoryDefault Value
nameStringYes
is_l2_onlyBooleantrue, falseNofalse
vrf_nameStringNo
net_idIntegermin: 1, max: 16777214No
vlan_idIntegermin: 1, max: 4094No
vlan_nameStringNo
int_descStringNo
gw_ip_addressIPNo
gw_ipv6_addressStringNo
secondary_ip_addressesList[secondary_ip_addresses]No
mtu_l3intfIntegerNo9216
l3gw_on_borderBooleantrue, falseNofalse
route_tagIntegermin: 0, max: 4294967295No12345
multicast_group_addressIPNo239.1.1.1
arp_suppressBooleantrue, falseNofalse
route_target_bothBooleantrue, falseNofalse
dhcp_loopback_idIntegermin: 0, max: 1023No
dhcp_serversList[dhcp_servers]No
netflow_enableBooleantrue, falseNofalse
vlan_netflow_monitorStringNo
trm_enableBooleantrue, falseNofalse
network_attach_groupStringNo

NameTypeConstraintMandatoryDefault Value
nameStringYes
switchesList[switches]No

secondary_ip_addresses (vxlan.overlay.networks)

Section titled “secondary_ip_addresses (vxlan.overlay.networks)”
NameTypeConstraintMandatoryDefault Value
ip_addressIPYes
route_tagIntegermin: 0, max: 4294967295No

NameTypeConstraintMandatoryDefault Value
ip_addressIPYes
vrfStringYes

switches (vxlan.overlay.network_attach_groups)

Section titled “switches (vxlan.overlay.network_attach_groups)”
NameTypeConstraintMandatoryDefault Value
hostnameStringYes
portsListString[Regex: (?i)^(?:e|eth(?:ernet)?)((\d)/\d{1,3})$|^(?:po|port-channel)([1-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-6])$]No

The following configuration creates 2 networks: NetworkDMZ and Network1:

  • NetworkDMZ is created as a L2 Only network (no unicast routing). It is assigned a VXLAN L2VNID of 33100, and a VLAN ID of 3100. It is associated with a network_attach_group called ‘dmz’, which will deploy this network on the dc1-leaf1 and dc1-leaf2 switches, and allows the network on the Ethernet1/23 and Ethernet1/24 ports of both switches.
  • Network1 is created as a routed network (unicast routing enabled). It is associated with the VrfRed VRF. It is assigned a VXLAN L2VNID of 30100, and a VLAN ID of 100. The network is assigned a GW IP address of 192.168.10.1/24 with a route tag of 12345. It is associated with a ‘network_attach_group’ called ‘esxi’, which will deploy this network on the dc1-leaf1 and dc1-leaf2 switches, and allows the network on the Port-channel10, Port-channel20, Port-channel30 and Port-channel40 of both switches.

The network_attach_group object helps create a mapping of switches and switchports to be associated with one or more networks.

overlay_networks.nac.yaml
vxlan:
overlay:
networks:
# simple example
- name: NetworkDMZ
is_l2_only: true
net_id: 33100
vlan_id: 3100
network_attach_group: dmz
# full example
- name: Network1
is_l2_only: false
vrf_name: VrfRed
net_id: 30100
vlan_id: 100
vlan_name: Network1
gw_ip_address: 192.168.10.1/24
arp_suppress: false
dhcp_loopback_id: 100
dhcp_servers:
- ip_address: 10.125.10.100
vrf: VrfRed
- ip_address: 10.125.10.101
vrf: VrfRed
gw_ipv6_address: 203e:10:15:10::1/128
int_desc: Network1
l3gw_on_border: true
mtu_l3intf: 9216
multicast_group_address: 239.1.1.1
netflow_enable: false
route_target_both: true
route_tag: 12345
secondary_ip_addresses:
- ip_address: 192.168.11.1/24
route_tag: 54321
trm_enable: true
vlan_netflow_monitor: test
network_attach_group: esxi
network_attach_groups:
- name: esxi
switches:
- hostname: dc1-leaf1
ports:
- Port-channel10
- Port-channel20
- Port-channel30
- Port-channel40
- hostname: dc1-leaf2
ports:
- Port-channel10
- Port-channel20
- Port-channel30
- Port-channel40
- name: dmz
switches:
- hostname: dc1-leaf1
ports:
- Ethernet1/23
- Ethernet1/24
- hostname: dc1-leaf2
ports:
- Ethernet1/23
- Ethernet1/24

Enabling Removal Operations (using Ansible)

Section titled “Enabling Removal Operations (using Ansible)”

By default, network removal is disabled for safety. To enable automatic removal:

network_delete_mode: true

The Network configuration section of the Data Model defines how to create/modify networks, and their associated parameters.

From the network section, you can perform some of, but not limited to, the following operations:

  • Creating a new network
  • Modifying settings of an existing network such as name, associated VRF, VXLAN L2VNID, VLAN ID
  • Associating a network with specific switches and switchports in the fabric
Diagram
NameTypeConstraintMandatoryDefault Value
networksList[networks]No
network_attach_groupsList[network_attach_groups]No

NameTypeConstraintMandatoryDefault Value
nameStringYes
is_l2_onlyBooleantrue, falseNofalse
vrf_nameStringNo
net_idIntegermin: 1, max: 16777214No
vlan_idIntegermin: 1, max: 4094No
vlan_nameStringNo
int_descStringNo
gw_ip_addressIPNo
gw_ipv6_addressStringNo
secondary_ip_addressesList[secondary_ip_addresses]No
mtu_l3intfIntegerNo9216
l3gw_on_borderBooleantrue, falseNofalse
route_tagIntegermin: 0, max: 4294967295No12345
multicast_group_addressIPNo239.1.1.1
arp_suppressBooleantrue, falseNofalse
route_target_bothBooleantrue, falseNofalse
dhcp_loopback_idIntegermin: 0, max: 1023No
dhcp_serversList[dhcp_servers]No
netflow_enableBooleantrue, falseNofalse
vlan_netflow_monitorStringNo
trm_enableBooleantrue, falseNofalse
network_attach_groupStringNo

NameTypeConstraintMandatoryDefault Value
nameStringYes
switchesList[switches]No

secondary_ip_addresses (vxlan.overlay.networks)

Section titled “secondary_ip_addresses (vxlan.overlay.networks)”
NameTypeConstraintMandatoryDefault Value
ip_addressIPYes
route_tagIntegermin: 0, max: 4294967295No

NameTypeConstraintMandatoryDefault Value
ip_addressIPYes
vrfStringYes

switches (vxlan.overlay.network_attach_groups)

Section titled “switches (vxlan.overlay.network_attach_groups)”
NameTypeConstraintMandatoryDefault Value
hostnameStringYes
portsListString[Regex: (?i)^(?:e|eth(?:ernet)?)((\d)/\d{1,3})$|^(?:po|port-channel)([1-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-6])$]No

The following configuration creates 2 networks: NetworkDMZ and Network1:

  • NetworkDMZ is created as a L2 Only network (no unicast routing). It is assigned a VXLAN L2VNID of 33100, and a VLAN ID of 3100. It is associated with a network_attach_group called ‘dmz’, which will deploy this network on the dc1-leaf1 and dc1-leaf2 switches, and allows the network on the Ethernet1/23 and Ethernet1/24 ports of both switches.
  • Network1 is created as a routed network (unicast routing enabled). It is associated with the VrfRed VRF. It is assigned a VXLAN L2VNID of 30100, and a VLAN ID of 100. The network is assigned a GW IP address of 192.168.10.1/24 with a route tag of 12345. It is associated with a ‘network_attach_group’ called ‘esxi’, which will deploy this network on the dc1-leaf1 and dc1-leaf2 switches, and allows the network on the Port-channel10, Port-channel20, Port-channel30 and Port-channel40 of both switches.

The network_attach_group object helps create a mapping of switches and switchports to be associated with one or more networks.

overlay_networks.nac.yaml
vxlan:
overlay:
networks:
# simple example
- name: NetworkDMZ
is_l2_only: true
net_id: 33100
vlan_id: 3100
network_attach_group: dmz
# full example
- name: Network1
is_l2_only: false
vrf_name: VrfRed
net_id: 30100
vlan_id: 100
vlan_name: Network1
gw_ip_address: 192.168.10.1/24
arp_suppress: false
dhcp_loopback_id: 100
dhcp_servers:
- ip_address: 10.125.10.100
vrf: VrfRed
- ip_address: 10.125.10.101
vrf: VrfRed
gw_ipv6_address: 203e:10:15:10::1/128
int_desc: Network1
l3gw_on_border: true
mtu_l3intf: 9216
multicast_group_address: 239.1.1.1
netflow_enable: false
route_target_both: true
route_tag: 12345
secondary_ip_addresses:
- ip_address: 192.168.11.1/24
route_tag: 54321
trm_enable: true
vlan_netflow_monitor: test
network_attach_group: esxi
network_attach_groups:
- name: esxi
switches:
- hostname: dc1-leaf1
ports:
- Port-channel10
- Port-channel20
- Port-channel30
- Port-channel40
- hostname: dc1-leaf2
ports:
- Port-channel10
- Port-channel20
- Port-channel30
- Port-channel40
- name: dmz
switches:
- hostname: dc1-leaf1
ports:
- Ethernet1/23
- Ethernet1/24
- hostname: dc1-leaf2
ports:
- Ethernet1/23
- Ethernet1/24

The Network configuration section of the Data Model defines how to create/modify networks, and their associated parameters.

From the network section, you can perform some of, but not limited to, the following operations:

  • Creating a new network
  • Modifying settings of an existing network such as name, associated VRF, VXLAN L2VNID, VLAN ID
  • Associating a network with specific switches and switchports in the fabric
Diagram
NameTypeConstraintMandatoryDefault Value
networksList[networks]No
network_attach_groupsList[network_attach_groups]No

NameTypeConstraintMandatoryDefault Value
nameStringYes
is_l2_onlyBooleantrue, falseNofalse
vrf_nameStringNo
net_idIntegermin: 1, max: 16777214No
vlan_idIntegermin: 1, max: 4094No
vlan_nameStringNo
int_descStringNo
gw_ip_addressIPNo
gw_ipv6_addressStringNo
secondary_ip_addressesList[secondary_ip_addresses]No
mtu_l3intfIntegerNo9216
l3gw_on_borderBooleantrue, falseNofalse
route_tagIntegermin: 0, max: 4294967295No12345
multicast_group_addressIPNo239.1.1.1
arp_suppressBooleantrue, falseNofalse
route_target_bothBooleantrue, falseNofalse
dhcp_loopback_idIntegermin: 0, max: 1023No
dhcp_serversList[dhcp_servers]No
netflow_enableBooleantrue, falseNofalse
vlan_netflow_monitorStringNo
trm_enableBooleantrue, falseNofalse
network_attach_groupStringNo

NameTypeConstraintMandatoryDefault Value
nameStringYes
switchesList[switches]No

secondary_ip_addresses (vxlan.overlay.networks)

Section titled “secondary_ip_addresses (vxlan.overlay.networks)”
NameTypeConstraintMandatoryDefault Value
ip_addressIPYes
route_tagIntegermin: 0, max: 4294967295No

NameTypeConstraintMandatoryDefault Value
ip_addressIPYes
vrfStringYes

switches (vxlan.overlay.network_attach_groups)

Section titled “switches (vxlan.overlay.network_attach_groups)”
NameTypeConstraintMandatoryDefault Value
hostnameStringYes
portsListString[Regex: (?i)^(?:e|eth(?:ernet)?)((\d)/\d{1,3})$|^(?:po|port-channel)([1-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-6])$]No
torsList[tors]No

tors (vxlan.overlay.network_attach_groups.switches)

Section titled “tors (vxlan.overlay.network_attach_groups.switches)”
NameTypeConstraintMandatoryDefault Value
hostnameStringYes
portsListString[Regex: (?i)^(?:e|eth(?:ernet)?)((\d)/\d{1,3})$|^(?:po|port-channel)([1-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-6])$]No

The following configuration creates 2 networks: NetworkDMZ and Network1:

  • NetworkDMZ is created as a L2 Only network (no unicast routing). It is assigned a VXLAN L2VNID of 33100, and a VLAN ID of 3100. It is associated with a network_attach_group called ‘dmz’, which will deploy this network on the dc1-leaf1 and dc1-leaf2 switches, and allows the network on the Ethernet1/23 and Ethernet1/24 ports of both switches.
  • Network1 is created as a routed network (unicast routing enabled). It is associated with the VrfRed VRF. It is assigned a VXLAN L2VNID of 30100, and a VLAN ID of 100. The network is assigned a GW IP address of 192.168.10.1/24 with a route tag of 12345. It is associated with a ‘network_attach_group’ called ‘esxi’, which will deploy this network on the dc1-leaf1 and dc1-leaf2 switches, and allows the network on the Port-channel10, Port-channel20, Port-channel30 and Port-channel40 of both switches.

The network_attach_group object helps create a mapping of switches and switchports to be associated with one or more networks.

overlay_networks.nac.yaml
vxlan:
overlay:
networks:
# simple example
- name: NetworkDMZ
is_l2_only: true
net_id: 33100
vlan_id: 3100
network_attach_group: dmz
# full example
- name: Network1
is_l2_only: false
vrf_name: VrfRed
net_id: 30100
vlan_id: 100
vlan_name: Network1
gw_ip_address: 192.168.10.1/24
arp_suppress: false
dhcp_loopback_id: 100
dhcp_servers:
- ip_address: 10.125.10.100
vrf: VrfRed
- ip_address: 10.125.10.101
vrf: VrfRed
gw_ipv6_address: 203e:10:15:10::1/128
int_desc: Network1
l3gw_on_border: true
mtu_l3intf: 9216
multicast_group_address: 239.1.1.1
netflow_enable: false
route_target_both: true
route_tag: 12345
secondary_ip_addresses:
- ip_address: 192.168.11.1/24
route_tag: 54321
trm_enable: true
vlan_netflow_monitor: test
network_attach_group: esxi
network_attach_groups:
- name: esxi
switches:
- hostname: dc1-leaf1
ports:
- Port-channel10
- Port-channel20
- Port-channel30
- Port-channel40
- hostname: dc1-leaf2
ports:
- Port-channel10
- Port-channel20
- Port-channel30
- Port-channel40
- name: dmz
switches:
- hostname: dc1-leaf1
ports:
- Ethernet1/23
- Ethernet1/24
- hostname: dc1-leaf2
ports:
- Ethernet1/23
- Ethernet1/24