LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2004, 01:15 PM   #1
lionking_x
Member
 
Registered: Aug 2003
Posts: 36

Rep: Reputation: 15
Ip Aliasing On Reboot ????


Hey guys ,

I setup DNS on my system , everything works fine. So i went ahead and tried to setup IP aliasing , ie i have 1 ethernet card and i was giving it multiple IP addresses with the following command ,
my eth0 has 192.168.0.2 as the IP , and i add new IP's via

ifconfig eth0 add 192.168.0.3
ifconfig eth0:1 add 192.168.0.4
ifconfig eth0:2 add 192.168.0.5

The above adds the ip addresses , i update DNS settings and can dig the above IP's.

But when i reboot or restart the network service the changes for the new addresses are gone ,
How do i make these permanent ??

thanks
spk
 
Old 10-08-2004, 01:21 PM   #2
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
if you are running RH, the files you need are in /etc/sysconfig/network-scripts
[root@~]$ ls /etc/sysconfig/network-scripts/
ifcfg-eth0 ....

that ifcfg-eth0 file contains the info for your current IP, so you just copy it into:
ifcfg-eth0:1, ifcfg-eth0:2, etc, and modify what you need in there., simple enough.

[root@~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=IP
NETMASK=255.255.255.0
GATEWAY=GATE
[root@~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0:1
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=IP
NETMASK=255.255.255.0
GATEWAY=GATE

IP and GATE changed from original values for obvious reasons.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No keyboard/mouse after reboot. Requires second reboot to work. rottie Linux - Hardware 6 01-16-2006 06:04 AM
IP aliasing joseph Linux - General 2 09-01-2003 11:33 PM
IP aliasing lackofcare Linux - Networking 0 07-18-2003 03:10 AM
IP Aliasing nyek Linux - Networking 2 12-26-2001 08:36 PM
ip aliasing iquadri1 Linux - Networking 0 09-29-2001 03:04 PM


All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration