Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
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 –  Marco Ceppi Nov 22 '11 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. –  Florian Diesch Nov 22 '11 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. –  Paulo Arruda Nov 22 '11 at 23:39
    
Appended question with results if ifconfig eth1. –  Calvin Froedge Nov 23 '11 at 17:00
add comment

1 Answer 1

up vote 0 down vote accepted

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 .

share|improve this answer
    
This was it. I removed the gateway and all worked. –  Calvin Froedge Nov 23 '11 at 18:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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