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

Re: Changing IP



* Jesse Ackerman:
>
> I am installing Debian for the first time. I am trying
> to reset the IP address (static) from the install
> default.
>
> command: ifconfig 172.21.xxx.xxx

ifconfig takes the name of an ethernet interface (eth0, eth1 and the
like) and after that the IP address. You might try

# ifconfig eth0 172.21.xxx.xxx

(The # at the beginning is there to tell you that you need to be root to
do that, don't type it.)

Buw beware: ifconfig will not save your network settings. They'll be
lost upon reboot. There are scripts executed at bootup (so called init
scripts, look at /etc/init.d - but better don't touch) and one of them
is called "networking". It reads the network settings from the file
/etc/network/interfaces and configures your devices accordingly.

The "interfaces" file is really simple. Just changing the IP address
shouldn't be a problem as long as you know which device you want to
handle. Mine looks like this:

|auto lo
|iface lo inet loopback
|
|auto eth0
|iface eth0 inet static
|        address         192.168.1.2
|        network         192.168.1.0
|        netmask         255.255.255.0
|        gateway         192.168.1.1

The "auto" stanzas tell the networking init script to make the devices
functional during boot. Don't remove the "lo" interface or you'll have
more or less severe problems.

> I thought I changed the IP last night but apperntly
> not. an ifconfig -a does not show me the address I
> used.

And what does it show?

> I did a whereis ip found the location but have been
> denied permission to open and view the file.

You probably need to be root (type 'su' in a console or xterm).

Maybe you want to read some User Manual. Take a look at
http://www.debian.org/doc/ and you'll find plenty of it (most of them,
are quite old, though) in many languages.

J.
-- 
I like my Toyota RAV4 because of the commanding view of the traffic
jams.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>



Reply to: