Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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

Can't figure out why.

share|improve this question

migrated from stackoverflow.com 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

2 Answers 2

You don't have a route to 192.168.228.2. 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

Your Answer

 
discard

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