Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BGP on 3560s 1

Status
Not open for further replies.

michbsd

IS-IT--Management
Nov 9, 2010
23
BE
Hi,

I have a couple of 3560s - on which I am running BGP between (loopback) and up against two different peers.

I would like to inject a route for a specific network... Fx. I would like to route all traffic for a specific network to one of the peers.

How can this be done?

Many thanks,

Mike
 
The peer you want the traffic routed to should be the peer announcing the route. Your question is really vague though, you should post more specific detail.
 
Thank you for your answer.

Basically I have 2 IP transit suppliers (announcing all routes) - However for network X.X.X.X/23 I want to use one specific IP transit..

Does it make sense?

thanks,

Mike
 
Are you asking for inbound traffic to the /23 on your network, or for out bound traffic from your network to a /23 network?

It looks like the first one but I want to make sure first.
 
For out bound traffic from my network to a /23 network?

thanks,

Mike
 
Hmm.. So your internal routing is done by these two 3560s as well?

I'm thinking you could do a route-map on the router you don't want to use using a prefix-list to set the next hop if the source network is that subnet you mentioned.
 
Hmm.. ok - I will have a look at that.. thanks
 
What you would need to do is use a route-map matching the /23 network and set weight to something more than 100, then add that route-map to the neighbor you wish to use as your preferred path and set it to apply the route-map inbound.

So something like...

Code:
ip access-list standard PATH 
permit 1.1.1.0 0.0.1.255

route-map PREFERRED permit
match ip address PATH
set weight 200

router bgp 1
neighbor 2.2.2.2 remote-as 1000
neighbor 2.2.2.2 route-map PATH in

Change obviously to your own needs.

 
Follow up...this will set the weight of the route for that /23 network coming INTO your router FROM that peer/neighbor to 200. The default is 100, so the /23 coming from your other peer will be 100 and the route from the preferred peer will appear in the routing table no matter what path/etc the other peer has.
 
One edit on this...

Code:
ip access-list standard PATH
permit 1.1.1.0 0.0.1.255

route-map PREFERRED permit
match ip address PATH
set weight 200

route-map PREFERRED permit 20

router bgp 1
neighbor 2.2.2.2 remote-as 1000
neighbor 2.2.2.2 route-map PATH in

The second route-map sequence just allows all other routes to pass through. I think if you do not add this it will filter out the rest of the routes, but I'm still researching that. This will just insure it does not filter out the routes but it keeps the default weight.
 
Woops one more... hehe

Code:
ip access-list standard PATH
permit 1.1.1.0 0.0.1.255

route-map PREFERRED permit
match ip address PATH
set weight 200

route-map PREFERRED permit 20

router bgp 1
neighbor 2.2.2.2 remote-as 1000
neighbor 2.2.2.2 route-map PREFERRED in

Neighbor statement changed, this should be the route-map name not the ACL name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top