Re: Activating routing
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Sun, 07 Sep 2008 11:44:26 -0500
On 07 Sep 2008, in the Usenet newsgroup comp.os.linux.networking, in article
<48c3d037$0$13984$426a34cc@xxxxxxxxxxxx>, Fabrice Delente wrote:
I have two machines, slick and swift. They communicate over a WIFI
link (both are set in Ad-Hoc mode), using addresses 192.168.1.3 for
swift and 192.168.1.4 for slick. I can ssh from one to the other
without trouble.
swift is connected to the internet through an ethernet cable to a DSL
modem.
I'd like it to act as a router for slick.
PING google.com (64.233.187.99) 56(84) bytes of data.
From swift.airforce-one.org (192.168.1.3): icmp_seq=1 Redirect Host(Newnexthop: 192.168.1.254)
Yup - routing table is wrong.
Here is slick's routing table:
root@slick:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.254 0.0.0.0 UG 0 0 0 wlan0
default swift.airforce- 0.0.0.0 UG 0 0 0 wlan0
The 'default' route in a routing table means "if NOTHING else works,
use this". So google isn't on 192.168.1.0/24 and not on 127.0.0.0/8,
so use the default.... WHICH default? You have two, and there can
only be one.
root@swift:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
82.230.24.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 ath0
default 192.168.1.254 0.0.0.0 UG 0 0 0 ath0
default 82.230.24.254 0.0.0.0 UG 0 0 0 eth0
Same problem - two "if nothing else works, use this" - so which one to
use?
The rule is that the gateway has to be DIRECTLY attached. So given the
apparent setup of
slick <----> swift <----> DSL_Modem <----> ISP <----> world
slick should have swift as default, AND NOTHING ELSE.
swift should have the DSL Modem as default AND NOTHING ELSE
DSL_Modem should have ISP as default AND NOTHING ELSE
The ISP setup is not your problem (and may be a lot more complicated).
So - who is 192.168.1.254, and how did that enter the picture?
Old guy
.
- Follow-Ups:
- Re: Activating routing
- From: Fabrice Delente
- Re: Activating routing
- References:
- Activating routing
- From: Fabrice Delente
- Activating routing
- Prev by Date: Re: Detecting Zombies?
- Next by Date: Re: LAN IP addresses
- Previous by thread: Activating routing
- Next by thread: Re: Activating routing
- Index(es):
Relevant Pages
|