Subscribe Us

Thursday, January 28, 2021

EIGRP Tutorial – Basic concept explained

 

EIGRP Tutorial – Basic concept explained

This tutorial explains fundamental and basic concepts of EIGRP Routing protocol including features & characteristics of EIGRP in detail. Learn EIGRP terminology (Neighbor Table, Topology Table, Routing Table, PDM, RTP, DUAL Algorithm Autonomous System and Administrative Distance) step by step with examples.

EIGRP stands for Enhanced Interior Gateway Routing Protocol. It is a Cisco-proprietary routing protocol for TCP/IP. It is based on IGRP routing protocol. It has several enhancements to scale the enterprise size network.

Features and characteristics of EIGRP

  • It is a Cisco Proprietary routing protocol.
  • It is based on IGRP Routing protocol.
  • It is an enhanced version of IGRP (Interior Gateway Routing Protocol) protocol.
  • In comparison of IGRP it provides faster convergence times, superior handling of routing loops and improved scalability.
  • It was released in 1994.
  • It is a hybrid routing protocol.
  • It has characteristics of both distance vector and link state protocols.
  • It uses DUAL (Diffusing Update Algorithm) algorithm to select the best path.
  • It uses RTP (Reliable Transport Protocol) to communicate with neighbors.
  • It uses multicast for routing updates.
  • It supports IP [Both IPv4 and IPV6], Apple Talk and IPX routed protocols.
  • It includes subnet mask information in routing updates.
  • It supports route summarization and discontiguous networks.
  • It supports VLSM/CIDR.
  • It supports load balancing across the six routes for a single destination.
  • It supports trigger updates.

From introduction to till the preparation of this tutorial, EIGRP is ruling the world of routing protocols. The only negative about EIGRP was Cisco kept this protocol as proprietary protocol. In order to run this protocol, we had to buy all routers from Cisco. This thing was changed a little in 2013 when partial functionality of EIGRP was converted in open standard. Now we can also buy routers from other vendors along with Cisco, still running EIGRP on all routers.

Since EIGRP is hybrid protocol, it has advantages of both link state and distance vector protocol. It uses composite metric calculation formula to select the best route for destination. It sends partial or full update only when something is change in network. It maintains three tables for ultra-fast convergence.

  1. Neighbor Table
  2. Topology Table
  3. Routing Table

Neighbor Table

EIGRP shares routing information only with neighbors. To know who the neighbors are, it uses neighbor table. When a new neighbor is discovered, EIGRP would add its address and interface on which neighbor is connected in neighbor table. EIGRP uses separate neighbor table for each routed protocol.

Topology Table

EIGRP uses this table to store all routes which it learned from neighbors. It contains a list of all destinations and routes advertised by neighboring routers. EIGRP selects single best route for each destination from this list. That route goes in routing table. Remaining routes are marked as backup routes. EIGRP refers selected route as Successor and backup route as Feasible Successor. EIGRP uses separate topology table for each routed protocol.

Routing Table

EIGRP stores single best (Successor) route for each destination in this table. Router uses this table to forward the packet. There is a separate routing table for each routed protocol.

Protocol Dependent Modules

PDMs are the special feature of EIGPR. Through these modules EIGRP supports multiple network layer protocols. It maintains separate tables for separate routed (Network Layer) protocols. For example if you are using both (IPv4 and IPv6) versions of IP protocol, it will maintain separate IPv4/EIGRP and IPv6/EIGRP tables.

Metric

EIGRP uses metric to select the best route from all available routes for destination. Metric has five components.

  • Bandwidth
  • Load
  • Delay
  • Reliability
  • MTU

From these only bandwidth and delay are by default enabled.

RTP

EIGRP uses RTP to communicate with other EIGRP speaking routers. RTP (Reliable Transport Protocol) uses multicast and unicast to exchange the data with neighbors. It uses class D address 224.0.0.10 for multicast. It keeps track of each multicast it sends out. EIGRP maintains a list of the neighbors who have replied. If it doesn’t receive a reply from any neighbor, RTP will resend the same data using unicast. It will make 16 unicast attempts before declaring neighbor is dead.

DUAL

EIGRP uses DUAL (Diffusing Update Algorithm) to provide the fastest route convergence among all protocols. Route convergence includes:-

  • Selecting best route from all available routes
  • Supporting VLSMs
  • Dynamically recovering from route failure
  • Finding an alternative route if primary route goes down

