Linux - Server This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
01-13-2012, 05:26 AM
|
#1
|
Member
Registered: Dec 2011
Posts: 48
Rep: 
|
2 NIC configuration
Hi I have 2 NIC in my linux box. I have assigned to 10.0.0.10 for eth0 and 10.0.0.11 to eth1
and the gateway for both NIC's is 10.0.0.1
But i after adding the route for second NIC's , i could ping from another machine to 10.0.0.11 . But i could not ping the first IP 10.0.0.10
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 10.0.0.1 255.255.255.0 UG 0 0 0 eth1
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
Thanks in advance,
|
|
|
01-13-2012, 08:32 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
01-13-2012, 08:48 AM
|
#3
|
Senior Member
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7 / 8
Posts: 3,551
|
Can also use bonding to provide active/passive resilliance or if you have suitable switches you can use active/active for increased throughput.
|
|
|
01-13-2012, 09:04 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Quote:
Originally Posted by TenTenths
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!
|
|
|
01-16-2012, 10:33 AM
|
#5
|
LQ Newbie
Registered: Jan 2006
Location: China
Distribution: Fedora
Posts: 28
Rep:
|
Is my setting OK?
Quote:
Originally Posted by acid_kewpie
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.
What the issue might be?
Thanks a lot in advance.
|
|
|
01-16-2012, 01:07 PM
|
#6
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
please start a new thread if you have your own questions.
|
|
|
01-16-2012, 05:14 PM
|
#7
|
LQ Newbie
Registered: Apr 2005
Posts: 13
Rep:
|
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.
|
|
|
01-17-2012, 03:58 AM
|
#8
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Quote:
Originally Posted by GetLinux
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.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 01:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|