Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-10-2001, 07:57 PM   #1
LQ Newbie
Registered: Mar 2001
Posts: 5

Rep: Reputation: 0

I am running RH7.0 server. I have recently gotten a range of static IP's. I need to configure my RH box to work in my existing network, but also need it to work w/ one of the static IP's.

Things were running fine, until I got the static IP's and my default gateway changed from to I have seen posts that a NIC can have 2 IP's in Linux (heck it was easy for me on NT) but being new to Linux I am lost. I have tried multiple "settings" in linuxconf, but none really work as needed.

With it's original ip ( my internal network "sees" the system fine, but mail won't transfer to the outside world and the web does not work either. If I change the IP to the external one, the web works but then my local systems can't find the mail server to send mail.

Help! Please.... I don't mind reading so even a link would help, which I will be looking for next.

Thank you any and all in advance,
INS aka Henry
Old 04-10-2001, 10:12 PM   #2
LQ Newbie
Registered: Mar 2001
Posts: 5

Original Poster
Rep: Reputation: 0
Smile found it

I did find the answer on a RedHat discussion form. But for those of you woundering the same thing here is what I found:


It is actually just about as easy as it is in NT. It is called IP aliasing, and Red Hat compiles it into their kernels. It works almost the same as a normal interface *except* the statistics are for the physical card, not each individual IP address. So if I wanted to setup an IP alias on eth0 I would create a file:


And that file might look something like this:


Then restart your networking (/etc/rc.d/init.d/network restart). IP aliasing is entirely virtual, so no modules need to be loaded or anything like that (although the ip_alias code can be compiled as a module and loaded that way as well). You can check the interface like this:

ifconfig eth0:0

and it will report the setup of the interface. Once you're done with that and the IP address is working properly, you can set up the IP-based virtual hosting in httpd.conf.


I forgot to add:


to the above configuration.

The only change I made to the above instructions was that I setup the external IP as the "main" IP of the system and setup the alias (eth0:0) to be my internal. I don't think I had to, but it works. That is all that matters right????
OK, I will probably double chek that later to find out for sure.

The actual web link is:^1@.ee6c672/0

Thanx again,
Old 01-28-2004, 05:18 AM   #3
LQ Newbie
Registered: Jan 2004
Location: India
Posts: 1

Rep: Reputation: 0
Is anything more need????

I have also tried with the same but it is not working at my side. Is anything more needed to configure two IP addresses on a single NIC???

Though I am setting up one internal and one external IP address.

Thank You


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
Binding named to only one NIC of a dual NIC machine - possible? Paul_Randle Linux - Networking 3 08-24-2005 09:44 AM
assigning multiple ip's to nic ? pingu_penguin Linux - Networking 2 05-14-2005 10:00 PM
Gateway setting for dual NIC cards? Moonman Red Hat 4 02-02-2005 02:28 AM
Multiple ip's for same NIC hvdwatt Linux - Newbie 5 08-03-2003 05:33 AM
Multiple IP's on the 1 NIC dicka_j Linux - Hardware 4 04-08-2003 12:49 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:22 PM.

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