cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1363
Views
3
Helpful
26
Replies

BGP RIB

MonkeyBear007
Level 1
Level 1

Do I have to redist for the BGP to have Rib and there is no around it

router ospf 100
passive-interface GigabitEthernet1
network 3.3.3.3 255.255.255.252
network 10.1.2.0 0.0.0.255 area 0
!
router bgp 100
bgp router-id 3.3.3.3
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
network 10.1.2.0 mask 255.255.255.0
neighbor 10.1.1.2 remote-as 200
neighbor 10.1.1.2 soft-reconfiguration in
!
ISP#show ip int br
Interface IP-Address OK? Method Status Protocol
GigabitEthernet1 10.1.1.1 YES manual up up
Loopback0 3.3.3.3 YES manual up up
ISP#
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i

Total number of prefixes 1
Router1#

router ospf 200
router-id 1.1.1.1
network 172.16.1.0 0.0.0.255 area 0
!
router bgp 200
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 172.16.1.0 mask 255.255.255.0
neighbor 10.1.1.1 remote-as 100
neighbor 10.1.1.1 soft-reconfiguration in
!
Router1#show ip int br
Interface IP-Address OK? Method Status Protocol
GigabitEthernet1 10.1.1.2 YES manual up up
GigabitEthernet2 unassigned YES unset administratively down down
GigabitEthernet3 unassigned YES unset administratively down down
GigabitEthernet4 unassigned YES unset administratively down down
Loopback0 1.1.1.1 YES manual up up
Router1#
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.1.1 4 100 8 7 3 0 0 00:02:55 1
Router1#
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i

Total number of prefixes 1
Router1#

jamesbefreedeer_0-1710198143087.png

 

26 Replies 26

MonkeyBear007
Level 1
Level 1

I'm not seeing 172.16.1.0 and 10.1.2.0 between the two router between the bgp

same subnet in both BGP and OSPF?

can you more elaborate 

MHM

ISP Router isn't getting the subnet from R! and R2

router bgp 100
bgp router-id 3.3.3.3
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
network 10.1.2.0 mask 255.255.255.0
neighbor 10.1.1.2 remote-as 200
neighbor 10.1.1.2 soft-reconfiguration inbound

Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 10.1.1.2 0 0 200 i

Total number of prefixes 1
ISP#


Network Next Hop Metric LocPrf Weight Path
* 1.1.1.1/32 10.2.2.2 0 200 i

Total number of prefixes 1
ISP#

Router1#show run | s ospf
router ospf 200
router-id 1.1.1.1
network 172.16.1.0 0.0.0.255 area 0
Router1#show run | s bgp
router bgp 200
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 172.16.1.0 mask 255.255.255.0
neighbor 10.1.1.1 remote-as 100
neighbor 10.1.1.1 soft-reconfiguration inbound
neighbor 172.16.1.2 remote-as 200
neighbor 172.16.1.2 soft-reconfiguration inbound
Router1#

Router2#show run | s ospf
router ospf 200
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 0
network 172.16.1.0 0.0.0.255 area 0
Router2#show run | s bgp
router bgp 200
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
network 172.16.1.0 mask 255.255.255.0
neighbor 10.2.2.1 remote-as 100
neighbor 10.2.2.1 soft-reconfiguration inbound
neighbor 172.16.1.1 remote-as 200
neighbor 172.16.1.1 soft-reconfiguration inbound
Router2#

 

Can you provide the output of the routing table of R1, R2 and the ISP router?

Can you also provide the output of the command show ip bgp summary on all 3 devices?

 

-David

MonkeyBear007
Level 1
Level 1

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [20/0] via 10.1.1.2, 01:31:15
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/30 is directly connected, GigabitEthernet1
L 10.1.1.1/32 is directly connected, GigabitEthernet1
C 10.2.2.0/30 is directly connected, GigabitEthernet2
L 10.2.2.1/32 is directly connected, GigabitEthernet2
ISP#
Network Next Hop Metric LocPrf Weight Path
* 1.1.1.1/32 10.2.2.2 0 200 i
*> 10.1.1.2 0 0 200 i
*> 3.3.3.3/32 0.0.0.0 0 32768 i
ISP#

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.1.2 4 200 105 105 3 0 0 01:31:55 1
10.2.2.2 4 200 108 108 3 0 0 01:31:10 1

ISP#
**************************************************************************************

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
B 3.3.3.3 [20/0] via 10.1.1.1, 01:32:27
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/30 is directly connected, GigabitEthernet1
L 10.1.1.2/32 is directly connected, GigabitEthernet1
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.0/30 is directly connected, GigabitEthernet2
L 172.16.1.1/32 is directly connected, GigabitEthernet2
Router1#
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
* i 3.3.3.3/32 10.2.2.1 0 100 0 100 i
*> 10.1.1.1 0 0 100 i
Router1#

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.1.1 4 100 107 107 5 0 0 01:33:13 1
172.16.1.2 4 200 121 126 5 0 0 01:44:02 1

Router1#
*******************************************************************************************

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [200/0] via 172.16.1.1, 01:44:33
3.0.0.0/32 is subnetted, 1 subnets
B 3.3.3.3 [20/0] via 10.2.2.1, 01:32:58
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.2.2.0/30 is directly connected, GigabitEthernet1
L 10.2.2.2/32 is directly connected, GigabitEthernet1
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.0/30 is directly connected, GigabitEthernet2
L 172.16.1.2/32 is directly connected, GigabitEthernet2
Router2# Network Next Hop Metric LocPrf Weight Path
*>i 1.1.1.1/32 172.16.1.1 0 100 0 i
*> 3.3.3.3/32 10.2.2.1 0 0 100 i
* i 10.1.1.1 0 100 0 100 i
Router2#

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.2.2.1 4 100 111 111 5 0 0 01:33:50 1
172.16.1.1 4 200 128 122 5 0 0 01:45:24 2

Router2#

Your interfaces between R1and R2 are /30. In your BGP network statement it specifies a /24 mask. BGP is VERY particular as the network statement must match EXACTLY of what it has in its routing table. Since R1 and R2 have the 172.16.1.0 network as a /30 in the routing table your network statement of 172.16.1.0/24 wont work. Change it to:

router bgp 200

network 172.16.1.0 mask 255.255.255.252

Also I see you're advertising the10.1.2.0/24 network into BGP but I don't see it in the routing table of any router.

-David

I don't see the 10.1.2.0/24 or 172.16.0.0 that is my problem right now

Hello @MonkeyBear007 ,

@David Ruess is right  : now we have no auto-summary as default in BGP configuration so the network command under router bgp must have the exact network mask to trigger the prefix to be in the RIB and to be advertised.

if you want to advertise prefixes that are less specific then existing ones you can do one of the following:

a) use the aggregate command to create the less specific prefix if one component route is in the BGP table

b)  use a static route to null0 with an high AD + network command

ip route 10.1.2.0 255.255.255.0 null0 220

+

router bgp 200

network 10.1.2.0 mask 255.255.255.0

Hope to help

Giuseppe

 

Yes. In my post I explained why. In order to advertise a network into BGP it must be present in the routing table EXACTLY as you advertise it. Your interfaces are a /30 but your network command in BGP is a /24. That wont work. If you make the change I suggested it should work or do what @Giuseppe Larosa said and use the aggregate command.

it worked but I had question about default route
Best to use default

neighbor default-originate

It depends on the scenario but usually yes.

You could also create a Null0 route like 0.0.0.0 0.0.0.0 Null0 and use the network command in BGP to advertise it to all peers.

Using the neighbor default command you don't need a default route in the routing table. If you use the network command you WILL need a default route in the routing table.

Do you know where I can get lab so I can practice.
dual router to single ISP connect to single router 

What is your experience/cert level. You can set one up in your home lab. I have not seen a home lab with that kind of requirement. It looks like you have already started from your example above.

 

Make sure you understand BGP very well. You can try this series:

https://learningnetwork.cisco.com/s/article/BGP-Zero-to-Hero-Part-5--BGP-Conditional-Advertisement---Redistribution

That is specifically Multi-homed scenarios but part 1 starts off with basic BGP.

 

7 year ago i was sharp in BGP even work for ISP company but I forgot too much now. I don't use it much and I have been focused Web frame(flask, Node.js), Goland, Python, Cybersecurity(ethical hacker), Cloud - AWS - Azure, Automation, Palo alto, firewall and etc.. I have very hard time keeping up with so many topics and studying none stop.
I just need to relearn rules I forgot. I have too much other topic in my head. I rather be doing IaC right now than BGP
I thought I can do this by memory but I need relearn than I will forgot. I'm sure I will forgot again as I learn more other topics

Review Cisco Networking for a $25 gift card