routing confusion on home network

Kel Graham kel at orawia.com
Thu Mar 17 10:41:12 GMT 2005


Kevin O'Connor said:
>
> Nicely put Lee that is indeed the reason. Can I please have several
> glasses
> of whatever type of beer you're drinking :-)
>
> Kel
> The Netgear will have a default route to the public IP connection, it
> cannot
> build a routing table to different subnets( you can only get away with
> stuff
> like that on layer3 or better switches which learn routes via RIP or OSPF)
> Unless it's a typo the Gentoo Linux PC (eth0: 192.168.5.2, default route:
> 192.168.5.1) should read
> Gentoo Linux PC (eth0: 192.168.5.2, default route: 192.168.5.3)
> As the 192.168.5.3 interface on the FreeBSD box is the gateway not the
> ADSL
> 4-port modem/router.
> You also wonder about the Network/sub-net setup. These terms date back to
> the early days of TCP/IP when splitting a class A, B or C network up into
> smaller sub-nets was impossible. hence terms like Class A network. However
> with the introduction of more advanced network masking (CIDR) it became
> possible to split up these standard networks into smaller (Sub Net)
> segments. As a point of interest it also became possible to join several
> Class C networks into a single Class B network (Super net) So the term
> Network, subnet and supernet are, from a routing point of view, the same
> thing.
>
> I'd be curious to know why you have this particular setup.
>
> Regards
> Kevin
>
>>-----Original Message-----
>>From: freebsd-users-admin at uk.freebsd.org [mailto:freebsd-users-
>>admin at uk.freebsd.org] On Behalf Of Lee Brotherston
>>Sent: 15 March 2005 14:37
>>To: kel at orawia.com
>>Cc: freebsd-users at uk.freebsd.org
>>Subject: Re: routing confusion on home network
>>
>>Kel Graham wrote:
>>> ah.. solved it by judicious use of NAT.  Why does FreeBSD say it routes
>>> between interfaces with a simple "gateway_enable='YES'", when for me
>>> this
>>> wasn't the case? Was it because I have two separate networks, and not
>>just
>>> different subnets?
>>
>>Hi Kel,
>>
>>I suspect that the FreeBSD box was infact routing the traffic fine,
>>however the netgear router had no routes for 192.168.5.0/24 to enable
>>the return traffic back (a tcpdump should confirm this).  It would need
>>a gateway of 192.168.0.26 setting for any 192.168.5.0/24 traffic in the
>>router.  Using NAT means that the traffic used the address of the
>>interface on the FreeBSD machine which the router could route too by
>>virtue of being on the same subnet.
>>
>>Wow, did I just type that after beer? :)
>>
>>   Lee
>>


Thanks for the replies!

Lee: I did in fact set a static route on the router, for 192.168.5.0/24 to
point to 192.168.0.26.  I think this was working, as other 192.168.0.0/24
machines could ping all the machines on the 192.168.5.0/24 network.
However, as you said, a tcpdump didn't show any packets from 192.168.0.1
being returned to 192.168.5.2.

Most confusing!

Kevin: Thanks for the tip on the Linxu PC's default route. It was set to
192.168.5.1, as I was doggedly thinking that the 4port ADSL modem had to
do something special.

The reason I have this setup is:
 - I'm in a flat with a shared network connection via the netgear router
 - I wanted my own subnet to differentiate my machines from the others.
 - The 4-port ADSL modem is acting only as a hub (sorry I didn't mention
this earlier) because I'm too cheap to buy a proper hub!


Cheers,
Kel.

-- 
+----------------------------------------------+
| kel graham | kel at orawia.com | www.orawia.com |
| jabber/msn/yahoo/icq: www.orawia.com/contact |
+----------------------------------------------+






More information about the Ukfreebsd mailing list