116
AT-WR4500 Series - IEEE 802.11abgh Outdoor Wireless Routers
RouterOS v3 Configuration and User Guide
6
DHCP and DNS
6.1
DHCP Client and Server
Document revision:
2.7 (Mon Ap r 18 22:24:18 GMT 2005)
Applies to:
V2.9
6.1.1
General Information
Summary
The DHCP (Dynamic Host Configuration Protocol) is needed for easy distribution of IP addresses in a
network. The RouterOS implementation includes both - server and client parts and is compliant with
RFC2131.
General usage of DHCP:
•
IP assignment in LAN, cable-modem, and wireless systems
•
Obtaining IP settings on cable-modem systems
IP addresses can be bound to MAC addresses using static lease feature.
DHCP server can be used with RouterOS HotSpot feature to authenticate and account DHCP clients.
See the
HotSpot Manual
for more information.
Quick Setup Guide
This example will show you how to setup DHCP-Server and DHCP-Client on RouterOS.
Setup of a DHCP-Server.
1.
Create an IP address pool
/ip pool add name=dhcp-pool ranges=172.16.0.10-172.16.0.20
2.
Add a DHCP network which will concern to the network
172.16.0.0/12
and will distribute a
gateway with IP address
172.16.0.1
to DHCP clients:
/ip dhcp-server network add address=172.16.0.0/12 gateway=172.16.0.1
3.
Finally, add a DHCP server:
/ip dhcp-server add interface=wlan1 address-pool=dhcp-pool
Setup of the DHCP-Client (which will get a lease from the DHCP server, configured above).
1.
Add the DHCP client:
/ip dhcp-client add interface=wlan1 use-peer-dns=yes \
add-default-route=yes disabled=no
2.
Check whether you have obtained a lease:
[admin@Server] ip dhcp-client> print detail
Flags: X - disabled, I - invalid
0 interface=wlan1 add-default-route=yes use-peer-dns=yes status=bound
address=172.16.0.20/12 gateway=172.16.0.1 dhcp-server=192.168.0.1
primary-dns=159.148.147.194 expires-after=2d23:58:52
[admin@Server] ip dhcp-client>
Specifications
Packages required:
dhcp
License required:
Level1
Submenu level:
/ip dhcp-client
,
/ip dhcp-server
,
/ip dhcp-relay
Standards and Technologies:
DHCP
Description
The DHCP protocol gives and allocates IP addresses to IP clients. DHCP is basically insecure and should
only be used in trusted networks. DHCP server always listens on UDP 67 port, DHCP client - on UDP