2

I am trying to ping the network interface I have set up for eth1. This is my config:

auto eth1
iface eth1 inet static
  address 192.168.1.2
  netmask 255.255.255.0
  gateway 192.168.1.1
  broadcast 192.168.1.255

If I ping 192.168.1.2, I get:

Ping 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
From 192.168.1.3 icmp_seq=3 Destination Host Unreachable

Results of ifconfig tell me that the IPv4 address is 192.168.1.3. I can ping this ip. Bcast and Mask are as expected (same as in definition).

I can ping 192.168.1.3 from my macbook. I cannot ping 192.168.1.2 locally or from my macbook. Any ideas why?

4
  • Is the router setup to actually accept pings? You could try to run nmap against the machines to get a more accurate check for availability Nov 22, 2011 at 23:06
  • Looks like eth1 isn't up and the router at 192.168.1.3 can't reach 192.168.1.2 either. Please append the output of ifconfig eth1 and route -n to your question. Nov 22, 2011 at 23:19
  • Hello Calvin! This is the DHCP server right? Can you try this steps? 1) Run the command "mii-tool" on the server and check if the ethernet link is OK. 2) With your server and the MacBook connected to the switch, try to get an IP from the server with you mac. If it works but you still cant ping, please check the network configuration given from the server to the macbook to see if it has netmask 255.255.255.0. Check the server too with the command "ifconfig eth1". Please append the results to your question. Nov 22, 2011 at 23:39
  • Appended question with results if ifconfig eth1. Nov 23, 2011 at 17:00

1 Answer 1

0

ping is an application, considering this it needs an existing connection between the sender and receiver, in other words a routing path; since you specify a gateway in your setup it means that everything that is send or received by 192.168.1.2 has to pass through 192.168.1.1, and if 192.168.1.1 it's not present in your topology you simply do not will have any connection at all from 192.168.1.2 .

1
  • This was it. I removed the gateway and all worked. Nov 23, 2011 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .