0% found this document useful (0 votes)
5 views

Linux Networking (1)

Uploaded by

ankush8522109
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)
5 views

Linux Networking (1)

Uploaded by

ankush8522109
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

A

SEMINAR REPORT

On

“Linux Networking”

(Under the guidance of Ms. Palak Dhall)

Submitted to: Submitted By:


Ms. Tanvi Mehta Payal Saini

Assistant Pr 2021BCA054

Department Of Computer Application BCA-6th Sem

TIMT, YNR

TILAK RAJ CHADHA INSTUITUTE OF MANAGEMENT AND TECHNOLOGY

YAMUNA NAGAR-135001

Affiliated to Kurukshetra University, Kurukshetra

(Approved by AICTE, New Delhi)


Content
Intoduction
Linux Networking
Linux Networking Architecture
Linux networking protocol
Linux Networking Commands
Future Scope
Conclusion
Reference
Introduction

Computer networking is all about making computers talk to each other. It is simple to say, but
complex to implement. In this Introduction, we’ll take a bird’s-eye view of Ethernet networking
with Linux, and take a look at the various pieces that make it all work: routers, firewalls,
switches, cabling, interface hardware, and different types of WAN and Internet services.

A network, whether it is a LAN or WAN, can be thought of as having two parts: computers, and
everything that goes between the computers. This book focuses on connectivity: firewalls,
wireless access points, secure remote administration, remote helpdesk, remote access for users,
virtual private networks, authentication, system and network monitoring, and the rapidly growing
new world of Voice over IP services.

Connecting to the Internet

One of the biggest problems for the network administrator is connecting safely to the Internet.
What sort of protection do you need? Do you need expensive commercial routers and firewalls?
How do you physically connect your LAN to the Internet?

Here are the answers to the first two questions: at a minimum, you need a firewall and a router,
and no, you do not need expensive commercial devices. Linux on ordinary PC hardware gives
you all the power and flexibility you need for most home and business users.

The answer to the last question depends on the type of Internet service. Cable and DSL are
simple—a cable or DSL line connects to an inexpensive broadband modem, which you connect
to your Linux firewall/gateway, which connects to your LAN switch, as Figure 1-1 shows.
In this introduction, I’m going to refer to the interface between your LAN and outside networks
as the gateway. At a bare minimum, this gateway is a router. It might be a dedicated router that
does nothing else. You might add a firewall. You might want other services like name services, a
VPN portal, wireless access point, or remote administration.

It is tempting to load it up with all manner of services simply because you can, but from security
and ease-of-administration perspectives, it is best to keep your Internet gateway as simple as
possible. Don’t load it up with web, mail, FTP, or authentication servers. Keep it lean, mean, and
as locked-down as possible.

If you are thinking of upgrading to a high-bandwidth dedicated line, a T1 line is the next step up.
Prices are competitive with business DSL, but you’ll need specialized interface hardware that
costs a lot more than a DSL modem. Put a PCI T1 interface inside your Linux gateway box to get
the most flexibility and control. These come in many configurations, such as multiple ports, and
support data and voice protocols, so you can tailor it to suit your needs exactly..

Cable, DSL, and Dial-Up

Cable, DSL, and dial-up are unregulated services. These are the lowest-cost and most widely
available.
Cable

Cable Internet is usually bundled with television services, though some providers offer Internet-
only service. Cable’s primary attraction is delivering higher download speeds than DSL. Many
providers do not allow running public services, and even block common ports like 22, 25, 80,
and 110.

Some vendors are notorious for unreliable service, with frequent outages and long downtimes.
However, some cable providers are good and will treat you well, so don’t be shy about shopping
around. Beware restrictive terms of service; some providers try to charge per-client LAN fees,
which is as silly as charging per-user fees for tap water.

DSL

DSL providers are usually more business-friendly. Some DSL providers offer business DSL
accounts with SLAs, and with bandwidth and uptime guarantees. DSL isn’t suitable for mission-
critical services because it’s not quite reliable enough for these, but it’s fine for users who can
tolerate occasional downtimes.

