Home > Connect Python to GNS3 for Automation in Win10

Connect Python to GNS3 for Automation in Win10

July 26th, 2019 in Knowledge Go to comments

3. Assign an IPv4 address to the new loopback interface

We need to assign an IPv4 address for this interface so right-click on this icon and choose “Properties”.

Win10_Network_Connections.jpg

Double click on “Internet protocol version 4”:

Win10_Assign_IP_Address.jpg

Now we need to assign an IPv4 address that is on the same subnet with R1 (10.1.1.1/24) above. So we will assign 10.1.1.2/24 for this loopback interface.

Win10_Assign_IP_Address.jpg

In fact we don’t need to assign the “Default gateway” as currently we just want our real laptop to communicate with the virtual router in GNS3.

Now start GNS3 and create a “Cloud” node and right-click, choose “Configure”. We will see our new created Loopback interface there. Click “Add” button to add it to our “Cloud”.

Configure_Loopback_GNS3.jpg

So we successfully assign IPv4 address of 10.1.1.1/24 for our virtual router R1 in GNS3 and assign IPv4 address of 10.1.1.2/24 (which is on the same subnet) for our Loopback interface on our real laptop. Let’s make some verification in the next step.

3. Verify the connection between our laptop and router in GNS3

We should verify if the ping works well between them so we should ping from R1 to our loopback interface and vice versa.

+ Ping from Loopback interface to R1:
Open command prompt in Win10 (press Windows + R) to open “Run” dialog and type “cmd”:

Win10_command_prompt.jpg

Now type “ping 10.1.1.1” which is the IPv4 address of FastEthernet0/0 on the virtual router. The ping should work.

Win10_Ping_router.jpg

+ Ping from R1 to Loopback interface:

Next we jump back to R1 and type “ping 10.1.1.2” which is our loopback interface IPv4 address. The ping should also work:

R1_ping_Loopback.jpg

We can turn on ICMP debugging on R1 with the command “debug ip icmp” to see if the ICMP packets go to the correct place.

Note: The ping from R1 to loopback interface may not work if you are running an antivirus software or use Windows Firewall so please make sure to disable your antivirus software or firewall in this case.

Everything is now ready for our Python code, which we will learn in the next part.

Comments (2) Comments
  1. GreggSnume
    October 9th, 2019

    Хорошая статья

  2. Karol Garrido
    November 4th, 2022

    Where are you?