**Network Automation using Ansible for EIGRP Network**

\*\*Double blind review, please do not include authors information in this version \*\*

Received Date: \*date

Accepted Date: \*date

Published Date: \*date

**HIGHLIGHTS**

  - All the scripts are configured on the Network Automation using Ansible Playbook.

  - YAML file has some rules that need to be obedient to make sure the script can be run.

  - Develop scripting to push the configuration of EIGRP routing protocol, and EIGRP advance configuration from the Network Automation Docker to the three routers in GNS3 environment.

  - The scripting has been successfully automated and configured which all the configurations is verified in the testing phase.

ABSTRACT

*At this time, there is a huge need for automation. As a result, network automation has evolved into a solution that emphasizes efficiency in all areas. Furthermore, communication and computer networks rely on a platform that provides necessary technological infrastructure for packet transfer through the Internet using routing protocols. The Enhanced Interior Gateway Routing Protocol (EIGRP) is a hybrid routing protocol that combines the properties of both distance-vector and link-state routing methods. The traditional technique of implementing this EIGRP configuration, on the other hand, is inefficient compared to automating the network. The network administrator may also need some processes to be repeated without losing any configurations. As a result, Ansible is useful in assisting network administrators in automating and verifying EIGRP configuration. The purpose of this project is to automate the EIGRP routing configuration using Ansible. Ansible will be used as an automation tool to automate the EIGRP configuration in the GNS3 environment. The configurations will be focussed on assigning IP Address to the interfaces, EIGRP routing protocol, a default static route, and advanced EIGRP configurations. All the configurations will be run using Ansible scripting on Network Automation Docker and will be pushed to the devices. However, when implementing Ansible, there is no need to configure the scripts one by one. The network automation will interact and communicate with others routers via SSH. The results based on the ping connectivity between routers and verification of running configuration between traditional approach and automation scripting in Ansible playbook are compared to verify the accuracy of EIGRP configurations. As a result, the findings show that Ansible can be successfully deployed in a network with no errors. This automation tools basically can help network administrators improve their knowledge, minimize human mistakes, reduce time consuming and enable the device visibility across the network environment. Implementing EIGRP Authentication on all routers and configuring the router interfaces to utilize MD5 authentication for EIGRP can increase the Ansible functionality for future study.*

*Keywords: Network Automation, Ansible, GNS3, EIGRP*

# INTRODUCTION

The need for automation is significant at this point. Hence, the network automation has become a solution provided today that prioritizes effectiveness in every area. The concept of network automation is focused on automating the management, deployment, testing, and activity of physical devices or virtual networks in a control node with a running program. It assists in performing several tasks which reduce the time consumption and eliminates potential mistakes since all configurations are written and performed in a script (Islami et al., 2020). Besides that, network automation is faster and efficient than traditional operations (Sawtell, n.d.). All tasks and processes are done automatically. Network configurations will be simplified into a file. The file used executes repetitive tasks and arranges the operation sequentially (Islami et al., 2020). The network automation process can be implemented using a tool such as Ansible. Ansible is ideal for all environments, from small configurations with a few instances to enterprise environments with several numerous cases (J.Wijaya, 2018). Nowadays, the Internet has revolutionized the way in communication networks. Communication and computer networks rely on a platform that enables the technological infrastructure to transmit packets over the Internet using routing protocols. Enhanced Interior Gateway Routing Protocol (EIGRP) is a hybrid routing protocol with both distance-vector and link-state routing protocol characteristics. It is one of the types of routing protocols. EIGRP is a dynamic routing protocol for disseminating network topology to the adjacent routers in practical networks and is used to determine the best path to deliver the packet between any two layers 3 devices and to note them in their routing table. It has to establish a neighbour relationship before updates are sent and support Variable-Length Subnet Masking (VLSM) (Goyal, 2018).

# 

# RELATED WORKS

**Network Automation**

According to Islami et al., (2020), the paper studied about the implementation using network automation in Raspberry Pi to configure network devices. The studies used the Ansible tool to complete the tasks. The result concluded that using network automation can reduce the time for equipment configuration, maintain and reduce human error in configuration syntaxes, and how the device is configured. Their study indicated that Raspberry Pi has a restriction with the Ansible version.