DSL is limited by distance; you have to be within 18,000 wire-feet of a repeater, though this
distance varies a lot between providers, and is affected by the physical quality of the line.
Residential accounts are often restricted to shorter distances than business accounts, presumably
to limit support costs.

Dial-up

Dial-up has its place as a backup when your broadband fails, and may be useful as a quick, cheap
WAN—you can dial in directly to one of your remote servers, for example, and do a batch file
transfer or some emergency system administration, or set it up as a VPN for your users.
Linux Networking

Linux networking refers to the set of protocols, tools, and configurations that enable
communication between devices on a network within a Linux-based operating system. Linux,
being a powerful and versatile open-source operating system, provides robust networking
capabilities that are essential for various tasks, including connecting to the internet, sharing files,
and managing network resources.

Key aspects of Linux networking include:

 Networking Stack: Linux uses the TCP/IP networking stack, which includes protocols
such as IP (Internet Protocol), TCP (Transmission Control Protocol), and UDP (User
Datagram Protocol). These protocols form the foundation for communication over the
Internet.
 Network Configuration Files: Linux systems typically use configuration files to manage
network settings. The primary configuration file is /etc/network/interfaces on Debian-
based systems and /etc/sysconfig/network-scripts/ifcfg-<interface> on Red Hat-based
systems. Users can manually edit these files to set IP addresses, subnet masks, gateways,
and other network parameters.
 Network Interfaces: Linux recognizes network interfaces such as Ethernet cards and
wireless adapters. The ifconfig command (or ip command in newer systems) is used to
configure and display information about network interfaces.

Example (using ip command):

ip address show
 Firewall: Linux systems often use firewall tools like iptables or firewalld to control
network traffic by defining rules for allowing or blocking specific connections.

Example (using iptables):

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

 Network Services: Linux can act as a server for various network services, such as DNS
(Domain Name System), DHCP (Dynamic Host Configuration Protocol), and FTP (File
Transfer Protocol). Common daemons for these services include BIND, ISC DHCP, and
vsftpd.
 Network Tools: Linux provides a rich set of command-line tools for troubleshooting and
monitoring network issues. Some examples include ping, traceroute, netstat, tcpdump,
and wireshark.

Example (using ping):

ping www.example.com
Linux Networking Architecture

The Linux networking architecture is a layered structure that facilitates communication between
devices over a network. It follows the principles of the OSI (Open Systems Interconnection)
model, which consists of seven layers. Linux networking primarily involves layers 2 (Data Link),
3 (Network), and 4 (Transport) of the OSI model. Here's an overview of the Linux networking
architecture:

 Network Interface:

At the lowest layer (Layer 1 - Physical) of the OSI model, network interfaces are
responsible for the physical connectivity between devices. This includes network
interface cards (NICs) and the associated hardware.

 Data Link Layer (Layer 2):


In Linux, the data link layer is managed by the device drivers and kernel modules
responsible for handling the communication with the NICs. The Linux kernel includes
drivers for a wide range of network interface cards.
 Network Layer (Layer 3):
The network layer in Linux is primarily handled by the Internet Protocol (IP). It is
responsible for logical addressing, routing, and packet forwarding. Linux supports both
IPv4 and IPv6 for addressing.
 Routing and Forwarding:
The Linux kernel includes the routing table, which is managed by the routing subsystem.
This subsystem determines the path that network packets take from the source to the
destination. Linux routers use this information to forward packets between networks.
 Transport Layer (Layer 4):
The transport layer in Linux is primarily governed by the Transmission Control Protocol
(TCP) and the User Datagram Protocol (UDP). These protocols handle end-to-end
communication, ensuring data integrity, reliability, and flow control.
 Socket Layer:
Above the transport layer, the socket layer provides an interface for applications to
communicate over the network. Sockets allow processes on different devices to establish
connections, send, and receive data.
 Application Layer (Layers 5-7):
The application layer encompasses various network-aware applications and services. This
includes web browsers, email clients, file transfer programs, and more. These
applications use network protocols (e.g., HTTP, FTP, SSH) to communicate over the
network.
 Kernel Space vs. User Space:
