Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
do NOT put two nics on the same subnet, that is wrong wrong wrong wrong wrong. it is possible to join two nics on the same subnet using a bridge interface, but just unaware of each other, bad idea.
Maybe you'd like to back up and explain WHY you want to do this? If it's just to put two IP's on there, you can easily alias a single interface.
Can also use bonding to provide active/passive resilliance or if you have suitable switches you can use active/active for increased throughput.
oh, yes. good pint. Do NOT confuse bridging and bonding, they are NOT interchangeable! Either might be right in this scenario, but it will depend on the network there as to which is right and which is wrong!
do NOT put two nics on the same subnet, that is wrong wrong wrong wrong wrong. it is possible to join two nics on the same subnet using a bridge interface, but just unaware of each other, bad idea.
Maybe you'd like to back up and explain WHY you want to do this? If it's just to put two IP's on there, you can easily alias a single interface.
Hi, I also have one NIC Puzzle but don't know whether it is the same reason with the originator. There are 2 NIC in my PC and I configure their IP as 128.1.8.2 and another 10.5.2.11. The first IP is in office network but the second IP is in one local static network with a switch. I would like to log in the PC from my laptop with IP 128.1.8.3. However, I notice that it would be very slow via ssh like putty if the second NIC 10.5.2.11 is active. Once I disable it by ifconfig eth2 down, putty can log in the PC very fast.
2 NIC gateway are different but use the same submask as 255.255.255.0.
Not a huge problem with this, but ideally you set the routing table to treat both interfaces as a gateway to 10.0.0.1 and 10.0.0.0/24
Also if you're playing with VLANS they have to be on the same VLAN.
If you're looking for redundant interfaces you can do port channels, see your switch documentation to see if it's supported. Otherwise if your router supports it, you can do two subnets on the same interface with Cisco that's the secondary ip command. So you can have 10.0.0.0/24 and 10.0.1.0/24 and assign an ip between those two subnets.
Not a huge problem with this, but ideally you set the routing table to treat both interfaces as a gateway to 10.0.0.1 and 10.0.0.0/24
Also if you're playing with VLANS they have to be on the same VLAN.
If you're looking for redundant interfaces you can do port channels, see your switch documentation to see if it's supported. Otherwise if your router supports it, you can do two subnets on the same interface with Cisco that's the secondary ip command. So you can have 10.0.0.0/24 and 10.0.1.0/24 and assign an ip between those two subnets.
the bonding module (port channeling) supports plenty of modes outside of 802.3ad, so there's no *need* to have a capable switch to have HA. I would never see the need to consider multiple subnets for any HA related reason.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.