Based on research paper by J. Wijaya (2018), the study is conducted to show scripting effectiveness in implementing network devices. The method used in this study is by using Ansible as an automation tool to configure the network device, the Ubuntu environment, and the CISCO IOS image. However, Ansible supports only Linux and not Windows environments. The study concluded that the network administrator just requires creating the right infrastructure and implementing automation scripting using Ansible without configuring each device themselves. Their project is quite similar hence the difference is our project focusing on EIGRP network configurations.

**Routing Protocol**

Okonkwo & Emmanuel (2020) has determined a comparative study of RIP, OSPF, and EIGRP using ring topologies on the GNS3 network emulator. Their study design of four, six, eight, until twenty routers is implemented for star and mesh topologies for EIGRP and OSPF routing protocol using a network simulator and Cisco hardware equipment. The limitation founded that it restricted to several network routers. Then, in convergence length, EIGRP has higher efficiency, the period when a connection fails, and new links are added to the network rather than the OSPF protocol for routing.

According to Manzoor et al. (2020), the research paper focused on finding the best path to each network connection. The analysis made with routing protocols EIGRP, OSPF, and BGP are used in this topology and configured route distribution on these routers. Different types of data traffic are generated for network convergence, throughput, and packet delay. However, the limitation is that EIGRP has been used in a small environment. From the study, EIGRP is better in convergence while OSPF is better in packet delay. There are some similarities between their project and this project. My project focuses on the configuration of EIGRP using Network Automation.

**Graphical Network Simulator-3 (GNS3)**

According to Mihăilă et al. (2017), the research project discussed how to show scripting effectiveness in implementing network devices. It is emulated the network topology using GNS3, Ubuntu Docker Container as a main feature and controlled the network devices using Paramiko and Netmiko. This study stated that the new programmatic method is supported only by newer devices. The finding from this study shows that the controllability of the network is extremely easy, and modification could be implemented faster. The project is quite similar my project, which is used the GNS3 emulator platform. However, my project is using another tool of Network Automation. Table 1.0 below shows the summary of the related works.

**Table 1:** Summary of Related Works

<table>
<thead>
<tr class="header">
<th>No</th>
<th>Author</th>
<th>Objectives</th>
<th>Method</th>
<th>Finding</th>
<th>Limitation</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>Islami et al., (2020)</td>
<td>Using automation to configure network devices.</td>
<td>Using Ansible, Raspberry Pi, GNS3 and YAML file</td>
<td><p>Reduces the time for equipment configuration,</p>
<p>easier to maintain and reduces human error</p></td>
<td>Raspberry Pi also has a restriction with Ansible version.</td>
</tr>
<tr class="even">
<td>2</td>
<td>Wijaya, (2018)</td>
<td>To show scripting effectiveness in implementing network devices</td>
<td>Using Ansible, Ubuntu environment and Cisco IOS</td>
<td>The network administrator can implement automation scripting using Ansible without configuring each device themselves.</td>
<td>The Ansible supports only Linux and not Windows environments</td>
</tr>
<tr class="odd">
<td>3</td>
<td>Mihăilă et al., (2017)</td>
<td>To show scripting effectiveness in implementing network devices</td>
<td>Using GNS3, Ubuntu Docker Container, Netmiko and Paramiko</td>
<td>The controllability of the network is extremely easy and modification could be implemented faster.</td>
<td>The new the programmatic method is supported only by newer devices.</td>
</tr>
<tr class="even">
<td>4</td>
<td>Okonkwo &amp; Emmanuel, (2020)</td>
<td>To make the comparative analysis of EIGRP and OSPF protocols focused on the convergence of networks</td>
<td>Using GNS3, Cisco IOS and Wireshark</td>
<td>EIGRP has a higher efficiency rather than OSPF</td>
<td>Restricted to several network routers</td>
</tr>
<tr class="odd">
<td>5</td>
<td>Manzoor et al., (2020)</td>
<td>To find the best path to each network connected</td>
<td>Using GNS3, Cisco IOS and Wireshark</td>
<td>EIGRP is better in convergence and OSPF in packet delay</td>
<td>EIGRP has been used in a small environment</td>
</tr>
</tbody>
</table>

# 

# METHODOLOGY

**Design and Development**

