Re: Small office network with a FreeBSD server

From: jpd (read_the_sig_at_do.not.spam.it)
Date: 07/28/04


Date: Wed, 28 Jul 2004 13:34:45 +0000 (UTC)

On 2004-07-28, Charles <nothing@nothing.com> wrote:
> How can I share the connection to the Internet with others computers in
> the Office?

That depends on your network connection. If you only have one public
IP you'll need to use NAT[1] and RFC1918 addresses internally. If you
have been assigned more public IP addresses you can use them instead of
bothering with NAT. Either way, you'll need to have your machine forward
traffic.

Since you're using PPPoE (presumably using ppp(8) and ng_pppoe) you'll
have to use ppp(8) to do the NAT bits for you.

> Especially when some one plugs in a laptop to the LAN.

Then you'll want to setup a dhcp server. That will cover also ``obtain
an IP address automatically'' in windows. You can fix addresses by
binding them to MAC addresses, so your own machines always end up with
the same IP (but you can keep the IP configuration in one place[2]). You
don't have to. The main thing is that you want to keep your dynamic pool
and the statically assigned machines separate.

I think isc-dhcp3 suits the task of serving DHCP nicely (use it myself
too). It's in the ports and I think the handbook has a thing or two to
say about setting it up. Lots of options but a simple setup isn't hard.
Once you know the IP networking and DHCP basics, that is.

I would also setup a name server (bind) and maybe a caching http proxy
(squid) and probably NTP while at it, and have the dhcpd announce them,
but that is for after you've successfully setup the machine as a router
and gotten DHCP to work.

[1] Network Address Translation is the official term. linux likes to be
    different and calls it masquerading (the vampires![3]) and micros~1
    calls it "internet connection sharing" for marketing and demographic
    reasons. The idea is to allow more machines to use one public IP.
[2] Useful if you have to change netblocks. Did that twice now, for a
    well used public /24. Without DHCP it'd been much harder.
[3] If you don't get it you can safely ignore this sad pun.

-- 
  j p d (at) d s b (dot) t u d e l f t (dot) n l .


Relevant Pages

  • 2 pc network - XP and Win95 - help needed badly!
    ... I've been trying to get these two machines networked for 10 days now with no ... assigning an IP address to PC2, and is assigning an improper IP ... From what I've read, DHCP ... "Your computer has automatically configured the IP address for the network ...
    (microsoft.public.windowsxp.network_web)
  • Re: DHCP Not working properly
    ... Windows SBS Standard running on a Dell server with one NIC ... Desktop Workstations running Windows XP SP2 (wired network connections) ... These two machines will not pick up a DHCP address from the server. ...
    (microsoft.public.windows.server.sbs)
  • DHCP Not working properly
    ... Desktop Workstations running Windows XP SP2 (wired network connections) ... These two machines will not pick up a DHCP address from the server. ...
    (microsoft.public.windows.server.sbs)
  • Re: DHCP Not working properly
    ... computers on the network and I assigned IP addresses to each of them. ... cause them to re-register with the new DHCP database. ... You mentioned "you may want to make sure the old database is gone before ... These two machines will not pick up a DHCP address from the server. ...
    (microsoft.public.windows.server.sbs)
  • Re: Lost lease on IP address...?
    ... it avoids network collisions which can slow down the network. ... In a small peer network consisting of only Windows 2000 machines TCP/IP is usually the best and only protocol to use, NetBEUI is usually only required to connect to older DOS machines. ... Being that your network is so small an easy way around the problem is to give the machines static IP addresses and do away with DHCP leasing service altogether. ... If you can't resolve internet addresses make sure that DHCP Client ...
    (microsoft.public.win2000.general)