Exercícios Ubuntu Server - DHCP Server - Inglês

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Exercise Ubuntu Server - DHCP

1. In this class, we use a class C network (192.168.10.1) to configure the DHCP


Server, where we assign the address 192.168.10.1 to the Ubuntu Server
Server, and the range of addresses to assign to the clients from 192.168.10.101
to 192.168.10.201. Perform the same activity, but now using the Class A
network IP (10.0.0.0), where the Ubuntu Server Server will receive the IP
10.0.01. and the IPS range to be assigned to clients will be 10.0.0.50 to
10.0.0.99. Don't forget to also change the gateway and broadcast addresses for
the Class A Network.

R: The 10.0.0.1/24 format is called the CIDR representation of classless inter-


domain routing, so in short it is a bit mask that describes which part of the IP
address can be used for the range.

Here's an example: in your case, 10.0.0.1/24 you have 24 bits preserved from
the total 32-bit address field. If you think of an IP address as 4 parts 8 bits,
255.255.255.255respectively 2^8.2^8.2^8.2^8, which means that this part, 3
parts 8 bits, is protected (will not be changed) 10.0. 0e only the final eighth of
the IP will be used as part of the range, .1giving range in this format: 10.0.0.1 -
10.0.0.255

I assume 10.0.0.0IP is preserved for your router, NIC or other device, so it's not
included.

2. Explain what each DHCP Service configuration line means:

default-lease-time 600;
R: The “default-lease-time” option controls the IP address renewal time.
The “600” indicates that the server checks every ten minutes if the
stations are still active.

max-lease-time 7200;
R: The "max-lease-time" determines the maximum time that a station can
use a given IP address, in this case “7200” seconds. The DHCP server is
configured to offer up to 99 IP addresses for the 192.168.1.0/24 network.

3. What is the command to configure an IP automatically on the network,


through the DHCP Server?

R: ifconfig command

$ sudo ifconfig enp0s3 192.168.0.10 netmask 255.255.255.0

$ cd /etc/init.d/

$ sudo service isc-dhcp-server restart (status)


Or

$ sudo systemctl start isc-dhcp-server

4. Which files are used for SRV DHCP configuration? Where are they located?

R: In order for the server to act as a DHCP Server on the network and
automatically assign IP addresses to clients, it is necessary to install the
"dhcp3-server" package using apt-get, as shown below:

$ sudo apt-get install isc-dhcp-server (replace install with remove)

Then edit the file using the nano editor, "/etc/dhcp/dhcpd.conf", remove all
content from the file, leaving it with the following content:

#sudonano/etc/dhcp/dhcpd.conf

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;

subnet 192.168.10.0 netmask 255.255.255.0 {


range 192.168.10.101 192.168.10.201;
option routers 192.168.10.1;
option domain-name-servers 208.67,222,222,208.67,220,220;
option netbios-name-servers 192.168.10.254;
option broadcast-address 192.168.10.255;
}

Save the file (option CTRL+O) and close the nano editor (option CTRL+X)

5. What linux service is used to dynamically allocate IP addresses to network


clients?

a) DNS.
b) DHCP.
c) NETBIOS.
d) SQUID.
e) WINS.

6. Automatic configuration of IP addresses and other network information on


workstations is provided by a DHCP (Dynamic Host Configuration Protocol)
server. Check the alternative that does NOT correspond to information provided
by this server.

a) The address of the DNS servers.


b) The network gateway address.
c) The subnet mask.
d) The address of the web servers

7. Review the listing below for a network operating system:

From the analysis of the information, it is correct to state that:


a) 192.168.1.254 indicates the netmask configured on the router
b) DHCP is using IP addresses in the range of 192.168.1.10 to 192.168.1.200
c) the lease time of an IP address to a computer on the network is 24 hours
d) IP addresses 192.168.1.1 and 192.168.1.2 refer to DNS servers

You might also like