The design and development phase begins with installing all the software required to build the network topology in the GNS3 interface. The implementation starts with load the IOS image into the GNS3. Then, the topology will be created and evaluate. If the topology is appropriate, it will conduct with configuring the automation script. If not, the topology has to be modified. Next, load the script that has been configured into the devices and test the network to check if the network functioning or not. It also has to be modified if the network is not successful functioning. Figure 1 demonstrates the network topology of this project.

![](6118fe5a88823_media/media/image1.png)

**Figure 1**: Network Topology

**Preparing YAML Files**

There are some files which is related to YAML files must be created before push the scripting on the devices. There are consists of network interface configuration, ansible host and ansible configurations. The static IP address will be configured using *nano/etc/network/interfaces* command in the Network Automation Container. Figure 2 shows the network interfaces configuration.

![](6118fe5a88823_media/media/image2.png)

**Figure 2**: Network Interfaces Configuration

For Ansible Host file configuration, the file contains an inventory list that Ansible will use to determine where the task should be performed and communicate with one another through hostname by adding the IP address belonging to interface of the routers. Figure 3 and Figure 4 show the inventory list and host file.

![](6118fe5a88823_media/media/image3.png)

**Figure 3**: Inventory List

![](6118fe5a88823_media/media/image4.png)

**Figure 4**: Host File

Lastly for Ansible.cfg file configuration required to be configured. A few lines in the Ansible configuration file specified which inventory to utilize. Figure 5 shows the Ansible.cfg.

![](6118fe5a88823_media/media/image5.png)

**Figure 5**: Ansible.cfg

**Ansible Playbook Scripting**

The Ansible playbook is written in YAML format. Figure 6 shows the structure of Ansible Scripts. The playbook is a YAML file that contains the command order. Tasks, modules, and files are all part of a role's structure. The role is made up of a directory with subdirectories, each containing a main.yml file that describes the order in which operations should be done. And the modules are short programs that perform specific activities on the system. They can be used alone or as part of larger scripts known as playbooks.

![](6118fe5a88823_media/media/image6.png)

**Figure 6**: Structure of Ansible Scripts

The first Ansible scripting is the script for configuring EIGRP routing protocol. The topology has 3 routers and all the routers will be configured with the EIGRP routing command to enable EIGRP. The autonomous-system (AS) ID of 10 for all directly connected will be configured on all routers. The next scripting is the configuration and propagate a default static route. A default static route will be configured on R2 and propagate the route to all other routers. To propagate the default static route to other participating routers in the EIGRP process, use the redistribute static command. The last scripting is EIGRP fine tune. The bandwidth and EIGRP interface percentage and change the hello interval and hold timer for EIGRP interfaces will be configured. The IP bandwidth-percent command is used to change the amount of bandwidth percentage available to EIGRP.

**TESTING AND ANALYSIS**

There are four testing involve in this project. For first testing, the Ansible playbook scripting will be run on Network Automation Docker to check that all tasks such as IP address, loopback address, basic EIGRP are work efficiently using Ansible playbook. For second testing, the EIGRP operation testing will be conducted to verify the EIGRP configuration on Network Automation consists of EIGRP neighbors, routing protocol information, and routing table. The ping command and show run command will be applied. The third testing is default static route testing. This testing will be tested using a command to view the task of propagating a default static route script on the router. The last test is Fine-Tune EIGRP testing. This testing will be analyzed to check the bandwidth utilization, hello interval, and hold timer that has been configured using the Ansible playbook. Figure 7 shows the testing framework used in this project.

![Diagram Description automatically generated](6118fe5a88823_media/media/image7.png)

**Figure 7**: Testing Framework

**Ansible Playbook Results**

The playbook contains one play with five tasks, and the output is generated like the Figure 8. The result shows the 4 configurations in the target routers successfully changed. The configurations are included an interface IP address, a loopback IP address, and an EIGRP configuration.

![](6118fe5a88823_media/media/image8.png)

**Figure 8:** Result of Ansible Playbook

**EIGRP Operation Results**

Based on the Table 2 below, the routers can ping one another after EIGRP routing are configured. R1 can ping the R2 (192.168.0.62) and R3 (192.168.0.63). The ping results verify the successful connection.

**Table 2:** Ping Test Results

| Router | Item         | Description |
| ------ | ------------ | ----------- |
| R2     | 192.168.0.62 | Success     |
| R3     | 192.168.0.63 | Success     |

**Verification of EIGRP Neighbors**

The result of the IP address of each adjacent router and the interface that uses to reach the EIGRP neighbour can be verify with *show ip eigrp neighbors* command on R1. This command examined the neighbor table and confirmed the EIGRP had been formed and adjacent with R2 and R3 routers or determine when neighbors become active and inactive. Results of ansible-playbook *getEigrp.yml -u cisco -k* command also shows that task plays smoothly, and the result generated in Figure 9.

![](6118fe5a88823_media/media/image9.png)

**Figure 9**: EIGRP Neighbour Scripting

The comparison of both commands is shown in Table 3. This means that all the commands for *show ip eigrp neighbors* can be configured using traditional command and Ansible scripting.

**Table 3**: Testing Comparison

| Type               | Command                                   | Task    |
| ------------------ | ----------------------------------------- | ------- |
| Show run in router | show ip eigrp neighbors                   | Success |
| Ansible script     | ansible-playbook getEigrp.yml -u cisco -k | Success |

**Routing Protocol Information**

During the testing on R1, the show ip protocols command has been used to display information about the routing protocol operation. The output displays the configuration, including the protocol, process ID, and network. The IP address of the adjacent neighbors is shown in Figure 10.

![](6118fe5a88823_media/media/image10.png)

**Figure 10**: EIGRP Protocols

**Verification of EIGRP Routing Table**

The testing comparison result of both testing for *show ip route* and *ansible-playbook iproute.yml -u cisco -k* command is shown in Table 4. It is shown that the task also plays, and the result is generated.

**Table 4**: Testing Comparison

| Type               | Command                                  | Task    |
| ------------------ | ---------------------------------------- | ------- |
| Show run in router | show ip route                            | Success |
| Ansible script     | ansible-playbook iproute.yml -u cisco -k | Success |

**Verification of Default Static Route**

During the testing, the command *ansible-playbook playbookR2.yml -u cisco -k* to view the task of propagating a default static route that can be configured with Ansible script default static route on R2 tested with the command *show ip protocols* on R2 to verify the static route is being distributed using Ansible playbook or means that EIGRP included static routes in its EIGRP updates to other routers with the redistribute static command.

Table 5 shows the result for all routers using the *show ip route eigrp | include 0.0.0.0* command to view the default route’s statement. The result represented the static default route. For R1 and R3 the D\*EX indicate that they are external AS routes. The gateway of 0.0.0.0 indicates that there is no gateway for reaching the corresponding destination subnet. However, the administrative distance (AD) for all routers is 170.

**Table 5**: Default Route Statement

<table>
<thead>
<tr class="header">
<th>Type</th>
<th>Command</th>
<th>Administrative Distance</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>R1</td>
<td><p>Gateway of last resort is 192.168.1.2 to network 0.0.0.0</p>
<p>D*EX 0.0.0.0/0 [170/156160] via 192.168.1.2, 01:29:36, FastEthernet1/0</p></td>
<td>170</td>
</tr>
<tr class="even">
<td>R2</td>
<td>Gateway of last resort is 0.0.0.0 to network 0.0.0.0</td>
<td>170</td>
</tr>
<tr class="odd">
<td>R3</td>
<td><p>Gateway of last resort is 192.168.2.1 to network 0.0.0.0</p>
<p>D*EX 0.0.0.0/0 [170/156160] via 192.168.2.1, 01:30:42, FastEthernet1/0</p></td>
<td>170</td>
</tr>
</tbody>
</table>

**Verification of EIGRP Fine Tune**

Table 6 shows the results obtained during the Fine Tune EIGRP testing. The advanced EIGRP testing for bandwidth utilization, hello interval and hold time on R1 has been tested with the command of ansible-playbook *FineTune.yml -u cisco -k* on the network automation. The *show ip eigrp interfaces detail* command has been used to view the configuration *of FineTune.yml* on all routers. The results shows that the new bandwidth percentage is changed to 75 percent and the hello-interval is 60 seconds, and the hold time is 180 seconds for the interfaces Fa1/0 and Fa2/0. This means that the EIGRP uses no more than 75% of a link’s available capacity. For every 60 seconds, the router will send out a hello packet to confirm its neighbor relationship, and if it does not receive a response, it will wait 180 seconds before announcing that neighbor drop.

