Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-27-2004, 08:04 PM
|
#1
|
|
Member
Registered: Aug 2004
Distribution: Debian, Linux 2.6
Posts: 88
Rep:
|
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?
|
|
|
|
10-28-2004, 01:07 AM
|
#2
|
|
Member
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65
Rep:
|
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)
|
|
|
|
10-28-2004, 11:36 AM
|
#3
|
|
Member
Registered: Aug 2004
Distribution: Debian, Linux 2.6
Posts: 88
Original Poster
Rep:
|
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.
|
|
|
|
10-28-2004, 12:12 PM
|
#4
|
|
Member
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65
Rep:
|
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.
|
|
|
|
10-28-2004, 08:30 PM
|
#5
|
|
Member
Registered: Aug 2004
Distribution: Debian, Linux 2.6
Posts: 88
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:04 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|