Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP/netmask permanent setting

Status
Not open for further replies.

hcclnoodles

IS-IT--Management
Jun 3, 2004
123
0
0
GB
Hi there

I have 2 nics, i use the following commands

# ifconfig dmfe0 plumb
# ifconfig dmfe0 192.168.0.5
# ifconfig dmfe0 netmask 255.255.255.0 up

# ifconfig dmfe1 plumb
# ifconfig dmfe1 10.10.0.5
# ifconfig dmfe1 netmask 255.255.255.0 up

which works great .....

however, when I reboot, it all goes back to how it was before ....

What do I need to do to make this permanent ??

cheers


 
I'm sure there's probably a FAQ about this, but basically, make sure the IP and hostname are in /etc/hosts, create an /etc/hostname.dmfe1 file containing just that hostname, and make sure the network and netmask are defined in /etc/netmasks (syntax "10.10.0.0 255.255.255.0").

Annihilannic.
 
ok thanks ....quick question ....if both /etc/hostname.dmfe0 and /etc/hostname.dmfe1 point to say `myhost` and in /etc/hosts i have

192.168.0.5 myhost
10.10.0.5 myhost


(which all seems to work by the way)

How does it know which IP to give to which card ???? because both cards point to the same hostname ?

how does this work, does it read down /etc/hosts from the top assigning the first address it gets to dmfe0 and the next in the list to dmfe1 ???

cheers


 
Err... no... I don't think that will work for setting IPs at boot time and I don't believe it should be configured that way. My guess is it will either take the first or the last entry every time, but... I could be wrong.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top