1

I have attached image of my server configuration. ServerConfig
Server uses Ubuntu 14.04.5 LTS
In server 'A', eth2 is my primary interface with static ip address 192.168.0.62. I created another interface for 10g card and assigned ip address 192.168.0.160.This 10g card only interacts with another standalone FPGA based 10g card which can process packets with small processor and reply back.
The following is the my /etc/network/interfaces setting file

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo eth2
iface lo inet loopback

auto eth2
iface eth2 inet static
address 192.168.0.62
netmask 255.255.255.0
gateway 192.168.0.1
dns-search bg1test.intrbg
dns-nameserver 192.168.0.39

auto eth4
iface eth4 inet static
address 192.168.0.160
netmask 255.255.255.0
network 192.168.0.0

With this setting I am not able to ping the standalone 10g card

ping -I eth4 192.168.0.166
PING 192.168.0.166 (192.168.0.166) from 192.168.0.62 eth4: 56(84) bytes of data

Although I am to see ICMP request and reply in Wireshark..
When I did route -n I got the following table

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth2
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth2
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth4
192.168.0.160   192.168.0.1     255.255.255.255 UGH   0      0        0 eth4
192.168.0.160   192.168.0.166   255.255.255.255 UGH   0      0        0 eth4

The firewall for this particular server is off. I checked answers in this link What prevents a machine from responding to pings? and this how to ping & use specific network card But did not work
Thanks in advance

3
  • 4
    The interfaces must be on separate subnets or you'd have to use special routing rules or you could bridge the interfaces. – jdwolf Nov 15 '17 at 0:20
  • I'm pretty sure specifying -I here isn't actually good enough. – jdwolf Nov 15 '17 at 0:29
  • 2
    yeah don't use the same subnet on two different interfaces, or instead bridge them – thrig Nov 15 '17 at 0:45
3

You can't have 2 NICs with overlapping subnets(192.168.0.0/24 in this case) on the same routing table. While an arping should respond correctly as it's a layer 2 protocol, ping(ICMP 0) is a layer 3 protocol and it's being routed to the default gateway.

If what you're trying to do is possible at all, you will probably have to set up a second routing table. There's a great blog entry on doing this here although it's written to set up 2 networks with 2 default gateways on the same box.

It'd be far simpler to just move the standalone box to a different subnet, assuming that you're not asking because you don't have access to do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.