LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-27-2004, 08:04 PM   #1
Khang
Member
 
Registered: Aug 2004
Distribution: Debian, Linux 2.6
Posts: 88

Rep: Reputation: 15
route - Changes take a while to take effect


This is probably a simple question. Is it normal that when I make a change to the routing table using 'route', for example 'route add default gw 192.168.1.1', that it should take a while for the changes to start working? When I make such a change, the routing table seems to be changed immediately, in that when I type 'route' again, and wait, eventually the whole thing is displayed... But it hangs on the route I just added, the default gw. Only after somewhere between 30 seconds to a few minutes, does the route start working.

Not sure how clear I'm being here. Basically, if I add a default gateway for example, "route add -net default gw 192.168.1.1 dev ra0", then try to ping 192.168.1.1 (my router), or some other host such as google.com, there is no response... If I try again in a minute or two, it is suddenly working.

Any explanations for this? Is this normal behaviour?
 
Old 10-28-2004, 01:07 AM   #2
neilman
Member
 
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65

Rep: Reputation: 15
When you make an update to route (i.e. changing your gw [gateywa] address), do a quick route -n (the minus n will show IP addresses only, not resolved into hostnames -- thus, it's faster, more immediate). Are you deleting your previous gateway if one was set? Also, what kernel rev of Linux are you running? (just curious)
 
Old 10-28-2004, 11:36 AM   #3
Khang
Member
 
Registered: Aug 2004
Distribution: Debian, Linux 2.6
Posts: 88

Original Poster
Rep: Reputation: 15
I'm running Debian with kernel 2.6.8.1 (soon to be 2.6.9 since I need to do a recompile for some other reason, and I figured I might as well go with the latest).

Actually I was a bit silly here. I don't know why I was so quick to assume it was the route that wasn't being updated quickly... It occured to me that even without that route in place, I should still be able to ping 192.168.1.1. However, I wasn't able to... So basically, what the problem actually is isn't anything to do with the route. It's that when I apply settings to my wireless adapter with iwconfig, *those* settings take a while to kick in.

That is, if my wireless interface is down, and I type:

ifconfig ra0 up
iwconfig ra0 essid tchwifi channel 11 mode Managed

(or something to that effect), then type:

iwconfig ra0

Everything seems fine. It shows the MAC address of my access point, yet when I try to ping it (192.168.1.1) I get "Host Unreachable", or something like that. That is, until I wait a minute or so. Then suddenly it starts working.

If I type "ping 192.168.1.1" and just leave it, I get loads of errors, until all of a sudden I start getting replies, and after that starts happening, everything works fine... Until my connection with the router is lost for whatever reason. Then I have to undergo the same slow process again.

Any ideas why the connection is being slow to start working?

Last edited by Khang; 10-28-2004 at 11:44 AM.
 
Old 10-28-2004, 12:12 PM   #4
neilman
Member
 
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65

Rep: Reputation: 15
When its not working, do an ifconfig and a route -n -- save the outputs. When it is working correctly do the exact same commands and check the outputs against the time it wasn't working. If they're different, and you still can't figure it out, post both of the output files here.
 
Old 10-28-2004, 08:30 PM   #5
Khang
Member
 
Registered: Aug 2004
Distribution: Debian, Linux 2.6
Posts: 88

Original Poster
Rep: Reputation: 15
When it ISN'T working:
Code:
jez@jez64:/home/jez# ifconfig ra0
ra0       Link encap:Ethernet  HWaddr 00:0C:6E:65:4F:0D
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:6eff:fe65:4f0d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1178 errors:0 dropped:0 overruns:0 frame:0
          TX packets:199 errors:0 dropped:0 overruns:0 carrier:0
          collisions:3 txqueuelen:1000
          RX bytes:74764 (73.0 KiB)  TX bytes:6604 (6.4 KiB)
          Interrupt:169 Base address:0x4000

jez64:/home/jez# iwconfig ra0
ra0       RT2400PCI  ESSID:"tchwifi"
          Mode:Managed  Channel=11  Access Point: 00:0D:54:FC:43:30
          Bit Rate:11 Mb/s
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality:81  Signal level:55  Noise level:0
          Rx invalid nwid:0  invalid crypt:0  invalid misc:0

jez@jez64:/home/jez# 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 ra0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 ra0
When it IS working:
Code:
jez@jez64:/home/jez# ifconfig ra0
ra0       Link encap:Ethernet  HWaddr 00:0C:6E:65:4F:0D
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:6eff:fe65:4f0d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2355 errors:0 dropped:0 overruns:0 frame:0
          TX packets:410 errors:0 dropped:0 overruns:0 carrier:0
          collisions:4 txqueuelen:1000
          RX bytes:154422 (150.8 KiB)  TX bytes:14587 (14.2 KiB)
          Interrupt:169 Base address:0x4000

jez64:/home/jez# iwconfig ra0
ra0       RT2400PCI  ESSID:"tchwifi"
          Mode:Managed  Channel=11  Access Point: 00:0D:54:FC:43:30
          Bit Rate:11 Mb/s
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality:82  Signal level:57  Noise level:0
          Rx invalid nwid:0  invalid crypt:0  invalid misc:0


jez@jez64:/home/jez# 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 ra0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 ra0
As you can see, the differences are in the second half of the ifconfig output. I don't understand what that stuff is unfortunately... But it looks like the sort of thing that is supposed to change anyway.

So, any suggestions?

Last edited by Khang; 10-28-2004 at 08:46 PM.
 
  


Reply


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
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
if a route fails in a multipath route? eantoranz Linux - Networking 5 07-03-2005 02:03 PM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
ADSL as a Alternate route or backup route bhagat2000 Linux - Networking 0 05-27-2004 03:17 PM
Working with 'route' and unwanted route entries pioniere Linux - Networking 6 02-05-2003 12:14 PM

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

All times are GMT -5. The time now is 12:24 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