LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-18-2014, 03:24 AM   #1
Manganus
Member
 
Registered: Nov 2013
Location: San Fernando de Maspalomas
Distribution: Mint
Posts: 43

Rep: Reputation: 0
Question "ip route" shows no default route


[edit: The following is not a SOLVED issue yet, but it turned out that some kind of cache may be responsible. After a couple of hours, the NAS got again connection with the network on the WAN-side of the router, and now it has a default route in its routing table again. Strange! ]

I am scratching my head.

Usually the NAS, that's wired to the 192.168.5.1 router, could ping out of the network. Then, suddenly, it could no longer. (Maybe I'd rebooted the NAS. Maybe. Anyway, I tried a reboot as an early measure to solve the problem. It didn't.) And that's when I discovered that there was no default route in its main routing table.

It seems likely that this lack of default route was the cause that explained why the NAS no more could get connected to the internet (to check timeserver or firmware updates...).

But how can this occur?
And what should I do to fix it?


When connecting to the same router with my linux computer through ethernet, I get:

Code:
$ ip route
192.168.5.0/24 dev eth0  proto kernel  scope link  src 192.168.5.106  metric 1 
$
But when connecting with wifi, there is a default route too:
Code:
$ ip route
default via 192.168.5.1 dev wlan0  proto static 
192.168.5.0/24 dev wlan0  proto kernel  scope link  src 192.168.5.103  metric 9 
$
I don't know if it was like this before.

However, when I checked another NAS (admittedly with an older firmware) connected to an identical router, then its main routing table had more entries:
Code:
# ip route
192.168.4.0/24 dev eth0  proto kernel  scope link  src 192.168.4.100 
127.0.0.0/8 dev lo  scope link 
default via 192.168.4.1 dev eth0 
#

(I maybe should raise this question in the newbie forum instead, since I feel like just a user of Linux (Mint Quiana).
I don't know anything about which programs that are responsible for what. And before today, I hadn't bothered about such things as different routing tables...)

Last edited by Manganus; 12-18-2014 at 04:22 AM. Reason: The _original_ problem dissolved...
 
Old 12-18-2014, 04:27 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,162

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
Is it using DHCP? DHCP pushes not only the IP address, but can also push a default route as part of network setup.

For static IP, the default route must be set manually.

Last edited by smallpond; 12-18-2014 at 04:28 PM.
 
Old 12-18-2014, 07:07 PM   #3
Manganus
Member
 
Registered: Nov 2013
Location: San Fernando de Maspalomas
Distribution: Mint
Posts: 43

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by smallpond View Post
Is it using DHCP? DHCP pushes not only the IP address, but can also push a default route as part of network setup.

For static IP, the default route must be set manually.
Thank you, smallpond!

Yes, the routers serve as DHCP servers.

Both the dd-wrt routers and the routers with tp-link firmware give similar results:
If the linux laptop connects via wifi, it gets a default route. If it connects with ethernet, there is no default route, and the laptop can reach only ip-adresses in the same sub net.

One or two days before, I'd moved the routers around, and given them new ip-adresses in new sub nets, in order to put the most stable router where continuous function is most crucial.
 
  


Reply

Tags
iptables, networking, newbie, routing


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why does "route del default eth0" break current ssh connection, sometimes? pettha Linux - Networking 1 09-18-2014 10:53 AM
ssh session "disconnects" after "route add default ppp0", any suggestion? pettha Linux - Networking 2 09-15-2014 04:38 AM
Routing problem is reporting this error "Unable to find default route interface name" vsanandan Linux - Networking 1 03-29-2009 11:44 AM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
Permanently set "route add" -host and default gw sacants Linux - Newbie 1 07-18-2003 04:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration