-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[DMA] add UMA and LMA min topo #26742
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5b3b5ce
Add topology and configuration for DMA min topo
wenyiz2021 dd517b5
Add topology and configuration for single node setup
wenyiz2021 641e07c
Add Jinja2 template for single node 6 ports leaf
wenyiz2021 3cc5624
Add lma_single_node_6ports-core.j2 template
wenyiz2021 14ec4b9
Rename lma_single_node_6ports-core.j2 to lma-core.j2
wenyiz2021 4e12fea
Rename lma_single_node_6ports-leaf.j2 to lma-leaf.j2
wenyiz2021 4c36851
Add uma-leaf.j2 template for network configuration
wenyiz2021 21e349d
Create uma-core.j2 template for network configuration
wenyiz2021 58cab35
Rename topo_lma_single_node_6ports.yml to topo_lma.yml
wenyiz2021 7af8f8a
Rename topo_uma_single_node_6ports.yml to topo_uma.yml
wenyiz2021 ad6a26d
Add 'lma' and 'm1' roles to topo_uma.yml
wenyiz2021 aa79589
Add device_type to core configuration
wenyiz2021 0c4f5d3
Replace 'leaf' role with 'lma' and 'm1' roles
wenyiz2021 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,173 @@ | ||
| {# Converged (multi-VRF) topologies render the shared converged config; the | ||
| stock body below is used unchanged on non-converged topologies. #} | ||
| {% if topo_is_multi_vrf | default(false) | bool %} | ||
| {% include 'ceos_converged.j2' %} | ||
| {% else %} | ||
| {% set host = configuration[hostname] %} | ||
| {% set mgmt_ip = ansible_host %} | ||
| {% if vm_type is defined and vm_type == "ceos" %} | ||
| {% set mgmt_if_index = 0 %} | ||
| {% else %} | ||
| {% set mgmt_if_index = 1 %} | ||
| {% endif %} | ||
| no schedule tech-support | ||
| ! | ||
| {% if vm_type is defined and vm_type == "ceos" %} | ||
| agent LicenseManager shutdown | ||
| agent PowerFuse shutdown | ||
| agent PowerManager shutdown | ||
| agent Thermostat shutdown | ||
| agent LedPolicy shutdown | ||
| agent StandbyCpld shutdown | ||
| agent Bfd shutdown | ||
| {% endif %} | ||
| ! | ||
| hostname {{ hostname }} | ||
| ! | ||
| vrf definition MGMT | ||
| rd 1:1 | ||
| ! | ||
| spanning-tree mode mstp | ||
| ! | ||
| aaa root secret 0 123456 | ||
| ! | ||
| username admin privilege 15 role network-admin secret 0 123456 | ||
| ! | ||
| clock timezone UTC | ||
| ! | ||
| lldp run | ||
| lldp management-address Management{{ mgmt_if_index }} | ||
| lldp management-address vrf MGMT | ||
| ! | ||
| snmp-server community {{ snmp_rocommunity }} ro | ||
| snmp-server vrf MGMT | ||
| ! | ||
| ip routing | ||
| ip routing vrf MGMT | ||
| ipv6 unicast-routing | ||
| ! | ||
| {% if disable_ceos_mgmt_gateway is defined and disable_ceos_mgmt_gateway == 'yes'%} | ||
| {% elif vm_mgmt_gw is defined %} | ||
| ip route vrf MGMT 0.0.0.0/0 {{ vm_mgmt_gw }} | ||
| {% else %} | ||
| ip route vrf MGMT 0.0.0.0/0 {{ mgmt_gw }} | ||
| {% endif %} | ||
| ! | ||
| interface Management {{ mgmt_if_index }} | ||
| description TO LAB MGMT SWITCH | ||
| {% if vm_type is defined and vm_type == "ceos" %} | ||
| vrf MGMT | ||
| {% else %} | ||
| vrf forwarding MGMT | ||
| {% endif %} | ||
| ip address {{ mgmt_ip }}/{{ mgmt_prefixlen }} | ||
| no shutdown | ||
| ! | ||
| {% if enable_macsec is defined %} | ||
| mac security | ||
| profile {{ profile.macsec_profile }} | ||
| cipher {{ profile.cipher_suite }} | ||
| key {{ profile.primary_ckn }} 7 {{ profile.primary_cak }} | ||
| traffic unprotected drop | ||
| sci | ||
| {% endif %} | ||
| ! | ||
| {% set ns = namespace(po_mbr_cnt=0) %} | ||
| {% for name, iface in host['interfaces'].items() %} | ||
| {% if name.startswith('Ethernet') %} | ||
| {% set ns.po_mbr_cnt = ns.po_mbr_cnt + 1 %} | ||
| {% endif %} | ||
| {% endfor %} | ||
|
|
||
| {% for name, iface in host['interfaces'].items() %} | ||
| interface {{ name }} | ||
| {% if name.startswith('Loopback') %} | ||
| description LOOPBACK | ||
| {% else %} | ||
| mtu 9214 | ||
| no switchport | ||
| {% endif %} | ||
| {% if name.startswith('Port-Channel') %} | ||
| {% set min_links = (ns.po_mbr_cnt * 0.75) | round(0, 'ceil') | int %} | ||
| port-channel min-links {{ min_links }} | ||
| {% else %} | ||
| {% if enable_macsec is defined %} | ||
| mac security profile {{ profile.macsec_profile }} | ||
| {% endif %} | ||
| {% endif %} | ||
| {% if iface['lacp'] is defined %} | ||
| channel-group {{ iface['lacp'] }} mode active | ||
| lacp rate normal | ||
| {% endif %} | ||
| {% if iface['ipv4'] is defined %} | ||
| ip address {{ iface['ipv4'] }} | ||
| {% endif %} | ||
| {% if iface['ipv6'] is defined %} | ||
| ipv6 enable | ||
| ipv6 address {{ iface['ipv6'] }} | ||
| ipv6 nd ra suppress | ||
| {% endif %} | ||
| no shutdown | ||
| ! | ||
| {% endfor %} | ||
| ! | ||
| interface {{ bp_ifname }} | ||
| description backplane | ||
| no switchport | ||
| {% if host['bp_interface']['ipv4'] is defined %} | ||
| ip address {{ host['bp_interface']['ipv4'] }} | ||
| {% endif %} | ||
| {% if host['bp_interface']['ipv6'] is defined %} | ||
| ipv6 enable | ||
| ipv6 address {{ host['bp_interface']['ipv6'] }} | ||
| ipv6 nd ra suppress | ||
| {% endif %} | ||
| no shutdown | ||
| ! | ||
| router bgp {{ host['bgp']['asn'] }} | ||
| router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }} | ||
| ! | ||
| {% if host['bgp']['confed_asn'] is defined and host['bgp']['confed_peers'] is defined %} | ||
| bgp confederation identifier {{ host['bgp']['confed_asn'] }} | ||
| bgp confederation peers {{ host['bgp']['confed_peers'] }} | ||
| ! | ||
| {% endif %} | ||
| {% for asn, remote_ips in host['bgp']['peers'].items() %} | ||
| {% for remote_ip in remote_ips %} | ||
| neighbor {{ remote_ip }} remote-as {{ asn }} | ||
| neighbor {{ remote_ip }} maximum-routes 0 | ||
| neighbor {{ remote_ip }} description {{ asn }} | ||
| neighbor {{ remote_ip }} next-hop-self | ||
| {% if remote_ip | ansible.utils.ipv6 %} | ||
| address-family ipv6 | ||
| neighbor {{ remote_ip }} activate | ||
| exit | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% endfor %} | ||
| neighbor {{ props.nhipv4 }} remote-as {{ host['bgp']['asn'] }} | ||
| neighbor {{ props.nhipv4 }} maximum-routes 0 | ||
| neighbor {{ props.nhipv4 }} description exabgp_v4 | ||
| neighbor {{ props.nhipv6 }} remote-as {{ host['bgp']['asn'] }} | ||
| neighbor {{ props.nhipv6 }} maximum-routes 0 | ||
| neighbor {{ props.nhipv6 }} description exabgp_v6 | ||
| address-family ipv6 | ||
| neighbor {{ props.nhipv6 }} activate | ||
| exit | ||
| ! | ||
| {% for name, iface in host['interfaces'].items() if name.startswith('Loopback') %} | ||
| {% if iface['ipv4'] is defined %} | ||
| network {{ iface['ipv4'] }} | ||
| {% endif %} | ||
| {% if iface['ipv6'] is defined %} | ||
| network {{ iface['ipv6'] }} | ||
| {% endif %} | ||
| {% endfor %} | ||
| ! | ||
| management api http-commands | ||
| no protocol https | ||
| protocol http | ||
| no shutdown | ||
| ! | ||
| end | ||
| {% endif %} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| {# Converged (multi-VRF) topologies render the shared converged config; the | ||
| stock body below is used unchanged on non-converged topologies. #} | ||
| {% if topo_is_multi_vrf | default(false) | bool %} | ||
| {% include 'ceos_converged.j2' %} | ||
| {% else %} | ||
| {% set host = configuration[hostname] %} | ||
|
wenyiz2021 marked this conversation as resolved.
|
||
| {% set mgmt_ip = ansible_host %} | ||
| {% if vm_type is defined and vm_type == "ceos" %} | ||
| {% set mgmt_if_index = 0 %} | ||
| {% else %} | ||
| {% set mgmt_if_index = 1 %} | ||
| {% endif %} | ||
| no schedule tech-support | ||
| ! | ||
| {% if vm_type is defined and vm_type == "ceos" %} | ||
| agent LicenseManager shutdown | ||
| agent PowerFuse shutdown | ||
| agent PowerManager shutdown | ||
| agent Thermostat shutdown | ||
| agent LedPolicy shutdown | ||
| agent StandbyCpld shutdown | ||
| agent Bfd shutdown | ||
| {% endif %} | ||
| ! | ||
| hostname {{ hostname }} | ||
| ! | ||
| vrf definition MGMT | ||
| rd 1:1 | ||
| ! | ||
| spanning-tree mode mstp | ||
| ! | ||
| aaa root secret 0 123456 | ||
| ! | ||
| username admin privilege 15 role network-admin secret 0 123456 | ||
| ! | ||
| clock timezone UTC | ||
| ! | ||
| lldp run | ||
| lldp management-address Management{{ mgmt_if_index }} | ||
| lldp management-address vrf MGMT | ||
| ! | ||
| snmp-server community {{ snmp_rocommunity }} ro | ||
| snmp-server vrf MGMT | ||
| ! | ||
| ip routing | ||
| ip routing vrf MGMT | ||
| ipv6 unicast-routing | ||
| ! | ||
| {% if disable_ceos_mgmt_gateway is defined and disable_ceos_mgmt_gateway == 'yes'%} | ||
| {% elif vm_mgmt_gw is defined %} | ||
| ip route vrf MGMT 0.0.0.0/0 {{ vm_mgmt_gw }} | ||
| {% else %} | ||
| ip route vrf MGMT 0.0.0.0/0 {{ mgmt_gw }} | ||
| {% endif %} | ||
| ! | ||
| interface Management {{ mgmt_if_index }} | ||
| description TO LAB MGMT SWITCH | ||
| {% if vm_type is defined and vm_type == "ceos" %} | ||
| vrf MGMT | ||
| {% else %} | ||
| vrf forwarding MGMT | ||
| {% endif %} | ||
| ip address {{ mgmt_ip }}/{{ mgmt_prefixlen }} | ||
| no shutdown | ||
| ! | ||
| {% set ns = namespace(po_mbr_cnt=0) %} | ||
| {% for name, iface in host['interfaces'].items() %} | ||
| {% if name.startswith('Ethernet') %} | ||
| {% set ns.po_mbr_cnt = ns.po_mbr_cnt + 1 %} | ||
| {% endif %} | ||
| {% endfor %} | ||
|
|
||
| {% for name, iface in host['interfaces'].items() %} | ||
| interface {{ name }} | ||
| {% if name.startswith('Loopback') %} | ||
| description LOOPBACK | ||
| {% else %} | ||
| mtu 9214 | ||
| no switchport | ||
| {% endif %} | ||
| {% if name.startswith('Port-Channel') %} | ||
| {% set min_links = (ns.po_mbr_cnt * 0.75) | round(0, 'ceil') | int %} | ||
| port-channel min-links {{ min_links }} | ||
| {% endif %} | ||
| {% if iface['lacp'] is defined %} | ||
| channel-group {{ iface['lacp'] }} mode active | ||
| lacp rate normal | ||
| {% endif %} | ||
| {% if iface['ipv4'] is defined %} | ||
| ip address {{ iface['ipv4'] }} | ||
| {% endif %} | ||
| {% if iface['ipv6'] is defined %} | ||
| ipv6 enable | ||
| ipv6 address {{ iface['ipv6'] }} | ||
| ipv6 nd ra suppress | ||
| {% endif %} | ||
| no shutdown | ||
| ! | ||
| {% endfor %} | ||
| ! | ||
| interface {{ bp_ifname }} | ||
| description backplane | ||
| no switchport | ||
| {% if host['bp_interface']['ipv4'] is defined %} | ||
| ip address {{ host['bp_interface']['ipv4'] }} | ||
| {% endif %} | ||
| {% if host['bp_interface']['ipv6'] is defined %} | ||
| ipv6 enable | ||
| ipv6 address {{ host['bp_interface']['ipv6'] }} | ||
| ipv6 nd ra suppress | ||
| {% endif %} | ||
| no shutdown | ||
| ! | ||
| router bgp {{ host['bgp']['asn'] }} | ||
| router-id {{ host['interfaces']['Loopback0']['ipv4'] | ansible.utils.ipaddr('address') }} | ||
| ! | ||
| {% if host['bgp']['confed_asn'] is defined and host['bgp']['confed_peers'] is defined %} | ||
| bgp confederation identifier {{ host['bgp']['confed_asn'] }} | ||
| bgp confederation peers {{ host['bgp']['confed_peers'] }} | ||
| ! | ||
| {% endif %} | ||
|
|
||
| {% for asn, remote_ips in host['bgp']['peers'].items() %} | ||
| {% for remote_ip in remote_ips %} | ||
| neighbor {{ remote_ip }} remote-as {{ asn }} | ||
| neighbor {{ remote_ip }} maximum-routes 0 | ||
| neighbor {{ remote_ip }} description {{ asn }} | ||
| neighbor {{ remote_ip }} allowas-in | ||
| neighbor {{ remote_ip }} next-hop-self | ||
| {% if remote_ip | ansible.utils.ipv6 %} | ||
| address-family ipv6 | ||
| neighbor {{ remote_ip }} activate | ||
| exit | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% endfor %} | ||
| neighbor {{ props.nhipv4 }} remote-as {{ host['bgp']['asn'] }} | ||
| neighbor {{ props.nhipv4 }} description exabgp_v4 | ||
| neighbor {{ props.nhipv6 }} remote-as {{ host['bgp']['asn'] }} | ||
| neighbor {{ props.nhipv6 }} description exabgp_v6 | ||
| address-family ipv6 | ||
| neighbor {{ props.nhipv6 }} activate | ||
| exit | ||
| ! | ||
| {% for name, iface in host['interfaces'].items() if name.startswith('Loopback') %} | ||
| {% if iface['ipv4'] is defined %} | ||
| network {{ iface['ipv4'] }} | ||
| {% endif %} | ||
| {% if iface['ipv6'] is defined %} | ||
| network {{ iface['ipv6'] }} | ||
| {% endif %} | ||
| {% endfor %} | ||
| ! | ||
| management api http-commands | ||
| no protocol https | ||
| protocol http | ||
| no shutdown | ||
| ! | ||
| end | ||
| {% endif %} | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.