cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
595
Views
5
Helpful
3
Replies

CCNP BGP question

I'm using ITProTV videos to study for my CCNP route exam, and I've been messing around with BGP in GNS 3 but I'm a little confused at the moment.  The topology I'm using in GNS3 is below:

 

2020-09-12 15_02_27-S-TEST1 - s-test1 - Remote Desktop Connection.png

 

The 4 routers in AS 65000 are all running OSPF between themselves.  Edge1 has connections to both ISPs, and Edge 2 just a single connection to it's own ISP.  eBGP peering is setup between ISP1 and Edge1, ISP2, and Edge1, and between ISP2 and Edge 2.

 

Edge1 and Edge 2 are also peering BGP between themselves to share routes.  I initially got stuck because I could see the 2 Edge routers sharing BGP routes but they weren't populating in the routing table.  The guy in the video mentioned using the "next hop self" command which I did, and now Edge2 has routes to the 172.x.x.x networks which is good. 

 

So I couldn't ping from Edge1 or Edge 2 to any of the 172.x.x.x networks and couldn't figure out why.  Then I thought, well maybe the traffic doesn't have a path back.  So I went to ISP1 and did "ip route 192.168.0.0 255.255.255.0 172.16.0.2" and success...I could ping both ways.  But then I thought well why not just share the route over BGP, and here's where I have a problem...or just don't understand.

 

If I go to Edge1 and and advertise 

192.168.0.0 mask 255.255.255.0

into the ipv4 address family, the route doesn't show in the routing table of ISP1, or Edge2.  Actually, it doesn't even show up in the RIB.  However, if I go into the address family for ipv4 on Edge1 and specify "

network 192.168.0.0 mask 255.255.255.252

" and put the /30 in there, the /30 route shows in the Edge2 and ISP1 routing tables, and I can ping 192.168.0.1 from ISP1 and Edge2.

 

So I guess my question ultimately is, why would a static route ported to the /24 of 192.168.0.0 work, but the BGP route for the same subnet not enter the routing table?  I'm sure it's something obvious I'm missing and my brain is fried from all the studying, so I'm hoping someone can point out what I'm not understanding.

 

Posting relevant configs from the routers below for clarification:

 

ISP1:

ISP1#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES NVRAM administratively down down 
GigabitEthernet1/0 172.16.0.1 YES NVRAM up up 
GigabitEthernet2/0 unassigned YES NVRAM administratively down down 
GigabitEthernet3/0 unassigned YES NVRAM administratively down down 
GigabitEthernet4/0 unassigned YES NVRAM administratively down down 
GigabitEthernet5/0 unassigned YES NVRAM administratively down down 
GigabitEthernet6/0 unassigned YES NVRAM administratively down down 
Loopback1 172.16.1.1 YES NVRAM up up 
Loopback2 172.16.2.1 YES NVRAM up up 
Loopback3 172.16.3.1 YES NVRAM up up 
Loopback4 172.16.4.1 YES NVRAM up up 
ISP1#
ISP1#sh run | s bgp
router bgp 65111
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 172.16.0.2 remote-as 65000
!
address-family ipv4
network 172.16.0.0 mask 255.255.255.0
network 172.16.1.0 mask 255.255.255.0
network 172.16.2.0 mask 255.255.255.0
network 172.16.3.0 mask 255.255.255.0
network 172.16.4.0 mask 255.255.255.0
neighbor 172.16.0.2 activate
exit-address-family
ISP1#
ISP1#sh ip pro
*** IP Routing is NSF aware ***

Routing Protocol is "bgp 65111"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Neighbor(s):
Address FiltIn FiltOut DistIn DistOut Weight RouteMap
172.16.0.2 
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
172.16.0.2 20 00:05:24
Distance: external 20 internal 200 local 200

ISP2:

ISP2#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES NVRAM administratively down down 
GigabitEthernet1/0 10.0.0.1 YES NVRAM up up 
GigabitEthernet2/0 10.0.0.5 YES NVRAM up up 
GigabitEthernet3/0 unassigned YES NVRAM up up 
GigabitEthernet4/0 unassigned YES NVRAM up up 
GigabitEthernet5/0 unassigned YES NVRAM administratively down down 
GigabitEthernet6/0 unassigned YES NVRAM administratively down down 
Loopback1 10.0.1.1 YES NVRAM up up 
Loopback2 10.0.2.1 YES NVRAM up up 
Loopback3 10.0.3.1 YES NVRAM up up 
Loopback4 10.0.4.1 YES NVRAM up up 
ISP2#
ISP2#sh run | s bgp
router bgp 65222
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 10.0.0.2 remote-as 65000
neighbor 10.0.0.6 remote-as 65000
!
address-family ipv4
network 10.0.0.0 mask 255.255.255.252
network 10.0.0.4 mask 255.255.255.252
network 10.0.1.0 mask 255.255.255.0
network 10.0.2.0 mask 255.255.255.0
network 10.0.3.0 mask 255.255.255.0
network 10.0.4.0 mask 255.255.255.0
neighbor 10.0.0.2 activate
neighbor 10.0.0.6 activate
exit-address-family
ISP2#
ISP2#sh ip pro
*** IP Routing is NSF aware ***

