Linux Networking (1)
Linux Networking (1)
SEMINAR REPORT
On
“Linux Networking”
Assistant Pr 2021BCA054
TIMT, YNR
YAMUNA NAGAR-135001
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.
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 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.
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.
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.
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.
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.
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:
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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:
Syntax: Ifplugstatus
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.
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