You are not logged in.

#1 2016-09-13 00:24:17

brc192
Member
Registered: 2016-05-27
Posts: 2

[SOLVED] Networking Errors/Network is Unreachable

For the last several months I've had some issues with (what I thought was) my router assigning invalid IP subnet addresses. To give an example, the regular IP address to the router was 192.168.1.1, and for what seemed to be no reason my computer would randomly take on an IP of the following: 192.168.24.XXX. It is always 24 and it has happened at random several times. So I decided to upgrade to the new Asus OnHub and got it installed ok today. I've got 3 other computers in the house connected to it and it is working fine, but for whatever reason my arch computer will not connect. I have tried (each separately) the following: netctl, dhcpcd, networkd and manually assigning a static ip address with ip. No matter how I run them, they all end up giving me the 192.168.24.XXX ip address ( I will also note that the OnHub default range is 192.168.86.2-254).

Whenever I tried to use

ip route default via 192.168.86.1 dev enp5s0 

it would either spit out

RTNETLINK answers: NETWORK IS UNREACHABLE

or leave me unable to ping any outside addresses (I could ping 192.168.86.1).  I read through the wiki pages for each different method, tried them out and again no luck. So I finally figured I'd just go back to my old router. But now here I am again with the same issues. It was working about 2 hours ago fine, I've been ssh'ing into it all day, but now I can't seem to even get the old router working and again it's stuck randomly assigning me the 192.168.24.XXX every time. Just wondering if anyone had any tips or suggestions as to why this might be happening and if there was some way to get me back online.

Thanks


Edit: Not sure how to mark solved, so hope that worked.

But I still have no idea why my ip is being botched every time I restart my computer - but the work around I found was this:

 
# Flush bad default routes
ip route flush dev enp5s0

# Add local ip - paying attention to add /24 at end
ip addr add 192.168.1.15/24 dev enp5s0

# Had to do this first to allow me to add default gateway
ip route add 192.168.1.1 dev enp5s0

# Finally add default gateway
ip route add 0/0 via 192.168.1.1 dev enp5s0

That last line I posted in code was what really seemed to do the trick - without it the computer was automatically assigning 192.168.1.0 as the gateway and the internet wouldn't work again.

But anyway, my internet is up and working again, but if anyone has any ideas of what may be causing my initial IP problems I'd love to hear it.

Last edited by brc192 (2016-09-13 03:38:59)

Offline

Board footer

Powered by FluxBB