Chapter Four
Chapter Four
Chapter Four
Administration
Course
Code: COSC4036
Salale University
College of Natural Sciences
Department of Computer Science
Chapter-4
Network Management
4.1. TCP/IP Networking:
Application initiates communication: An application on a dev ice (e.g., your web browser)
sends data to the network layer.
Data is segmented and encapsulated: The data is broken down into smaller packets and
wrapped with headers containing addressing and control information at each layer.
Packets travel through the layers: Each layer adds its own header and performs specific
tasks before passing the packet down to the next layer.
Packets reach the destination device: The packets trav el across the network, and the
destination dev ice's network layers process the headers to reassemble the original data and
deliv er it to the corresponding application.
Standardized: Enables communication
between diverse devices and networks
due to its universal nature.
Modular: The layered structure allows
for independent development and
improvement of each layer.
Benefits of
TCP/IP
Scalable: The architecture can
accommodate a vast number of
interconnected devices.
Reliable: TCP ensures reliable data
delivery, while UDP offers speed for
time-sensitive applications.
4.2. Configuring a Linux Box for
Networking
Network Hardware: You'll need a Linux machine with two or more network
interfaces (Ethernet ports). One interface will connect to your modem/internet
source (WAN), and the others will connect to your internal network devices
(LAN).
Static IPs: Assign static IP addresses to each network interface. The WAN
interface will typically have an IP address provided by your ISP, while the LAN
interface can be configured within a private network range (e.g.,
192.168.1.0/24).
Routing Table: Configure the routing table using the route command or a
graphical tool to direct network traffic. The WAN interface will be the default
gateway for internet access.
Network Address Translation
(NAT):
DHCP Service: For a more conv enient experience on your internal network,
consider setting up a DHCP (Dynamic Host Configuration Protocol) serv er. This
serv ice automatically assigns IP addresses, subnet masks, and default gateway
information to dev ices connecting to your network. Common DHCP serv er
options include ISC DHCP or dnsmasq.
Security Considerations:
Multiple Websites: If you plan to host multiple websites on the same serv er, you'll need
to configure v irtual hosts. This tells Apache which website content to serv e based on
the domain name or IP address. Edit configuration files (usually in /etc/apache2/sites-
av ailable/) to create v irtual host configurations.
Permissions
Ownership and Access: Ensure the Apache user has ownership and
appropriate permissions to access the document root directory and website
files. Use commands like chown and chmod to adjust permissions if needed.
Firewall Rules
BIND (Berkeley Internet Name Domain) is a popular and powerful DNS (Domain
Name System) serv er software. Configuring a BIND serv er on your Linux box allows you
to manage your own DNS zone and resolv e domain names for dev ices on your
network. Here's a roadmap to guide you through the process:
Installation
Zone File
Configuration: MX record: Specifies mail exchange servers for your
domain.
The main Postfix configuration file is /etc/postfix/main.cf. Here are some essential
settings to configure:
relayhost (Optional): If you're not setting up a full-fledged email server and want to
relay emails through an external provider, configure a relayhost here.
mynetworks: Define the IP address range of your trusted network from which emails
can be sent.
Restarting Postfix
The main Squid configuration file is typically located at /etc/squid/squid.conf. This file defines v arious
settings for Squid's operation, including:
http_port: Define the port on which Squid listens for incoming client connections (default: port 3128).
cache_dir: Specify the directory on disk where Squid will store cached web content.
acl: Define Access Control Lists (ACLs) to control which clients or networks can use the proxy serv er.
http_access: Specify access rules based on the defined ACLs to allow or deny proxy access.
cache_mem: Configure the amount of memory Squid can utilize for caching frequently accessed
data.
Restarting Squid:
DHCP Installation
The main configuration file for ISC DHCP is typically located at /etc/dhcp/dhcpd.conf.
This file defines various settings for the DHCP server, including:
Subnet declarations: Define the range of IP addresses available for lease within a
specific subnet.
Pool options: Specify options like subnet mask, default gateway, DNS server addresses,
and lease times to be offered to clients in that pool.
Host declarations (optional): Assign static leases to specific devices based on their MAC
addresses.
Restarting and Verification:
sudo systemctl
restart isc-
dhcp-server
4.9. Network Time Services and
Sharing Desktops with VNC
/etc/systemd/timesyncd.conf
Restarting the Service
sudo systemctl
restart systemd-
timesyncd
Sharing Desktops with VNC:
Installation:
vncpasswd
Sharing Desktops with VNC:
vncserver
Install a VNC viewer on your local machine
(computer you want to control from). Many options
are available, including built-in viewers on some
desktops or standalone software like RealVNC or
TigerVNC Viewer.