PDA

View Full Version : Using 2 IP addresses



Grendal1982
11-09-2005, 03:10 PM
Hello, I am at work.

We have migrated to a new system, Web.
and we would like to start using linux, (cheaper in some point)
however I have a little difficulty.

Our network has been done by a weird person, so now each computer need to have 2 IP addresses so a UNISYS computer can provide the service. One IP for LAN and another for internet (WAN).

OK, now I need to set the two IP addresses on one NIC interface to be able to access all resourses.

how can I set it. The network configuration wizard knopix or auditor show me just let me add one IP address.

Obviously I need to add it using code, however; how.

Harry Kuhman
11-09-2005, 10:46 PM
Our network has been done by a weird person,
You are trying to make things very difficult; I doubt that you are going to get a quick fix the way the problem is stated.

What was your old system and how exactly did the weird person manage to get it to use 2 IP addresses for one NIC? And how does the NIC decide which IP address to use for any packet?

Of course, you may manage to get software to dynamically change the IP address depending on what the user is doing; but that's not going to work well if there are incoming requests on the network when the card is in the other mode (but since the card is really addresses by it's unique MAC address there may be a way to make it work).

I would seriously consider fixing what the weird person has done. An alternate and inexpensive solution might be to add a secod NIC to the systems, each NIC can have it's own setting.

UnderScore
11-09-2005, 11:28 PM
The ifconfig command is what you need. It is also know as IP aliasing. You may have to edit the /etc/network/interfaces file.
http://www.faqs.org/docs/Linux-mini/IP-Alias.html
http://gentoo-wiki.com/HOWTO_IP_Aliasing

maxIT
11-16-2005, 07:01 PM
Something useful... 8)
http://linuxhelp.blogspot.com/2005/05/setting-up-multiple-ip-addresses-on.html