Hi there! Just curious if anyone out there knows of a way to configure default routes on a per interface basis on a Cisco. So that different interfaces had different default routes statically defined. Any thoughts? Thanks! Nick Lauriat
You can do it using route-maps. Here's a quick and dirty example I will quickly type up. Route-maps are a source type routing rather than destination based. So you are grabbing packets with your source IP and any destination IP and tell them to go out Path B instead of the default path A. (I hope I didn't screw up any of the orders, I am merely trying to demonstrate a simple example, corrections are welcome. :) --------------------------->8----------------------------- ! int e0 description Your Internal LAN ip address 192.168.100.1 255.255.255.0 ip policy route-map DEFROUTE ! int s0 description Upstream Path A ip address 192.168.150.2 255.255.255.0 ! int s1 description Upstream Path B ip address 192.168.200.2 255.255.255.0 ! ip route 0.0.0.0 0.0.0.0 192.168.150.1 ! access-list 125 permit ip 192.168.100.0 0.0.0.255 any ! route-map DEFROUTE permit 10 match ip address 125 set ip next-hop 192.168.200.1 ! --------------------------->8--------------------------------- ...David * David Papp | 4907-99 Street | Phone: +1.403.430.0811 * * Manager | Edmonton, Alberta | Fax: +1.403.436.9963 * * OA Internet Inc. | Canada, T6E 4Y1 | Email: david@oanet.com * On Fri, 11 Jul 1997, Nick Lauriat wrote:
Hi there!
Just curious if anyone out there knows of a way to configure default routes on a per interface basis on a Cisco. So that different interfaces had different default routes statically defined.
Any thoughts?
Thanks!
Nick Lauriat
Date: Fri, 11 Jul 1997 10:30:58 -0400 (EDT) From: Nick Lauriat <lauriat@panther.middlebury.edu> Subject: default routes on Ciscos To: nanog@merit.edu
Hi there!
Just curious if anyone out there knows of a way to configure default routes on a per interface basis on a Cisco. So that different interfaces had different default routes statically defined.
Policy routing will do that at GREAT cost in CPU time.
Any thoughts?
Thanks!
Nick Lauriat
Dave Nordlund d-nordlund@ukans.edu University of Kansas 913/864-0450 Computing Services FAX 913/864-0485 Lawrence, KS 66045 KANREN
DAVE NORDLUND said:
Date: Fri, 11 Jul 1997 10:30:58 -0400 (EDT) From: Nick Lauriat <lauriat@panther.middlebury.edu> Subject: default routes on Ciscos To: nanog@merit.edu
Hi there!
Just curious if anyone out there knows of a way to configure default routes on a per interface basis on a Cisco. So that different interfaces had different default routes statically defined.
Policy routing will do that at GREAT cost in CPU time.
Any thoughts?
Thanks!
Nick Lauriat
Dave Nordlund d-nordlund@ukans.edu University of Kansas 913/864-0450 Computing Services FAX 913/864-0485 Lawrence, KS 66045 KANREN
yes, but there are several ways to do this that isn't as expensive in CPU. You could set an access list that is on all your peers, you could set up communities to prevent leaking the default to your network, you could use some form of the aggregate command (not recommended) There are lots of ways. _J
Just curious if anyone out there knows of a way to configure default routes on a per interface basis on a Cisco. So that different interfaces had different default routes statically defined.
Others here have pointed out that this can be done using policy based routing. It's pretty hard to do per-interface default routes when you're not the sink for the packets, though, since there's otherwise no protocol control block or other state to hang the outbound default on. I suppose you could just do round robin for your outbound traffic. If you're using a BSD/OS, NetBSD, or FreeBSD machine and you're doing multi- homed web service (which _does_ give you protocol control blocks to use to hold your default route binding for outbound packets), there's some free code available to support per-interface default routes. It's a small change to the kernel and an even smaller one to the "route" and "netstat" commands. See ftp://ftp.vix.com/pub/vixie/ifdefault/ for source code and SF NANOG slides.
participants (5)
-
DAVE NORDLUND
-
David Papp
-
jhall@UU.NET
-
Nick Lauriat
-
Paul A Vixie