[Techtalk] network query

dominik.schramm at gmxpro.net dominik.schramm at gmxpro.net
Sun Jan 11 13:44:59 EST 2004


Hi,

Patricia Fraser <trish at thefrasers.org> writes:
> I am in the process of connecting to ADSL via a D-Link 300+ modem, which 
> has a built-in pppoe client. The advice from the ISP is to use DHCP to 
> get the IP address. This works fine on the machine I've got connected 
> now.

(Looked up D-Link 300+ on the Internet: 
 it is for connecting one PC/MAC to the Internet via Ethernet)

What does your network look like?
Something like this?

                                        ,------------,
                                        | lanclient1 |
                                        '------------'
                                              |
                                              \/
            ,-------,  ,-----------,   ,------------,
INTERNET <--| modem |--| router pc |-->| HUB/SWITCH |
            '-------'  '-----------'   '------------'
                                        ^          ^
                                        |          |
                                    ,---------,,---------,
                                    | client2 || client3 |
                                    '---------''---------'

Read as follows: "router pc" has two NICs, is connected
directly to the modem with one and is connected to 
hub/switch with the other. client1 to client3 have one
NIC connected to hub/switch.

If so, then client1 to client3 cannot see the DHCP server
on the modem, because DHCP is not routed (it cannot be)
and the server is not in the same network as the clients.

However, I suppose that it doesn't really matter which 
network/netmask modem and routerpc use among themselves;
the hub/switch network is independent of that. 

> My problem is, I now want to set up a home network, using the connected 
> PC as the gateway/firewall. But my head isn't around the DHCP vs. 
> standard routing thing; if the gateway machine gets a new IP address 
> from the ISP periodically, then how do I manage this? Will all the 
> machines in the network have to use DHCP, or can I mix the two methods?

Since I don't know exactly what your network looks like
this is just a suggestion:
Set up your hub/switch network to use a different private network
address from the modem, say 192.168.177.0/24 (i.e. netmask 255.255.255.0),
then set up the routerpc as gateway: ip forwarding, masquerading
(sNAT). 

Alternatively: Set up a DHCP server on the routerpc and provide
the clients with IP, netmask, DNS addresses and default route.
This is useful if you're going to temporarily connect new computers 
(like notebooks) to your network regularly.

> I've looked at some of the howtos, but I think I need pointing to some 
> sort of overview that will help me understand the network topology I 
> should be looking at, and how packets will be routed about (and not 
> slide by the firewall, for instance).

The network topology you should be looking at is the one I suppose
you see right in front of you. If I'm wrong to assume that your 
network already exists, I'd suggest the topology I drew above:
routerpc is connected to both the modem and a switch (get a switch,
not a hub) requiring two NICs, the rest of the computers is
connected to the switch only requiring one NIC each. Then set up 
routerpc as gateway.

You can read about gateway configuration in
http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/index.html

Background knowledge on Linux networking in general is given in
http://www.tldp.org/HOWTO/Net-HOWTO/index.html
http://www.tldp.org/HOWTO/Networking-Overview-HOWTO.html

and of course in the "Linux Network Administrator's Guide"
(describing network services such as SMTP, UUCP, NFS...;
a little bit outdated but still useful on the whole):
http://www.tldp.org/LDP/nag2/index.html

hope this helps
regards,
dominik

-- 
Dominik Schramm <dominik.schramm at gmxpro.net>
pgp key available via e-mail, web, and FTP from 
http://www.cam.ac.uk.pgp.net/pgpnet/wwwkeys.html



More information about the Techtalk mailing list