LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 09-18-2001, 08:03 PM   #1
liuyangtj
LQ Newbie
 
Registered: Sep 2001
Posts: 4

Rep: Reputation: 0
Multiple interfaces problem


I have two NICs on a linux box running hardhat 2.4.2 kernel.
The output of ifconfig:
eth0 Link encap:Ethernet HWaddr 00:30:48:11:31:E8
inet addr:10.8.1.26 Bcast:10.8.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
...
eth1 Link encap:Ethernet HWaddr 00:30:48:11:31:18
inet addr:10.8.1.49 Bcast:10.8.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
....

Everything seems to be fine, I can ping both interfaces...however,
running arp shows that both interfaces bind to the SAME MAC -- the one that was brought up first. In fact, even when the cable is not connected to the second (up later) NIC, I can still ping its IP address, while the packet actually go to the first NIC.

Is it possibly to bind different IP addresses to different MACs for linux box with multiple NICs at all (and the IPs are within the same subnet)?

I know for a fact that lynxOS does allow this. Is this a feature of OS or driver?

Last edited by liuyangtj; 09-19-2001 at 06:01 PM.
 
Old 09-19-2001, 06:17 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
look at

http://www.linuxquestions.org/questi...?threadid=6493

If you get it working seemlessly, i'd be interested in ho0w you make it possible to ping between two machiens conenced to each interface.
 
Old 09-19-2001, 10:50 AM   #3
liuyangtj
LQ Newbie
 
Registered: Sep 2001
Posts: 4

Original Poster
Rep: Reputation: 0
Both eth0 and eth1 are connected to a netgear switch. I was able to ping both from another machine connnected to the same switch.

It is also true that if I put eth0 and eth1 on different subnet, the MAC binding would be fine. The problem arises when they are on the same subnet.

Below is the output of route:

Destination Gateway Genmask Flags Metric Ref Use Iface
10.8.1.0 * 255.255.255.0 U 0 0 0 eth0
10.8.1.0 * 255.255.255.0 U 0 0 0 eth1
default 10.8.1.1 0.0.0.0 UG 0 0 0 eth0
 
Old 09-21-2001, 09:33 AM   #4
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
Hi..

I think it is not possible to configure two ethernet cards on a same subnet.
Better u can try channelbonding method.


What is ur requirment.

More Datatransfer ???

etc//
siddiqu.T
 
Old 09-21-2001, 11:59 AM   #5
liuyangtj
LQ Newbie
 
Registered: Sep 2001
Posts: 4

Original Poster
Rep: Reputation: 0
The reason we want to use two NICs: we have logically two pathes to the linux boxes: one for critical control data (cannot be delayed), another one for large transfer bandwidth, but not worried about the timing. It seems using two seperate NICs (which are already present on the motherboard) for the two traffic is probably a good idea.

Of course we could setup two subnets, but it is more of a hassle if we could do it within the same subnet.

We were able to do this when we were using lynxOS RTOS. Now linux does not seem to support this....
 
Old 09-21-2001, 02:19 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
OK, i've been given a bit more info on this just now...

You can split a subnet into parts by specifying an appropriate netmask. in your /etc/sysconfig/network-scripts/ifcfg-ethX files try changing the netmask thus...

NETMASK=255.255.255.128
rather than
NETMASK=255.255.255.0

and assign proper IP addresses to each NIC, one below X.X.X.128, and one above.

I've got this far, and it seems to work, as i can ping either interface from one remote machine. I only have one remote machine available to me at the moment, so don't know if this is actually worknig correctly or not...

I've got a nasty feeling that this is basically the same as having them on different subnets tho (or rather IS having them on two different subnets still, but hiding that fact...)

if you think this is worth a go, please tell me what you get. There's also the very strong possibilty that it won't work, as i can certainly see why it won't... please let me know if i'm talking total arse| ;-)
 
Old 09-22-2001, 12:01 AM   #7
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Just as a followup:

acid_kewpie, your "nasty feeling" is on the mark. Check out this site for a good (although slightly brain-bending) elaboration on the whole subject.
 
Old 09-22-2001, 01:33 AM   #8
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
Hye..

Why dont u try channel bonding. U can aggreate multilbe cards
and logically it will work as a single card


Linux clusters they are using this
siddiqu.T
 
Old 09-24-2001, 07:07 PM   #9
liuyangtj
LQ Newbie
 
Registered: Sep 2001
Posts: 4

Original Poster
Rep: Reputation: 0
I've found a few discussions regarding multiple NICs on the same subnet from linux kernel discussion list:
http://www.uwsg.indiana.edu/hypermai...02.1/1038.html

http://www.uwsg.indiana.edu/hypermai...09.0/0244.html

Except for using different subnet, there seems to be no workaround. Many other OS behave differently. Linux is just the odd ball.
 
Old 09-25-2001, 04:20 AM   #10
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
I have mine on different subnets, samba wins server lets clients cross subnets to access each other.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Red Hat 7.3 and multiple gateways on multiple interfaces bluefmc Linux - Networking 2 11-19-2004 06:01 PM
Multiple Ethernet Interfaces gjs286 Linux - Networking 1 04-19-2004 02:09 PM
IPTables and multiple interfaces MaverickApollo Linux - Networking 7 12-28-2003 05:19 PM
multiple loopback interfaces arkin Linux - Networking 1 11-18-2003 05:22 PM
DHCPd for multiple interfaces Noerr Linux - Networking 2 02-07-2003 07:40 PM


All times are GMT -5. The time now is 01:50 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration