Posted on December 20, 2021 5:50 pm
 |  Asked by Isidore Moreno
 |  44 views
0
0
Print Friendly, PDF & Email

Hello,

I have multiple BGP peerings where the same policy is applied.
In order to optimize the BGP configurations, an idea could be to create route-maps which match both IPv4 prefix-list and IPv6 prefix-list (see the example). Instead of having dedicated route-maps for IPv4 and dedicated route-maps for IPv6.

route-map MyRouteMap permit 10
match ip address prefix-list IPv4
set .....
!
route-map MyRouteMap permit 20
match ipv6 address prefix-list IPv6
set .....

And then apply the single route-map for IPv4 and IPv6 neighbor peering.
Are there some Limitations/Guidelines where Arista do not recommend this kind of configuration ?

Thank you

Isidore

0
Posted by Naveen Chandra
Answered on December 21, 2021 4:50 am

Hi Isidore,

Thanks for writing to the forum. I quickly performed a simple test in my LAB setup using Arista DCS-7050SX-64-F with EOS-4.26.2F.

I created two prefix-lists as below:

!

ip prefix-list Vlan5-IPv4

    seq 10 permit 0.0.0.0/0

!

And

!

ipv6 prefix-list Vlan5-IPv6

    seq 10 permit ::/0

!

And then I created a route-map as below:

!

route-map Vlan5-BGP permit 10

  Description:

  Match clauses:

    match ip address prefix-list Vlan5-IPv4

  SubRouteMap:

  Set clauses:

route-map Vlan5-BGP permit 20

  Description:

  Match clauses:

    match ipv6 address prefix-list Vlan5-IPv6

  SubRouteMap:

  Set clauses:

!

I am having SVI-VLAN5 and enabled BGP using this interface.

!

interface Vlan5

   ip address 5.5.5.1/30

   ipv6 address 30::1/126

!

 

!

router bgp 10

   neighbor 5.5.5.2 remote-as 64679

   neighbor 5.5.5.2 route-map Vlan5-BGP in

   neighbor 192.168.10.9 remote-as 10

   neighbor 30::2 remote-as 64679

   neighbor 30::2 route-map Vlan5-BGP in

   !

   address-family ipv4

      network 100.100.100.2/32

   !

   address-family ipv6

      neighbor 30::2 activate

   !

While checking the BGP summary, we can see that the device is receiving 12 prefixes from the peer but installing only the default route as per the route-map.

#sh ip bgp su

BGP summary information for VRF default

Router identifier 192.168.10.10, local AS number 10

Neighbor Status Codes: m - Under maintenance

  Neighbor         V AS           MsgRcvd   MsgSent  InQ OutQ  Up/Down State   PfxRcd PfxAcc

  5.5.5.2          4 64679             67        67    0    0 00:36:13 Estab   12     1

  192.168.10.9     4 10             23472     23459    0    0   28d12h Connect

#sh ip bgp

BGP routing table information for VRF default

Router identifier 192.168.10.10, local AS number 10

Route status codes: s - suppressed, * - valid, > - active, E - ECMP head, e - ECMP

                    S - Stale, c - Contributing to ECMP, b - backup, L - labeled-unicast

                    % - Pending BGP convergence

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI Origin Validation codes: V - valid, I - invalid, U - unknown

AS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop

          Network                Next Hop              Metric  AIGP       LocPref Weight  Path

* >      0.0.0.0/0              5.5.5.2               0       -          100     0       64679 ?

* >      100.100.100.2/32       -                     -       -          -       0       i

               -       -          -       0       i

And the same way in IPv6 peering the device is receiving and installing IPv6 default route.

#show ipv6 bgp summ

BGP summary information for VRF default

Router identifier 192.168.10.10, local AS number 10

Neighbor Status Codes: m - Under maintenance

  Neighbor         V AS           MsgRcvd   MsgSent  InQ OutQ  Up/Down State   PfxRcd PfxAcc

  30::2            4 64679             49        51    0    0 00:26:42 Estab   1      1

do500-pgh-03...23:28:01(config)#

#sh ipv6 route

VRF: default

Displaying 2 of 6 IPv6 routing table entries

Codes: C - connected, S - static, K - kernel, O3 - OSPFv3, B - BGP, R - RIP, A B - BGP Aggregate, I L1 - IS-IS level 1, I L2 - IS-IS level 2, DH - DHCP, NG - Nexthop Group Static Route, M - Martian, DP - Dynamic Policy Route, L - VRF Leaked, RC - Route Cache Route

C        30::/126 [0/0]

           via Vlan5, directly connected

B        ::/0 [200/0]

           via 30::2, Vlan5

0
Posted by Isidore Moreno
Answered on December 27, 2021 1:36 pm

Hi Naveen,

Thank you very much for having tested it in your lab.
I tested it also before asking in the forum. My question was more related recommendations or guidelines.
I did not find any guidelines from Arista about the fact to use within the same route-map bot address families.

So that's why I'm asking if someone heard about potential problems.

Thank you,

Isidore

Post your Answer

You must be logged in to post an answer.