Community discussions

MikroTik App
 
bejcd
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Thu Oct 27, 2005 7:26 pm

BGP AS-PATH prepend (routing-test)

Sat Aug 11, 2007 8:06 am

Hello,

I have 2 questions regarding configuration of BGP in a routing test package (ver. 2.9.45) :

1.
I have configured 2 BGP uplinks with redistribution of OSPF and static routes in BGP (instance). I would like to know how to "force" (or regulate) incoming and outgoing traffic primarily through one of those 2 links ? I tried to play with routing filters, AS prepend and local preference parameters without visible success. First I created rules :

< routing filter> print
Flags: X - disabled
0 chain=ospf-in prefix=10.100.0.0/20 protocol="" invert-match=no
action=accept set-bgp-local-pref=10 set-bgp-prepend=4

1 chain=ospf-out prefix=10.100.0.0/20 protocol="" invert-match=no
action=accept set-bgp-local-pref=10 set-bgp-prepend=4

and applied them to a peer :

Flags: X - disabled
0 name="peer1" instance=default remote-address=xxx.xxx.xxx remote-as=XXX
tcp-md5-key="" nexthop-choice=default multihop=no route-reflect=no
hold-time=10s ttl=1 in-filter=ospf-in out-filter=ospf-out


2.
After few hours of production work BGP peers started changing state - from "connected" to "idle" every 20s.
Does anybody have experience how to prevent that ?


Thank you,
D.
 
bejcd
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Thu Oct 27, 2005 7:26 pm

Re: BGP AS-PATH prepend (routing-test)

Mon Aug 13, 2007 6:47 am

there are two situations when BGP peer's become unstable (intermittent change from connected to idle state) :

1. if an interface port has been turned to "disable" and after that to "enable" state
2. after a button "resend" is submitted

the only solution how to make a router stable back is to be rebooted.
again: ver 2.9.45

Thx,
D.
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: BGP AS-PATH prepend (routing-test)

Mon Aug 13, 2007 7:28 pm

1. possibly the tcp session on port 179 is getting interrupted. Make sure there are no firewall rules blocking communication to these machines on port 179.

2. make sure that no one is nailing you on port 179 - possibly something is resetting the tcp session.

3. check your network between peers, possibly something is causing a break in activity ?

4. use packet sniffer and take a pcaket capture of the bgp peering session. This will tell you exactly what is wrong. if you need help decoding it I can help.

Sam
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: BGP AS-PATH prepend (routing-test)

Mon Aug 13, 2007 7:32 pm

oh, one last thing ... if your CPU is 100% that might be the problem. sometimes the router is too busy and forgets bgp is running (bgp crash). Do you see 100% cpu for long periods of time after bgp session is established, or only during route negotiation?
 
bejcd
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Thu Oct 27, 2005 7:26 pm

Re: BGP AS-PATH prepend (routing-test)

Tue Aug 14, 2007 4:59 pm

Hello Sam,

I appreciate your answer.

What I did I unscheduled "routing-test" package, scheduled back "routing" package and BGP with 2 uplinks works well !!! There are no interruptions and problems as those with routing-test and routing filters even if I do enable/disable ports and similar activities mentioned earlier.

The major problem is how to prepend AS path to one of 2 peers. Because we are using OSPF as our primary igp routing protocol I simply applied routing filters to ospf-in and ospf-out chains to a desired peer to reduce in/out traffic throught it. But if I start varying parameteres in "Matchers" section BGP peers are going "nuts" - they are flip-floping between idle/established states.

If there is AS path prepend option somewhere in a basic routing package personally I don't need to use routing-test.

Thank you again,
D.
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: BGP AS-PATH prepend (routing-test)

Tue Aug 14, 2007 6:52 pm

the standard routing package doesn't have any filtering i believe ... so use at your own risk : )