FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.36k stars 1.25k forks source link

6PE with Cisco #5572

Open marcioelias opened 4 years ago

marcioelias commented 4 years ago

After a long time trying without success, and about to give up, as a last resource, I came to ask here. I have a Cisco 7200 running as a Route-Reflector for a BGP Free Core design. In order to inject IPv6 routes without configuring multiple BGP sessions, I started using 6PE functionality.

Now what I'm trying to do, is take a Linux box, with Accel-PPP and turn this in a PPPoE concentrator dual-stack. This box has an IPv4 /30 with OSPF running, and I'm closing a BGP session with the Route-Reflector using loopbacks.

Here is a brief of my running-config of Frr.

frr version 7.2
frr defaults traditional
hostname SC-ARU-A01-BRAS-RT-003
log syslog informational
service integrated-vtysh-config
!
ip route public-ipv4/24 blackhole
ipv6 route global-ipv6/44 blackhole
ipv6 route global-ipv6/52 blackhole
!
interface enp65s0f0.3774
 description Core: SC-ARU-A01-BKB-RT-001 (VlanIf 3774)
 ip address 172.18.1.126/30
 ip ospf network point-to-point
!
interface lo
 ip address 172.18.0.18/32
 ipv6 address loopback-ipv6-address/128
!
router bgp 64512
 bgp router-id 172.18.0.18
 bgp log-neighbor-changes
 neighbor RR peer-group
 neighbor RR remote-as 64512
 neighbor RR update-source 172.18.0.18
 neighbor 172.18.0.1 peer-group RR
 !
 address-family ipv4 unicast
  redistribute connected
  redistribute static
  no neighbor RR activate
  neighbor RR soft-reconfiguration inbound
  neighbor RR route-map IN-RR in
  neighbor RR route-map OUT-RR out
  neighbor 172.18.0.1 activate
 exit-address-family
 !
 address-family ipv6 unicast
  redistribute static
 exit-address-family
 !
 address-family ipv6 labeled-unicast
  neighbor 172.18.0.1 activate
 exit-address-family
!
router ospf
 ospf router-id 172.18.0.18
 log-adjacency-changes detail
 passive-interface default
 no passive-interface enp65s0f0.3774
 network 172.18.0.18/32 area 0.0.0.0
 network 172.18.1.124/30 area 0.0.0.0
 capability opaque
 mpls-te on
 mpls-te router-address 172.18.0.18
!
mpls ldp
 router-id 172.18.0.18
 !
 address-family ipv4
  discovery targeted-hello accept
  discovery transport-address 172.18.0.18
  !
  interface enp65s0f0.3774
  !
 exit-address-family
 !
!
ip prefix-list AS-64512_24 seq 5 permit public-ipv4/22 le 24
ip prefix-list AS-64512_32 seq 1 permit 0.0.0.0/0 ge 29
ip prefix-list AS-64512_DEDICADO seq 5 permit public-ipv4/25 le 32
!
bgp community-list standard CLIENTES permit 65534:1010
bgp community-list standard MNG permit 65534:1019
!
route-map IN-RR permit 1
!
route-map OUT-RR permit 10
 match ip address prefix-list AS-64512_24
 set community 65534:1010
!
route-map OUT-RR permit 20
 match ip address prefix-list AS-64512_V6
 set community 65534:1010
!
route-map OUT-RR permit 5
 match ip address prefix-list AS-64512_DEDICADO
 set community 65534:1010
!
pbr-map PBR-CGNAT-01 seq 1
 match src-ip 100.80.0.0/24
 set nexthop 172.18.0.50
!
mpls label global-block 16 100000
!
line vty

When I go to my Cisco router and look at these IPv6 routes, I'm seeing that the next-hop of them is the IPv6 loopback address and not the IPv4 loopback address.

What is the same case reported here

Anything that I'm doing wrong?

ton31337 commented 4 years ago

Could you show some more outputs from the Cisco device:

show ip bgp ipv6 unicast
show ipv6 route
show ip bgp neighbor 172.18.0.18
show running-config (would be good as well)
marcioelias commented 4 years ago

Hi @ton31337, sorry for not see your comment before.

show ip bgp ipv6 unicast

BGP table version is 30842459, local router ID is 172.18.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i ::/0             ::FFFF:172.18.0.5
                                                     100      0 i
 *>i ::FFFF:172.18.1.108/126
                       ::FFFF:172.18.0.16
                                                     100      0 i
 *>i ::FFFF:172.18.1.112/126
                       ::FFFF:172.18.0.16
                                                     100      0 i
 *>i 2001::/32        ::FFFF:172.18.0.16
                                                0   1000      0 6939 i
 *>i 2001:4:112::/48  ::FFFF:172.18.0.16
                                                0   1000      0 6939 112 i

There a full routing table, but I believe that was no need to show all. Pay attention to the next hop.

show ipv6 route

IPv6 Routing Table - default - 80182 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
       NDr - Redirect, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2, l - LISP
B   ::/0 [200/0]
     via 172.18.0.5%default, indirectly connected
B   ::FFFF:172.18.1.108/126 [200/0]
     via 172.18.0.16%default, indirectly connected
B   ::FFFF:172.18.1.112/126 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001::/32 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:4:112::/48 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:C0:3::/48 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:200::/32 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:200:900::/40 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:200:C000::/35 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:200:E000::/35 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:218::/32 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:218:2200::/40 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:218:3004::/48 [200/0]
     via 172.18.0.16%default, indirectly connected
B   2001:218:8000::/38 [200/0]

Again, this is not the entire output.

show ip bgp neighbor 172.18.0.18

BGP neighbor is 172.18.0.18,  remote AS 52977, internal link
 Member of peer-group RT-BHM-PE for session parameters
  BGP version 4, remote router ID 172.18.0.18
  BGP state = Established, up for 5d06h
  Last read 00:00:54, last write 00:00:28, hold time is 180, keepalive interval is 60 seconds
  Neighbor sessions:
    1 active, is not multisession capable (disabled)
  Neighbor capabilities:
    Route refresh: advertised and received(new)
    Four-octets ASN Capability: advertised and received
    Address family IPv4 Unicast: advertised and received
    Address family IPv6 Unicast: advertised
    ipv6 MPLS Label capability: advertised and received
    Graceful Restart Capability: received
      Remote Restart timer is 120 seconds
      Address families advertised by peer:
        none
      Address families advertised by peer before restart:
        none
    Enhanced Refresh Capability: advertised
    Multisession Capability: 
    Stateful switchover support enabled: NO for session 1
  Message statistics:
    InQ depth is 0
    OutQ depth is 0

                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:              735          2
    Keepalives:          8196       7598
    Route Refresh:          0          0
    Total:               8932       7601
  Default minimum time between advertisement runs is 0 seconds

 For address family: IPv4 Unicast
  Additional Paths receive capability: received
  Session: 172.18.0.18
  BGP table version 101110234, neighbor version 101110234/0
  Output queue size : 0
  Index 12, Advertise bit 0
  Route-Reflector Client
  12 update-group member
  RT-BHM-PE peer-group member
  Inbound soft reconfiguration allowed
  Community attribute sent to this neighbor
  Inbound path policy configured
  Outbound path policy configured
  Route map for incoming advertisements is IN-IPV4-BHM
  Route map for outgoing advertisements is OUT-IPV4-BHM
  Slow-peer detection is disabled
  Slow-peer split-update-group dynamic is disabled
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:             450          1 (Consumes 80 bytes)
    Prefixes Total:             36010          1
    Implicit Withdraw:          32537          0
    Explicit Withdraw:           2714          0
    Used as bestpath:             n/a          1
    Used as multipath:            n/a          0

                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Bestpath from this peer:             13        n/a
    Other Policies:                77471597        n/a
    Total:                         77471617          0
  Number of NLRIs in the update sent: max 148, min 0
  Last detected as dynamic slow peer: never
  Dynamic slow peer recovered: never
  Refresh Epoch: 1
  Last Sent Refresh Start-of-rib: never
  Last Sent Refresh End-of-rib: never
  Last Received Refresh Start-of-rib: never
  Last Received Refresh End-of-rib: never
                               Sent   Rcvd
        Refresh activity:          ----   ----
          Refresh Start-of-RIB          0          0
          Refresh End-of-RIB            0          0

 For address family: IPv6 Unicast
  Session: 172.18.0.18
  BGP table version 30854512, neighbor version 30854512/0
  Output queue size : 0
  Index 12, Advertise bit 0
  Route-Reflector Client
  12 update-group member
  RT-BHM-PE peer-group member
  Inbound soft reconfiguration allowed
  Community attribute sent to this neighbor
  Inbound path policy configured
  Outbound path policy configured
  Route map for incoming advertisements is IN-IPV6-BHM
  Route map for outgoing advertisements is OUT-IPV6-BHM
  Sending Prefix & Label
  Slow-peer detection is disabled
  Slow-peer split-update-group dynamic is disabled
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:              29          2 (Consumes 208 bytes)
    Prefixes Total:               785          2
    Implicit Withdraw:            605          0
    Explicit Withdraw:            111          0
    Used as bestpath:             n/a          2
    Used as multipath:            n/a          0

                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Other Policies:                17565190        n/a
    Total:                         17565190          0
  Number of NLRIs in the update sent: max 13, min 0
  Last detected as dynamic slow peer: never
  Dynamic slow peer recovered: never
  Refresh Epoch: 1
  Last Sent Refresh Start-of-rib: never
  Last Sent Refresh End-of-rib: never
  Last Received Refresh Start-of-rib: never
  Last Received Refresh End-of-rib: never
                               Sent   Rcvd
        Refresh activity:          ----   ----
          Refresh Start-of-RIB          0          0
          Refresh End-of-RIB            0          0

  Address tracking is enabled, the RIB does have a route to 172.18.0.18
  Connections established 20; dropped 19
  Last reset 5d06h, due to BGP Notification received of session 1, Administrative Shutdown
  Transport(tcp) path-mtu-discovery is enabled
  Graceful-Restart is disabled
