Page 1 of 1

2.9.27 BGP Multihop

Posted: Fri Jul 28, 2006 4:40 pm
by wkm001
Bad news. This doesn't work.

My setup:
Tik router with a /30 on the WAN let say 1.1.1.1
Directly connected to my provider 1.1.1.2
I setup a peering connection with 1.1.2.1 which is directly connected to 1.1.1.2.
I added a static route to 1.1.2.1 with a gateway of 1.1.1.2.
I am able to pull all the routes down from 1.1.2.1 but all the routes are not active. When using Winbox the router tells me the interface to reach these routes learned through BGP is "unknown"

Casey

Posted: Mon Jul 31, 2006 9:41 am
by Eugene
by default, bgp routes have "target-scope" value less then "scope" value of static routes. You should set "scope" of the static route to a lower value.

Eugene

Posted: Tue Aug 01, 2006 11:15 am
by ozerk
hi all,

i have the same problem with bgp multihop as well;
example using the same ips as wkm001;

i establish a bgp connection with 1.1.2.1 via 1.1.1.2 (no problems
here) but when i receive routes, the gateways on the routes are
set as 1.1.2.1 when they actually should be 1.1.1.2. i tried to use
the 'nexthop' parameter while filtering, but it doesn't help.
if a bgp session is checked as 'multihop' the default route should
be the interface used to access the remote bgp router, not the bgp
router itself.

Posted: Tue Aug 01, 2006 4:43 pm
by changeip
post your routing filter.

Sam

Posted: Tue Aug 01, 2006 6:06 pm
by wkm001
Thanks for the help Eugene. This made all the BGP routes active. And I actually understand why.

Posted: Tue Aug 01, 2006 6:20 pm
by wkm001
If I run /ip route print detail I see all the routes learned through BGP are gateway-state=recursive. Is that what the state should be?

I have one more question, and here is the network setup:
ISP 1 ---BGP--- ether1\
|Mikrotik Router|
ISP 2 ---BGP--- ether3/

Can I set two default gateways like this?

0 S dst-address=0.0.0.0/0 gateway=1.1.1.1 interface=ether3 gateway-state=reachable distance=1 scope=5
target-scope=10 bgp-weight=100 bgp-local-pref=100

1 A S dst-address=0.0.0.0/0 gateway=2.2.2.1 interface=ether1 gateway-state=reachable distance=1 scope=5
target-scope=10 bgp-weight=1000 bgp-local-pref=1000

Thanks
Casey

Posted: Wed Aug 02, 2006 11:42 am
by Eugene
If I run /ip route print detail I see all the routes learned through BGP are gateway-state=recursive. Is that what the state should be?
Yes
Can I set two default gateways like this?
It depends on what you want to achieve :wink: