Networking question

Rashkae ubuntu at tigershaunt.com
Wed Oct 15 20:40:35 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
> 
> 
> 


The whole point of this script is that you don't configure the routes
yourself, but let DHCP do it's thing.

Unfortunately, this is something I've never tested.  However, I find it
strange you have to add this script to add standard functionality to
DHCP... setting up the static routes is something that should have just
worked out of the box without you adding any custom scripts, and should
be considered a bug if it doesn't just work.




More information about the ubuntu-users mailing list