Professional Documents
Culture Documents
Nvsu FR Icd 05 00 Module 6 (Sam101) Student
Nvsu FR Icd 05 00 Module 6 (Sam101) Student
In this lesson, we will explore how to install and configure DHCP and NTP Servers. By
mastering these skills and concepts, you will gain another level of experience on your way to
being a network engineer.
V. LESSON CONTENT
DYNAMIC HOST CONFIGURATION PROTOCOL
DHCP is the Dynamic Host Configuration Protocol. It sends IP information to clients automatically,
making configuration of IP addresses on the network easier and automated. This protocol uses a four-
step process known as DORA when disseminating IP addresses, and it employs ports 67 and 68.
Dynamic Host Configuration Protocol (DHCP) allows properly configured client computers to
obtain IP addresses automatically from a DHCP server. This is done so that a network administrator does
not have to manually configure IP addresses on all the computers on a network individually. The DHCP
server takes care of this task quickly and automatically. This protocol therefore reduces the amount of
system administration, allowing devices to be added to the network with little or no manual intervention.
The IP information obtained might include the following:
• IP addresses • DNS server addresses
• Subnet masks • Other advanced options
• Gateway addresses
The primary reason DHCP is needed is to simplify the management of IP addresses on networks.
No two hosts can have the same IP address, and configuring them manually will likely lead to errors.
Even on small networks manually assigning IP addresses can be confusing, particularly with mobile
devices that require IP addresses on a non-permanent basis. Also, most users aren’t technically proficient
enough to locate the IP address information on a computer and assign it. Automating this process makes
life easier for users and the network administrator.
When a new computer is configured to use DHCP and then attached to the network, it contacts
the DHCP server. The DHCP server leases an IP address to that new computer via DHCP. The length
of a lease is set on the DHCP server by a network administrator.
For example, a lease given to a desktop computer might be from several days to several weeks,
because the computer is permanently attached to the network.
In addition to the IP address, DHCP also assigns the subnet mask, default gateway address,
domain name server (DNS) address and other pertinent configuration parameters. Request for comments
(RFC) 2131 and 2132 define DHCP as an Internet Engineering Task Force (IETF)- defined standard
based on the BOOTP protocol.
To accommodate IPv6, DHCPv6 is available for installation on modern server operating systems,
such as Windows Server 2008 and Server 2008 R2. Network administrators can combine DHCP (for
IPv4) and DHCPv6 to integrate both kinds of communications on a network. IPv6 uses either stateful or
stateless autoconfiguration. Stateful autoconfiguration means that a host’s IPv6 address is obtained
through DHCPv6 and a DHCPv6 server, such as Windows Server 2008 R2 configured in the role of a
DHCPv6 server. In stateless autoconfiguration, the network host assigns its own IP address without
obtaining it from a DHCPv6 server.
Components of DHCP
According to networkworld.com, When working with DHCP, it’s important to understand all of the
components. Below is a list of them and what they do:
• DHCP server: A networked device running the DCHP service that holds IP addresses and related
configuration information. This is most typically a server or a router but could be anything that
acts as a host, such as an SD-WAN appliance.
• DHCP client: The endpoint that receives configuration information from a DHCP server. This can
be a computer, mobile device, IoT endpoint or anything else that requires connectivity to the
network. Most are configured to receive DHCP information by default.
• IP address pool: The range of addresses that are available to DHCP clients. Addresses are
typically handed out sequentially from lowest to highest.
• Subnet: IP networks can be partitioned into segments known as subnets. Subnets help keep
networks manageable.
• Lease: The length of time for which a DHCP client holds the IP address information. When a lease
expires, the client must renew it.
• DHCP relay: A router or host that listens for client messages being broadcast on that network and
then forwards them to a configured server. The server then sends responses back to the relay
agent that passes them along to the client. This can be used to centralize DHCP servers instead
of having a server on each subnet.
• Accurate IP configuration: The IP address configuration parameters must be exact and when
dealing with inputs such as “192.168.159.3”, it’s easy to make a mistake. Typographical errors
are typically very difficult to troubleshoot and the use of a DHCP server minimizes that risk.
• Reduced IP address conflicts: Each connected device must have an IP address. However, each
address can only be used once and a duplicate address will result in a conflict where one or both
of the devices cannot be connected. This can happen when addresses are assigned manually,
particularly when there are a large number of endpoints that only connect periodically, such as
mobile devices. The use of DHCP ensures that each address is only used once.
• Automation of IP address administration: Without DHCP, network administrators would need to
assign and revoke addresses manually. Keeping track of which device has what address can be
an exercise in futility as it’s nearly impossible to understand when devices require access to the
network and when they leave. DHCP allows this to be automated and centralized so network
professionals can manage all locations from a single location.
• Efficient change management: The use of DHCP makes it very simple to change addresses,
scopes or endpoints. For example, an organization may want to change its IP addressing scheme
from one range to another. The DHCP server is configured with the new information and the
information will be propagated to the new endpoints. Similarly, if a network device is upgraded
and replaced, no network configuration is required.
Source: https://www.networkworld.com/article/3299438/dhcp-defined-and-how-it-works.html
Now, take a look at the below diagram. This diagram will show you how the client and server
exchange these messages.
Now, as you can see, still the Destination IP address in the DHCP Offer Message header has a
broadcast IP address. This is because the client didn’t get an IP address from DHCP Server. But, this
time, this message is broadcast at Network Layer only.
Now, as you can see, still Client Source IP address is 0.0.0.0. This is because the client still
didn’t get an IP address from DHCP Server. Also, this message has broadcast only at the network layer
of the OSI Model.
After this message, the DHCP client will get an IP address. This message has broadcast at the
network layer but unicast on the Data Link layer.
Source: https://www.gns3network.com/what-is-dora-process-in-dhcp/
B. NTP Server
NTP server can be configured by WinBox in menu System - NTP Server or in command line
system/ntp/server. NTP server service is not included in default set of packages so it needs to be
ownloaded and installed manually with ntp.npk package. ntp.npk package is NOT required to provide
router with sNTP client as this is already built into system package!
If package is successfully installed then it can be simply enabled with Manycast support.
/system ntp server
set broadcast=no enabled=yes manycast=yes multicast=no
Local NTP servers need to be synchronized from Stratum 1 or Stratum 2 public servers. Pick
some from public list.
/system ntp client
set enabled=yes primary-ntp=1.2.3.4 secondary-ntp=5.6.7.8
Benefits:
Router doesn't need direct access to internet and public NTP servers. Allow control of a primary
source of clock for your router on only two main routers (primary and secondary) It can reduce traffic
and the load of some public NTP servers by local time caching.
RouterOS supports the setting of two servers for NTP client, primary and secondary. It's better to
setup and use two servers for redundancy if it is feasible. NTP servers should be located in independent
locations with high availability near main gateways.
NTP Client
Now the local NTP servers can be configured on every router in the local network:
Source: https://wiki.mikrotik.com/wiki/Setup_local_NTP_servers
Before going to start configuring a DHCP server in MikroTik router, I will show you a basic network
diagram where a MikroTik router is working as a DHCP server as well as it is working as a network
gateway. I hope, your network is almost same like the below network diagram and you want to enable a
DHCP server in your MikroTik router.
In the above network diagram, the first interface (ether1 port) of MikroTik router is connected to
an ISP for accessing internet and this interface is known as WAN port. All the LAN users are connected
to second interface (ether2 port) of MikroTik router through a network switch. We will now enable DHCP
server in this second interface so that all the LAN users will get network information (IP, Subnet mask,
Gateway and DNS) dynamically from this DHCP server to access internet. But before enabling DHCP
server in MikroTik router, you have to complete MikroTik router basic configuration. Basic configuration
includes WAN and LAN IP assigning, Gateway IP assigning, DNS configuration and NAT rule creation.
If you are a new MikroTik user, please spend some time to study my previous article about MikroTik
Router Basic Configuration using Winbox and complete the basic configuration of your MikroTik router
and then follow my below steps to enable DHCP server in your MikroTik router.
1. Go to IP > DHCP Server menu from your winbox. DHCP Server window will appear.
2. In DHCP Server window, click on DHCP Setup button and choose the interface (in this article:
ether2) in which you want to setup DHCP server from DHCP Server Interface drop-down menu
and then click on Next button.
3. Now put your LAN network block in DHCP Address Space input box and click Next button. DHCP
client/LAN user will get IP from this network.
4. Choose gateway address for the given network in Gateway for DHCP Network input box and then
click Next button.
5. Provide IP range from which your DHCP client/LAN user will get IP in Address to Give Out input
box and click Next button.
6. Provide preferred DNS server IP and click Next button.
7. Now provide IP lease time and click Next button. Default lease time is 3 days.
8. DHCP setup is complete now and a successful message will be shown.
9. Now connect any IP device (Desktop, Laptop, Smartphone etc.) to your network. Automatically
an IP will be allocated for that device from your MikroTik DHCP server. Click Leases tab and
observe IP lease status of that DHCP client.
If you follow the above steps carefully, your MikroTik router will turn into a DHCP server and your
LAN users will now be able to obtain IP information from your MikroTik DHCP server. However, if you
face any problem to enable DHCP server in your MikroTik router, watch my below video about DHCP
Server configuration in MikroTik Router. I hope, it will help you to configure your MikroTik DHCP server
successfully.
Source: https://systemzone.net/dhcp-server-configuration-in-mikrotik-router/
Video: https://www.youtube.com/watch?v=05mIZWxthXs
The function of the NTP client is to query an NTP server and get the current time and then set
the local clock. The actual displayed time on the RouterBOARD system will be dependent on the local
time setting on the device.
System Clock
Setting up the NTP client will not ensure the local clock is accurate for local time so you must
set your time zone on the Clock setting to ensure your clock information is meaningful.
Server and enable the NTP server for the protocol of your choice(s). Typically checking “enabled” is
the only setting required. Other routers in your network will now be able to access this router as their NTP
server.
VII. EVALUATION (Note: Not to be included in the student’s copy of the IM)
VIII. ASSIGNMENT
IX. REFERENCES
Discher, S. R. W. (2011). RouterOS by example: understanding MikroTik RouterOS through real life
applications. MicroTik.
Admin, P. by, & says:, V. (2020, October 2). DORA Process in DHCP - Explained in detail. GNS3
Network. https://www.gns3network.com/what-is-dora-process-in-dhcp/.
Kerravala, Z. (2018, August 21). DHCP defined and how it works. Network World.
https://www.networkworld.com/article/3299438/dhcp-defined-and-how-it-works.html.
Manual:IP/DHCP Server. Manual:IP/DHCP Server - MikroTik Wiki.
https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server.
Sayeed, A. (2020, January 4). DHCP Server configuration in MikroTik Router. System Zone.
https://systemzone.net/dhcp-server-configuration-in-mikrotik-router/.
Setup local NTP servers. Setup local NTP servers - MikroTik Wiki.
https://wiki.mikrotik.com/wiki/Setup_local_NTP_servers.