Linux: DHCP server


An example of a DHCP server in my R61:

/etc/dhcp/dhcpd.conf:

# Add lines like below
# specify domain name
option domain-name      “sixone.world”;

# specify DNS’s hostname or IP address
option domain-name-servers      208.67.222.222, 208.67.220.220;

# default lease time
default-lease-time 600;

# max lease time
max-lease-time 7200;

# this DHCP server to be declared valid
authoritative;

# specify network address and subnet mask
subnet 192.168.2.0 netmask 255.255.255.0 {
        # specify the range of lease IP address
        range 192.168.2.100 192.168.2.200;

        # specify broadcast address
        option broadcast-address 192.168.2.255;

        # specify default gateway
        option routers 192.168.2.1;

        option ip-forwarding on;
}

About jjjesss

I'm a guy interested in technology, bsd fan and concerned about the world around.
This entry was posted in Linux. Bookmark the permalink.

One Response to Linux: DHCP server

  1. Pingback: Linux: share 3g connection with the internal network | nix/bsd

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s