Routing Protocol is "bgp 65222"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Neighbor(s):
Address FiltIn FiltOut DistIn DistOut Weight RouteMap
10.0.0.2 
10.0.0.6 
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
10.0.0.2 20 00:05:56
10.0.0.6 20 01:41:51
Distance: external 20 internal 200 local 200

Edge1:

EDGE1#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down    
GigabitEthernet1/0         172.16.0.2      YES NVRAM  up                    up      
GigabitEthernet2/0         10.0.0.2        YES NVRAM  up                    up      
GigabitEthernet3/0         192.168.0.1     YES NVRAM  up                    up      
GigabitEthernet4/0         192.168.0.18    YES manual up                    up      
GigabitEthernet5/0         unassigned      YES NVRAM  administratively down down    
GigabitEthernet6/0         unassigned      YES NVRAM  administratively down down    
EDGE1#
EDGE1#sh run | s bgp
router bgp 65000
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 10.0.0.1 remote-as 65222
 neighbor 172.16.0.1 remote-as 65111
 neighbor 192.168.0.19 remote-as 65000
 !
 address-family ipv4
  network 192.168.0.0
  network 192.168.0.0 mask 255.255.255.252
  neighbor 10.0.0.1 activate
  neighbor 172.16.0.1 activate
  neighbor 192.168.0.19 activate
  neighbor 192.168.0.19 next-hop-self
 exit-address-family
EDGE1#
EDGE1#sh ip pro
*** IP Routing is NSF aware ***

Routing Protocol is "bgp 65000"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  IGP synchronization is disabled
  Automatic route summarization is disabled
  Neighbor(s):
    Address          FiltIn FiltOut DistIn DistOut Weight RouteMap
    10.0.0.1                                             
    172.16.0.1                                           
    192.168.0.19                                         
  Maximum path: 1
  Routing Information Sources:
    Gateway         Distance      Last Update
    10.0.0.1              20      00:20:39
    192.168.0.19         200      00:20:44
    172.16.0.1            20      1d05h
  Distance: external 20 internal 200 local 200

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 192.168.0.18
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.0.1 0.0.0.0 area 0
    192.168.0.18 0.0.0.0 area 0
  Passive Interface(s):
    FastEthernet0/0
    GigabitEthernet1/0
    GigabitEthernet2/0
    GigabitEthernet5/0
    GigabitEthernet6/0
    VoIP-Null0
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.1.1          110      1d08h
    192.168.2.1          110      1d07h
    192.168.0.19         110      1d07h
  Distance: (default is 110)

Edge2:

EDGE2#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down    
GigabitEthernet1/0         10.0.0.6        YES NVRAM  up                    up      
GigabitEthernet2/0         192.168.0.19    YES manual up                    up      
GigabitEthernet3/0         192.168.0.9     YES NVRAM  up                    up      
GigabitEthernet4/0         unassigned      YES NVRAM  administratively down down    
GigabitEthernet5/0         unassigned      YES NVRAM  administratively down down    
GigabitEthernet6/0         unassigned      YES NVRAM  administratively down down    
EDGE2#
EDGE2#sh run | s bgp
router bgp 65000
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 neighbor 10.0.0.5 remote-as 65222
 neighbor 192.168.0.18 remote-as 65000
 !
 address-family ipv4
  neighbor 10.0.0.5 activate
  neighbor 192.168.0.18 activate
  neighbor 192.168.0.18 next-hop-self
 exit-address-family
EDGE2#
EDGE2#sh ip pro
*** IP Routing is NSF aware ***

Routing Protocol is "bgp 65000"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  IGP synchronization is disabled
  Automatic route summarization is disabled
  Neighbor(s):
    Address          FiltIn FiltOut DistIn DistOut Weight RouteMap
    10.0.0.5                                             
    192.168.0.18                                         
  Maximum path: 1
  Routing Information Sources:
    Gateway         Distance      Last Update
    10.0.0.5              20      1d05h
    192.168.0.18         200      00:13:09
  Distance: external 20 internal 200 local 200

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 192.168.0.19
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.0.9 0.0.0.0 area 0
    192.168.0.19 0.0.0.0 area 0
  Passive Interface(s):
    FastEthernet0/0
    GigabitEthernet1/0
    GigabitEthernet4/0
    GigabitEthernet5/0
    GigabitEthernet6/0
    VoIP-Null0
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.1.1          110      1d07h
    192.168.2.1          110      1d08h
    192.168.0.18         110      1d07h
  Distance: (default is 110)

Core1:

CORE1#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down    
GigabitEthernet1/0         192.168.0.2     YES NVRAM  up                    up      
GigabitEthernet2/0         192.168.0.5     YES NVRAM  up                    up      
GigabitEthernet3/0         192.168.1.1     YES manual up                    up      
GigabitEthernet4/0         unassigned      YES NVRAM  administratively down down    
GigabitEthernet5/0         unassigned      YES NVRAM  administratively down down    
GigabitEthernet6/0         unassigned      YES NVRAM  administratively down down    
CORE1#
CORE1#sh ip pro
*** IP Routing is NSF aware ***

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 192.168.1.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.0.2 0.0.0.0 area 0
    192.168.0.5 0.0.0.0 area 0
    192.168.1.1 0.0.0.0 area 0
  Passive Interface(s):
    FastEthernet0/0
    GigabitEthernet3/0
    GigabitEthernet4/0
    GigabitEthernet5/0
    GigabitEthernet6/0
    VoIP-Null0
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.2.1          110      1d08h
    192.168.0.19         110      1d07h
  Distance: (default is 110)

Core2:

CORE2#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down    
GigabitEthernet1/0         192.168.0.10    YES NVRAM  up                    up      
GigabitEthernet2/0         192.168.0.6     YES NVRAM  up                    up      
GigabitEthernet3/0         192.168.2.1     YES manual up                    up      
GigabitEthernet4/0         unassigned      YES NVRAM  administratively down down    
GigabitEthernet5/0         unassigned      YES NVRAM  administratively down down    
GigabitEthernet6/0         unassigned      YES NVRAM  administratively down down    
CORE2#
CORE2#sh ip pro
*** IP Routing is NSF aware ***

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 192.168.2.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.0.6 0.0.0.0 area 0
    192.168.0.10 0.0.0.0 area 0
    192.168.2.1 0.0.0.0 area 0
  Passive Interface(s):
    FastEthernet0/0
    GigabitEthernet3/0
    GigabitEthernet4/0
    GigabitEthernet5/0
    GigabitEthernet6/0
    VoIP-Null0
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.1.1          110      1d08h
    192.168.0.18         110      1d08h
    Gateway         Distance      Last Update
    192.168.0.19         110      1d08h
  Distance: (default is 110)

Note: In the video they have BGP peering internally between the 4 routers...Edge1, Edge2, Core1 and Core2.  I elected not to do that.  Instead, Core1 and Core2 have default routes pointing at the VIP of HSRP between Edge1 and Edge2

 

Thanks for taking the time to read and thanks in advance for any replies.

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @WallaceVanDunk1494 ,

>> So I guess my question ultimately is, why would a static route ported to the /24 of 192.168.0.0 work, but the BGP route for the same subnet not enter the routing table? 

 

In modern IOS and IOS XE BGP default is now

no auto-summary

 

this means that the BGP network command looks for an exact match in the IP routing table this is why the command

router bgp 65000

network 192.168.0.0 mask 255.255.255.252

 

worked it reflects an existing IP subnet .

You cannot compare the BGP network command with a static route configured over the other node. The static route is installed if the specified next-hop is resolved by ARP or other L3 to L2 mechanism (for non LAN interfaces).

 

to be noted if you do the following

router bgp 65000

auto-summary

network 192.168.0.0

 

this works because enabiing auto-summary the component route 192.168.0.0/30 triggers 192.168.0.0/24 the major network auto summary route.

 

Hope to help

Giuseppe

 

View solution in original post

3 Replies 3

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

The prefix specified in the BGP network statement must exactly match a prefix in the routing table to be advertised. As you noticed you can attempt to advertise 192.168.0.0/24 but that does not match any of the /30 point-to-point links which is why your second network statement does work.

If you enable auto route summarisation in the BGP process on the edge routers, then the /24 network could be advertised using the aggregate-address command as the routing table contains component routes (the /30's).

 

cheers,

Seb.

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @WallaceVanDunk1494 ,

>> So I guess my question ultimately is, why would a static route ported to the /24 of 192.168.0.0 work, but the BGP route for the same subnet not enter the routing table? 

 

In modern IOS and IOS XE BGP default is now

no auto-summary

 

this means that the BGP network command looks for an exact match in the IP routing table this is why the command

router bgp 65000

network 192.168.0.0 mask 255.255.255.252

 

worked it reflects an existing IP subnet .

You cannot compare the BGP network command with a static route configured over the other node. The static route is installed if the specified next-hop is resolved by ARP or other L3 to L2 mechanism (for non LAN interfaces).

 

to be noted if you do the following

router bgp 65000

auto-summary

network 192.168.0.0

 

this works because enabiing auto-summary the component route 192.168.0.0/30 triggers 192.168.0.0/24 the major network auto summary route.

 

Hope to help

Giuseppe

 

Thank you both for the replies.  Makes much more sense now.

Review Cisco Networking products for a $25 gift card