Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Getting the following error when trying to add a default gateway for eth1.

# route add default gw eth1
route: SIOCADDRT: Network is unreachable

Can't figure out why.

share|improve this question

migrated from Aug 10 '10 at 21:40

This question came from our site for professional and enthusiast programmers.

what is the output of ip link and ip route? – msw Aug 10 '10 at 21:33

You don't have a route to Likely your address is not in the 192.168.228 block, or your netmask is to restrictive to reach it.

share|improve this answer

The network cable could be disconnected. Try to ping a known IP first, then try to ping the IP of the gateway and see what happens.

share|improve this answer

You must log in to answer this question.