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.
Suppose a machine has 2 interfaces eth0, eth1. And suppose we are running
a tcp application on that(bounded to eth0). Now, if I turn off the
interface eth0, I cann't see anymore packets being generated from
Transport or Network layer. The application stalls till the interface
eth0 comes up again.
But I was expecting packets to be generated and routed through interface
eth1.
Can you guide me as to where exactly is the problem ? How does interface
status gets notified to the tcp socket?
I tried going through kernel codes(tcp.c tcp_output.c tcp_ipv4.c ip_output.c)
but things are not clear to me. Initially I thought that proble might be
with sk->dst_cache, but now I am little suspicious.
If you want an active backup you can use bonding which is really cool!
Bonding is offering several states like
- Active Backup
- Round Robin
- xor
- Broadcast
- iee802.3ad
- load balancing
- adaptiv load balancing
So, should the second eth be a backup interface?
Don`t connect 2 eth with the same network an the same subnet configuration. I also did not belive that this type of configuration is going to cause problems in the past. But it really is (depending on the services you are going to start in the future!)
I'm trying to sort through the information here and it's quite difficult to be honest. I dont know how you are monitoring the conversion of transport layer's session data units and the network layer's packet data units but I'm sure you are doing it. As for the operation of the NIC cards, or network interface cards (eth0 and eth1), you are treating the as if they automatically failover to one another should one fail. This type of setup is usualy pursued for redundancy in servers so it's not impossible but it will not work without some type of software to setup the "failover" that you want to see.
As for the TCP sockets, if they are open and listening then they are open and listening. The sockets are operate on the transport layer while the NICs operate on the physical. If there is a transmission destined for eth0 but it is down then the packets will be dropped because there is no recipient to take the data on a hardware level or even a software level because the packets assigned to the IP address of that NIC card will be unavailable as well. So a new session will have to be started to take up the slack using eth1.
So you want to search for failover software for your NICs. I hope this answers your question.
I have some clarifications regarding Linux bonding box
1. Can multiple network interfaces be assigned different IP addresses. So, that the master interface(bond0) takes the different IP addresses depending on the slave interface being used at any instant.
2. Does linux bonding box supports wireless interfaces as slave.
I am assuming that I have 2(or more)network intefaces with each interfaces configured with different IP addresses(each interface has a different gateway). Each interfaces and the corresponding routes declared have priority in the kernel routing table(using "metric" field).
Now I would like to declare a virtual network inteface(say bond0, which IP address), such that this will have the highest priority in the routing table. All application would bind to virtual network interface. The virtual network interface in turn will make use of a specific physical interface(eth0) to transfer the packet(frame should contain eth0's mac address). But when the physical interface being used goes down, the VNI should switch over to the other physical interface available(eth1, with frame containing eth1's mac address).
Is there any device driver or software which can help me to do the above task.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.