Re: Activating routing



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(New
nexthop: 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
.



Relevant Pages

  • Activating routing
    ... I have two machines, slick and swift. ... I can't ping google.com from slick. ... Here is slick's routing table: ...
    (comp.os.linux.networking)
  • Re: Activating routing
    ... The routing table on "slick" ... and the routing table on "swift" should look like this: ... the packets have to be translated to _appear_ to originate from the ... Does it make it back through the translation? ...
    (comp.os.linux.networking)
  • Re: Activating routing
    ... Clifford Kite wrote: ... on swift: ... Yes, I did that too, but still can't access the internet from slick... ...
    (comp.os.linux.networking)