Networking question

Mark Haney mhaney at ercbroadband.org
Wed Oct 15 22:50:21 UTC 2008


Paolo wrote:
> Hello,
> 
> My connection to a Windows LAN is provided by a script which I was given, but 
> don't understand, and which I've been using on Gutsy and Hardy.
> 
> Now it also seems to be working on Intrepid, but I wonder if, with the new 
> networking capabilities of Intrepid, it is possible to do the configuration 
> directly in the Network Manager?
> 
> The script is saved as /etc/dhcp3/dhclient-exit-hooks.d/cfg_static_routes
> and looks like this:
> 
> #!/bin/sh
>   # Add routes obtained by DHCP
>   function process_static_routes() {
>     while [ $# -ne 0 ]
>     do
>       host=$1
>       gateway=$2
>       shift; shift
>       echo "add -host $host gw $gateway"
>       route add -host $host gw $gateway
>     done
>   }
>   if [ "$reason" = "BOUND" ]|| [ $reason == "REBOOT" ]
>   then
>   #  echo "static_routes = $new_static_routes"
>      process_static_routes $new_static_routes
>   fi
> 
> If anyone has some advice on what to try, I'd be grateful.
> 
> Paolo
> 
> 
> 

I'm not exactly sure what you're trying to do with this.  Or even why 
you need it.  With DHCP, once you get an IP address, you'll also get a 
default gateway.  All that does is tell your system if the system 
doesn't know where a packet goes, to shove it to the default.  I've 
NEVER needed to do this with DHCP, as it will provide basic networking 
functionality when you request the IP address.  Otherwise, what would be 
the point of DHCP?

Any dhcp client will set this up for you (or it should) and NM will 
definitely do so.  I'm just curious as to WHY you need to use a script 
for something that DHCP was designed to handle in the first place.

Have you tried to NOT run that script and see what happens?  I mean I 
would expect a script like this to be needed, maybe in '91 or '92.  Maybe.

Can you explain why this is needed?


-- 
Libenter homines id quod volunt credunt -- Caius Julius Caesar


Mark Haney
Sr. Systems Administrator
ERC Broadband
(828) 350-2415

Call (866) ERC-7110 for after hours support




More information about the ubuntu-users mailing list