SA Module3
SA Module3
SA Module3
Administration
Module 3
Modules and Network Interfaces
● Network devices under Linux break the tradition of accessing all devices through
the file abstraction.
● In Linux, device drivers can be compiled into the kernel or built as modules.
● When a driver is compiled as a module, it is not loaded into memory until it is
specifically requested, which allows for better system resource management.
● Configuring a driver as a module means that it can be dynamically loaded and
unloaded from the kernel as needed.
● Auto-loading modules is a feature in Linux that allows the kernel to automatically
load the necessary modules when a corresponding device is detected or
requested by the system.
Modules and Network Interfaces
● When a device is detected or requested by the system, the kernel needs to know
which module to load to support that device.
● This mapping between device names and the corresponding modules is specified
in the /etc/modprobe.conf file. This file contains configuration directives for the
modprobe utility, which is responsible for managing kernel modules.
Modules and Network Interfaces
Eg : alias eth0 e1000
For example, eth0 is the main interface, eth0:0 is an aliased interface, eth0:1
is an aliased interface.
Managing Routes
● Managing routes in Linux involves configuring the routing table,
● which is a key component of the networking stack.
● The routing table dictates how network packets should be forwarded or routed
through the system.
● Each entry in the routing table specifies a destination network or host
Managing Routes
Viewing the Routing Table:
● Before managing routes, it's useful to view the current routing table to understand
how traffic is being routed.
● This can be done using commands like route -n or ip route show
● The routing table typically consists of several columns including the destination
network or host, gateway, netmask, interface
Adding a Route:
To add a route in Linux, you use the route add or ip route add command. The syntax
for adding a route is:
Managing Routes
Adding a Route:
● To add a route in Linux, you use the route add or ip route add command.
The syntax for adding a route is: route add -net <DESTINATION_NETWORK>
netmask <NETMASK> gw <GATEWAY> dev <INTERFACE>
The syntax for adding a route is: route del -net <DESTINATION_NETWORK>
netmask <NETMASK> gw <GATEWAY> dev <INTERFACE>
netstat :
● Normally, the netstat program is used to display the status of all of the network
connections on a host. However, with the -r option, it can also display the kernel
routing table.
Managing Routes
netstat :
● Normally, the netstat program is used to display the status of all of the network
connections on a host. However, with the -r option, it can also display the kernel
routing table.
10.10.2.0/24 dev eth0 proto kernel scope link src 10.99.99.45 192.168.1.0/24 dev
eth2 proto kernel scope link src 192.168.1.42 169.254.0.0/16 dev eth0 scope link
default via 10.10.2.1 dev eth0
Mechanics of FTP
The File Transfer Protocol (FTP) is a standard network protocol used for the
transfer of files from one host to another over a TCP-based network, such as the
internet.
An FTP server is a software application that runs on a server and provides FTP
services, allowing users to upload, download, and manage files on the server.
FTP is one of the oldest and most common methods of sending files over the
Internet. Very Secure FTP Daemon (vsftpd), which is the FTP base server that
ships with most Linux distributions.
Install FTP Server on Ubuntu with vsftpd
If you are looking to install an FTP server on Ubuntu, the simplest method is to use
vsftpd
Step 1: Update System Package Repository
Start by updating the system package repository to ensure you get the latest program
version. Open the terminal and run the following command:
$ sudo apt update
vsftpd is an open-source FTP utility commonly used in Ubuntu due to its simplicity.
Install vsftpd by running the command below:
To launch the service and enable it to automatically start at boot, run the following
commands:
Before making any changes, back up your configuration files. Create a backup copy
of the default configuration file using the cp command: