Bug 124042 - Allow user to select the "default" route for an interface
Allow user to select the "default" route for an interface
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2004-05-23 01:07 EDT by Nickolai Zeldovich
Modified: 2014-03-16 22:45 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-07 15:23:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Nickolai Zeldovich 2004-05-23 01:07:18 EDT
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, you can
add the following to ifcfg-ethN:


and as a result, you'll end up with a route to pointing
out that interface.
Comment 1 Nickolai Zeldovich 2004-05-23 01:07:54 EDT
Created attachment 100468 [details]
patch for /sbin/ifup
Comment 2 Nickolai Zeldovich 2004-05-23 01:08:06 EDT
Created attachment 100469 [details]
patch for /sbin/dhclient-script
Comment 3 Nickolai Zeldovich 2004-05-23 01:10:00 EDT
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 12:45:45 EDT
Why not just have static routes for that interface?
Comment 5 Nickolai Zeldovich 2004-05-25 16:18:09 EDT
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 16:26:28 EDT
Well, I'd argue that the DHCP script needs to probably go away.
Comment 7 Bill Nottingham 2004-06-07 15:23:37 EDT
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.