brent timothy saner on 29 Aug 2009 13:31:18 -0700


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

Re: [PLUG] network fixer hat


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric wrote:
> I'm thinking this might work:
> 
> route -v add -net 192.168.0.0 netmask 255.255.0.0 -dev eth1
> 
> Would I add this permanently or just when I needed it?
> 
> Thanks,
> Eric

i've seen some creative suggestions, but the old-fashioned rfc-friendly
way for this is to have routes defined on your routers, or use a dynamic
routing protocol (which would be overkill for this).

let's say you are at workstation A (a.k.a. the 10.10.10.0/24 network),
the router (i'm assuming there's only one? if not, reply back with what
routers are where in the network and this can be tweaked) is at B, and
the 192.168.1.0/24 block is at C (since it's a virtual concept and not
limited to a physical device).

(gosh, i hope my formatting keeps.)

	WAN
	|
	|
	(ifaceA)
	B
    /       \
(ifaceB)    (ifaceC)
|		|
|		|
|		|
A		C

A needs a default route (0.0.0.0) to B. C needs a default route to B.

B needs routes that look a-little a-like a-this (pardon the mangling):

root@legion:~# grep -v tun route.table
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.1.1     0.0.0.0         255.255.255.255 UH    0      0        0
eth0.1
10.2.2.1        0.0.0.0         255.255.255.255 UH    0      0        0
eth0.0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 wl0
192.168.1.0     192.168.1.1     255.255.255.0   UG    0      0        0
eth0.1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0
eth0.1
10.2.2.0        10.2.2.1        255.255.255.0   UG    0      0        0
eth0.0
10.2.2.0        0.0.0.0         255.255.255.0   U     0      0        0
eth0.0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0
eth0.1

in the example listed above, 192.168.1.1 is the "WAN" to that network
(this was actually just a LAN/WLAN under another LAN, but the same
concept applies).
you wouldn't need the 192.168.1.0/24 route, since that's there just to
route to one network up.

anyways, right. so in the above example, the LAN on that router is
10.2.2.0/24 and is accessed via eth0.0. the WLAN is 192.168.2.0/24 and
is on device wl0 (this is on an openwrt-flashed buffalo, if that
explains things). take note; eth0.0 and eth0.1 etc. are entirely
different physical interfaces, they aren't virtual NICs on the same
interface.

let me know if that clears things up for you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqZkAgACgkQ8u2Zh4MtlQqRcACdH7br1CMMKJksMmz2BmBLMWNH
hKoAoKk/n7qKeVevxly9x7QAjOxONc78
=BAB7
-----END PGP SIGNATURE-----
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug