Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have two NICs on a linux box running hardhat 2.4.2 kernel.
The output of ifconfig:
eth0 Link encap:Ethernet HWaddr 00:30:48:11:31:E8
inet addr:10.8.1.26 Bcast:10.8.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
...
eth1 Link encap:Ethernet HWaddr 00:30:48:11:31:18
inet addr:10.8.1.49 Bcast:10.8.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
....
Everything seems to be fine, I can ping both interfaces...however,
running arp shows that both interfaces bind to the SAME MAC -- the one that was brought up first. In fact, even when the cable is not connected to the second (up later) NIC, I can still ping its IP address, while the packet actually go to the first NIC.
Is it possibly to bind different IP addresses to different MACs for linux box with multiple NICs at all (and the IPs are within the same subnet)?
I know for a fact that lynxOS does allow this. Is this a feature of OS or driver?
The reason we want to use two NICs: we have logically two pathes to the linux boxes: one for critical control data (cannot be delayed), another one for large transfer bandwidth, but not worried about the timing. It seems using two seperate NICs (which are already present on the motherboard) for the two traffic is probably a good idea.
Of course we could setup two subnets, but it is more of a hassle if we could do it within the same subnet.
We were able to do this when we were using lynxOS RTOS. Now linux does not seem to support this....
OK, i've been given a bit more info on this just now...
You can split a subnet into parts by specifying an appropriate netmask. in your /etc/sysconfig/network-scripts/ifcfg-ethX files try changing the netmask thus...
NETMASK=255.255.255.128
rather than
NETMASK=255.255.255.0
and assign proper IP addresses to each NIC, one below X.X.X.128, and one above.
I've got this far, and it seems to work, as i can ping either interface from one remote machine. I only have one remote machine available to me at the moment, so don't know if this is actually worknig correctly or not...
I've got a nasty feeling that this is basically the same as having them on different subnets tho (or rather IS having them on two different subnets still, but hiding that fact...)
if you think this is worth a go, please tell me what you get. There's also the very strong possibilty that it won't work, as i can certainly see why it won't... please let me know if i'm talking total arse| ;-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.