Question on setting the local preference.

WhyMe_08WhyMe_08 Member Posts: 8 ■□□□□□□□□□
Hello.
Need help on setting the local preference. Referring to the topology below, after advertising both links btwn
R4 and R3 in BGP, i advertised R4's loopback into bgp, but i could only get one entry in the bgp table.

Question;

1-Traffic exiting from R3 and returning to R3 should prefer the T1 link which is the s0/2 on R3 to s0/1 on R4.



bgp.jpg 33.7K

Comments

  • Forsaken_GAForsaken_GA Member Posts: 4,024
    Need a whole lot more information that, man. sh ip bgp summ from the routers in question, as well as BGP configuration. Is this iBGP or eBGP? Exactly which router's BGP table you're only seeing a single entry in would help. I assume you mean R3's.

    When you posts questions like this, especially about BGP, err on the side of caution and go for a boatload of information rather then less.

    If I had to hazard a guess based on the information you have here, I'm guessing there's a peering between r3 and r4 that isn't up. If you only have one session between R3 and R4, then you're only going to have one entry for the loopback. You'll need to establish two sessions, one on each link, between R3 and R4, and then R3 should get two entries for the loopback.

    Regardless of what you're doing on R3, R1 should only see one route to the loopback, unless it also has a direct peering session to R4. Although BGP can handle multiple links, it only advertises the route it's selected as best to it's neighbors.
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    The thing you need to keep in mind is that BGP doesn't operate on a link by link basis. It behaves much more like RIP, and it's on a hop by hop basis. Each peering session is essentially a hop. Despite the fact that those two links are connected to the same routers on both ends, from BGP's perspective, those individual links represent individual routers. Advertising both links between R3 and R4 does nothing to influence path selection, it just makes BGP advertise your transit links to other routers (this is generally not considered desireable)

    The only thing you can do to influence path selection is essentially influence what's seen as the next hop for a route from the routers perspective. So if you're only establishing one BGP session between R3 and R4, whatever link you're establishing that session over is what's going to be the next hop, so that's the link that's going to be used. If you peered between the loopbacks, and both routers have IGP routes to the loopbacks over both links, then it'll load balance between the links.

    However, if you want to bias all traffic between R3 and R4 to the s0/1 to s0/2 link, then you need to peer over that link. And then you need to peer over the s0/0 to s0/1 link as well. Then set local pref for each of those connections to what's desired. So set local pref on the s0/1 - s0/2 link to 200 and leave local pref at the default of 100 over the s0/0 to s0/1 link. All traffic to routes advertised by R4 will then take the desired link, and if that link happens to go down, it will then take the other one.
  • WhyMe_08WhyMe_08 Member Posts: 8 ■□□□□□□□□□
    thanks for the effort, although i did not provide enough information i think you hit the nail on the head.
    bgp peering was between both links between R3 and R4 so thats ebgp. although after advertising the
    both links with their remote-as's, the questions asks to advertise only the loopback of R4 into bgp which
    i did with the network statements. then i had to prefer traffic from and back to, R3 through the s0/2--s0/1
    interfaces. In all when i did a tcl script for testing the network connectivity, i still had problems with reaching
    the networks on the R4 loopback networks.
Sign In or Register to comment.