Unit 3
Unit 3
Unit 3
Every network interface has its own configuration file in the /etc/sysconfig/network-scripts directory.
Each interface has a configuration file named ifcfg-<interface-name>X, where X is the number of the
interface, starting with zero or 1 depending upon the naming convention in use; for example
/etc/sysconfig/network-scripts/ifcfg-eth0 for the first Ethernet interface.
Most of the other files in the /etc/sysconfig/network-scripts directory are scripts used to start, stop and
perform various network configuration activities.
Each interface configuration file is bound to a specific physical network interface by the MAC address of
the interface.
This example network interface configuration file, ifcfg-eth0, defines a static IP address configuration for
a CentOS 6 server installation.
Configuration options:
There are many configuration options for the interface configuration files. These are some of the more
common options:
If the DHCP option is specified, most of the other options are ignored. The only required options are
BOOTPROTO, ONBOOT and HWADDR. Other options that you might find useful, that are not ignored, are
the DNS and PEERDNS options if you want to override the DNS entries supplied by the DHCP server.
Diagnosing Network Startup Issues
The term troubleshooting refers to the process of identifying problems with a network through a
rigorous and repeatable process and then solving those problems using testable methods.
Network Troubleshooting Steps includes the following.
1. Check the hardware.
2. Use ipconfig.
3. Use ping and tracert.
4. Perform a DNS check.
5. Contact the ISP.
6. Check on virus and malware protection.
7. Review database logs.
Command-Line Tools
The following commands can be entered into the command prompt one at a time to reveal specific
information about the network status:
ping — A TCP/IP utility that transmits a datagram to another host, specified in the command. If
the network is functioning properly, the receiving host returns the datagram.
tracert/traceroute —A TCP/IP utility that determines the route data takes to get to a particular
destination. This tool can help you to determine where you are losing packets in the network,
helping to identify problems.
nslookup — A DNS utility that displays the IP address of a hostname or vice versa. This tool is
useful for identifying problems involving DNS name resolution.
ipconfig — A Windows TCP/IP utility that verifies network settings and connections. It can tell
you a host’s IP address, subnet mask and default gateway, alongside other important network
information.
ifconfig — A Linux or UNIX TCP/IP utility that displays the current network interface
configuration and enables you to assign an IP address to a network interface. Like ipconfig on
Windows, this command will tell you vital information about the network and its status.
iptables — A Linux firewall program that protects a network. You can use this tool if you suspect
that your firewall may be too restrictive or too lenient.
netstat — A utility that shows the status of each active network connection. This tool is useful
for finding out what services are running on a particular system.
tcpdump — A utility that is used to obtain packet information from a query string sent to the
network interface. It’s available for free on Linux but can be downloaded as a command for
Windows.
pathping — A TCP/IP command that provides information about latency and packet loss on a
network. It can help you troubleshoot issues related to network packet loss.
nmap — A utility that can scan the entire network for various ports and the services that are
running on them. You can use it to monitor remote network connections and get specific
information about the network.
route — A command that enables manual updating of the routing table. It can be used to
troubleshoot static routing problems in a network.
arp — A utility that supports the Address Resolution Protocol (ARP) service of the TCP/IP
protocol suite. It lets the network admin view the ARP cache and add or delete cache entries. It
can be used to address problems having to do with specific connections between a workstation
and a host.
dig — A Linux or UNIX command-line tool that will display name server information. It can be
used to troubleshoot problems in DNS name resolution.
Network Troubleshooting Applications
In addition to command-line tools, there are also a number of standalone applications that can be used
to determine the status of a network and to troubleshoot issues. Some of these applications may be
included in the system that you are working with, while others may need to be installed separately.
Packet Sniffer — Provides a comprehensive view of a given network. You can use this application
to analyze traffic on the network, figure out which ports are open and identify network
vulnerabilities.
Port Scanner — Looks for open ports on the target device and gathers information, including
whether the port is open or closed, what services are running on a given port and information
about the operating system on that machine. This application can be used to figure out which
ports are in use and identify points in a network that could be vulnerable to outside attacks.
Protocol Analyzer — Integrates diagnostic and reporting capabilities to provide a comprehensive
view of an organization's network. You can use analyzers to troubleshoot network problems and
detect intrusions into your network.
Wi-Fi Analyzer — Detects devices and points of interference in a Wi-Fi signal. This tool can help
you to troubleshoot issues in network connectivity over a wireless network.
Bandwidth Speed Tester — Tests the bandwidth and latency of a user’s internet connection. This
application is typically accessed through a third-party website and can be used to confirm user
reports about slow connections or download speeds.
Packet filtering firewalls are one of the simplest types of firewalls that operate at the network
layer of the OSI model. They are designed to control network access by monitoring outgoing
and incoming packets and either allowing them to pass through or halting them based on
predetermined rules. These rules are based on the packet headers and involve criteria such as IP
addresses, protocol types, port numbers, and other surface-level information available in the
packet.
Proxy-server firewalls, also known simply as proxy firewalls or application-level gateways, act
as intermediaries between end users and the services they access on the internet. Unlike lower-
level packet filtering firewalls, proxy firewalls operate at the application layer of the OSI model.
They examine the contents of the traffic at a much deeper level, which involves looking at the
application data within the packet. This ability allows them to offer more comprehensive security
features.
The ping command is used to ensure that a computer can communicate with a specified device over the
network. The pings command sends Internet Control Message Protocol (ICMP) Echo Request messages
in the form of packets to the destination computer and waits in order to get the response back. Once the
packets are received by the destined computer, it starts sending the packets back. This command keeps
executing until it is interrupted. Ping command provides details such as
Measuring the time taken by the packets to return to determine the speed of the connection.
To make sure that the network connection between the host and the destined computer can be
established.
2. nslookup/dig
These commands are used for querying the Domain Name System (DNS) to obtain domain name
or IP address mapping or any other specific DNS record.
[root@localhost ~]# nslookup facebook.com
3. Using traceroute/tracert
These commands show the path packets take to reach a network host. They can help identify
where delays are occurring in the network. traceroute is used on Linux, while tracert is used on
Windows.
The host command is used to find a domain name associated with the IP address or find an IP address
associated with the domain name. The returned IP address is either IPv4 or IPv6.
5. Using netstat
This command displays various network-related information such as network connections,
routing tables, interface statistics, masquerade connections, and multicast memberships.
The ARP (Address Resolution Protocol) command is used to display and modify ARP cache, which
contains the mapping of IP address to MAC address. The system’s TCP/IP stack uses ARP in order to
determine the MAC address associated with an IP address.
[root@localhost ~]# arp
Nagios is an open source computer and network monitoring software application. It supervises hosts and
services, alerting users when things go wrong and again when they get better. It is used to monitor
Storage, Network, Grid and National Services divisions.
Nagios can monitor SMTP, POP3, HTTP, NNTP, ICMP, SNMP, FTP, SSH, and other network services.
Resource Monitoring:
It can monitor processor load, disk usage, system logs, and more on a majority of network
operating systems.
Scalability:
Due to its flexible design and powerful script APIs, Nagios can scale to monitor large
environments with thousands of devices and millions of metrics.
Comprehensive Reporting:
Provides a wealth of reports which can help in maintaining historical data about network
performance, outages, and server functionality.
Extensible:
Nagios features a powerful API that allows for extensive customization and integration with
third-party tools and scripts.