Operating System - Linux
1831599 Members
2581 Online
110027 Solutions
New Discussion

Re: How set network parameters on linux machine for all time ?

 
SOLVED
Go to solution
debian111
Regular Advisor

How set network parameters on linux machine for all time ?

Hi all,
at home I have two computers
one-dual boot FreeBSD 6.0 and Debian Sarge
second- Debian Sarge and winXP.
I used crossover cable to connect them and they work ok.
I assigned them IP adresses 10.1.1.1 and 10.1.1.2 private network, but when I reboot debian machines every time I must type
netconfig 10.1.1.1 netmask 255.0.0.0 and on second machine same to establish network, when I reboot and chose BSD network parameters are as they were before, and I should not type network parameters again. So my question is what is worong with my Debian machines and why my nerwork parameters changing every time.

Thank you.
6 REPLIES 6
Piergiacomo Perini
Trusted Contributor
Solution

Re: How set network parameters on linux machine for all time ?

Hi debian111,

try with these two command :
"ifconfig" and "route add"

Maybe something like this should work
(taken from deb manual):

# ifconfig eth0 inet down
# ifconfig eth0 inet up 192.168.0.111 \
netmask 255.255.255.0 broadcast 192.168.0.255
# route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.0.1 dev eth0

regards
Sergejs Svitnevs
Honored Contributor

Re: How set network parameters on linux machine for all time ?

You should check your /etc/network/interfaces file.

Do you have the line beginning with the word "auto"?

--------------------------------------
# The primary network interface
auto eth0
iface eth0 inet static
address 10.1.1.1
netmask 255.0.0.0
network 10.0.0.0
broadcast 10.255.255.255
--------------------------------------

Regards,
Sergejs
Vipulinux
Respected Contributor

Re: How set network parameters on linux machine for all time ?

For redhat we can create a file under /etc/sysconfig/network-scripts/ifcfg-eth0
not sure about path in debian

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPAddress= 10.1.1.1
Subnet=255.255.255.0

Cheers
Bill Thorsteinson
Honored Contributor

Re: How set network parameters on linux machine for all time ?

Debian uses /etc/network/interfaces

You will need at least the following for the
eth0 interface

auto eth0
iface eth0 inet static
address 10.1.1.1
netmask 255.0.0.0

You may also want to set the gateway, but it
should not be required to connect the two
computers. See 'man interfaces' for more
data.
debian111
Regular Advisor

Re: How set network parameters on linux machine for all time ?

I will try your suggestions today later, and I promise I will assign points tommorow.


Thank you
debian111
Regular Advisor

Re: How set network parameters on linux machine for all time ?

I think it will work...
thank you.