Results 1 to 6 of 6

Thread: what are the benefits of dhcp in a LAN?

  1. #1
    Senior Member registered user
    Join Date
    Mar 2004
    Location
    Berlin
    Posts
    436

    what are the benefits of dhcp in a LAN?

    I see a lot of people, using dhcp for their lan, and don't understand the benefits.

    I'm used to static IPs.
    My example is: I have a /etc/host:
    192.168.4.2 desktop
    192.168.4.3 laptop

    To make a filetransfer, I start
    Code:
    ftpd
    on the desktop, and
    Code:
    ftp desktop
    on the laptop.

    When I use dhcp, will the laptop find the desktop too?
    I need a hardware-router for this - or an additional service running permanently in the background, don't I?

  2. #2
    Administrator Site Admin-
    Join Date
    Apr 2003
    Location
    USA
    Posts
    5,441

    Re: what are the benefits of dhcp in a LAN?

    Quote Originally Posted by user unknown
    I see a lot of people, using dhcp for their lan, and don't understand the benefits.
    With DHCP, IP addresses are assigned automagically. Without DHCP you have to assign an unique IP address in your subnet to every computer in your system.

    While it might not be that big of a deal to set up a static IP address on a ciouple of computers in a home system, if you are testing other equipment DHCP takes care of this for you. If someone comes over with a notebook and you plug them into your system, DHCP assigns them a unique IP address on your network, even if the IP address they had on their home system is already in use by another of your computers (very handy for a lan party when several people come over). And, of most relavence to a Knoppix forum; if you boot Knoppix from CD and have DHCP available, you will be on the network as soon as you boot, with no set-up needed at all (assuming the boot version of Knoppix has support for your NIC and some evil company that hates Linux hasn't played games with your NIC's EEPROM in a "security update:, but that's another story).

    Quote Originally Posted by user unknown
    I'm used to static IPs.
    My example is: I have a /etc/host:
    192.168.4.2 desktop
    192.168.4.3 laptop

    To make a filetransfer, I start
    Code:
    ftpd
    on the desktop, and
    Code:
    ftp desktop
    on the laptop.

    When I use dhcp, will the laptop find the desktop too?
    That's not DHCP exactly, that's Name Resolution. How it works in Linux I'm not sure. Yes, it works that way in Windows just fine, I can talk to my VPN server by telling the VPN client that I want to connect to 192.168.2.100 or that I want to connect to "AMD". I can ping by IP address or by name. And so on. Name resolution should work in a system independent of using DHCP or static addresses (in fact, there is no reason why you can't have a network with some static addresses and some dynamic ones. There are actually some good reasons for doing this if your DHCP server doesn't allow you to permanently lock some computers to dedicated addresses).

    Quote Originally Posted by user unknown
    I need a hardware-router for this - or an additional service running permanently in the background, don't I?
    Well, for DHCP, something has to be a DHCP server. If you have a high speed connection, I personally wouldn't consider runnng it without a router. (Please note: I'm talking about even a mininal $10 home DSL/cable router, not some expensive piece of Cisco equipment.) And certainly this is even more true if you have multiple computers on the network. In fact I'm wondering how you think it is that you are running a network with two computers on the private 192.168.xxx.xxx subnet without a router to provide NAT services (unless that's a completely independent network from the one you access the Internet with). But while a DHCP server needs to be somewhere, there is at least one simple case where you can and do use DHCP without having a router or other hardware or an additional service running in the background: Most high speed cable users connect to their provider and get their IP address from the cable company's DHCP server. So if you are on cable you can usually boot and have Knoppix come right up on the Internet on a computer connected directly to the cable modem (this is not true for cable companies who assign each user a sttatic IP address that they have to configure into their software before connecting, not is it true for DSL users without a router who must run PPPoE to connect to their modem). I certainly don't recommend connecting to the Internet this way, as a router provides an extra and important lever of firewall security as well, but it can and is frequently done.

  3. #3
    Administrator Site Admin-
    Join Date
    Apr 2003
    Location
    USA
    Posts
    5,441

    Re: what are the benefits of dhcp in a LAN?

    Quote Originally Posted by user unknown
    I'm used to static IPs.
    My example is: I have a /etc/host:
    192.168.4.2 desktop
    192.168.4.3 laptop
    One update: rereading your post and seeing that you are manually putting the addresses in the host file to do your name resolution, I do see why you would question this. I don't know if Linux has better ways to deal with resolving these names for you; it's not part of DHCP. Many home routers will let you dedicate an IP address to a MAC adderss, so they can be sure to assign the same IP to a computer whenever the system is rebooted. The Dlink brand of routers that I have seen do this, and I like them for several other reasons too. Unfortunately, some other routers do not assure you that the same IP addresses will be given out to the same MAC addresses each time, particularly on a network where the computers come and go (the SMC router I have, for example, is particularly poor at this, even though it has a feature to make the DHCP lease "forever". Apparently forever starts over after a restart).

    So if you do use a router and still want to resolve names with your host file, make sure these addresses don't change (either by using a router that gives out the same IP address by DHCP each time (when you configure it to do so) like the Dlink, or by setting these systems up as you have now with static addresses. Additional computers could still join the network and be assigned an address by DHCP, but they wouldn't have a name in your host file unless you added one. I'm hoping someone else will join in and teach us both if there is a better more automatic way in Linux to do name resolution than editing the host file on every system.

    BY the way, there is a good reason to use DHCP to hand out a "permanent" address rather than setting it statically. Consider your laptop. If you configure it with DHCP, when you carry it to work, to an friend's network, to a lan party or to an Internet cafe, you can just plug in and DHCP will configure your IP address for you. When you come back to your home network, DHCP puts things back where they should be. With a static IP set in the laptop, you have to reconfigure things every time you move to a new network (except in the rare case where you have two networks and made sure the same static address will work on each network).

  4. #4
    Senior Member registered user
    Join Date
    Jun 2004
    Posts
    788
    Easy but unsecure ?

  5. #5
    Administrator Site Admin-
    Join Date
    Apr 2003
    Location
    USA
    Posts
    5,441
    Quote Originally Posted by shah
    Easy but unsecure ?
    Who's easy? you?

  6. #6
    Senior Member registered user
    Join Date
    Mar 2004
    Location
    Berlin
    Posts
    436
    Whooo!
    Thanks for the long reply.

    Well - I should have said that I don't visit lanparties.
    I move my laptop sometimes to a friend, and he his laptop to my network.

    And I don't work at several places, so the hosts-file keeps permanent small.

    And I use pppoe - but get an additional adress for the internet-connection.
    So I may start ftp, ssh, and my database, and tell it, which host (ip or name) is allowed to connect.
    Therefore I don't see a need for a firewall.
    And if I use the internet from both machines (which is seldom), I start a router on one of the linux-machines.
    With dhcp I would need to allow access from the whole subnet, to allow the laptop to use the desktop-database, or I would need an additional service, to get the actual IP for the hostname 'desktop' for instance.

    I guess under this circumstances, a static IP is a much faster and more easy solution.

    But of course if you visit lanparties, an automatic solution is much more easy.

    In general I prefer the handmade control over automatic services - which need to be setup too.

Similar Threads

  1. What are the benefits of a Linux-based System?
    By DiabloGN in forum General Support
    Replies: 3
    Last Post: 04-19-2005, 06:22 AM
  2. DHCP
    By syco in forum Networking
    Replies: 9
    Last Post: 10-14-2004, 03:59 AM
  3. Benefits of improving compression?
    By jreiser in forum Customising & Remastering
    Replies: 3
    Last Post: 02-01-2004, 09:45 PM
  4. DHCP ok but...
    By tyiooo in forum Networking
    Replies: 19
    Last Post: 06-11-2003, 09:28 AM
  5. CD-RW benefits over CD-R?
    By kcbnac in forum General Support
    Replies: 5
    Last Post: 04-10-2003, 08:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN picture

OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN

$145.00



pfSense Firewall 16-Core Atom C3958 8GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN picture

pfSense Firewall 16-Core Atom C3958 8GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN

$184.99



OPNsense pfSense 16-Core Atom C3958 16GB ECC RAM 512GB SSD 8-Port QAT AES-NI VPN picture

OPNsense pfSense 16-Core Atom C3958 16GB ECC RAM 512GB SSD 8-Port QAT AES-NI VPN

$258.00



SonicWall TZ280 Firewall 03-SSC-6933 Advanced Edition 3YR NEW SEALED picture

SonicWall TZ280 Firewall 03-SSC-6933 Advanced Edition 3YR NEW SEALED

$999.99



Fortinet FortiGate 60F FG-60F P24286-03-13 Network Firewall Security Appliance picture

Fortinet FortiGate 60F FG-60F P24286-03-13 Network Firewall Security Appliance

$155.75



Firewalla Gold Pro - 10 Gbps Cyber Security Firewall picture

Firewalla Gold Pro - 10 Gbps Cyber Security Firewall

$680.00



Firewalla Gold Pro 10GbE Firewall Router with Rack Mount Ears and USB Key picture

Firewalla Gold Pro 10GbE Firewall Router with Rack Mount Ears and USB Key

$829.99



Palo Alto PA-220 Next-Gen Firewall 520-000309-00J picture

Palo Alto PA-220 Next-Gen Firewall 520-000309-00J

$40.00



Zero Trace Pen: All-in-one Tor Network Anonymous Drive + Cryptocurrency Wallet picture

Zero Trace Pen: All-in-one Tor Network Anonymous Drive + Cryptocurrency Wallet

$147.00



Cisco Meraki MX67-HW Security Appliance Firewall NEW Unused Unclaimed picture

Cisco Meraki MX67-HW Security Appliance Firewall NEW Unused Unclaimed

$202.50