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

Refactor(eos_cli_config_gen): Rearrange the eos-cli config for vlan-interfaces to match with EOS #4488

Draft
wants to merge 4 commits into
base: devel
Choose a base branch
from
Draft
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
Expand Up @@ -131,10 +131,10 @@ interface Loopback2
```eos
!
interface Vlan24
ip ospf network point-to-point
ip ospf area 0.0.0.24
ip ospf cost 99
ip ospf network point-to-point
ip ospf authentication message-digest
ip ospf area 0.0.0.24
ip ospf message-digest-key 55 md5 7 <removed>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,15 @@ interface Vlan24
ipv6 address 1b11:3a00:22b0:6::15/64
ipv6 nd managed-config-flag
ipv6 nd prefix 1b11:3a00:22b0:6::/64 infinite infinite no-autoconfig
ipv6 virtual-router address 1b11:3a00:22b0:6::1
ip address virtual 10.10.24.1/24
ipv6 virtual-router address 1b11:3a00:22b0:6::1
!
interface Vlan25
description SVI Description
no shutdown
ipv6 address 1b11:3a00:22b0:16::16/64
ipv6 virtual-router address 1b11:3a00:22b0:16::15
ipv6 virtual-router address 1b11:3a00:22b0:16::14
ipv6 virtual-router address 1b11:3a00:22b0:16::15
!
interface Vlan41
description SVI Description
Expand Down Expand Up @@ -301,17 +301,17 @@ interface Vlan75
multicast ipv6 boundary ff00::/16 out
multicast ipv6 boundary ff01::/16 out
multicast ipv4 static
ipv6 virtual-router address 1b11:3a00:22b0:1000::1
ip address virtual 10.10.75.1/24
ipv6 virtual-router address 1b11:3a00:22b0:1000::1
!
interface Vlan81
description IPv6 Virtual Address
vrf Tenant_C
ipv6 enable
ip address virtual 10.10.81.1/24
ipv6 address virtual fc00:10:10:81::1/64
ipv6 address virtual fc00:10:11:81::1/64
ipv6 address virtual fc00:10:12:81::1/64
ip address virtual 10.10.81.1/24
!
interface Vlan83
description SVI Description
Expand All @@ -326,8 +326,8 @@ interface Vlan83
interface Vlan84
description SVI Description
arp gratuitous accept
arp monitor mac-address
ip address 10.10.84.1/24
arp monitor mac-address
isis enable EVPN_UNDERLAY
isis authentication mode sha key-id 2 rx-disabled
isis authentication key 0 password
Expand All @@ -336,20 +336,20 @@ interface Vlan84
!
interface Vlan85
description SVI Description
arp cache dynamic capacity 50000
ip address 10.10.84.1/24
arp cache dynamic capacity 50000
bfd interval 500 min-rx 500 multiplier 5
bfd echo
isis enable EVPN_UNDERLAY
isis authentication mode sha key-id 2
isis authentication key 0 password
bfd interval 500 min-rx 500 multiplier 5
bfd echo
!
interface Vlan86
description SVI Description
ip address 10.10.83.1/24
ip attached-host route export 10
isis enable EVPN_UNDERLAY
isis authentication mode shared-secret profile profile1 algorithm sha-1 rx-disabled
ip attached-host route export 10
!
interface Vlan87
description SVI Description
Expand Down Expand Up @@ -388,51 +388,51 @@ interface Vlan89
multicast ipv6 static
pim ipv4 sparse-mode
pim ipv4 local-interface Loopback0
ipv6 virtual-router address 1b11:3a00:22b0:5200::3
ip address virtual 10.10.144.3/20
ipv6 virtual-router address 1b11:3a00:22b0:5200::3
!
interface Vlan90
description SVI Description
ip address 10.10.83.1/24
ip attached-host route export
isis enable EVPN_UNDERLAY
isis authentication mode shared-secret profile profile2 algorithm sha-1 level-1
isis authentication mode shared-secret profile profile1 algorithm sha-256 level-2
ip attached-host route export
!
interface Vlan91
description PBR Description
shutdown
service-policy type pbr input MyServicePolicy
isis enable EVPN_UNDERLAY
isis authentication mode md5 level-1
isis authentication mode text level-2
isis authentication key 0 password level-1
isis authentication key 0 password level-2
service-policy type pbr input MyServicePolicy
!
interface Vlan92
description SVI Description
ip proxy-arp
ip directed-broadcast
ip address 10.10.92.1/24
ip directed-broadcast
isis enable EVPN_UNDERLAY
isis authentication mode shared-secret profile profile2 algorithm sha-1 rx-disabled level-1
isis authentication mode shared-secret profile profile1 algorithm sha-256 rx-disabled level-2
!
interface Vlan110
description PVLAN Primary with vlan mapping
no shutdown
pvlan mapping 111-112
vrf Tenant_A
ip address 10.0.101.1/24
multicast ipv4 boundary ACL_MULTICAST out
multicast ipv6 source route export 20
multicast ipv4 static
pvlan mapping 111-112
!
interface Vlan333
description Multiple VRIDs and tracking
no shutdown
arp aging timeout 180
ip address 192.0.2.2/25
arp aging timeout 180
ipv6 enable
ipv6 address 2001:db8:333::2/64
ipv6 address fe80::2/64 link-local
Expand Down Expand Up @@ -497,8 +497,8 @@ interface Vlan501
interface Vlan667
description Multiple VRIDs
no shutdown
arp aging timeout 180
ip address 192.0.2.2/25
arp aging timeout 180
ipv6 enable
ipv6 address 2001:db8:667::2/64
ipv6 address fe80::2/64 link-local
Expand Down Expand Up @@ -529,8 +529,8 @@ interface Vlan1002
!
interface Vlan2001
description SVI Description
vrf Tenant_B
logging event link-status
vrf Tenant_B
ip address virtual 10.2.1.1/24
comment
Comment created from eos_cli under vlan_interfaces.Vlan2001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ interface Management1
ip address 10.73.255.122/24
!
interface Vlan24
ip ospf network point-to-point
ip ospf area 0.0.0.24
ip ospf cost 99
ip ospf network point-to-point
ip ospf authentication message-digest
ip ospf area 0.0.0.24
ip ospf message-digest-key 55 md5 7 ABCDEFGHIJKLMNOPQRSTUVWXYZ
!
router ospf 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ interface Vlan24
ipv6 address 1b11:3a00:22b0:6::15/64
ipv6 nd managed-config-flag
ipv6 nd prefix 1b11:3a00:22b0:6::/64 infinite infinite no-autoconfig
ipv6 virtual-router address 1b11:3a00:22b0:6::1
ip address virtual 10.10.24.1/24
ipv6 virtual-router address 1b11:3a00:22b0:6::1
!
interface Vlan25
description SVI Description
no shutdown
ipv6 address 1b11:3a00:22b0:16::16/64
ipv6 virtual-router address 1b11:3a00:22b0:16::15
ipv6 virtual-router address 1b11:3a00:22b0:16::14
ipv6 virtual-router address 1b11:3a00:22b0:16::15
!
interface Vlan41
description SVI Description
Expand Down Expand Up @@ -90,17 +90,17 @@ interface Vlan75
multicast ipv6 boundary ff00::/16 out
multicast ipv6 boundary ff01::/16 out
multicast ipv4 static
ipv6 virtual-router address 1b11:3a00:22b0:1000::1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IP order

interface Vlan41
   description SVI Description
   no shutdown
   ip helper-address 10.10.64.150 source-interface Loopback0
   ip helper-address 10.10.96.150 source-interface Loopback0
   ip helper-address 10.10.96.151 source-interface Loopback0
   ip igmp host-proxy
   ip igmp host-proxy 239.0.0.1
   ip igmp host-proxy 239.0.0.2 exclude 10.0.2.1
   ip igmp host-proxy 239.0.0.3 include 10.0.3.1
interface Vlan41
   description SVI Description
   ip helper-address 10.10.64.150 source-interface Loopback0
   ip helper-address 10.10.96.150 source-interface Loopback0
   ip helper-address 10.10.96.151 source-interface Loopback0
   ip igmp host-proxy
   ip igmp host-proxy 239.0.0.2 exclude 10.0.2.1
   ip igmp host-proxy 239.0.0.3 include 10.0.3.1
   ip igmp host-proxy 239.0.0.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The EOS is not sorting as natural sort here. If you see 239.0.0.1 then it should come before to 239.0.0.2 but not happening actually

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key-id order

interface Vlan43
   description SVI Description
   no shutdown
   ipv6 dhcp relay destination a0::2 vrf TEST local-interface Loopback44 link-address a0::4
   ipv6 address a0::1/64
   isis authentication key-id 2 algorithm sha-512 key 0 password
   isis authentication key-id 3 algorithm sha-512 rfc-5310 key 0 password1
   isis authentication key-id 1 algorithm sha-1 key 0 password level-1
interface Vlan43
   description SVI Description
   ipv6 dhcp relay destination a0::2 vrf TEST local-interface Loopback44 link-address a0::4
   ipv6 address a0::1/64
   isis authentication key-id 1 algorithm sha-1 key 7 qZQzXEhWASbvrmcvHhTCZw==
   isis authentication key-id 2 algorithm sha-512 key 7 qZQzXEhWASbvrmcvHhTCZw==
   isis authentication key-id 3 algorithm sha-512 rfc-5310 key 7 yN8FIWN8ZbkSvVqiF90Gfw==

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interface Vlan44
   description SVI Description
   no shutdown
   ipv6 dhcp relay destination a0::5 vrf TEST source-address a0::6 link-address a0::7
   ipv6 dhcp relay destination a0::8
interface Vlan44
   description SVI Description
   ipv6 dhcp relay destination a0::8
   ipv6 dhcp relay destination a0::5 vrf TEST source-address a0::6 link-addr
ess a0::7

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interface Vlan50
   description IP NAT Testing
   ip nat source static 3.0.0.1 4.0.0.1
   ip nat source dynamic access-list ACL2 pool POOL2
   ip nat destination static 1.0.0.1 2.0.0.1
   ip nat destination dynamic access-list ACL1 pool POOL1
interface Vlan50
   description IP NAT Testing
   ip nat destination static 1.0.0.1 2.0.0.1
   ip nat source static 3.0.0.1 4.0.0.1
   ip nat destination dynamic access-list ACL1 pool POOL1
   ip nat source dynamic access-list ACL2 pool POOL2
   isis authentication mode text rx-disabled level-2
   isis authentication key 7 bpM/wnochsWdunkFr0o/Bg== level-2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the isis authentication key-id order the logic is like it will first sort the isis both type level key-ids then lervel-1 and then level-2 so we will see the order difference here.
@ClausHolbechArista @gmuloc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interface Vlan44
   description SVI Description
   no shutdown
   ipv6 dhcp relay destination a0::5 vrf TEST source-address a0::6 link-address a0::7
   ipv6 dhcp relay destination a0::8
interface Vlan44
   description SVI Description
   ipv6 dhcp relay destination a0::8
   ipv6 dhcp relay destination a0::5 vrf TEST source-address a0::6 link-addr
ess a0::7

We are already sorting base on address but EOS sorting base on vrf and none vrf destinations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interface Vlan50
   description IP NAT Testing
   ip nat source static 3.0.0.1 4.0.0.1
   ip nat source dynamic access-list ACL2 pool POOL2
   ip nat destination static 1.0.0.1 2.0.0.1
   ip nat destination dynamic access-list ACL1 pool POOL1
interface Vlan50
   description IP NAT Testing
   ip nat destination static 1.0.0.1 2.0.0.1
   ip nat source static 3.0.0.1 4.0.0.1
   ip nat destination dynamic access-list ACL1 pool POOL1
   ip nat source dynamic access-list ACL2 pool POOL2
   isis authentication mode text rx-disabled level-2
   isis authentication key 7 bpM/wnochsWdunkFr0o/Bg== level-2

this ip nat is comes from interface-ip-nat.j2 so we can check there only

ip address virtual 10.10.75.1/24
ipv6 virtual-router address 1b11:3a00:22b0:1000::1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interface Vlan75
   description SVI Description
   no shutdown
   ipv6 address 1b11:3a00:22b0:1000::15/64
   ipv6 nd managed-config-flag
   ipv6 nd prefix 1b11:3a00:22b0:1000::/64 infinite infinite no-autoconfig
   multicast ipv4 boundary 224.0.1.0/24 out
   multicast ipv4 boundary 224.0.2.0/24
   multicast ipv6 boundary ff00::/16 out
   multicast ipv6 boundary ff01::/16 out
 multicast ipv6 boundary ff01::/16 out
 multicast ipv6 boundary ff00::/16 out

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already user natural sort on boundary address and as per sort ff00 comes first then ff01 but EOS do just opposite

!
interface Vlan81
description IPv6 Virtual Address
vrf Tenant_C
ipv6 enable
ip address virtual 10.10.81.1/24
ipv6 address virtual fc00:10:10:81::1/64
ipv6 address virtual fc00:10:11:81::1/64
ipv6 address virtual fc00:10:12:81::1/64
ip address virtual 10.10.81.1/24
!
interface Vlan83
description SVI Description
Expand All @@ -115,8 +115,8 @@ interface Vlan83
interface Vlan84
description SVI Description
arp gratuitous accept
arp monitor mac-address
ip address 10.10.84.1/24
arp monitor mac-address
isis enable EVPN_UNDERLAY
isis authentication mode sha key-id 2 rx-disabled
isis authentication key 0 password
Expand All @@ -125,20 +125,20 @@ interface Vlan84
!
interface Vlan85
description SVI Description
arp cache dynamic capacity 50000
ip address 10.10.84.1/24
arp cache dynamic capacity 50000
bfd interval 500 min-rx 500 multiplier 5
bfd echo
isis enable EVPN_UNDERLAY
isis authentication mode sha key-id 2
isis authentication key 0 password
bfd interval 500 min-rx 500 multiplier 5
bfd echo
!
interface Vlan86
description SVI Description
ip address 10.10.83.1/24
ip attached-host route export 10
isis enable EVPN_UNDERLAY
isis authentication mode shared-secret profile profile1 algorithm sha-1 rx-disabled
ip attached-host route export 10
!
interface Vlan87
description SVI Description
Expand Down Expand Up @@ -177,51 +177,51 @@ interface Vlan89
multicast ipv6 static
pim ipv4 sparse-mode
pim ipv4 local-interface Loopback0
ipv6 virtual-router address 1b11:3a00:22b0:5200::3
ip address virtual 10.10.144.3/20
ipv6 virtual-router address 1b11:3a00:22b0:5200::3
!
interface Vlan90
description SVI Description
ip address 10.10.83.1/24
ip attached-host route export
isis enable EVPN_UNDERLAY
isis authentication mode shared-secret profile profile2 algorithm sha-1 level-1
isis authentication mode shared-secret profile profile1 algorithm sha-256 level-2
ip attached-host route export
!
interface Vlan91
description PBR Description
shutdown
service-policy type pbr input MyServicePolicy
isis enable EVPN_UNDERLAY
isis authentication mode md5 level-1
isis authentication mode text level-2
isis authentication key 0 password level-1
isis authentication key 0 password level-2
service-policy type pbr input MyServicePolicy
!
interface Vlan92
description SVI Description
ip proxy-arp
ip directed-broadcast
ip address 10.10.92.1/24
ip directed-broadcast
isis enable EVPN_UNDERLAY
isis authentication mode shared-secret profile profile2 algorithm sha-1 rx-disabled level-1
isis authentication mode shared-secret profile profile1 algorithm sha-256 rx-disabled level-2
!
interface Vlan110
description PVLAN Primary with vlan mapping
no shutdown
pvlan mapping 111-112
vrf Tenant_A
ip address 10.0.101.1/24
multicast ipv4 boundary ACL_MULTICAST out
multicast ipv6 source route export 20
multicast ipv4 static
pvlan mapping 111-112
!
interface Vlan333
description Multiple VRIDs and tracking
no shutdown
arp aging timeout 180
ip address 192.0.2.2/25
arp aging timeout 180
ipv6 enable
ipv6 address 2001:db8:333::2/64
ipv6 address fe80::2/64 link-local
Expand Down Expand Up @@ -286,8 +286,8 @@ interface Vlan501
interface Vlan667
description Multiple VRIDs
no shutdown
arp aging timeout 180
ip address 192.0.2.2/25
arp aging timeout 180
ipv6 enable
ipv6 address 2001:db8:667::2/64
ipv6 address fe80::2/64 link-local
Expand Down Expand Up @@ -318,8 +318,8 @@ interface Vlan1002
!
interface Vlan2001
description SVI Description
vrf Tenant_B
logging event link-status
vrf Tenant_B
ip address virtual 10.2.1.1/24
comment
Comment created from eos_cli under vlan_interfaces.Vlan2001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ interface Vlan150
description Tenant_A_WAN_Zone_1
no shutdown
vrf Tenant_A_WAN_Zone
ip ospf area 1
ip ospf cost 100
ip ospf authentication
ip ospf authentication-key 7 AQQvKeimxJu+uGQ/yYvv9w==
ip ospf area 1
ip address virtual 10.1.40.1/24
!
interface Vlan250
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ interface Vlan150
description Tenant_A_WAN_Zone_1
no shutdown
vrf Tenant_A_WAN_Zone
ip ospf area 1
ip ospf cost 100
ip ospf authentication
ip ospf authentication-key 7 AQQvKeimxJu+uGQ/yYvv9w==
ip ospf area 1
ip address virtual 10.1.40.1/24
!
interface Vlan250
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ interface Vlan150
description Tenant_A_WAN_Zone_1
no shutdown
vrf Tenant_A_WAN_Zone
ip ospf area 1
ip ospf cost 100
ip ospf authentication
ip ospf authentication-key 7 AQQvKeimxJu+uGQ/yYvv9w==
ip ospf area 1
ip address virtual 10.1.40.1/24
!
interface Vlan250
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ interface Vlan150
description Tenant_A_WAN_Zone_1
no shutdown
vrf Tenant_A_WAN_Zone
ip ospf area 1
ip ospf cost 100
ip ospf authentication
ip ospf authentication-key 7 AQQvKeimxJu+uGQ/yYvv9w==
ip ospf area 1
ip address virtual 10.1.40.1/24
!
interface Vlan250
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ interface Vlan113
no shutdown
vrf Tenant_A_OP_Zone
ip ospf network point-to-point
ip ospf area 0
ip ospf authentication message-digest
ip ospf area 0
ip ospf message-digest-key 1 sha1 7 AQQvKeimxJu+uGQ/yYvv9w==
ip ospf message-digest-key 2 sha512 7 AQQvKeimxJu+uGQ/yYvv9w==
!
Expand Down Expand Up @@ -236,8 +236,8 @@ interface Vlan452
no shutdown
mtu 1560
vrf 12345678
ipv6 address virtual 2001:db8:412::1/64
ip address virtual 10.4.12.254/24
ipv6 address virtual 2001:db8:412::1/64
!
interface Vxlan1
description DC1-LEAF1A_VTEP
Expand Down
Loading
Loading