How to advertise networks in BGP

Hi Lagapides,

BGP 65400 is not ISP one and it is my local router AS connected to ISP router

Is there possibility it should come forn ISP router ?

Below output shows redistributing via eigrp

We have below command

address-family ipv4 in BGP so this will get impact to bgp routing table in vrf NET
  network 0.0.0.0
BGP configuration in VRF NET
-----------------------------------------------
address-family ipv4 vrf  NET
 redistribute eigrp 65400

So from above entire eigrp wil be distributed or we also have eigrp config for vrf NET
so EIGRP which belongs to NET will be distributed?

Is there possibility it should come forn ISP router

Hello Pavan

A default route in BGP can be learned in a couple of ways. It can be configured as a static route in the routing table and then it can be injected into BGP using the network command, or it can be redistributed either from a static route in the routing table or from another routing protocol. In the second case, you will require the use of the default-originate keyword in your BGP neighbor command. More info on this can be found at the BGP advertising a default route NetworkLessons note.

I suggest you share your BGP configuration with us as well as your routing table, your EIGRP configuration, and any static routes you have configured. This way we’ll be able to help you further.

I hope this has been helpful!

Laz

Is there a lesson, explaining redistribution between BGP, EIGRP and OSPF?

Hello Shree

This lesson has a section that deals with redistribution from OSPF into BGP:

If you have any specific questions, feel free to let us know!

I hope this has been helpful!

Laz

Hi Rene.

I just wanted to ask regarding with one of your lessons in BGP. You said If you advertise a network 1.0.0.0 mask 255.0.0.0 on R1 it will not work since this entry is not in the routing table but the thing is, this is a parent route right? cause if I type show ip route it shows the following:

1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback0
L        1.1.1.1/32 is directly connected, Loopback0

So should this be work then? Appreciate your response

Hello Joed

A prefix will be advertised by a BGP router only if both of the following two conditions are met:

  • the network command is used to specify the prefix to be advertised
  • The prefix, with the exact subnet mask, exists within the routing table

This means that if you issue the network command with a parent route, it will not be advertised.

Take a look at this NetworkLessons note on BGP Advertising a prefix for more information.

I hope this has been helpful!

Laz

Can anyone explain the difference between Null route and blackhole

Hello Gayathri

When dealing with routing, a black hole is a term used to refer to a situation where network traffic or packets are dropped or lost without any notification or error message being sent back to the sender. Specifically, this can occur when a router receives traffic for a destination network that it cannot route or forward.

Instead of returning an error message to the sender indicating the destination is unreachable, the router discards the packets, creating a “black hole” where traffic goes in but never comes out.

There are various reasons that this can occur, including routing misconfiguration or device failure. One way to create a black hole manually is to create a null route. Any traffic destined for the network in the null route will simply be dropped.

Now in the case of the null route in this lesson, it doesn’t create a black hole. Why? Because the null route doesn’t actually route any traffic! If it did, it would be a black hole. The null route here serves as a way to advertise a network to its neighbors using BGP.

So by using the null route to 1.0.0.0/8 in R1, R2 learns about it. When R2 wants to send traffic to 1.1.1.20 for example, it will know to send such traffic to R1. When R1 receives it, it’s not the null route that routes the traffic, but the more specific route that matches 1.1.1.0/24.

Now if R2 wants to send traffic to a destination of 1.1.20.1, then yes, that would be sent to R1 and a black hole would be created. But that’s where network engineers should be smart about how they create null routes and what networks they include.

I hope this has been helpful!

Laz

Hey, everyone!

When it comes to advertising networks into BGP, what’s the best practice or the common way to advertise them? By using the network command or the redistribute command?

Since redistribution is probably the quickest way, since we don’t have to write a specific network command for each of our prefixes. Are there any downsides to it, though?

Kind regards,
David

Hello David

The best practice for advertising networks into BGP largely depends on your specific network design and requirements. Both the network and redistribute commands have their uses, but they operate differently.

The network command in BGP is used to advertise networks that are already present in the routing table. It’s a good practice to use this command when you want to have granular control over which routes are being advertised. This method requires more configuration as you would need to manually specify each network that you wish to advertise.

On the other hand, the redistribute command is used to take routes from other routing protocols and inject them into BGP. This is a more automated way of advertising routes, as it doesn’t require manual configuration for each network. Although the redistribute command requires that the redistributed prefixes be in the routing table, it doesn’t require an exact match as the network command does. However, it can potentially lead to the advertisement of unwanted routes if not properly controlled, which may cause routing loops or other issues.

Keep in mind that using the ‘redistribute’ command without proper route filtering can lead to the propagation of unnecessary routes, which can increase the size of the routing table and use more resources. It could also inadvertently advertise routes that you do not want to advertise.

So, if you have a small to medium-sized network where you can easily manage and control all your routes, you might prefer using the ‘network’ command. If you have a large network with many dynamic routes, then ‘redistribute’ might be more efficient, but you should be careful to apply appropriate filtering.

Always consider your network’s specific requirements and constraints when choosing between these methods.

I hope this has been helpful!

Laz

1 Like

Great info, I have 3 routers in location A peering with a WAN link that connects to another router in location B. The router in location B is peering with the ISP router. How would I advertise the default route in my entire network using BGP? Do I need to statically add it to the routing table first in order for BGP to advertise it? Is this my only option. Thanks

Hello Joseph

You can advertise a default route via BGP in a couple of ways. Take a look at this NetworkLessons note on the topic for more details.

This is the case regardless of the topology that you may have. Let us know if you have any more specific questions.

I hope this has been helpful!

Laz