Bug 124042 - Allow user to select the "default" route for an interface
Summary: Allow user to select the "default" route for an interface
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-23 05:07 UTC by Nickolai Zeldovich
Modified: 2014-03-17 02:45 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2004-06-07 19:23:37 UTC


Attachments (Terms of Use)
patch for /sbin/ifup (1.05 KB, patch)
2004-05-23 05:07 UTC, Nickolai Zeldovich
no flags Details | Diff
patch for /sbin/dhclient-script (995 bytes, patch)
2004-05-23 05:08 UTC, Nickolai Zeldovich
no flags Details | Diff

Description Nickolai Zeldovich 2004-05-23 05:07:18 UTC
Suppose you have a separate network interface that you use to connect
to  a corporate network.  This corporate network has some structure to
it, such that it's not a single subnet.  Yet there's no reason to have
your default route point to that company's router -- you still want to
reach the Internet over your regular internet connection.  What you
want is to install a specific route for your corporate network's
address range, rather than a default route.

The attached patches allow you to specify a value for "DEFAULTROUTE"
in your ifcfg-ethN file, which will result in a route being added for
that subnet, rather than for "default".  For instance, if you use eth0
to connect to your corporate network, which is 170.12.0.0/16, you can
add the following to ifcfg-ethN:

    DEFAULTROUTE=170.12.0.0/16

and as a result, you'll end up with a route to 170.12.0.0/16 pointing
out that interface.

Comment 1 Nickolai Zeldovich 2004-05-23 05:07:54 UTC
Created attachment 100468 [details]
patch for /sbin/ifup

Comment 2 Nickolai Zeldovich 2004-05-23 05:08:06 UTC
Created attachment 100469 [details]
patch for /sbin/dhclient-script

Comment 3 Nickolai Zeldovich 2004-05-23 05:10:00 UTC
I forgot to mention that this change actually involves both /sbin/ifup
and /sbin/dhclient-script, which are two different packages.  I just
chose one at random to file against, not being well-versed in how bug
reports are handled.

Comment 4 Bill Nottingham 2004-05-25 16:45:45 UTC
Why not just have static routes for that interface?

Comment 5 Nickolai Zeldovich 2004-05-25 20:18:09 UTC
For DHCP, you don't know the gateway ahead of time, so you need the
DHCP agent to configure the proper route.  And it seems proper to have
this feature accessible in the same manner regardless of whether
you're using DHCP or static configuration.

Comment 6 Bill Nottingham 2004-05-25 20:26:28 UTC
Well, I'd argue that the DHCP script needs to probably go away.

Comment 7 Bill Nottingham 2004-06-07 19:23:37 UTC
Closing; the best way to do this is with the static-routes file, and
if that interface isn't working with dhcp, that should be fixed.


Note You need to log in before you can comment on or make changes to this bug.