Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
SDN 101: An Introduction to Software Defined Networking
Discover the advantages of SDN.
SDN has quickly become one of the hottest trends in IT. But not all SDN solutions offer real software-defined functionality. As more enterprises consider SDN, they want to know, “What is SDN? And what are the real benefits?” If you're ready to explore the advantages of SDN, and want to know how it should be implemented within your enterprise, start by reading our introductory white paper.
Click Here to receive this Complete Guide absolutely free.
Just a note: you musta specify "RHEL" as "RH Linux" is different and you don't want to have loads of people telling you to upgrade.
The issue in such a configuration is that, only one interface remains active at a time.
I'm sorry, you want only one interface active at a time, OR you don't want this, but that's what you get? Which is it?
How are you configuring the interfaces?
What does ifconfig say?
Technically, if you have two nics on one machine, and one is set to static IP1 and the other to static IP2, then you can ping them both. If you want one to be unpingable, either take the interface down, or block ping requests.
> I'm sorry, you want only one interface active at a time, OR you don't want this, but that's what you get? Which is it?
This is what I get, I want both interfaces to be ACTIVE
I am configuring static entries in /etc/sysconfig/network-scripts/ifcfg files
> Technically, if you have two nics on one machine, and one is set to static IP1 and the other to static IP2, then you can ping them both. If you want one to be unpingable, either take the interface down, or block ping requests.
I agree both should be pingable, but through their own interface, and same MAC address should not be assigned to both IPs, as both have different NIC
I want ping results in such a way, when both interfaces are active
using eth0 interface
ping IP1 should work
ping IP2 should not work
using eth1 interface
ping IP1 should not work
ping IP2 should work
Why don't we start again, by having you provide some more info... ifconfig -a
Might help us get a clearer picture of what it is exactly that you are doing.
I'm unclear on whether these two NICs are on the same network, on different networks, etc.. I don't understand why you are using two NICs in the first place.. Are you routing, bridging, binding, other ? A clearer understanding of what you are trying to accomplish, why and how would help us help you..
Linux does reply on ARP on all NIC by default, if you have two NIC on separate lan then you never see this and it doesn't change anything. An arp reply on WAN and LAN for a request on LAN doesn't do anything to WAN and there is a credible reason apparently but I forget however it is listed somewhere in the kernel documentation , I think in /usr/src/linux/Documentation/networking/ip-sysctl.txt. Also in that same document it mentions arp_filter which is used when you want to have two NIC on the same subnet, it says so right in the doc, arp_filter should be set to 1 but not for just one device but for all devices which is either /proc/sys/net/ipv4/conf/all/arp_filter or "sysctl -w net.ipv4.conf.all.arp_filter=1" sans the quotes or net.ipv4.conf.all.arp_filter=1" in /etc/sysctl.conf. Also another one too look at is arp_ignore which I would set to 1. 2 sounds good but tends to cause problems in most boxes with 2+ NIC on a subnet.
Also, just so we are all clear, having an arp reply with the wrong mac causes sheer hell because machines only focus on the first MAC they see and if you are sending data to the wrong MAC then you are sending data to the wrong IP address. Additionally, when I started seeing this problem I had groups of "gurus" on #iptables in freenode telling me the kernel does not do arp replies on all interfaces. Well it is documented in the text file I just listed and I think the reason why is also in there too so routing has nothing to do with it.
Now that I have my own arp worked out and hopefully that helps you as well, I need to figure out how to create a situation where a IP only replies off the NIC that is assigned that IP despite having two NIC with route to host.