LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-13-2012, 04:26 AM   #1
sekarlinux
Member
 
Registered: Dec 2011
Posts: 48

Rep: Reputation: Disabled
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,
 
Old 01-13-2012, 07:32 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 01-13-2012, 07:48 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Can also use bonding to provide active/passive resilliance or if you have suitable switches you can use active/active for increased throughput.
 
Old 01-13-2012, 08:04 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by TenTenths View Post
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!
 
Old 01-16-2012, 09:33 AM   #5
sscn
LQ Newbie
 
Registered: Jan 2006
Location: China
Distribution: Fedora
Posts: 28

Rep: Reputation: 0
Is my setting OK?

Quote:
Originally Posted by acid_kewpie View Post
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.
 
Old 01-16-2012, 12:07 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
please start a new thread if you have your own questions.
 
Old 01-16-2012, 04:14 PM   #7
GetLinux
LQ Newbie
 
Registered: Apr 2005
Posts: 13

Rep: Reputation: 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.
 
Old 01-17-2012, 02:58 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by GetLinux View Post
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.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NIC configuration ashlyjay *BSD 9 05-04-2011 11:33 PM
NIC Configuration venky_2_2000 Linux - Networking 1 08-22-2005 10:22 PM
NIC configuration eddy98 Slackware 8 04-24-2005 10:15 AM
NIC configuration tran_colin Linux - Networking 3 12-21-2004 06:38 AM
NIC Configuration firestorm2123 Slackware 6 04-21-2003 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration