Configure your network card with DHCP

DHCP ( Dynamic Host Configuration Protocol ).  By far the easiest and most popular way to get your computer connected to an existing network.  In a nutshell, DHCP configures your computer to ask the network router to assign the IP address information to it, automatically configuring itself to any network with a DHCP enabled router.  A quick fact for those who aren’t computer savvy, nearly all home routers come preconfigured with this enabled.  So lets see how to do it.

DHCP Configuration in Ubuntu

  1. From the command line, open the interfaces configuration file with your favorite text editor (I like to use nano, but you can use which ever you like)
  2. $ sudo nano /etc/network/interfaces
  3. Within nano you will see something similar to the following contents
  4. # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
     
    # The loopback network interface
    auto lo
    iface lo inet loopback
     
    # The primary network interface
    auto eth0
    iface eth0 inet dhcp
  5. As you can see in this file several things are configured here.  Pay attention to the lines that mention eth0
  6. # The primary network interface
    auto eth0
    iface eth0 inet dhcp
  7. ‘auto eth0′ tells Ubuntu that the ‘eth0′ device is to be automatically configured. And ‘iface eth0 inet dhcp’ tells Ubuntu that the interface eth0 should assign the 32bit inet address with the information provided from the dhcp server.  If your computer has this information already in the file, it is already configured to use DHCP.  By default most Linux distrobutions use this method.
  8. If it has something different, it means your computer is most likely configured with a static IP address that was either configured by someone else or by someone else when Ubuntu was installed.

Pages: 1 2 3 4

Tags: