another dumb question, I guess. I have a 2 routers, r1 and r2, connected to a layer 3 switch. All 3 devices run eigrp. I would like to send traffic from the layer 3 switch for a destination, say 10.1.1.0 255.255.255.0 to r1 and different traffic , say 10.2.2.0 255.255.255.0 to r2. In my eigrp routing table, I get all traffic going to r1, nothing to r2. I've tried max paths, variance, hsrp, route-maps (route maps in the bgp section, since r1 and r2 also run bgp), static routes and I just can't seem to figure this out. How do I go about doing this?
You can use offset list matching routes and using some penalties to make that route worse.
How is it configured in the L3 switch? Is it the same SVI for both routers?
Is one SVI for R1 and another for R2?
If they're different SVI you can do this below.
access-list 99 permit 10.2.2.0 0.0.0.255
router eigrp x
offset-list 99 in XXX vlan y
XXX => Value to be greater than the backup route
Y -> SVI connected to R1
This would make this specific route to have a penalty so the traffic would flow through R2.
You could also use PBR.
access-list 100 permit scr dest
route-map PBR permit 10
match ip address 100
set ip next-hop x.x.x.x
set ip next-hop verify-availability
Another way is using administrative distance; you can modify it using :
router eigrp <as>
distance <admin_dist> <source_ip> <wild card mask> <acl>
You can give routes (or some routes) from r1 a worst admin distance; this way the switch will prefere routes from r2.
please rate if useful