macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 09:58:17 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: 2 default routes, what is wrong ?  (Read 1713 times)
0 Members and 1 Guest are viewing this topic.
zsjoska
Newbie
*
Offline Offline

Posts: 29



View Profile
« on: November 08, 2006, 17:59:33 PM »

Hi,

I switched my Asus 500G Deluxe router in client mode and then switched back. I'm not sure at which step I did something wrong, but after a month (during this everything worked properly) I had to change the WAN IP address and I did it from the web interface. Since then I have 2 default gateways.

The route command shows:
192.168.2.0     0.0.0.0            255.255.255.0   U       0      0        0 br0
11.22.33.0       0.0.0.0            255.255.255.0   U       0      0        0 vlan1
0.0.0.0            11.22.33.1       0.0.0.0              UG    0      0        0 vlan1
0.0.0.0            192.168.2.1     0.0.0.0              UG    0      0        0 br0

Please give me a hint where to look which variable may be wrong or how to reset them to the factory defaults. I'm running RC5.

Thanks,
Jozsef
Logged

------------------------------------------------------------
Using Asus WL-500g Deluxe with OpenWrt RC6 + WebIf2
zsjoska
Newbie
*
Offline Offline

Posts: 29



View Profile
« Reply #1 on: February 26, 2007, 20:39:21 PM »

Hi,
it's me again...
My previous post was due to a network issue... the WAN worked for a while and not for a while (10 minutes and 30 minutes)
I cleaned up the router, reinstalled it, cleared the NVRAM and started to work perfectly -- I forgot this issue.

Some days ago I noticed that I still have 2 default gateways. My best knowledge says that this is an wrong configuration but it works.
It is OK? should I live with pace in mind that it is properly configured?
(OpenWrt White Russian 0.9 on Asus WL-500G Deluxe)
Logged

------------------------------------------------------------
Using Asus WL-500g Deluxe with OpenWrt RC6 + WebIf2
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #2 on: February 26, 2007, 21:36:28 PM »


What do you mean two default gateways?

How do you "see" that ?
Logged
zsjoska
Newbie
*
Offline Offline

Posts: 29



View Profile
« Reply #3 on: February 27, 2007, 10:14:20 AM »

the two default routes would mean that there are two 0.0.0.0 destinations in the following listing:

root@vostok:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
86.105.120.0    0.0.0.0         255.255.248.0   U     0      0        0 vlan1
0.0.0.0         86.105.127.1    0.0.0.0         UG    0      0        0 vlan1
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 br0



I expect that the striked line is wrong and the routing must work without it since "everything" shouldn't be ever routed to the 192.168.1.1 gateway (LAN&WiFi) -- the first line (with 192.168.1.0) must do it.
« Last Edit: February 27, 2007, 10:16:14 AM by zsjoska » Logged

------------------------------------------------------------
Using Asus WL-500g Deluxe with OpenWrt RC6 + WebIf2
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #4 on: February 27, 2007, 11:33:37 AM »


I see the same thing here on my ASUS WL-500G Deluxe with OpenWrt WhiteRussian 0.9 on it.

On a Linksys WRT54G v. 2.1 with White Russian RC5 the issue is not there.

I will try to check out a couple of other routers tonight.

Logged
zsjoska
Newbie
*
Offline Offline

Posts: 29



View Profile
« Reply #5 on: February 27, 2007, 12:09:36 PM »

Found it the problem:
on the page: http://wiki.openwrt.org/OpenWrtNVRAM at the end of section 1
there is a remark:
Quote
Don't set *_gateway more than once, or use *_proto=dhcp on more than one interface, or you'll find yourself with multiple default routes inserted which is probably not what you want.
I checked it on my router and:
Code:
root@vostok:~$ nvram show | grep _gateway
lan_gateway=192.168.1.1
wan_gateway=86.105.127.1
and the misconfiguration was introduced on the webif (Webif2) by setting on the page
Network -> WAN-LAN -> LAN Configuration, by setting 192.168.1.1 for Default Gateway.
Removed this and the wrong entry disappeared. and the command now shows:
root@vostok:~$ nvram show | grep _gateway
lan_gateway=
wan_gateway=86.105.127.1
Logged

------------------------------------------------------------
Using Asus WL-500g Deluxe with OpenWrt RC6 + WebIf2
Pages: [1]   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.237 seconds with 24 queries.