DUAL uses topology table along with RTP to accomplish above tasks in minimal time. As we know EIGRP maintain a copy of all routes including neighbors in topology table, so it would be the first place to look for an alternative route in a route failure situation. If EIGRP does not find an alternative here, it will ask neighbors for help. If neighbors have any updates about asked route, they will reply back with that information. This strong mechanism allows DUAL to find and maintain the best routes for destination speedily.

Autonomous System

EIGRP shares routing information only with neighbors. In order to become a neighbor AS number must be matched. AS create a logical boundary for route information. By default router will not propagate route information outside the AS. For example a router which belongs to AS number 10 will not share routing information with the router that belongs to AS number 20 or any other AS numbers except AS number 10. For easy administration a large network may have multiple ASes.

Not all routing protocols understand the concept of AS. Luckily EIGRP not only understand the concept of AS but also supports multiple ASes. We can easily configure multiple AS instance with EIGRP to divide a large network in smaller segments. By default EIGRP routers will not share routing information between different AS.

Redistribution is used to exchange the route information between different ASes. When a route is learned through the redistribution, it has higher AD value than its original source. For example EIGRP has two AD values 90 for interior EIGRP and 170 for exterior EIGRP. Exterior EIGRP means EIGRP instance which has different AS number.

EIGRP Autonomous System

Administrative Distance

In a complex network, we may have multiple routing protocols running simultaneously. Different routing protocols use different metrics to calculate the best path for destination. In this situation router may receive different routes information for a single destination network. Routers use AD value to select the best path among these routes. Lower ad value has more trustworthiness.

AD valueProtocol / Source
0Directly connected interface
0 or 1Static route
90EIGRP (Interior)
110OSPF
120RIP
170EIGRP (Exterior)
255Unknown source

Let’s understand it with a simple example; a router learned two different paths for 20.0.0.0/8 network from EIGRP Interior and EIGRP Exterior. Which one should it select?

Answer of this question is hidden in above table. Check the AD value of both protocols. Administrative distance is the believability of routing protocols. Routers measure each route source on a scale of 0 to 255. 0 is the best route. 255 is the worst, router will never use the route learned by this source. In our question we have two protocols EIGRP Interior and EIGRP Exterior. EIGRP Interior has lower AD value than EIGRP Exterior. So its route will be selected for routing table.

That’s all for this part. In this introductory part we covered basic terminology used in EIGRP routing protocol. In next parts of this article we will explain these terms in more detail with examples.

Tuesday, January 19, 2021

Differences between Throughput and Bandwidth Explained tutorials

 


Differences between Throughput and Bandwidth Explained

This tutorial explains the differences between the throughput and bandwidth in detail. Learn what the throughput and bandwidth are and how they differ from each other.

Both throughput and bandwidth describe transmission speeds. Bandwidth describes the information-carrying capacity of a medium, while throughput describes the actual use of that capacity.

To understand the basic difference between throughput and bandwidth, think about a highway. If 24 cars can go through on a highway in a second, then the bandwidth of that highway is 24 cars per second.

But, in practice, this never happens. Cars can’t be driven in bumper-to-bumper mode. The actual number of cars that can go through depends on several conditions such as weather, road condition, and lights. If under given conditions only 20 cars can go through in a second, then the throughput of that highway is 20 cars per second.

The following image shows this example.

throughput and bandwidth

Let’s take one more example.

File size: 46 megabits

Ethernet overhead (the total of extra information which each data packet contains such as header and trailer): 10 megabits.

The total amount of data to be transferred: 56 megabits (46 megabits + 10 megabits)

Bandwidth (Maximum data transfer speed): 56 Mbps

Amount of data lost due to errors and acknowledgments: 28 Mbps

Throughput: 56 Mbps - 28 Mbps = 28 Mbps

The time it takes to transfer the entire file: 56 megabits/28 Mbps = 2 seconds

Throughput always remains lower than the bandwidth. Because of this, provides usually advertises connection speed in up to form such as; up to 100 Mbps, up to 1 Gbps, etc.

Next time, when you subscribe for a new Internet connection, subscribe for a connection that offers a higher bandwidth than your requirement. For example, if you require 1Gbps bandwidth, subscribe for a connection that offers a bandwidth rate of 1.25 Gbps or higher.

Measuring throughput and bandwidth

Computer networks use two types of signals; analog and digital for data transmission. The throughput and bandwidth of digital signals are measured in the bit rate. A bit rate is the number of bits transmitted per second, such as 1000 bits per second or 1Kbps.

The following table lists the common bits rate of digital signals used in computer networks.