Linux networking components are divided into kernel space and user space. The kernel
space includes the networking stack, device drivers, and core networking functionalities.
User space includes applications and tools that interact with the kernel through system
calls.
 Network Configuration Tools:
Linux provides a variety of tools for configuring and managing network settings.
Commands like ifconfig and ip are used for configuring network interfaces, while utilities
like route manage routing tables.
 Packet Filtering and Firewall:
The netfilter framework, commonly used with iptables or nftables, provides packet
filtering and firewall capabilities in the Linux kernel. It allows administrators to define
rules for packet acceptance, rejection, and modification.
Linux networking protocol

Linux, being a Unix-like operating system, follows the TCP/IP networking protocol suite, which
is the foundation of the modern internet. The key networking protocols used in Linux are part of
this suite. Here are some of the fundamental networking protocols used in Linux:

 Internet Protocol (IP):


IPv4: The most widely used version of the Internet Protocol. It provides the addressing
scheme for networked devices and enables the routing of data packets between them.
IPv6: The next-generation Internet Protocol designed to address the limitations of IPv4
by providing a larger address space and improved features.
 Transmission Control Protocol (TCP):
A connection-oriented protocol that ensures reliable, ordered, and error-checked delivery
of data between devices. It is widely used for applications like web browsing, email, and
file transfer.
 User Datagram Protocol (UDP):
A connectionless protocol that provides a simple, lightweight method of data
transmission. It is used for applications where low latency and reduced overhead are
more critical than guaranteed delivery, such as real-time applications like streaming and
online gaming.
 Address Resolution Protocol (ARP):
Used to map IP addresses to hardware addresses (MAC addresses) on a local network.
ARP is crucial for communication between devices within the same subnet.
 Internet Control Message Protocol (ICMP):
A network layer protocol used to send error messages and operational information about
network conditions. ICMP includes the well-known "ping" command, which is widely
used for testing network connectivity.
 Domain Name System (DNS):
Translates human-readable domain names into IP addresses. DNS is a critical protocol
for internet navigation, enabling users to access websites using domain names rather than
IP addresses.
 Dynamic Host Configuration Protocol (DHCP):
Facilitates the automatic assignment of IP addresses and other network configuration
parameters to devices on a network. DHCP simplifies network administration by
eliminating the need for manual IP address configuration.
 File Transfer Protocol (FTP):
A standard network protocol used to transfer files from one host to another over a TCP-
based network, such as the internet.
 Secure Shell (SSH):
A protocol for secure remote login and other secure network services over an insecure
network. It provides encrypted communication between two devices, typically used for
remote administration.
 Hypertext Transfer Protocol (HTTP) and Hypertext Transfer Protocol Secure
(HTTPS):
HTTP is the foundation of any data exchange on the Web, and HTTPS adds a layer of
encryption to secure the data transmission. These protocols are used for web browsing.
Linux Networking Commands
Every computer is connected to some other computer through a network whether internally or
externally to exchange some information. This network can be small as some computers
connected in your home or office, or can be large or complicated as in large University or the
entire Internet.

Maintaining a system's network is a task of System/Network administrator. Their task includes


network configuration and troubleshooting.

Here is a list of Networking and Troubleshooting commands:

ifconfig: ifconfig is short for interface configurator. This command is utilized in network
inspection, initializing the interface, enabling or disabling an IP address, and configuring an
interface with an IP address. Also, it is used to show the network and route interface.

The basic details shown with ifconfig are:

o MTU
o MAC address
o IP address

Syntax: ifconfig

ip: It is the updated and latest edition of ifconfig command. The command provides the
information of every network, such as ifconfig. Also, it can be used to get information about a
particular interface.

Syntax: ip a

ip addr
traceroute: The traceroute command is one of the most helpful commands in the networking
field. It's used to balance the network. It identifies the delay and decides the pathway to our
target. Basically, it aids in the below ways:

o It determines the location of the network latency and informs it.


o It follows the path to the destination.
o It gives the names and recognizes all devices on the path.

Syntax: traceroute <destination>

