PDA

View Full Version : DHCP or Static on new install?



chlhardy
20th June 2005, 07:59 PM
Howdy, NOOB here, I am setting up a lil home box as a server using the guide at www.brennan.id.au. The guide is really excellent but I am confused over one lil section. The author has their machine set up with a static IP address and they do not discuss with it is required or not. Now, do i need to set up my machine with a static address also or would selecting dhcp be alright? I have my machines running through a router but am not sure if the address for my server will stay the same if it is restarted, so thats why i'm kinda worried about switching to static.

Also, I subscribe to broadband through a consumer ISP.

Thanks for any advice,
~ Chris

pushback
21st June 2005, 01:04 AM
There are really two connections going on. Your router talks to your ISP and your linux box talks to your router.

Your router<->ISP connection would have an external, routable address. Whether or not that connection is static or dynamic is a function of what your ISP has told you.

As for the connection between your router and your linux box, you can likely go either way. Just makes sure the settings on your router are consistent with youe linux box. If you are going to run it as a server, however, you should make it static. If you are using a consumer router like a linksys, you can tell it what you want as they usually have a DCHP server built in. If you make it static, make sure you choose an IP that is on the same network as the router--likely starting with 192.168.1.

Zigzagcom
21st June 2005, 03:09 AM
Also, check on your router which IP addresses are in the DHCP pool. Many routers use a block in the neighborhood of 192.168.1.2 to 192.168.1.50 or a block on another subnet like 192.168.0.0.
Then, when you choose a static (private) IP address for your server, choose one that is outside of that pool.

Butt-Ugly
21st June 2005, 03:35 PM
The author has their machine set up with a static IP address and they do not discuss with it is required or not.

Chris,

If you see the following section of the HOWTO you will notice that "eth0" is assigned as the INTERNAL network device, while either a USB or Ethernet modem provide the EXTERNAL "ppp0" connection:
http://www.brennan.id.au/02-Planning_Considerations.html#topology

The INT eth0 connection should be assigned a STATIC IP address as it is providing services to the internal workstations; you don't want that IP address to change.

The EXT ppp0 connection (USB or Ethernet) should be configured as a basic DHCP as the connection details may change each time you connect.

If you use a Ethernet modem, then you will need 2 x NICs in your server; eth0 (INT - STATIC) and eth1 (EXT - DHCP). If the connection you have with your ISP uses a STATIC IP address, then you may assign this to your EXT network device (eth1/ppp0).

If your xDLS modem provides a DHCP Server (most do) then it can not provide dynamic leased addresses to the workstations inside the INT network. You can provide this yourself with the deatils contained in Chapter 10 of the HOWTO.

I have suggested in the documentation that you configure your Ethernet modem in "BRIDGED" mode: http://www.brennan.id.au/05-Broadband_Connectivity.html#ethernet this means it creates a basic connection to your ISP, however you will then need to create your own "ppp0" connection to authenticate with your ISP. This way your server handles all the work and you can configure your routing tables and firewall scripts from a central place; the server.

Let me know if this clears things up,

Cheers,
Miles (author)...