Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 8 Configuring a Basic Networking CompTIA Linux+ (Configuring…
Chapter 8
Configuring a Basic Networking
CompTIA Linux+
Understanding TCP/IP Networking
Understanding Network Packets
When the recipient system receives packets, it must hold on to them and reassemble them in the correct order to recreate the complete data stream.
It’s not uncommon for packets to be delayed or even lost in transmission, so error-recovery procedures are critical for protocols that handle large transfers.
Understanding Network Protocol Stacks
Is a set of software that converts and encapsulates data between layers of abstraction
Each computer in a transaction requires a compatible protocol stack.
Investigating Types of Network Hardware
The most common of these is Ethernet, which comes in several varieties.
Other types of network hardware exist, but most are less common than Ethernet. These include Token Ring, LocalTalk, Fiber Distributed Data Interface (FDDI), High-Performance Parallel Interface (HIPPI), and Fibre Channel
Knowing the Basic Functions of Network Hardware
Network hardware is designed to enable two or more computers to communicate with one another
Knowing TCP/IP Protocols Types
IP provides a “best effort” method for transferring packets between computers.
ICMP is most often used to send error messages between computers.
UDP can be faster than more sophisticated tools that provide such improvements to IP
TCP creates full connections with error checking and correction as well as other features.
Configuring Linux for a Local Network
Configuring Routing
A simplified version of the route syntax is as follows: route {add | del} [-net | -host] target [netmask nm] [gw gw] ➦[reject] [[dev] interface]
You can set up this route with the following command: # route add -net 172.20.0.0 netmask 255.255.0.0 gw 172.21.1.1
To enable this feature, you must modify a key file in the /proc filesystem: # echo “1” > /proc/sys/net/ipv4/ip_forward
Using GUI Configuration Tools
GUI configuration tool provides a means to enter the information described earlier.
Configuring with Static IP Address
Network mask
NETMASK
IP address
IPSDDR
Gateway address
DNS settings
A typical ifcfg-eth0 file, configured to use a static IP Address
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.29.39
NETMASK=255.255.255.0
NETWORK=192.168.29.0
BROADCAST=192.168.29.255
GATEWAY=192.168.29.1
ONBOOT=yes
Using the ifup and ifdown Commands
Most Linux distributions today ship with two commands, ifup and ifdown , that combine the functions of several other network commands, most notably ifconfig and route . In their simplest forms, they bring interfaces up or shut them down based on information in whatever files your distribution uses to store network configuration data:
ifup eth0
Configuring with DHCP
One of the easiest ways to configure a computer to use a TCP/IP network is to use DHCP, which enables one computer on a network to manage the settings for many other computers.
Configuring Hostnames
The most basic tool for setting your hostname locally is called, appropriately enough, hostname . Type the command alone to see what your hostname is, or type it with a new name to set the system’s hostname to that name:
hostname nessus.example.com
Network Hardware Configuration
The most fundamental part is getting the network hardware up and running
Understanding Network Addressing
Resolving Hostnames
DNS is a distributed database of computers that converts between IP addresses and hostnames.
You might do this if you know the IP address of a server through non-DNS means and suspect your DNS configuration is delivering the wrong address or to check whether a DNS server is working. Several programs can be helpful in performing such checks:
nslookup
host
dig
whois
Network ports
The sender must have an address for a specific program on the remote system.
Using Network Addresses
Managing IP Addresses
IPv4 addresses are usually expressed as four base-10 numbers (0–255) separated by periods, as in 192.168.29.39.
IPv6 addresses consist of eight groups of four-digit hexadecimal numbers separated by colons, as in fed1:0db8:85a3:08d3:1319:8a2e:0370:7334 .
Broadcasting Data
A broadcast is a type of network transmission that’s sent to all the computers on a local network, or occasionally all of the computers on a remote network
Addressing Hardware
One of the characteristics of dedicated network hardware such as Ethernet or Token Ring cards is that they have unique hardware addresses, also known as Media Access Control (MAC) addresses, programmed into them.
Understanding Hostnames
hostnames are composed of two parts: machine names and domain names.
Domain names are registered for use by an individual or organization, which may assign machine names within the domain and link those machine names to any arbitrary IP address desired.
Checking Network Status
Another useful diagnostic tool is netstat . This is something of a Swiss Army knife of network tools because it can be used in place of several others, depending on the parameters it’s passed. It can also return information that’s not easily obtained in other ways. Some examples include the following:
Interface information
Routing information
Masquerade information
Program use
Open ports
All connections
Examining Raw Network Traffic
One advanced network troubleshooting tool is tcpdump . This utility is a packet sniffer, which is a program that can intercept network packets and log them or display them on the screen.
tcpdump
Tracing Route
$ traceroute -n 10.1.0.43
Sends a series of three test packets to each computer between your system and a specified target system.
Using Additional Tools
One of the most useful of these may be Telnet. This program and protocol is mainly a remote login tool; type the program name followed by the name of a remote system to receive a login prompt on that system:
$ telnet speaker
Testing Basic Connectivity
$ ping -c 4 speaker
This command sent four packets and waited for their return, which occurred quite quickly because the target system was on the local network
Daniela Porras Quiros
2015071255