General discussion

Locked

Different ip address for single NIC

By venkat_salam ·
Hi

We got doubt in configuring Single Network Interface Card for two different network in same lan in Redhat Linux.
As we are familiar in NT configuration of the above mentioned doubt.
please let us know how to set two IP address of different network in one NIC(Redhat Linux).

Thanks in advance.

venkatachalam.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Different ip address for single NIC

by cpfeiffe In reply to Different ip address for ...

You need an IP alias. Here is how to set that up.

(1) locate ip_alias.o
This will return the path to ip_alias.o

(2) /sbin/insmod full_path_to/ip_alias.o
This will load the IP alias module into your kernel

(3) cp /etc/sysconfig/network-scripts/ifcfg-INT /etc/sysconfig/network-scripts/ifcfg-INT:0
Substitute your physical interface (ex. lan0) for INT. This will create the alias interface (lan0 will also be known as lan0:0). I'll continue to use lan0 as an example in this description, but you may have a different physical interface ID.

(4) Edit the new file created from step three and modify these lines accordingly:
DEVICE=lan0:0 (instead of DEVICE=lan0)
BROADCAST=your_broadcast_for_the_second_IP_address
NETWORK=your_network_for_the_second_IP_address
NETMASK=your_netmask_for_the_second_IP_address
IPADDR=your_second_IP_address
I think this is self-explanatory, but I'm not sure how much networking background you have. If you need help determining broadcast and network email my alias and I'll explain.

(5) ifconfig lan0:0 up

That's it. Good luck! Any problems/questions feel free to email my alias.

Collapse -

Different ip address for single NIC

by venkat_salam In reply to Different ip address for ...

The question was auto-closed by TechRepublic

Collapse -

Different ip address for single NIC

by Lintadsl In reply to Different ip address for ...

If you are using RedHat, try "linuxconf" and go to Server Tasks, IP aliases for Virtual Host.
You can assign Virtual IPs on one NIC. This can be a gateway for two different networks.

If you are not using RedHat, answer1 will be your solution.
Good luck,
Lintadsl

Collapse -

Different ip address for single NIC

by venkat_salam In reply to Different ip address for ...

The question was auto-closed by TechRepublic

Collapse -

Different ip address for single NIC

by venkat_salam In reply to Different ip address for ...

This question was auto closed due to inactivity

Back to Linux Forum
5 total posts (Page 1 of 1)  

Related Forums