Bits RateDescription
1bps1 bit per second
1Kbps1000 bits per second
1Mbps1,000,000 bits per second
1Gbps1,000,000,000 bits per second
1Tbps1,000,000,000,000 bits per second

The throughput and bandwidth of analog signals are measured in the baud rate. A baud rate is the number of symbols transmitted per second. A symbol is a voltage, frequency, pulse, or phase change in the analog transmission.

Calculating bandwidth of analog signals

The bandwidth of analog signals is computed by subtracting the lower frequency from the higher one. For example, if a cable can carry frequencies from 300 Hz to 3300 Hz, then the bandwidth of that cable is 3000 Hz (3300 - 300).

Let’s take one more example, a human can hear a signal of frequency range 300 to 3000. So the bandwidth of a human voice is 2700 Hz (3000 - 300).

Frequency rangeUsed by
535 kHz to 1605 kHzAM Radio stations
88 to 108 MHzFM Radio stations
108 to 174 MHzVHF Cable stations
174 to 216 MHzVHF television stations
216 to 470 MHzUHF Cable stations
470 to 890 MHzUHF television stations
230MHz to 3 THzRadar

A higher frequency represents a larger bandwidth. A larger bandwidth provides faster transmission.

Common factors that affect bandwidth and throughput

Transmitting device
A transmitting device converts data into signals and load signals on the medium. A slow transmitting device can lower the throughput rate. For example, suppose, a cable of 100Mbps bandwidth is connected with a NIC that can transmit data at the rate of 10Mbps. In this case, even the bandwidth of the cable is 100Mbbps, the bandwidth of transmission will be 10 Mbps and the actual data transmission rate (throughput) will be even less.

Distance
Signals lose strength as they travel on a medium. Because of this, the throughput of a medium decreases as the distance increases. Amplifiers (for analog signals) and repeaters (for digital signals) are used to increase signals’ strength.

Environment
When signals travel through a medium, their environment affects them. For example, EMI (electro-magnetic-interface) fields and cross-talk affect digital signals, noise and attenuation affect analog signals, and weather and obstacles affect radio waves.

That’s all for this tutorial. If you like this tutorial, please don’t forget to share it with friends through your favorite social network

How to Configure and use Linux as a Router tutorials

 


How to Configure and use Linux as a Router

This tutorial explains how to enable IP forwarding in Linux. Learn how to use a Linux system as the router in detail through the practical example.

Each computer, in the LAN network, uses a unique software address that is known as the IP address. For easier management and several technical reasons, IP addresses are grouped into the IP networks and the IP networks are further categorized into the five IP classes.

By default, an IP address of an IP network can't communicate with the IP address of another IP network. This means, if you have two devices and both use IP addresses from different IP networks, they can't communicate with each other.

Due to any reason, if computers in your network are configured with the IP addresses of the different IP networks, then to connect them, you need a device that supports the IP forwarding. IP forwarding is a feature that allows communication between the devices of different the IP networks.

Router is a special device that not only provides the IP forwarding as the main function but also supports several other IP based features such as; packet filtering, voice over IP, IP firewall, etc.

Router is an expensive device. Configuring it is also a complex task. Not every network, especially the small and home office network, can afford it.

Linux provides a zero-cost solution for the IP forwarding. If you have a Linux system in your network, you can use it for the IP forwarding. The below section explains this process step by step with a practical example.

LAB setup

For demonstration purpose, I will use three systems named as; Linux (RHEL 7.2), PC-A (Windows 7), and PC-B (Ubuntu 18.4). I will use the Linux system as the router and will use the remaining two systems (PC-A and PC-B) to simulate the two different networks.

The following image shows the IP configuration of the PC-A (Windows 7).

ip configuration on windows testing system

The following image shows the IP configuration of the PC-B (Ubuntu 18.04).

ip configuration on ubuntu testing system

Since the process of setting IP address varies in each OS and you can use any OS to simulate the different networks, it's not feasible for me to provide step by step instructions for each OS. However, if you are using the Linux system for testing, you can follow the same steps which I will use to configure the IP address on my Linux system.

Setting IP configuration on Linux system

For this section, I assume that you have two or more PCs configured with different IP networks. If you have multiple PCs in each network, make sure each PC of each network uses the same default gateway IP address.

The following image shows my LAB with IP configuration.

practice lab with ip configuration

Make a list of all gateway IPs which you assigned in your network. For example, in my LAB I have two networks and the default gateway IPs of both are; 192.168.1.1 and 172.168.1.1.

