Interesting Networking Question

Discuss Networking

Interesting Networking Question

Postby X11 » Wed Sep 01, 2004 8:49 am

I have a machine and I want to configure it so it has more then one IP Address (and Ethernet Address if possible) on the same interface (it runs Red-Hat 7.2).

It has a Intel 100B Network card.

This is pretty simple from what I have heard, any help would be appreciated.
X11
guru
guru
 
Posts: 674
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia

Postby Void Main » Wed Sep 01, 2004 9:58 am

You can't assign more than one MAC address to an interface but you can easily assign multiple IP addresses to an interface:

To create a subinterface on your eth0 with IP address iii.iii.iii.iii and netmask of mmm.mmm.mmm.mmm you would:

# ifconfig eth0:0 iii.iii.iii.iii netmask mmm.mmm.mmm.mmm

To view it you would:

# ifconfig eth0:0

Then of course you could add a route with the "route" command if needed.

You can add more (eth0:1, eth0:2, etc). Before you do any of that you should notice that these subinterfaces already exist, just are not assigned IP addresses. Before setting an IP address with ifconfig just do this:

# ifconfig eth0:0
# ifconfig eth0:1

etc.

Depending on your distro would depend on how you would declare it in configuration files and graphical utilities but that is the way they all would do it on the command line.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA


Return to Networking

Who is online

Users browsing this forum: No registered users and 2 guests