**Table 6**: Parameters Details on R1

| Interfaces | Hello-interval / seconds | Hold-timer / seconds | Bandwidth / percent |
| ---------- | ------------------------ | -------------------- | ------------------- |
| Fa0/0      | 5                        | 15                   | \-                  |
| Fa1/0      | 60                       | 180                  | 75                  |
| Fa2/0      | 60                       | 180                  | \-                  |
| Lo1        | 5                        | 15                   | \-                  |

**CONCLUSION AND RECOMMENDATIONS**

In conclusion, Ansible can be implemented in creating and configuring EIGRP in GNS3 to achieve the network automation concepts. Ansible is very simple to set up and too easy for everyone to understand the language. Network Automation can also help and easier to deploy and reduce the time for the network administrators to configure the scripting for each router one by one. Otherwise, it uses automating scripting in the playbook and Secure Socket Shell (SSH) to manage different nodes or communicate with network devices such as routers and switches. Ansible uses playbooks to deploy configuration changes and retrieve data from hosts in a network. The scripts that have been created will be saved on Network Automation Docker where the codes are written in YAML. Between the control node and the managed hosts, there is network communication, and then the playbooks contain play with tasks to be performed on the managed node, such as routers that will be run from the control machine. Specifically, there are many things that the network administrator needs other than EIGRP that can be automated and configured using Ansible. However, the password or an SSH key is the first thing that IT needed before managing the network automation of Ansible. When using Ansible, all the tasks that want to be automated on the Ansible playbook is human-readable data format and is agentless.

As a conclusion, the objective of the project has been achieved. The first objective is to implement the Network Automation of EIGRP routing configuration using Ansible. Ansible can be used to create and configure EIGRP routing in the network. The simulation tool of GNS3 as a simulation software can simulate the real networking configuration by configuring virtualized equipment such as routers. The IP configuration, basic EIGRP, and advanced EIGRP for the topology can be configured only using the Ansible playbook and configure on Network Automation Docker.

The second objective of this project is to verify the accuracy of the EIGRP routing configuration in GNS3. The accuracy is tested by ping test and show run command to show that the EIGRP information was successfully implemented using the Ansible playbook on Network Automation docker. The show run can be implemented on the router by SSH and using Ansible scripting written in YAML format. After the testing is done, the findings show that Ansible can be successfully deployed in a network.

There are some recommendations for future research to improve the project of Network Automation using Ansible. First, Ansible functionality can be increased by implementing the EIGRP Authentication on all routers and configure the router interfaces to use MD5 authentication for EIGRP authentication in advanced EIGRP. Another suggestion is to design and executes Network Automation with different scenarios running on a GNS3 architecture for future development. For example, it can implement EIGRP route filtering with ACL, OSPF, and others using Ansible. In addition, the future researcher can automate network devices using Ansible by adding more network devices such as servers, PC, firewalls, and other devices in topology for large networks

**REFERENCES**

Goyal, V. (2018). Review Paper on Comparison of RIP, OSPF and EIGRP Protocols Using Simulation. *International Journal on Future Revolution in Computer Science & Communication Engineering*, 4(4), 135–140.

Islami, M., Musa, P., KOMPUTASI, M. L.-J. I., & 2020, undefined. (2020). Implementation of Network Automation using Ansible to Configure Routing Protocol in Cisco and Mikrotik Router with Raspberry PI. Ejournal.Jak-Stik.Ac.Id, 19, 127–134.

Mihăilă, P., Bălan, T., Curpen, R., & Sandu, F. (2017). Network Automation and Abstraction using Python Programming Methods. MACRo 2015, 2(1), 95–103.

Manzoor, A., Hussain, M., & Mehrban, S. (2020). Performance Analysis and Route Optimization: Redistribution between EIGRP, OSPF & BGP Routing Protocols. Computer Standards and Interfaces, 68(July 2019), 103391.

Okonkwo, I. J., & Emmanuel, I. D. (2020). Comparative study of EIGRP and OSPF protocols based on network convergence. *International Journal of Advanced Computer Science and Applications*, 11(6), 39–45.

Sawtell, S. (2018). Day One: Automating Junos with Ansible, 2<sup>nd</sup> Edition, Juniper Network.

Wijaya, J. (2018). Network Automation using Ansible for Cisco Routers Basic Configuration.
