Re: Networking question



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

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • always_on.sh script in DD-WRT not working
    ... I have a odd problem with always_on.sh script. ... The problem is that when my modem disconnects, ... gateway address, yet I cant ping google. ... WAN Connection Type: Auto Config - DHCP ...
    (alt.internet.wireless)
  • Re: Setting Gateway by User Group
    ... With what you say you have running now, I would use class ids in dhcp. ... You can use the log in script to set the class id on the client and se your ... > have a hundred workstations for the students and 20 or so for staff. ... I need to set the Gateway for them. ...
    (microsoft.public.windows.server.general)
  • Re: remote ip configuration
    ... > I'm trying to write a script that would allow me to completely control Local ... > configuration on the target workstation (it can be seen from its Local Area ... I use this to set DHCP and obtain DNS servers. ...
    (microsoft.public.scripting.wsh)
  • Re: Change computer dns to automatic
    ... you can use the script below to change all IP-settings to DHCP on the ... Dim wmiRoot, wmiQuery ... I am using DHCP for my ... >I am looking for a way to change all the dns configuration on all the XP ...
    (microsoft.public.windows.server.scripting)
  • DLINK 614+, script injection vulnerability
    ... TYPE: Script injection over DHCP ... to change the administrator password (doesn't require his current ...
    (Bugtraq)

Loading