Sunteți pe pagina 1din 12

Ans:

(i) ping
(ii) arp

(iii) finger

(iv) diskperf
(v) rcp

Ans:
(i) /bin
(ii) /usr/bin
(iii) /sbin

(iv) /tmp

(v) /boot
Ans:
Shell Script
Main.sh

Output:

Ans:
Shell Script
Main.sh
Output:

Ans:

Ans:
Ans:

Ans:

INSTALLING THE DHCP SERVER


The first thing to do is instal the dhcpd Server. Log into your Ubuntu Server and issue the
following command:

sudo apt-get install isc-dhcp-server –y

The above command will pick up all of the necessary dependencies and complete the
installation without error.

CONFIGURING THE DHCP SERVER


Next, the DHCP server must be configured. Issue the command:

sudo nano /etc/dhcp/dhcpd.conf


In that file, you need to modify (to fit your networking needs) a few lines.

Specify the domain name with the following line:

option domain-name "example.com";

Specify the nameserver's hostname or IP address with the following line:

option domain-name-servers 192.168.1.10, 192.168.1.11;

Specify the default lease times with the following two lines:

default-lease-time 3600;
max-lease-time 7200;

Uncomment out (remove the # character) the following line:

#authoritative;

Next, scroll to the end of the file and add the following (making sure to modify it to fit your
networking needs):

# Specify the network address and subnet-mask


subnet 192.168.1.0 netmask 255.255.255.0 {
# Specify the default gateway address
option routers 192.168.1.254;
# Specify the subnet-mask
option subnet-mask 255.255.255.0;
# Specify the range of leased IP addresses
range 192.168.1.100 192.168.1.200;
}
Save and close that file.

RESTART THE DHCP SERVER WITH THE COMMAND

sudo systemctl restart isc-dhcp-server.service

At this point, any clients on your network will pick up a DHCP address from this newly
configured server. If you had DHCP addresses distributed by another source, you'll want to
shut down that source, otherwise you could wind up with a conflict on your network.
Lease addresses

IF YOU WANT TO FIND OUT WHAT IP ADDRESSES HAVE BEEN GIVEN OUT BY THE SERVER,
ISSUE THE COMMAND:

dhcp-lease-list

The above command will list out all addresses that have been handed out

Command route

The command route is used to modify and check the existing routes. To check the routing
table using route command,
Shell
$ route
1

$ route

This will display the list of routes currently configured

Command: route -n
Shell
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
192.168.0.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0

This will give the output with out resolving the names

S-ar putea să vă placă și