Now, configure all these gateway IP addresses in the Linux system. You can use an individual network interface (LAN) for each gateway IP or can use a single network interface for all gateway IPs. For example, in my LAB, I have two gateway IPs. I can assign both gateway IPs to a single network interface or can assign them to two separate network interfaces individually.

Since Linux allows us to configure multiple IP addresses on a single network interface, the second option would be a waste of resources.

To configure gateway IPs on Linux, use the following steps.

Login from the root account and run the nmtui command.

nmtui command

Select "Edit a connection" option and press the Enter key

edit a connection option

Select available Ethernet (network interface) from the left pane and the Edit option from the right pane and hit the Enter key.

select network inteface for editing

Set IP configuration as explained in the following image.

set ip configuration

When adding IPs, in step2, make sure you add IP with the subnet-mask in slash notation. Slash notation is the other way to write the subnet mask along with the IP address. To know more about the slash notation and how to make or use it, check this tutorial.

Subnetting Tutorial - Subnetting Explained with Examples

Select the Quit option and press Enter key.

quit for editing

Restart the network service.

systemctl restart network

The nmtui tool, which we used to set the IP configuration, automatically applies all changes when quit form it. So, technically we don't need to restart the network service. We use this command to verify that everything is configured properly.

Confirm the IP configuration. To print the IP configuration of all network interfaces, use the "ip addr" command.

ip addr show

At this point, systems from different networks can access the default gateway, but they can't access the system of another network. To verify connectivity between systems and gateway, you can use the ping command.

The following image shows connectivity between PC-A and the default gateway.

testing connectivity between windows and linux

The following image shows connectivity between PC-B and the default gateway.

testing connectivity between ubuntu and linux

Enabling IP forwarding on Linux

Run the following command to enable the IP forwarding.

#echo "1" > /proc/sys/net/ip4/ip_forward

enabling ip forwarding temporary

This command enables IP forwarding in the current session. It does not make a change in that configuration file which Linux reads at the startup. By default, the state of IP forwarding is disabled in the configuration file. It means Linux will automatically disable the IP forwarding again when you will restart the system.

To enable IP forwarding permanently, run the following command.

#echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf

enabling ip forwarding permanently

Once the IP forwarding is enabled, Linux works as the router. It forwards all incoming data packets to their correct destination.

To verify this, test connectivity between the PCs of different networks.

The following image confirms connectivity between PC-A and PC-B from the Windows (PC-A) system.

verifying linux as router from windows

The following image verifies connectivity between PC-B and PC-A from the Ubuntu (PC-B) system.

verifying linux working as router from ubuntu

If you are following my LAB setup, make sure you also disable the windows firewall on the Windows system otherwise you will not get the response of the ping command from the Windows system.

That's all for this tutorial. If you like this tutorial, please don't forget to share it with friends through your favorite social channel

Linux System Administration Commands tutorials

 

Linux System Administration Commands Explained with Examples

This tutorial explains basic Linux system administration commands in detail. Learn essential Linux commands for system administration through practical examples.

Listing the currently logged-in users

When a user logged-in, Linux stores his information in the /var/run/utmp file. This information includes his username, terminal number and login time. This information is stored in raw text format. To read this file, we can use the following command.

#cat /var/run/utmp

Since information is stored in raw text format and by default, when displaying text, the cat command does not change the format of text, the output of this command may look messy. To view the properly formatted output, you can use the following two commands.

#who
#who am i

Both commands work in similar fashion. Both commands read raw text from the /var/run/utmp file and properly format that before displaying on the command prompt. The only difference between both commands is that the who command displays information about all users while the who am i command displays information only about the user who executes it.

Following image shows an example of all three commands.

who command example

Knowing the last successful login, failed login attempts and system reboot time

Just like keeping track of active users, Linux also keeps the record of previous successful login sessions, failed login attempts and last system reboots. It stores information about previous successful login sessions in the file /var/log/wtmp. To store information about the failed login attempts, it uses the file /var/log/btmp.

You can read these files directly or can use the following commands.

#last
#last reboot
#lastb

The last command prints the list of users who had successfully accessed the system. This command does not tell you what user did after login. It only tells you that which user logged-in at what time on which terminal and how many time he stayed login.

The last reboot command prints the last reboot time of the system. Through this command, you can know when the system was restarted or rebooted last time.

The lastb command prints the list of failed login attempts. Through this command, you can know which user account was used with the wrong password to login on which terminal and what time.

Following image shows example of above commands.

last command

Getting detailed information about active users

If you need more detailed information about active users including what they are doing, you can use the w command. The w command provides two types of information; System specific and User specific.

