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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

installing eth0:0 1

Status
Not open for further replies.

haux

Programmer
Apr 11, 2001
79
DZ
I have an internet card eth0 : 192.168.10.1/255.255.255.0
i want to give it an alias i do this :

ifconfig eth0:0 194.x.x.x netmask 255.255.255.240

when i tape ifconfig i can see the loopback and the eth0 and eth0:0 but when i restart there is no eth0:0 why ?
What i must do ?

thanks for all
 
when u make console changes, these are changes stored in memory only, and if u reboot, u will lose them.. what u need to do is put these ifconfig paremeteres in the same file that starts your network interfaces.. so that u preserve your changes even after reboot... for instance, if u are running SuSE Linux, u would put that ifconfig config in /etc/rc.config

good luck..

 
Hi,

On redhat the easiest is to copy the existing eth0 config file :

cd /etc/sysconfig/network-scripts/
cp ifcfg-eth0 ifcfg-eth0:0

Then edit ifcfg-eth0:0 and change the relevant bits ...

DEVICE=&quot;eth0:0&quot; <--- Device
USERCTL=yes
ONBOOT=&quot;yes&quot; <--- bring up at Boot or network start ?
BOOTPROTO=&quot;none&quot;
NETMASK=&quot;255.255.0.0&quot; <--- IP address
IPADDR=&quot;172.16.16.10&quot; <--- subnet mask
IPXNETNUM_802_2=&quot;&quot;
IPXPRIMARY_802_2=&quot;no&quot;
IPXACTIVE_802_2=&quot;no&quot;
IPXNETNUM_802_3=&quot;&quot;
IPXPRIMARY_802_3=&quot;no&quot;
IPXACTIVE_802_3=&quot;no&quot;
IPXNETNUM_ETHERII=&quot;&quot;
IPXPRIMARY_ETHERII=&quot;no&quot;
IPXACTIVE_ETHERII=&quot;no&quot;
IPXNETNUM_SNAP=&quot;&quot;
IPXPRIMARY_SNAP=&quot;no&quot;
IPXACTIVE_SNAP=&quot;no&quot;

etc.

If you restart the network (or reboot), that interface will come up automatically with the others under the redhat sysv init scripts - e.g. :

/etc/rc.d/init.d/network restart

This may also work for Mandrake if you find the same type of scripts in the /etc/sysconfig/network-scripts directory.

Regards
 
Thanks very much ifincham and StarTAC ;-)

Another question :
Where is the file that contain the &quot;route -n&quot; informations ?
because when i use :
route add SOME_IP gw IP_OF_GETWAY

when i restart /etc/rc.d/init.d/netwrak restart OR reboot RedHat the informations are lost :(((((

Please i need help !

Thank you very very much ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top