Connection state is ESTAB, I/O status: 1, unread input bytes: 0        
Connection is ECN Disabled
Mininum incoming TTL 0, Outgoing TTL 255
Local host: 172.18.0.1, Local port: 61883
Foreign host: 172.18.0.18, Foreign port: 179
Connection tableid (VRF): 0

Enqueued packets for retransmit: 0, input: 0  mis-ordered: 0 (0 bytes)

Event Timers (current time is 0x100E82284):
Timer          Starts    Wakeups            Next
Retrans          8887         49             0x0
TimeWait            0          0             0x0
AckHold          7602       7464             0x0
SendWnd             0          0             0x0
KeepAlive           0          0             0x0
GiveUp              0          0             0x0
PmtuAger            1          1             0x0
DeadWait            0          0             0x0
Linger              0          0             0x0

iss:   58964624  snduna:   59166300  sndnxt:   59166300     sndwnd:  65535
irs: 2864229382  rcvnxt: 2864374025  rcvwnd:      15130  delrcvwnd:   1254

SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 ms
Status Flags: none
Option Flags: higher precendence, nagle, path mtu capable

Datagrams (max data segment is 1460 bytes):
Rcvd: 16445 (out of order: 0), with data: 7602, total data bytes: 144642
Sent: 16410 (retransmit: 49 fastretransmit: 0),with data: 8841, total data bytes: 201675

show running-config (would be good as well)

There is a lot of running-config on this Cisco, he was in production, let me put the interesting parts and let see if help.

Loopback:

interface Loopback0
 ip address 172.18.0.1 255.255.255.255
 ipv6 address 2001:db8::172:18:0:1/128

BGP:

router bgp 64512
 bgp router-id 172.18.0.1
 no bgp enforce-first-as
 bgp log-neighbor-changes
 bgp maxas-limit 50
 no bgp default ipv4-unicast
 no bgp default route-target filter
 neighbor RT-BHM-PE peer-group
 neighbor RT-BHM-PE remote-as 64512
 neighbor RT-BHM-PE update-source Loopback0
 neighbor 172.18.0.18 peer-group RT-BHM-PE
!
address-family ipv4
  neighbor RT-BHM-PE send-community both
  neighbor RT-BHM-PE route-reflector-client
  neighbor RT-BHM-PE soft-reconfiguration inbound
  neighbor RT-BHM-PE route-map IN-IPV4-BHM in
  neighbor RT-BHM-PE route-map OUT-IPV4-BHM out
  neighbor 172.18.0.18 activate
!
address-family ipv6
  neighbor RT-BHM-PE send-community both
  neighbor RT-BHM-PE route-reflector-client
  neighbor RT-BHM-PE soft-reconfiguration inbound
  neighbor RT-BHM-PE route-map IN-IPV6-BHM in
  neighbor RT-BHM-PE route-map OUT-IPV6-BHM out
  neighbor RT-BHM-PE send-label
  neighbor 172.18.0.18 activate

About the route-maps, I believe that is no need to show because the problem is in the next-hop address, not in receiving the route.

Here is an example of the output of the command:

show bgp ipv6 unicast neighbors 172.18.0.18 received-routes

BGP table version is 30876360, local router ID is 172.18.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 2001:db8:1::/52  2001:db8:0:504::18
                                                0    100      0 ?
 *>i 2001:db8:100::/44
                       2001:db8:0:504::18
                                                0    100      0 ?

Instead of 2001:db8:0:504::18, the next-hop must be ::FFFF:172.18.0.18.

Look at the output of the other neighbor that works (Juniper MX).

show bgp ipv6 unicast neighbors 172.18.0.16 received-routes

BGP table version is 30887194, local router ID is 172.18.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i ::FFFF:172.18.1.108/126
                       ::FFFF:172.18.0.16
                                                     100      0 i
 *>i ::FFFF:172.18.1.112/126
                       ::FFFF:172.18.0.16
                                                     100      0 i
 *>i 2001::/32        ::FFFF:172.18.0.16
                                                0   1000      0 6939 i
 *>i 2001:4:112::/48  ::FFFF:172.18.0.16
                                                0   1000      0 6939 112 i
 *>i 2001:C0:3::/48   ::FFFF:172.18.0.16

Thanks for the help, and Merry Christmas guys!