tracepath: The tracepath command is the same as the traceroute command, and it is used to find
network delays. Besides, it does not need root privileges. By default, it comes pre-installed in
Ubuntu. It traces the path to the destination and recognizes all hops in it. It identifies the point at
which the network is weak if our network is not strong enough.

Syntax: tracepath <destination>

ping: It is short for Packet Internet Groper. The ping command is one of the widely used
commands for network troubleshooting. Basically, it inspects the network connectivity between
two different nodes.

Syntax: ping <destination>

netstat: It is short for network statistics. It gives statistical figures of many interfaces, which
contain open sockets, connection information, and routing tables.

Syntax: Netstat

ss: This command is the substitution for the netstat command. The ss command is more
informative and much faster than netstat. The ss command's faster response is possible because it
fetches every information from inside the kernel userspace.

Syntax: Ss
nsloopup: The nslookup command is an older edition of the dig command. Also, it is utilized for
DNS related problems.

Syntax: nslookup <domainname>

dig: dig is short for Domain Information Groper. The dig command is an improvised edition of
the nslookup command. It is utilized in DNS lookup to reserve the DNS name server. Also, it is
used to balance DNS related problems. Mainly, it is used to authorize DNS mappings, host
addresses, MX records, and every other DNS record for the best DNS topography understanding.

Syntax: dig <domainname>

route: The route command shows and employs the routing table available for our system.
Basically, a router is used to detect a better way to transfer the packets around a destination.

Syntax: Route

host: The host command shows the IP address for a hostname and the domain name for an IP
address. Also, it is used to get DNS lookup for DNS related issues.

Syntax: host -t <resourceName>

arp: The arp command is short for Address Resolution Protocol. This command is used to see
and include content in the ARP table of the kernel.

Syntax: Arp

iwconfig: It is a simple command which is used to see and set the system's hostname.

Syntax: Hostname
curl and wget: These commands are used to download files from CLI from the internet. curl
must be specified with the "O" option to get the file, while wget is directly used.

curl Syntax: curl -O <fileLink>

wget Syntax: wget <fileLink>

mtr: The mtr command is a mix of the traceroute and ping commands. It regularly shows
information related to the packets transferred using the ping time of all hops. Also, it is used to
see network problems.

Syntax: mtr <path>

whois: The whois command fetches every website related information. We can get every
information of a website, such as an owner and the registration information.

Syntax: mtr <websiteName>

ifplugstatus: The ifplugstatus command checks whether a cable is currently plugged into a
network interface. It is not available in Ubuntu directly. We can install it with the help of the
below command:

sudo apt-get install ifplugd

Syntax: Ifplugstatus

iftop: The iftop command is utilized in traffic monitoring.

tcpdump: The tcpdump command is widely used in network analysis with other commands of
the Linux network. It analyses the traffic passing from the network interface and shows it. When
balancing the network, this type of packet access will be crucial.

Syntax: $ tcpdump -i <network_device>


Future Scope

Linux is a widely used operating system in various domains, including networking. The future
scope of Linux networking is likely to continue evolving based on technological advancements
and industry trends.

With the rollout of 5G networks, Linux may continue to play a role in providing networking
solutions for the infrastructure supporting high-speed, low-latency communication. Integration of
Linux into 5G network functions and the development of software-defined networking (SDN)
solutions could be areas of interest.

Security is always a critical aspect of networking. Future developments may focus on enhancing
the security features of Linux networking components, addressing emerging threats, and
ensuring the robustness of networked systems.

Ongoing development of the Linux kernel and networking protocols will likely bring about
optimizations, performance improvements, and support for emerging standards to ensure Linux
remains a robust and reliable platform for networking.
Conclusion

Linux, being a powerful and versatile open-source operating system, provides robust networking
capabilities that are essential for various tasks, including connecting to the internet, sharing files,
and managing network resources.

. The Linux networking architecture is a layered structure that facilitates communication between
devices over a network. It follows the principles of the OSI (Open Systems Interconnection)
model, which consists of seven layers.

Linux networking primarily involves layers 2 (Data Link), 3 (Network), and 4 (Transport) of the
OSI modelSecuring Linux networking is a critical aspect of maintaining a safe and reliable
computing environment
References

You might also like