Re: Can't send packets via WiFi (possibly route issue)
From: OtisUsenet (otis_usenet_at_yahoo.com)
Date: 01/17/05
- Next message: Jose Maria Lopez Hernandez: "Re: securing wireless"
- Previous message: John: "Headless machine?"
- In reply to: Floyd L. Davidson: "Re: Can't send packets via WiFi (possibly route issue)"
- Next in thread: Floyd L. Davidson: "Re: Can't send packets via WiFi (possibly route issue)"
- Reply: Floyd L. Davidson: "Re: Can't send packets via WiFi (possibly route issue)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 Jan 2005 11:54:30 -0800
Hello,
This is a reply to your first reply.
Floyd L. Davidson wrote:
> "OtisUsenet" <otis_usenet@yahoo.com> wrote:
> >Hello,
> >
> >Problem:
> >I have eth0 and eth1 (WiFi) and can't get packets over eth1 into
'the
> >wild'.
> >I suspect the problem is with the routes, but I can't figure out how
> >to set them.
>
> You haven't said what you want it to do...
>
> Given this is a laptop, you'll want to be able to use either a
> 10baseT wired link or the wireless link. There are only big
> problems if you want to use both at once, because then you have
> to decide which traffic goes to which interface.
>
> Here is an example that would work. It sends all 192.168.0.x
> traffic to the wired LAN, and all 192.168.1.x traffic to the
> wireless network. I've made the default a little special,
> because it has a 192.168.0.x address for the gateway, but routes
> it to eth1, which means that the gateway needs a host route.
>
> Destination Gateway Genmask Flags ... Iface
> 1 192.168.0.1 * 255.255.255.255 UH ... eth1
> 2 192.168.0.0 * 255.255.255.0 U ... eth0
> 3 192.168.1.0 * 255.255.255.0 U ... eth1
> 4 169.254.0.0 * 255.255.0.0 U ... eth0
> 5 default 192.168.0.1 0.0.0.0 UG ... eth1
>
> The default, line 5, is created with this command,
>
> route add default gw 192.168.0.1 dev eth1
>
> With that you should be able to ping any 192.168.0.x address on
> your LAN and any 192.168.1.x address on your wireless net. In
> particular, you should be able to ping the access point if it
> has a 192.168.1.x address. If it doesn't have a 192.168.1.x
> address, add a host route as done above for the gateway. (And
> you then might need to specify it as a gateway for all of your
> wireless traffic, one address at a time if they are matched by
> either of the other two network routes. That is exactly why you
> really do want to put the two networks on different subnet
> addresses.)
I've mimicked the above routing table on my machine.
I left my AP (which is also the Router/Gateway and DHCP server) at
192.168.0.1 IP.
I turned off DHCP and used static IPs for both wired and WiFi Ifaces:
eth0: 192.168.0.2
eth1: 192.168.1.3
When I did that, the only IPs I could ping were IPs of eth0 and eth1.
I could not ping the Router, and I could not ping anything on the WAN.
Then I deleted that default route, and added the same default route,
but with 'dev eth0' instead of eth1:
# route add default gw 192.168.0.1 dev eth0
[root@localhost otis]# route
....
default 192.168.0.1 0.0.0.0 UG 0 0 0
eth0
When I did that I could still ping eth0 and eth1 IPs.
I could still _not_ ping the Router, but I _could_ ping, say,
yahoo.com.
I think all this worked simply because all traffic went over eth0.
I have also tried changing the IP address of AP/Router to 192.168.1.1,
while leaving the route as the one you posted above, and while leaving
IPs of eth0 as is:
eth0: 192.168.0.2
eth1: 192.168.1.3
I then lost the ability to even connect to the AP/Router. :(
But I think the problem is more basic. I think there is some basic
problem of connecting eth1 (WiFi) to my AP/Router. I say this because
I can't get eth1 to talk to AP/Router even if I take eth0 completely
out of the picture (ifconfig eth0 down) and put eth1 on the same subnet
as the AP/Router:
AP/Router: 192.168.0.1
eth0: no IP, Iface is down
eth1: 192.168.0.3
# route
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.0.0 * 255.255.255.0 U 0 0 0
eth1
169.254.0.0 * 255.255.0.0 U 0 0 0
eth1
default 192.168.0.1 0.0.0.0 UG 0 0 0
eth1
With the eth0 completely out of the picture, eth1 on the same IP subnet
as the AP/Router, and the above routing table I could still not ping
anything other than the eth1 IP itself.
So, I think, this tells me that the issue is not (only in) the routing
table, but even more basic, since I can't get eth1 to talk to the AP
even when there is no eth0 in the routing tables.
What do you think? Is this thinking correct?
Thanks!
- Next message: Jose Maria Lopez Hernandez: "Re: securing wireless"
- Previous message: John: "Headless machine?"
- In reply to: Floyd L. Davidson: "Re: Can't send packets via WiFi (possibly route issue)"
- Next in thread: Floyd L. Davidson: "Re: Can't send packets via WiFi (possibly route issue)"
- Reply: Floyd L. Davidson: "Re: Can't send packets via WiFi (possibly route issue)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|