cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
861
Views
5
Helpful
12
Replies

BGP egress traffic not sent to neighbour

zsolt211
Level 1
Level 1

Hello, 

I am trying to set up a bgp multihomed configuration with 2 ISPs but I am struggling to get it to work. I am trying to get it to always use the shortest path available between the 2 connections. My problem is that whichever neighbour is second to connect doesnt receive any egress traffic. I have tried to imitate the following example: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/23675-27.html#routingtable namely the "Configuration to Receive Full Internet Routing Table". 

Here is my BGP configuration, I would really appreciate if somebody could point out where I am going wrong:

router bgp MY_ASN
bgp router-id a.a.a.a
bgp log-neighbor-changes
bgp bestpath med missing-as-worst
neighbor ISP1_IP remote-as ASN1
neighbor ISP2_IP remote-as ASN2
neighbor a.a.a.a+6 remote-as MY_ASN
!
address-family ipv4
bgp dmzlink-bw
network b.b.b.b mask 255.255.252.0
network c.c.c.c mask 255.255.248.0
network d.d.d.d mask 255.255.252.0
network e.e.e.e mask 255.255.255.0
neighbor ISP1_IP activate
neighbor ISP1_IP soft-reconfiguration inbound
neighbor ISP1_IP route-map localonly out
neighbor ISP2_IP activate
neighbor ISP2_IP soft-reconfiguration inbound
neighbor ISP2_IP route-map localonly out

route-map localonly permit 10
match as-path 10

neighbor a.a.a.a+5 activate
auto-summary
exit-address-family
!

ip as-path access-list 10 permit ^$

All the ip addresses shoud be routed to a.a.a.a+6 through bgp, I am planning to change this to a static route in the future as there is no need for bgp, but I'd like to figure this one out first.

Thanks in advance!

1 Accepted Solution

Accepted Solutions

Harold Ritter
Cisco Employee
Cisco Employee

Hi @zsolt211 ,

The path selection based on shortest AS path happens by default, assuming you receive full internet routing table or partial internet routing table from your ISPs. Do you receive the full Internet routing table/partial internet routing table from your service providers or just the default route (0.0.0.0/.0). 

You should do a "show bgp ipv4 uni summary" and check the number of routes received from each ISP.

Regards, 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

12 Replies 12

zsolt211
Level 1
Level 1

In the last paragraph I was ment to write a.a.a.a+6 instead of a.a.a.a+5, sorry.

I can not understand what you want? you want both path in BGP ?

I would like it to choose which neighbour to route the traffic through based on the number of hops. For example: ISP1 is directly connected to a local internet exchange, while ISP2 is connected to a different exchange. In this example I wouldnt want traffic to local sites to be routed through ISP2 as through ISP1 they would be 1-2 hops. 

How two hops?

ebgp is accept direct neighboor and I dont see you config ebgp multihop.

And for as-path it contain all as along path, and bgp use this criteria to select best path.

Yes, I was referring to as-path, sorry. My problem is that for egress traffic it only uses one path(the first neighbor to establish connection). For ingress traffic it works fine though.

Harold Ritter
Cisco Employee
Cisco Employee

Hi @zsolt211 ,

The path selection based on shortest AS path happens by default, assuming you receive full internet routing table or partial internet routing table from your ISPs. Do you receive the full Internet routing table/partial internet routing table from your service providers or just the default route (0.0.0.0/.0). 

You should do a "show bgp ipv4 uni summary" and check the number of routes received from each ISP.

Regards, 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Thank you for your response, as I see we only receive 1 route to each ISP. If I understand correctly I should ask them to send the full routing table. Is the configuration ready for that on my end?

Also, does this explain the behaviour that I am seeing where one of the ISPs is not used for egress traffic?

Hi @zsolt211 ,

Yes, the fact that you only receive the default route will not allow you to be granular and explains the behaviour you are currently seeing.  You could ask the ISPs to provide the full internet routing table, assuming the device you are using has the resources to cope with the high number of Internet routes (~1,000,000 routes). The current BGP configuration already allows for all routes to be received.

If you only want to make sure that both links are used for egress traffic, the other option would be to install the default route received from ISP1 and ISP2 and let the router load balance between both ISPs. To achieve load balancing between the two received default routes, you would need the following changes to the BGP configuration:

router bgp xxx

 bgp bestpath as-path multipath-relax

address-family ipv4 unicast

 maximum-paths 2 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Thank you, just to be sure the following switch will be able to handle a full bgp table, right? As I read from the documentation Cisco recommends 1GB of memory per bgp table.

Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500e-ENTSERVICESK9-M), Version 15.2(4)E5, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2017 by Cisco Systems, Inc.
Compiled Mon 18-Sep-17 09:44 by prod_rel_team

ROM: 12.2(44r)SG10
XXX uptime is 23 weeks, 3 days, 23 hours, 49 minutes
System returned to ROM by power-on
System restarted at 20:44:12 EEST Sat Jul 2 2022
System image file is "bootflash:cat4500e-entservicesk9-mz.152-4.E5.bin"
Sushi Revision 11, Tatooine Revision 141, Forerunner Revision 1.83

Last reload reason: power-on

 

This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

cisco WS-C4900M (MPC8548) processor (revision 5) with 1048576K bytes of memory.
Processor board ID JAE18210CBN
MPC8548 CPU at 1.33GHz, Cisco Catalyst 4900M
Last reset from PowerUp
4 Virtual Ethernet interfaces
36 Gigabit Ethernet interfaces
16 Ten Gigabit Ethernet interfaces
511K bytes of non-volatile configuration memory.

Configuration register is 0x2102

Hi @zsolt211 ,

I would not recommend going with the full Internet routing table on this device, as it has not been designed to deal with so many routes. I would rather go with the two default routes and the load balancing between them.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Okay, will do! Thank so much for the help.

You are very welcome @zsolt211 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Review Cisco Networking products for a $25 gift card