[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to change a gateway?

On Thu, 2006-21-12 at 18:46 +0200, Andrei Popescu wrote:
> On Thu, Dec 21, 2006 at 03:42:38AM -0800, Bill wrote:
> > Hi folks,
> > 
> > What is the best way to change the IP address of a gateway?
> > Other than using the route command - that won't survive a reboot.
> > 
> > I have a new router with a different IP and need to configure
> > accordingly.
> > 
> > I find the basic data is in /etc/network/interfaces, but it's a
> > "no-edit" file. Presumably there's a better way? A tool, a script?

> Why is it a "no-edit" file? I thought *this* was the way to configure
> network on Debian.


Well, as you can see from below the file contains statements like 
"please do not modify the following line."

Bitter experience has taught me that such files usually have to be
modified using a tool of some sort and that there are usually multiple
files involved. Unfortunately, this is the downside of sysV style.

I would like nothing more than to write a little script that takes care
of the prob, but first I have to understand the current process that is
setting up the present router and disable that. If I can reconfigure
that process instead then I won't have to disable it and write the
script. So that's what I'm looking for here.

You'll notice too that the lower iface section has a weird set of
addresses. They don't match the upper set (correct) for some reason.
Anyone know why that might be? Should I delete the lower section?

All replies appreciated,



#cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        # dns-* options are implemented by the resolvconf package, if
        dns-search home.net
        name Ethernet LAN card

# please do not modify the following line
iface  inet static
name Ethernet LAN card


iface dsl-provider inet ppp
     provider dsl-provider
# please do not modify the following line
     pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf

Reply to: