Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

IP Aliasing

  Date: Nov 24    Category: Unix / Linux / Ubuntu    Views: 380
  

I am trying to set up a small server to run from home and want to host a couple of web sites on it. I currently have managed to set up the master on the dns and the web server, however, I want to setup another IP based aliasing virtual domain. My problem lies when I enter the following commands:

/sbin/ifconfig eth0:1 172.16.3.10
followed by
/sbin/route add -host 172.16.3.10 dev eth0:1

that seems to work and I check it by doing an ifconfig which shows the new IP attached to the virtual eth0:1, however, when I restart the server and do an ifconfig the new IP alias is no longer there.

If anyone can help me (and understand my jumbled question) I would be very greatful. I am using redhat 6.2

Share: 

 

2 Answers Found

 
Answer #1    Answered On: Nov 24    

You can always make the change permanent by adding the commands you type to your /etc/rc.d/rc.local script.

Alternatively, you can set up a virtual IP interface by creating a file
called ifcfg-eth0:1 in your /etc/sysconfig/network-scripts directory. This file should look something like this:

DEVICE=eth0:1
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
BROADCAST=<your broadcast IP address>
NETWORK=<your subnet address>
NETMASK=<your netmask>
IPADDR=172.16.3.10

This should automatically add the eth0:1 interface each time the network
service is started.

Have you taken the time to update all your server software with the latest patches? RH6.2 has several known security issues.

 
Answer #2    Answered On: Nov 24    

This may or may not work for you. I used an X
application called netcfg which I believe pretty much
does the same thing as mentioned in the previous post.
You can run it from a console in X (if netcfg is
installed on your machine, of course).

 
Didn't find what you were looking for? Find more on IP Aliasing Or get search suggestion and latest updates.




Tagged: