Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Local network routing problem

Stuart Luppescu writes:

 > So, I thought I'd put them all on the same subnet. I made the upstairs
 > router the same network, made its IP address
 > (beyond the range of DHCP addresses of the basement router), and had
 > it assign addresses to by DHCP. For some
 > reason, I still can't see the Windows shares like this. But worse
 > still, I can't ssh into my Linux box in the basement (
 > from my laptop on the upstairs wireless network (with IP address
 > It tells me no route to host.

You can't do that.  If two hosts do not each have a physical
connection to a common router, they can't be on the same subnet (more
precisely, they can't be routed by subnet; you could assign a
host-specific route at each router along the way, sort of like a uucp

 > Then I got the bright idea of making the netmask on the two networks
 > But when I did that, I couldn't log into any remote
 > machine. I kept getting ``No route to host'' errors.
 > Perhaps someone can explain to me a couple of things:
 > 1) How come when my laptop is on the same subnet, it can't find a
 > route to my desktop machine in the basement?

For this level of discussion, consider that automatic routing
protocols are done by *physical* broadcasts on the *physical* subnet
(ie, the set of hosts all connected to a given interface on a given
router).  To automatically find a route from L(aptop) to D(esktop) via
the logical subnet, both would have to be reachable by a common
physical broadcast.  They aren't.

 > 2) How do I access Windows shares from the upstairs wireless network?
 > This is important because the printer is served by samba on my Linux
 > box downstairs.

Set up a route and everything should work.  I would suggest that each
physical net be given a logical subnet.  I gather you have three,
something like this:

+--------+     +-----------+     +-------------+     +---------+
| laptop |<-W->| up router |<-E->| down router |<-W->| desktop |
+--------+     +-----------+     +-------------+     +---------+

where W means a wireless link and E means wired Ethernet.

Then do the following (or the equivalent DHCP config)

# this is your "backbone"
# modern ifconfig will automatically configure a route for
# directly connected hosts on this ethernet
# at up
ifconfig eth netmask
# at down
ifconfig eth netmask

# configure the "up" subnet
# at up
ifconfig wless netmask
# tell "up" how to go down
# note that the gateway is on the 192.168.0 "backbone"
route add -net gateway

# configure the "down" subnet
# at down
ifconfig wless netmask
# tell "down" how to go up
# note that the gateway is on the 192.168.0 "backbone"
route add -net gateway

An alternative would be to set up the "up" and "down" routers as
transparent bridges.  This probably means that they would simply echo
*all* packets (except those they receive themselves) over the wired
link to the other wireless link.  (Maybe bridges are supposed to be
smart enough to know from ARPs that they don't need to bridge packets
that are destined for machines they recognize on their local physical
network, I forget.  Again, it won't hurt you to think in terms of a
simple echo.)

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links