-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[topo_m0] Add new topo for mgmt tor router (#6208)
What is the motivation for this PR? For mgmt tor router, both testing methodology and physical wiring pattern are quite different with existing T0/T1/ topo. Adding this topo can let us filter unrelated test cases from mgmt network. How did you do it? Add a new topo (inherit from t0-52) Enhance topo config and topo_facts for including interfaces Enhance minigraph templates to support generate minigraph for this new topo How did you verify/test it? Generate minigraph and deploy to DUT. Use ./testbed-cli.sh deploy-mg to gen&deploy minigraph with new topo m0 successfully, All the related configuration are correct pushed to DUT after deploy.
- Loading branch information
Showing
7 changed files
with
378 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 @@ | ||
t0-leaf.j2 |
This file contains 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,134 @@ | ||
{% 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 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 | ||
! | ||
{% for name, iface in host['interfaces'].items() %} | ||
interface {{ name }} | ||
{% if name.startswith('Loopback') %} | ||
description LOOPBACK | ||
{% else %} | ||
mtu 9214 | ||
no switchport | ||
no shutdown | ||
{% 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 | ||
no shutdown | ||
{% 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'] | ipaddr('address') }} | ||
! | ||
graceful-restart restart-time {{ bgp_gr_timer }} | ||
graceful-restart | ||
! | ||
{% for asn, remote_ips in host['bgp']['peers'].items() %} | ||
{% for remote_ip in remote_ips %} | ||
neighbor {{ remote_ip }} remote-as {{ asn }} | ||
neighbor {{ remote_ip }} description {{ asn }} | ||
{% if remote_ip | 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 |
This file contains 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
Oops, something went wrong.