System specific information

  • Current time of day
  • System uptime
  • Total number of active users (currently logged in)
  • Average load (number of jobs in run queue)

User specific information

  • User login name
  • Terminal number from which user is logged in
  • Host name (Name of system where user is logged in)
  • Login session time (the time the user stayed logged-in)
  • Last activity time (the time since the user last typed anything)
  • JCPU time (the time taken by all process excluding past background jobs.)
  • PCPU time (the time taken by current process)
  • Current process

Following image shows a practical example of the w command.

w command

Knowing the system uptime

To know how long the system has been up, you can use the uptime command. Besides system’s uptime, it also provides the following information:-

Current system time, number of currently logged-in users, system load average for past 1, 5 and 15 minutes respectively.

As explained above, same information can also be obtained from the w command. The difference between both commands is that the w command provides this information along with the information of active users.

If you want to obtain both types of information, use the w command. If you want to get system specific information only, use the uptime command.

Following image shows both commands with output.

uptime command

Viewing login name/username

To view the login name, you can use either the logname command or the whoami command. Both commands display the username. The difference between both commands is that the logname command displays the username of that user account which was used to login while the whoami command displays the username of the current user account.

Let’s take a simple example to understand the difference between both commands. Login from a user account and use both commands to print the username. Both commands will display the same result.

Now, change user account through the su command and run both commands again. This time the whoami command will display the username of new user account while the logname command will still display the old login name.

Now logout from the new account and run both commands again. This time both commands will display the same result again.

Following image shows this exercise.

loginname command

Knowing hostname, kernel version number, processor type and hardware architecture

You can use the uname command to view the basic system information such as hostname, operating system name, hardware platform and kernel information (name, version, built etc.) Without any option, this command only displays the operating system name. To view other information, you have to use the related option. Following table lists some common options with description.

OptionDescription
-skernel name
-nnode name
-rkernel release
-vkernel build date
-mhardware name
-pprocessor type
-ihardware platform
-oOS name
-aall above information

Following image shows two examples of the uname command.

uname command

Viewing and setting the hostname

You can view the hostname of system through two commands; the hostname and hostnamectl. To view the hostname only, use the hostname command. To view the detailed information about hostname along with the hardware information, use the hostnamectl command.

The hostnamectl command also allows us to set the hostname. To change the hostname, use the set-hostname option with this command.

Following image shows how to use both commands practically.

hostname command

Viewing and setting the date and time

To view or set the date and time, we have two commands; date and timedatectl. Without any option, both commands display the current date and time. The date command provides basic information while the timedatectl provides detailed information.

To change the date and time from the date command, use the date command as explained below.

# date --set "YYYY-MM-DD HH:MM:SS"

To change the date and time from the timedatectl command, use the timedatectl command as explained below.

# timedatectl set-time YYYY-MM-DD
# timedatectl set-time HH:MM:SS

Following image shows both commands with examples.

date command

Finding the command location

Every command in Linux has an associated script file. When we type a command at command prompt and hit the Enter key, Shell finds the related script file and executes it. To know the location of any command’s associated script file, you can use the which command.

Following image shows an example of the which command.

which command

Counting the lines, words and characters

To count the lines, words and characters of a file, you can use the wc command. The wc command counts and displays the number of lines, words and characters of the supplied file.

wc command

Viewing all running processes in the system

The ps –ef command lists all running processes in the system. To figure out whether a particular process is running or not, you can filter the output of this command through the grep command. For example to figure out whether the Firefox is running or not, you can use the following command.

#ps -ef |grep firefox
Terminating a halted process

Linux assigns a unique process ID to each running process. You can use this process ID to terminate a halted process. To know the process ID of halted process, use the following command.

#ps -ef |grep [name of halted process]

Once you know the process ID of halted process, use it with the kill command to terminate that process.

Following image illustrates the finding and killing process of the Firefox web browser process.

ps command

Viewing the real time usage of hardware resources

To view the real time hardware usage, you can use the top command. The top command displays the real time usage of hardware resources such as CPU and memory.

Following image displays the use of the top command.

top command

To terminate the command, press the q key.

Getting detailed hardware information

To get the detailed hardware information, you can use the lspci, lsscsi, lsusb and lscpu commands.

lspci :- This command provides information about the pci buses and their attached devices.

lsscsi :- This command provides information about the scsi devices.

lsusb :- This command displays information about the USB ports and attached devices.

lscpu :- This command displays information about the CPU.

Following image shows all above commands with output.

hardware info

That’s all for this tutorial. If you like this tutorial, please don’t forget to share it friends through you favorite social network.