LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-05-2013, 07:57 PM   #1
pokemon168
LQ Newbie
 
Registered: Mar 2013
Posts: 7

Rep: Reputation: Disabled
Independent pings on NIC interfaces


I have two Ethernet interfaces on the target Linux machine, eth0 and eth1. I can ping "out of" both fine. I can ping "to" both fine.

This is the ipconfig for both.

eth0 Link encap:Ethernet HWaddr 5A:75:AB:C6:16:1E
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0

eth1 Link encap:Ethernet HWaddr E6:04:E6:8B:32:0A
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0

This is the routing table.

Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

When I had setup the host machine with the following:

IP address of host machine = 192.168.0.100
netmask 255.255.0.0 (I had meant 255.255.255.0 but mistakenly put 255.255.0.0)

I had only an Ethernet cable connected between the host Linux machine and eth0 of the target Linux machine. Why is it from my host machine I can ping both IP addresses 192.168.0.10 (eth0 of the target Linux machine) and 192.168.1.10 (eth1 of the target Linux machine) successfully when only eth0 of the target Linux machine was connected. The target Linux machine was responding to the ping for 192.168.1.10 even though I was connected to only eth0 which has an IP address of 192.168.0.10. Is this due to some Linux bonding? How do I configure it so eth0 would only respond to its own IP address and eth1 would only respond to its own IP address. Is that through ip or route command? Any help would be much appreciated.
 
Old 09-06-2013, 03:36 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,314

Rep: Reputation: 1329Reputation: 1329Reputation: 1329Reputation: 1329Reputation: 1329Reputation: 1329Reputation: 1329Reputation: 1329Reputation: 1329Reputation: 1329
On the target machine check
Code:
cat /proc/sys/net/ipv4/ip_forward
 
Old 09-06-2013, 10:37 PM   #3
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
My guess is that since your netmask on the host is set to 255.255.0.0 that's a /16 network and the broadcast domain includes .1 and .0 change that and see if you still get a response. Also checking ip_forward is a good idea too as that could route traffic between the NICs.
 
Old 09-09-2013, 06:09 AM   #4
pokemon168
LQ Newbie
 
Registered: Mar 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thank you smallpond and schedel21 for your responses.

cat /proc/sys/net/ipv4/ip_forward showed a 0.

I did some reading and Linux's IP stack is host oriented. So the online documentation states since the Linux IP stack is not interface oriented, this was the expected behavior. So I tried changing the arp_ignore setting to a 1 and was able get it to behave more interface oriented.
 
  


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
local pings/apache2 sites work from outside. external pings/apt-get not working. BnrStnr Linux - Networking 5 02-25-2010 02:20 PM
Naming interfaces within NIC driver zman2245 Linux - Kernel 1 08-12-2009 01:29 AM
Dual independent NIC setup on RHEL syd Linux - Networking 1 06-26-2009 03:18 AM
Multiple Interfaces + Cisco 515 and default NIC streamalot Linux - Networking 0 06-12-2006 01:43 PM
1 nic, 2 interfaces show up.. grcore Linux - Hardware 8 01-08-2005 01:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:05 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