11-13-2017 05:37 PM - edited 03-05-2019 09:28 AM
i am trying to create an ibgp connection that will advertise my local networks (if possible) to each other. The problem i'm running into is that i don't want to use ospf for one router to talk to another router to know about local routes. The one router is just sitting on an edge with connectivity to a tier1 provider. That router is connected to another one of my routers that is connected to a couple of piers but also knows about the Internal network. Say 10.0.0.0/24 but its routable subnets. I can get it to work by having them talk ospf, but if i remove ospf i do not see any of my local networks ingested and hence the router doesn't know the way back to the source. I do have say a static route to 10.0.0.0/24 to null interface with value of 240 or something like that. If i don't want to use ospf i'm wondering how i get the injection of local subnets into the router. I can probably do a visio tomorrow if this is confusing but i'll do it in ascii here.
Internet<>routera<>routerb<>internal network. i would like routera to receive internal routes via bgp from routerb instead of passing traffic to null. I have to be missing something simple. This is on ios-xr 9k series routers.
11-13-2017 08:48 PM
Hi,
Let's assume your AS is 65001, and your internal network is 10.1.1.0/24. If you want to advertise the internal network from RT_B to RT_A (which is connected to the ISP), your configuration will have the following:
On RT_B:-
config t
router bgp 65001
neighbor A.A.A.A remote-as 65001
neighbor A.A.A.A update-source loopback X ! Optional -- if you have alternate routes to reach RT_A.
network 10.1.1.0 mask 255.255.255.0
no synchronization
!
On RT_A:-
config t
router bgp 65001
neighbor B.B.B.B remote-as 65001
neighbor B.B.B.B update-source loopback X
no synchronization
!
HTH,
Meheretab
11-14-2017 02:31 AM - edited 11-14-2017 02:32 AM
Hi
Could you please share your config, omitting the sensitive information, or just the BGP configuration. It should be something like:
R1
router bgp 100
address-family ipv4 unicast
neighbort 10.0.0.1
remote 100
network 192.168.1.0/24
network 192.168.2.0/24
address-family ipv4 unicast
R2
router bgp 100
address-family ipv4 unicast
neighbort 10.0.0.2
remote 100
address-family ipv4 unicast
**Im not using OSPF as NLRI.
I assume it is an iBGP using the point to point network between these routers. Now R1 is connected to Internet only or to an eBGP peer?
:-)
11-14-2017 07:15 AM
Both router A and B also have ebgp to Internet peers. I see you have 2 unicast in the neighbor section. Is that needed. I can do a diagram also. The null0 is for advertising to the Internet. There is on the first reply post no sync config on ios-xr that i could find.
router static
address-family ipv4 unicast
192.168.1.0/24 Null0 245
192.168.0.0/24 Null0 245
!
router_A
route-policy ADV-iBGP
pass
end-policy
!
!
route-policy ALL_iBGP_IN
pass
end-policy
router bgp 1
bgp router-id 5.5.5.5
bgp log neighbor changes detail
address-family ipv4 unicast
bgp attribute-download
network 192.168.1.0/24
network 192.168.0.0/24
!
neighbor 192.168.0.1
remote-as 1
password encrypted ****************
address-family ipv4 unicast
route-policy ALL_iBGP_IN in
route-policy ADV-iBGP out
next-hop-self
soft-reconfiguration inbound always
!
!
router_B
route-policy ADV-iBGP
pass
end-policy
!
!
route-policy ALL_iBGP_IN
pass
end-policy
router bgp 1
bgp router-id 5.5.5.5
bgp log neighbor changes detail
address-family ipv4 unicast
bgp attribute-download
network 192.168.1.0/24
network 192.168.0.0/24
!
neighbor 192.168.0.2
remote-as 1
password encrypted ****************
address-family ipv4 unicast
route-policy ALL_iBGP_IN in
route-policy ADV-iBGP out
next-hop-self
soft-reconfiguration inbound always
!
!
11-14-2017 07:30 AM - edited 11-14-2017 07:33 AM
Hi
It could be configured under loopbacks instead null0
router static
address-family ipv4 unicast
192.168.1.0/24 Null0 245
192.168.0.0/24 Null0 245
Also router A and B should have different router ID, not sure but the configuration is similar on both routers:
Router B
router bgp 1
bgp router-id 5.5.5.5
bgp log neighbor changes detail
address-family ipv4 unicast
bgp attribute-download
network 192.168.1.0/24
network 192.168.0.0/24
11-14-2017 07:34 AM
do you think that would resolve the issue? I knew i could do that, just been doing it this way for 17 years. I can try it though.
11-14-2017 07:40 AM - edited 11-14-2017 08:00 AM
You could request an authorize maintenance window. Or make tests before. The router-id must be different otherwise it can generate problems.
11-14-2017 08:39 AM
11-14-2017 08:39 AM
11-14-2017 08:42 AM
For example
RA
router bgp 1
router-id 1.1.1.1
RB
router bgp 1
router-id 2.2.2.2
11-14-2017 08:54 AM
11-14-2017 08:58 AM
router bgp 1
bgp router-id 5.5.5.5
That is correct, also remember if you are going to advertise a subnet or host, it must be included with the same subnet mask under BGP.
11-14-2017 10:09 AM
i'm pretty sure (i just put on the rfc ip address, but my loopback is
loopback 192.168.3.1/32
interfaces are
(just example)
router a)
interface te0/0/2/0
ipv4 address 192.168.1.1/30
advertise 192.168.1.0/24
router b)
interfaces te0/0/2/0
ipv4 address 192.168.1.2/30
and advertising say 192.168.0.0/20 as an example and have a 192.168.0.0 in router-static to null with weight of 240 or whatever it was. not sure if it should be on loopback0 or whatever. Of course, this all works for addressing to ebgp.
11-14-2017 11:26 AM
Hello
Why not use an IGP for rtr1-rtrb communication, it doesnt have to be ospf and you can still get to each site without going over bgp.
Depending on the size of your internal network you could use the bgp BACKDOOR feature which will set ebgp routes tp an admin distance of 200 thus any local igp routes will be prefeered over their igp path rather than over their ebgp path to the same networks?
res
Paul
11-14-2017 01:03 PM
well the goal was just to have bgp running on the router and no interior gateway protocol if i understand you right. i think i just need to do ospf because it is the only way to know the routes that i can see. I don't mind using ospf, but i just don't really need it other than having a way back to our subscribers/servers. I just thought there was an easier way to do it with the likes of bgp only. I do know i could advertise a default route to the other router.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide