0% found this document useful (0 votes)
84 views18 pages

Linux Network Services Guide

Network services using Linux

Uploaded by

abc367088
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)
84 views18 pages

Linux Network Services Guide

Network services using Linux

Uploaded by

abc367088
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/ 18

University of Yahia Farès de Médéa

Faculty of Sciences
Department of Mathematics and Computer
Science
Year
: 2nd Master of Computer Science
2nd semester _

Linux: System Administration and


Network Services
Dr. Chergui ( n_chergui@esi.dz )
2022 2023
Chapter 3: Network Services
Course objectives

• Understanding the OSI / TCP/IP communication model

• Learn how to configure a Linux station


Plan
• TCP/IP communication models
• The client-server concept
• Network applications
• Addressing
• Setting up a station
The OSI model
TCP/IP Model

Responsible for transmission trames between two devices on the


same network
OSI Vs TCP/IP

DHCP,
DNS,
FTP,
HTTP,
SSH,
SMTP
TCP, UDP
IP

MAC address
Ethernet cable,
fibres, wifi
client-server concept
Client and server are both parts of a network application, designed to work
together over the network

The client initiates the communication, often started by a user.

The server, a program started automatically when the computer boots up,
responds to the client's requests..

In Unix/Linux terminology, the term "daemon" is used to refer to those processes


that run continuously, waiting for requests from a client.

In Microsoft Windows terminology, the word used is 'service.'

A server is a process, not a machine. A Linux machine can simultaneously run


multiple servers (and possibly clients as well)
Network applications
Network applications are applications that serve communication between machines
on heterogeneous networks.

These are some basic applications for heterogeneous networks.

ftp (File Transfer Protocol): File transfer in connected mode (TCP):

ftp [option] [machine_name]

telnet (TErminaL NETwork protocol): Allows remote connections:

telnet [machine_name]

NFS Network File System (UDP)

http Hyper-Text Transfer Protocol (TCP)


Network Addressing
• Before installing a new server you must assign:
• An IP address and the subnet mask

• a hostname (network machine name )

• know the various gateways

• the domain name

• An IP address is defined as 32 bits and represented by four numbers


separated by ‘.’: n1.n2.n3.n4 .

• An address consists of two parts that define the network address and the
host in the network.
Network Addressing

• We can distinguish different types of addresses:


• Network address: example: 192.168.0.0

• Broadcast address: 192.168.255.255

• Public Address: routed on the Internet

• Local address: should not be routed over the Internet


Example : all addresses between 192.168.0.0 and 192.168.255.255

• Loopback address : it represents the machine itself 127.0.0.1


Setting up a station
• A computer communicates with other computers through network interfaces .

• In general , we have a network interface for each network card (for computers that have
several network cards).

• A network card ( ethernet or wifi) has a MAC address , which identifies the network card on the
network

The network interfaces configuration file under Debian (and Ubuntu) is located in :
✔/ etc /network/interfaces (This location is typically found in Debian-based distributions,
including Ubuntu versions prior to 17.10) OR
✔ /etc/netplan/01-network-manager-all.yaml (from version 17.10 and other distributions )
Setting up a station
• To obtain the current interface configuration, use the
command ifconfig
Setting up a station
• To disable the interface:
• Ifconfig eth0 down
• To activate the interface:
• Ifconfig eth0 up
• To reset the network after a change in the configuration
files, you must do :
• /etc/init.d/networking restart
Or
• Sudo netplan apply
Station configuration
network interfaces configuration file under Debian (and
Ubuntu) is located in / etc /netplan/*.yaml
Routing

• The network mask is used to determine whether a recipient


machine is on the same network as you or not.

• You must indicate the path that the IP packets must take to reach
their destination.

• If your machine is a station client with a single network card and


this network only has one router ( classic case of a connection to
the Internet) then you must create two routes .
• The first is the one indicating which network card must take the packets to
access the rest of the network (the subnet ),

• the second which route should the packets take to exit the network.
Routing
• Show current routes:
• route
• netstat –n
• Add the route to the 192.168.1.0 network via eth0.
• route add -net 192.168.1.0 netmask 255.255.255.0 eth0
• Add the default gateway to the router:
• route add default gw 192.168.1.254
• Removes the route to network 172.16.0.0:
• route del -net 172.16.0.0 eth0
References


https://www.cloudflare.com/learning/ddos/glossary/
open-systems-interconnection-model-osi/

You might also like