Chap4 - Course1
Chap4 - Course1
– Course 1 –
Chapter 4: TCP/IP services oriented Configuration (1/2)
– Course 1 –
Chapter 4: TCP/IP services oriented Configuration (1/2)
Concerned Students :
Faculty Department Level Speciality
Objectives:
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
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
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
DHCP Configuration
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”;
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.
Client side:
biod [nservers]: The client uses the Linux command mount to
mount a remote file system on a local directory.
Samba
Samba gets its name from the SMB (Server Message Block)
protocol.
Configuration
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
Conclusion
References
https://www.it-connect.fr/cours/dhcp-du-protocole-a-la-
configuration/
www.frameip.com/dhcp/
https://www.frameip.com/dns/