How to advertise networks in BGP

This topic is to discuss the following lesson:

Hi Rene,

What is the use of the null0, I learned that is the trash can of the packets but never fully understand when will I use it.

Please advise

Hi Alfredo,

When you send something to the null interface then those packets are discarded. It can be useful if you want to advertise something that you don’t have.

When you create a static route you need a valid next hop or it can’t be installed in the routing table. Because of this, using the null interface as next hop will help.

It’s also useful when you create summary routes. With a summary, it’s possible that you receive traffic for networks that you don’t have. In this case the packets can be discarded to the null interface.



will I need to advertise the internal routing network into BGP
for example internal EIGRP is using subnet

Hi Aaron,

It depends what you want to achieve. If you want to be reachable from the outside world, then yes. If you are a transit AS then there might be no reason for others to know about some of your internal networks.


HI Rene ,

Thanks for your answers in all departments they really do help !

one question -

if for example I was using subnet for all of my internal EIGRP routing
would i need to add that subnet to the network statement under the BGP feature in order for a BGP neighbour to route packets to hosts in the /24 network ?

I think that makes sense !!

do you offer any of your time to look at configs / topolgys??

Hi Aaron,

If a remote BGP neighbor should access /24 then yes, you should advertise it. You can use the network command in BGP or you could redistribute things from EIGRP into BGP.

I’m afraid I don’t look at specific configs or topologies, I would love to but it’s way too time consuming…:slight_smile:


Thank you Rene.

Getting back to Alfred0’s question regarding null routes, why would someone need to advertise a prefix which is not existing in their local AS? Yes, it does make sense to use null route(s) with route summarization. I think there is one more case where you need null route, namely when you don’t want your public (peering) IP to be advertised upstream in BGP.


Hi Marty,

There’s a couple of good reasons. For example, let’s say the ISP has the entire range but at the moment they are only using a small part of this address space, just a few subnets:

You could advertise just these subnets in BGP and be done with it but advertising your entire address space might be a better idea:

Stability of routing updates is important in BGP. If one of your interfaces that has a subnet that is advertised in BGP is flapping then this will trigger a routing update. When you use a static route (to the null interface) then this route will always be advertised…it doesn’t matter what your interfaces are doing. This will greatly improve the stability of BGP routing.

The second thing to consider is that you are the only one using the address space so you might as well advertise it right away. This also improves stability since you won’t be advertising (and removing) new subnets all the time. It also helps to reduce the size of routing tables.

Hope this helps!



Thank you Rene.

Excellent! So let’s make sure I understand your logic. If I was the ISP and I owe the entire subnet (utilizing/advertizing only,, and then I will manually configure ip route null 0 so to contribute for my AS stability and reduce the size of the routing table. Am I correct?


1 Like

Hi Marty,

That’s right, you got it.


1 Like

Can you shed any light on the default information originate and it’s use in BGP.

Hi Derek,
There are three cases that must be considered for your question. I will answer your question directly first, and then mention the other two cases.

Case #1:
Think of “default-information originate” as a safety check. Suppose there was some careless BGP admin that told a router to redistribute some other protocol’s routes into BGP, say EIGRP. If that admin didn’t use a route-map or some other filter, and he didn’t think about that EIGRP was advertising a default route, the consequences could be really bad. You might not want all of your BGP peers to learn a default route from you! As a precaution against this, if you redistribute other routes into BGP and you really intended the default to be included, you must additionally type in “default-information originate.” So in other words, “default-information originate” really has no meaning with BGP unless it is paired with a “redistribute” statement.

Case #2
(config-router)#neighbor default default-originate
What this does is advertise a default route to a specific neighbor. BGP will do this even if it doesn’t have a default route itself (so this is an exception to the rule where you can only advertise networks that are in your routing table).

Case #3
The last case is advertising the default network explicitly like this
(config-router)#network mask
Doing this will cause BGP to advertise a default network, but only if you already have the default network in your routing table.


Thanks that helps to clear it up!

Hi Rene,
What if behind R1 - on the left side - we have a cloud and then How R2 will ever be capable to send traffic to this net, through R1?
Because R1 has:

ip route null 0 

which will sink to null 0 every packet, right?!
One solution would be: if R1 will have more specific routes to subnets of, traffic to those subnets will reach its destination because of the longest match rule.

Hi Adrian,

With a static route like this, everything that matches will be discarded unless there is a more specific route. For example, if R1 has pointing to another router then any packed with destination 1.1.x.x would match that second static route.

If there was a router with networks that match behind R1 then you should change the next hop from null0 to the IP address of the router behind R1 :slight_smile:


Hello Rene,

I have seen some documents that they advertise a network in BGP without using mask like below:

router bgp 1

Just wondering as you said the exact mask has to be added in network command, why bgp process accepts this without mask?


Hi Rouzbeh,

  1. If no mask is specified, default mask is used, that is /8 in your example.
  2. When Rene said “exact mask has to be added in network command” meant that if we have a prefix in routing table (say, and we want this prefix to be injected in bgp with network command we should use
router bgp 1

in our config.
If we are going to use:

router bgp 1

, router will assume an implicit mask (
So prefix will not enter bgp table because we do not have in routing table. We have but not
Briefly, if we have in r. table, we should use EXACT prefix (of course) and mask (!) in network statement
Hope it helps.

1 Like

Thank you so much for the answer, now it is clear for me.



How do I advertise public IP to a peer? for example, my server should NAT to <public-IP> and routed to neighbor.

The router only knows the network as connected.