Network with multiple subnets with wired and wireless LANs
Aim
Design and configure a network with multiple subnets with wired and wireless LANs using
required network devices. Configure the following services in the network - TELNET, SSH, FTP
server, Web server, File server, DHCP server and DNS server.
Theory
Subnet
A subnet is a logical partition of an IP network into multiple, smaller network segments. It is
typically used to subdivide large networks into smaller, more efficient subnetworks. The internet is
composed of many networks that are run by many organizations. In turn, each organization’s
network can be composed of many smaller networks, or subnets. Each subnet allows its connected
devices to communicate with each other, and routers are used to communicate between subnets. The
size of a subnet depends on the connectivity requirements and the network technology employed. A
point-to-point subnet allows two devices to connect, while a data center subnet might be designed to
connect many more devices.
Configuring the Services
The following shows how the different services can be configured in an Ubuntu PC:
Telnet
Telnet is a user command and an underlying TCP/IP protocol for accessing remote
computers. Through Telnet, an administrator or another user can access someone else’s computer
remotely. On the Web, HTTP and FTP protocols allow you to request specific files from remote
computers, but not to actually be logged on as a user of that computer. With Telnet, you log on as a
regular user with whatever privileges you may have been granted to the specific application and
data on that computer. Telnet is most likely to be used by program developers and anyone who has a
need to use specific applications or data located at a particular host computer.
• Install Telnet
sudo apt install telnet xinetd
• Edit /etc/[Link] with root permission, add this line:
telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/[Link]
• Edit /etc/[Link], copy the following configuration:
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use
# log_on_success and log_on_failiure The default is the following:
# log_type = SYSLOG daemon info
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failiure = HOST
cps = 25 30
}
• Change telnet port by using the following command in the terminal:
telnet 23/ tcp
• Then restart the service and check runnig status:
sudo systemctl restart inetd
sudo systemctl status inetd
• Login to telnet using:
telnet ip_address
SSH
The SSH protocol (also referred to as Secure Shell) is a method for secure remote login from
one computer to another. It provides several alternative options for strong authentication, and it
protects the communications security and integrity with strong encryption. It is a secure alternative
to the non-protected login protocols (such as telnet, rlogin) and insecure file transfer methods (such
as FTP).
Take the following steps to configure SSH:
• Install SSH
sudo apt install
(Installing the client can be done by replacing openssh-server by openssh-client)
• Configure SSH:
sudo nano /etc/ssh/sshd_config
Then make the changes you want to make
• Restart SSH
sudo systemctl restart ssh
• Verify the runnig status of SSH
sudo systemctl status ssh
If configuration is successful,You should see something like Active: active (running)
• We can login to the SSH server from an SSH client.
ssh username@ip_address
FTP Server
File Transfer Protocol (FTP) is the commonly used protocol for exchanging files over the
Internet. FTP uses the Internet’s TCP/IP protocols to enable data transfer. FTP uses a client-server
architecture, often secured with SSL/TLS. FTP promotes sharing of files via remote computers with
reliable and efficient data transfer. FTP uses a client-server architecture. Users provide
authentication using a sign-in protocol, usually a username and password, however some FTP
servers may be configured to accept anonymous FTP logins where you don’t need to identify
yourself before accessing files. Most often, FTP is secured with SSL/TLS.
The following steps show setting up an FTP server on the computer:
• Install FTP daemon
sudo apt install vsftpd
• Configuring FTP can be done by editing the following file:
sudo nano / etc / vsftpd . Conf
• Restart the service and check the status of vsftp
sudo systemctl restart vsftpd
sudo systemctl status vsftpd
• Connecting to ftp server
ftp -p [IP_Address]
Web Server
A Web server is a program that uses HTTP (Hypertext Transfer Protocol) to serve the files
that form Web pages to users, in response to their requests, which are for warded by their
computers’ HTTP clients. Dedicated computers and appliances may be referred to as Web servers as
well. The process is an example of the client/server model. All computers that host Web sites must
have Web server programs. Leading Web servers include Apache (the most widely installed Web
server), Microsoft’s Internet Information Server (IIS) and nginx (pronounced engine X) from
NGNIX. Other Web servers include Novell’s NetWare server, Google Web Server (GWS) and
IBM’s family of Domino servers.
A web server can be hosted on the localhost of the PC by following the following steps:
• Install Apache server
sudo apt install apache2
• Check the webserver status
sudo systemctl status apache2
• Hosting a website:
◦ Create the directory for your_domain:
sudo mkdir /var/www/[domain-name]
◦ Assign ownership of the directory:
sudo chown -R $USER:$USER /var/www/[domain-name]
◦ Create webpages inside the folder [domain-name] to access it
◦ Make a new virtual host file at /etc/apache2/sites-available/[[Link]] and
paste the following example to configure it
sudo nano /etc/apache2/sites-available/your_domain.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName your_domain
ServerAlias your_domain
DocumentRoot /var/www/your_domain
ErrorLog ${APACHE_LOG_DIR}/[Link]
CustomLog ${APACHE_LOG_DIR}/[Link] combined
</VirtualHost>
◦ Enabling the configuration file by using the command a2ensite
sudo a2ensite [domain-name].conf
◦ Disable the default site defined in [Link]:
sudo a2dissite [Link]
◦ Test for configuration errors:
sudo apache2ctl configtest
If the configuraiton is successful then corresponding output will displayed
• By editing /etc/hosts file, we can give the domain name for the website
• The configuration the server is in the file: /etc/apache2/[Link]
• Restart the server by the command:
sudo systemctl restart apache2
• By vising the [domain-name] we can access the website that we created
File Server
In the client/server model, a file server is a computer responsible for the central storage and
management of data files so that other computers on the same network can access the files. A file
server allows users to share information over a network without having to physically transfer files
by floppy diskette or some other external storage device. Any computer can be configured to be a
host and act as a file server. In its simplest form, a file server may be an ordinary PC that handles
requests for files and sends them over the network. In a more sophisticated network, a file server
might be a dedicated network-attached storage (NAS) device that also serves as a remote hard disk
drive for other computers, allowing anyone on the network to store files on it as if to their own hard
drive.
The following steps can be followed to setup a file server:
• Installing Samba File Server:
sudo apt install samba
• Configuring the file server by editing /etc/samba/[Link]
First, edit the following key/value pairs in the [global] section of /etc/samba/[Link]:
workgroup = EXAMPLE
...
security = user
Create a new section at the bottom of the file, or uncomment one of the examples, for
the directory to be
shared:
[ share ]
comment = UbuntuFileServerShare
path = /srv/samba/share
browsable = yes
guest ok = y e s
read only = no
create mask = 0755
• Make a directory for hosting files and setting permission for the directory:
sudo mkdir -p /srv/samba/share/
sudo chown nobody:nogroup /srv/samba/share/
• Restart Samba service and checking status:
sudo systemctl restart [Link] [Link]
• We can connect to samba server using sama
DHCP Server
DHCP (Dynamic Host Configuration Protocol) is a network management protocol used to
dynamically assign an Internet Protocol (IP) address to any device, or node, on a network so they
can communicate using IP. DHCP automates and centrally manages these configurations rather than
requiring network administrators to manually assign IP addresses to all network devices. DHCP can
be implemented on small local networks as well as large enterprise networks. DHCP will assign
new IP addresses in each location when devices are moved from place to place, which means
network administrators do not have to manually initially configure each device with a valid IP
address or reconfigure the device with a new IP address if it moves to a new location on the
network. Versions of DHCP are available for use in Internet Protocol version 4 (IPv4) and Internet
Protocol version 6 (IPv6).
The following steps shows how DHCP server can be run:
• Install DHCP server:
sudo apt install isc-dhcp-server
• Configure DHCP server, the config file is /etc/dhcp/[Link] :
# Sample /etc/[Link]
# ( add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask [Link];
option broadcast-address [Link]
option routers [Link];
option domain-name-sever [Link] , [Link]
option domain-name “[Link]”;
subnet [Link] netmask [Link] {
range [Link];
range [Link] [Link];
}
• Starting and stopping services can be achieved using:
sudo service isc-dhcp-server restart
sudo service isc-dhcp-server start
sudo service isc-dhcp-server stop
After editing configuration files, we have to restart the service
• Enable and check the status of DHCP Server
sudo systemctl enable [Link]
sudo systemctl status [Link]
DNS Server
The Domain Name Systems (DNS) is the phonebook of the Internet. Humans access
information online through domain names, like [Link] or [Link]. Web browsers interact
through Internet Protocol (IP) addresses. DN S translates domain names to IP addresses so browsers
can load Internet resources.
Each device connected to the Internet has a unique IP address which other machines use to
find the device. DNS servers eliminate the need for humans to memorize IP addresses such as
[Link] (in Ipv4), or more complex newer alphanumeric IP address such as
[Link] (in Ipv6).
The following steps show the setup:
• Installing:
sudo apt install bind9
• The configuration is in the /etc/bind folder
• Setting as a catching name server by editing the file /etc/bind/[Link]:
forwarders {
[Link]; # replace with the ip address
[Link]; # of the name servers
};
• BIND9 can be configured with the primary and the secondary master as a custom DNS
server to access all the subnets.
• Restarting bind9:
sudo systemctl restart bind9
• You can use the dig command to test DNS services
Result:
For accessing the different nodes in the subnet, TELNET, SSH, FTP server, Web server, File
server, DHCP server and DNS server have been configured and runs successfully in an Ubuntu
20.04 LTS .