You are on page 1of 2

H iu hnh Ubuntu Server

CU HNH DHCP SERVER


1.Chun b cc thng tin :
- ethernet device : eth0 - Ip range : 192.168.1.2 192.168.1.10 - Subnet address : 192.168.1.0 - Netmask : 255.255.255.0 - DNS server 203.113.131 v 203.131.188.1 - Domain : ttp.net - Default Gateway Address : 192.1681.1 - Broadcast Address : 192.168.1.255 2.Ci t DHCP Server : sudo apt-get install dhcp3-server 3.Cu hnh file /etc/default/dhcp3-server sudo vim /etc/default/dhcp3-server

Tm dng INTERFACES= v thay bng INTERFACES=eth0

Save li v thot.
4.Cu hnh file pool: -Bn m file /etc/dhcp3/dhcpd.conf

-Bn tm n dng 16. C on thng tin sau :


Phan Huy Phong

H iu hnh Ubuntu Server


#option definitions common to all supported networks... option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org; default-lease-time 600; max-lease-time 7200;

Sa thnh :
# # # # # option definitions common to all supported networks... option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org; default-lease-time 600; max-lease-time 7200;

-Tip tc, bn tm n dng 53. C on nh sau :


# A slightly different configuration for an internal subnet. #subnet 10.5.5.0 netmask 255.255.255.224 { # range 10.5.5.26 10.5.5.30; # option domain-name-servers ns1.internal.example.org; # option domain-name "internal.example.org"; # option routers 10.5.5.1; # option broadcast-address 10.5.5.31; # default-lease-time 600; # max-lease-time 7200; #}

on ny cn b ch thch v sa nh sau :
# A slightly different configuration for an internal subnet. subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.2 192.168.1.6; option domain-name-servers 203.113.131.1, 203.131.188.1; option domain-name "ttp.net"; option routers 192.168.1.1; option broadcast-address 192.168.1.255; default-lease-time 600; max-lease-time 7200;}

5.Khi ng li dch v DHCP Server:

sudo /etc/init.d/dhcp3-server restart

6.My Client (XP, Ubuntu) thu IP. a).My XP : -Vo run, g cmd. -g ipconfig /release v ipconfig /renew -g li ipconfig kim tra IP ca Client c ng trong range cp khng. b).My Ubuntu : Terminal, g ifconfig kim tra.

Phan Huy Phong

You might also like