Use dnsmasq to provide DNS and DHCP services in Ubuntu8.10

Source: Internet
Author: User
The DNS and DHCP software used in Linux generally adopt isc bind and dhcpd. in most environments, these two software are indeed great and safe. But when we use a network environment like home or office, it may be more appropriate to replace them with smaller software. This section describes the software dnsmasq that can provide both DNS and DHCP services In Ubuntu. It can cache external DNS records and provide local DNS resolution or act as a proxy for external DNS. In addition, dns

The DNS and DHCP software used in Linux generally adopt isc bind and dhcpd. in most environments, these two software are indeed great and safe. But when we use a network environment like home or office, it may be more appropriate to replace them with smaller software.

This section describes the software dnsmasq that can provide both DNS and DHCP services In Ubuntu. It can cache external DNS records and provide local DNS resolution or act as a proxy for external DNS. In addition, the DHCP service provided by dnsmasq is similar to that provided by dhcpd. For example, for Dynamic Address Allocation, You can pre-specify a static IP address to a specific host through the MAC address.

1. Install dnsmasq (SEE)

Sudo apt-get install dnsmasq

Linuxidc @ linuxidc-laptop :~ $ Sudo apt-get install dnsmasq
[Sudo] password for linuxidc:
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
The following software packages are automatically installed and are no longer in use:
Linux-headers-2.6.27-7 linux-headers-2.6.27-7-generic
Use 'apt-get autoremove 'to delete them.
The following additional software packages will be installed:
Dnsmasq-base
Recommended software packages:
Resolvconf
The following [new] software packages will be installed:
Dnsmasq-base
A total of 0 software packages have been upgraded, 2 new software packages have been installed, 0 software packages have to be uninstalled, and 0 software have not been upgraded. Www.britepic.org
Download a kb package.
Decompress the package to consume KB of extra space.
Do you want to continue? [Y/n] Y

2. Configure/etc/dnsmasq. conf

Expand-hosts
Domain = example.com
Dhcp-range = 192.168.0.50, 192.168.0.150, 12 h
Dhcp-option = 3, 192.168.0.1
Dhcp-option = 6, 192.168.0.5

The above configuration options enable the DHCP service and set domain to "example.com ". The IP address range provided by the DHCP service is 192.168.0.50 to 192.168.0.150. the renewal period is 12 hours. The gateway is 192.168.0.1 and the dns server is 192.168.0.5.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.