Ansible: Network topology and configuration

We are continuing our journey with Ansible. The first part of my Ansible journey is available here.

My Network topology:

 

 

To access my virtual routers in GNS, I need to configure additional routing on my host machine. The IP network ‘10.0.0.0/24’ will be reachable via the gateway IP address ‘192.168.122.1’

virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:52:55:3e txqueuelen 1000 (Ethernet)
RX packets 85 bytes 22804 (22.8 KB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 162 bytes 30867 (30.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

 

Adding new routing on Ubuntu:

sudo route add -net 10.0.0.0 netmask 255.255.255.0 gw 192.168.122.1

 

Verifying the Routing Table:

netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlp3s0
10.0.0.0 192.168.122.1 255.255.255.0 UG 0 0 0 virbr0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 virbr0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp3s0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0

 

My topology in GNS3:

 

Configuring network for my virtual machine with Ansible:

Got it! Let’s do something with Ansible!

Continue reading.

 

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *