0% found this document useful (0 votes)
26 views29 pages

Chap4 - Course1

Uploaded by

Song Lyrics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views29 pages

Chap4 - Course1

Uploaded by

Song Lyrics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Network Management

– Course 1 –
Chapter 4: TCP/IP services oriented Configuration (1/2)

Dr. Nadira Benlahrache


NTIC Faculty
email@univ-constantine2.dz

University Constantine 2 2022/2023. Semester 2


Network Management

– Course 1 –
Chapter 4: TCP/IP services oriented Configuration (1/2)

Dr. Nadira Benlahrache


NTIC Faculty
email@univ-constantine2.dz

Concerned Students :
Faculty Department Level Speciality

NTIC TLSI License 3 G.L.

University Constantine 2 2022/2023. Semester 2


Introduction
Inetd
DHCP
NFS
SAMBA

Objectives:

Presentation of network configuration services,


Presentation of Inetd service,
Presentation of DHCP service,
Presentation of FNS service,
Presentation of SAMBA service.
Presentation of DNS service.

University Constantine 2 © Dr. Nadira Benlahrache 2 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Problem statement
When connecting to a network, our machine, called the Client,
must have:
A unique IP address belonging to a logical network and a
subnet mask,
A DNS address, to be able to resolve host names, especially
on the Internet,
The address of the gateway that allows access to the Internet,
Access to a number of services: identifying oneself to servers
as a client, browsing web pages, downloading files, sending
email, etc.
These services must be provided by one or more machines called
Servers, configured to properly and adequately satisfy the requests
of clients.
University Constantine 2 © Dr. Nadira Benlahrache 3 / 23
Introduction
Inetd
DHCP
NFS
SAMBA

Inetd: Server of Servers


The Inetd daemon is a ”super” server, listening on multiple
ports.
Inetd uses the tcpd daemon which intercepts connection
requests to a service and checks through the hosts.allow and
hosts.deny files if the client is allowed to use this service.
It is installed by default on current versions of Linux.

Inetd can secure a machine under Linux, but it cannot


completely replace a real firewall.
University Constantine 2 © Dr. Nadira Benlahrache 4 / 23
Introduction
Inetd
DHCP
NFS
SAMBA

Configuration files
- Inetd uses the /etc/services file which contains the general list
of TCP/IP services with their associated port numbers and
transport protocol.
Example of /etc/services file:
ftp 21/tcp
telnet 23/tcp
http 80/tcp
- The /etc/inetd.conf file contains the list of enabled services on
a given machine.
- Inetd has been replaced by xinetd in recent distributions of
Linux such as Mandrake 10.x, RedHat 9.x... The only difference,
in /etc/etc/xinetd.d, is that each service (telnet, ftp, pop3...) has
its own configuration file.
University Constantine 2 © Dr. Nadira Benlahrache 5 / 23
Introduction
Inetd
DHCP
NFS
SAMBA

Dynamic Host Configuration Protocol

DHCP is a protocol that enables a DHCP server (Unix,


Linux, Windows, etc.) to assign temporary IP addresses (and
other parameters) to PCs or terminals during their startup.

This protocol allows TCP/IP network administrators to


configure client machines automatically.

A DHCP server has a range of addresses to distribute to its


clients. It keeps a database of addresses already in use.

DHCP was used by cable Internet service providers but has


been replaced by a point-to-point connection such as PPP
(Point-to-Point Protocol) for ADSL.

University Constantine 2 © Dr. Nadira Benlahrache 6 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Server-Client Dialogue

University Constantine 2 © Dr. Nadira Benlahrache 7 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Server-Client Dialogue

University Constantine 2 © Dr. Nadira Benlahrache 7 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Server-Client Dialogue

University Constantine 2 © Dr. Nadira Benlahrache 7 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Server-Client Dialogue

University Constantine 2 © Dr. Nadira Benlahrache 7 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Server-Client Dialogue

University Constantine 2 © Dr. Nadira Benlahrache 7 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Configuration
On the client side: Most Linux distributions provide at least one
package for the DHCP client, such as the precompiled dhcpcd.
Static Address
♯ File: /etc/sysconfig/network-
scripts/ifcfg-eth0 Dynamic Address
DEVICE=eth0 ♯ File: /etc/sysconfig/network-
BOOTPROTO=static scripts/ifcfg-eth0
IPADDR=192.168.0.254 DEVICE=eth0
NETMASK=255.255.255.0 BOOTPROTO=dhcp
NETWORK=192.168.0.0 ONBOOT=yes
BROADCAST=192.168.0.255
ONBOOT=yes

University Constantine 2 © Dr. Nadira Benlahrache 8 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Configuration

On the Server Side


It involves creating two files:

1. /etc/dhcp3/dhcpd.conf: used for configuring the DHCP


server (address range, distributed parameters),

2. /var/lib/dhcp3/dhcpd.leases: used for client registration. It


enables monitoring and statistics of the server’s activities.

University Constantine 2 © Dr. Nadira Benlahrache 9 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Configuration (File: dhcpd.conf )


♯ For a 192.168.0.0 network:
subnet 192.168.0.0 netmask 255.255.255.0;
♯ The range of available addresses for clients:
range 192.168.0.10 192.168.0.20;
♯ The default gateway address:
option routers 192.168.0.254;
♯ Then, we specify the name servers:
option domain-name-servers 192.168.0.1;
♯ Finally, we give them the domain name:
option domain-name ”uc2.educ.org”;
♯ The broadcast address is:
option broadcast-address 192.168.0.255;
♯ The lease has a default duration of 86400s (24h):
default-lease-time 86400;
University Constantine 2 © Dr. Nadira Benlahrache 10 / 23
Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Configuration

File: dhcpd.leases
In this file, the DHCP server stores information about
already-served clients.
Example of this file after the insertion of the first client:
♯ more /var/lib/dhcp3/dhcpd.leases
lease 192.168.0.12
starts 1 2023/01/12 9:33:45;
ends 1 2023/01/12 10:34:22;
hardware ethernet 00:40:33:2c:ba:6d;
uid 01:00:40:33:2c:ba:6d;
client-hostname ”MyPC”;

University Constantine 2 © Dr. Nadira Benlahrache 11 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

DHCP Configuration

File: dhcpd.leases
In this file, the DHCP server keeps track of the clients it has
already served.
Example of this file after the insertion of the first client:
♯ more /var/lib/dhcp3/dhcpd.leases
lease 192.168.0.12
starts 1 2012/11/12 9:33:45; −→ Start of the lease,
ends 1 2012/11/12 10:34:22; −→ End of the lease
hardware ethernet 00:40:33:2c:ba:6d; → MAC address
uid 01:00:40:33:2c:ba:6d;
client-hostname ”MyPC”; −→ Client hostname.

University Constantine 2 © Dr. Nadira Benlahrache 12 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Network File System: NFS

NFS: Network File System developed by Sun.

NFS allows you to mount a remote directory (use it as if it


were part of the local machine) to access files from a
computer connected to the network.

Similar to Microsoft’s network neighborhood.

University Constantine 2 © Dr. Nadira Benlahrache 13 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Network File System: NFS

University Constantine 2 © Dr. Nadira Benlahrache 14 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Network File System: NFS

University Constantine 2 © Dr. Nadira Benlahrache 14 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Advantages of an NFS Server

Storing data and work on an NFS server provides more


freedom of movement,
Limiting the use of removable storage devices in the network
(disk drives, USB, etc.),
Can be used as a centralized storage for backups and
archiving (more secure).

University Constantine 2 © Dr. Nadira Benlahrache 15 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Configuration of an NFS Server


The necessary daemons to run NFS are:
Server side:
nfsd [nservers] (nservers: number of daemons to start,
generally 8).
rpc.mountd: its role is to handle mount requests from
clients.
The server configuration is located in the file /etc/exports and the
command exportfs allows the sharing to take effect.

Client side:
biod [nservers]: The client uses the Linux command mount to
mount a remote file system on a local directory.

University Constantine 2 © Dr. Nadira Benlahrache 16 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Samba

Samba is a file server that allows resources (directories and


printers) to be shared using the same protocols as Windows
machines (Netbios).

Samba, running on Linux, allows Windows computers to


access computers that implement a domain controller
(Microsoft’s Active Directory) in a transparent and stable
manner.

It works on most Unix systems, such as GNU/Linux, as well as


Apple’s Mac OS.

Samba gets its name from the SMB (Server Message Block)
protocol.

University Constantine 2 © Dr. Nadira Benlahrache 17 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Configuration

Two daemons are necessary:


Smbd, the server kernel, providing authentication, sharing,
and access to resources services.
Nmbd ensures NetBIOS name resolution, allowing Samba
services to be shown in the network neighborhood.

For the configuration of this service, the main file to modify is:
/etc/samba/smb.conf.
Start the service with the command:
/etc/init.d/samba start

University Constantine 2 © Dr. Nadira Benlahrache 18 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Samba Configuration File

University Constantine 2 © Dr. Nadira Benlahrache 19 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Creating Samba users

User accounts must already be created in Linux using the


adduser command.

To create Samba user accounts, use the command:


smbpasswd -a MyUser MyPassword

University Constantine 2 © Dr. Nadira Benlahrache 20 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Conclusion

The aim of this course was to:


Introduce the main network services that the administrators
must consider to ensure the proper functioning of their
network and other services.
The services covered are Inetd, DHCP, NFS and Samba.
These services may not be visible to a network user, but they
are essential to ensure the sharing and proper functioning of
other network services.

University Constantine 2 © Dr. Nadira Benlahrache 21 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

References

Cricket Liu , Paul Albitz , ”DNS and BIND ”, Paperback ,


Jun 2006
Michel DUTREIX - Pierre FAUQUEMBERGUE, ”Debian
GNU/Linux - Services réseau (DHCP, DNS, Apache, CUPS,
NFS, Samba, Puppet, Nagios...)”, Editions ENI, jannuary
2018, ISBN : 9782409012068
Julien Rouxel, ”SAMBA”, Editions ENI, ISBN :
9782746066526E12
Sujata Biswas, ”Understanding NFS: Network File System on
Linux”, Kindle Edition,

University Constantine 2 © Dr. Nadira Benlahrache 22 / 23


Introduction
Inetd
DHCP
NFS
SAMBA

Some useful links

https://www.it-connect.fr/cours/dhcp-du-protocole-a-la-
configuration/
www.frameip.com/dhcp/
https://www.frameip.com/dns/

University Constantine 2 © Dr. Nadira Benlahrache 23 / 23

You might also like