You are not logged in.
Hi,
I've just successfully setup a dd-wrt wireless bridge which I am now trying to setup some hosts on with static ip addresses. When I try to setup my routes using iproute2, I'm continuously encountering the error
RTNETLINK answers: Network is unreachable
This is incredibly frustrating, because I can't seem to find any reason the network would be unreachable. Here are the details.
Gateway IP: 192.168.0.1
Bridge IP: 192.168.0.2
Host machine IP: 192.168.0.4 (Changed from 192.168.0.3, thinking there may be a collision. No difference.)
Host machine is linked to the wireless bridge via eth0
Routes:
[root@arch james-arch]# ip route
192.168.0.0/24 dev eth0
192.168.0.2 dev eth0
I also tried removing the 2nd route and setting only the 192.168.0.0/24 route, which not surprisingly had no impact.
The gateway WILL ping under that configuration
[root@arch james-arch]# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=109 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=2.32 ms
^C
--- 192.168.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 2.327/56.091/109.856/53.765 ms
However the static route will absolutely not set.
[root@arch james-arch]# ip route add default via 192.168.0.1
RTNETLINK answers: Network is unreachable
The most frustrating part about this is that from this exact configuration, dhcp will work with absolutely no problems.
[root@arch james-arch]# dhcpcd eth0
dhcpcd[23843]: version 5.6.8 starting
dhcpcd[23843]: eth0: sending IPv6 Router Solicitation
dhcpcd[23843]: eth0: rebinding lease of 192.168.0.107
dhcpcd[23843]: eth0: acknowledged 192.168.0.107 from 192.168.0.1
dhcpcd[23843]: eth0: checking for 192.168.0.107
dhcpcd[23843]: eth0: sending IPv6 Router Solicitation
dhcpcd[23843]: eth0: leased 192.168.0.107 for 86400 seconds
dhcpcd[23843]: forked to background, child pid 23934
[root@arch james-arch]# ip route
default via 192.168.0.1 dev eth0 metric 202
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.107
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.107 metric 202
Checking out the dhcp established routes, I can't seem to deduce any problem with the manner in which I'm trying to establish the static route.
Thanks in advance for any help, troubleshooting tips, or anything, really.
Offline
Did you try to append your network device in your command?
ip route add default via 192.168.0.1 dev eth0
Offline
Did you try to append your network device in your command?
ip route add default via 192.168.0.1 dev eth0
Yes it doesn't make any difference.
Offline
For documentation purposes:
I believe I identified my problem here. It looks like I failed to provide all of the relevant details (sorry to anyone who took the time to read this thread). I don't quite remember the command I executed, but I believe I assigned the IP address using something like
ip addr add 192.168.0.3/32
When I needed to be using a /24 netmask, e.g.
ip addr add 192.168.0.3/24
I haven't tested this yet, so I can't confirm, but I made this mistake working on another project and had to have a co-worker point out my mistake to me. I will test when I get a chance and come back and mark this as solved if that takes care of the issue.
Offline