I am having trouble connecting to routers inside my GNS3 VM from within the GNS3 VM itself. The GNS3 VM is essentially an Ubuntu 18.04 Virtual Machine that has the GNS3 service installed. This allows you to emulate routers inside the Ubuntu VM. So let's just call it an Ubuntu VM with routers running inside. Note: Ubuntu VM's host is Hyper-V but I don't see that playing a role here.
I was going to take this to the GNS3 forum but I believe this is a routing issue from the Linux side.
What I want: ping/connect to a router in the topology from the Ubuntu VM.
I connected a port from the router in the topology to eth1 of the Ubuntu VM and made sure that the router interface and Ubuntu-eth1 are in the same subnet.
Eth0 (10.1.1.2/24) goes out to the internet so I have a default gateway on it.
Eth1 (10.1.2.2/24) is for internal communication only, it only needs to reach the routers in the topology so no default gateway set, but I did setup routing so that anything going 10.1.2.0/24 goes to 10.1.2.1. But the problem is I cannot even ping 10.1.2.1.
mfatty@gns3vm:~$ sudo cat /etc/netplan/99_config.yaml network: version: 2 renderer: networkd ethernets: eth0: addresses: [10.1.1.2/24] gateway4: 10.1.1.1 nameservers: addresses: [22.214.171.124, 126.96.36.199] optional: true eth1: addresses: [10.1.2.2/24] routes: - to: 10.1.2.0/24 via: 10.1.2.1/24 optional: true mfatty@gns3vm:~$ ping -I 10.1.2.2 10.1.2.1 PING 10.1.2.1 (10.1.2.1) from 10.1.2.2 : 56(84) bytes of data. From 10.1.2.2 icmp_seq=1 Destination Host Unreachable From 10.1.2.2 icmp_seq=2 Destination Host Unreachable From 10.1.2.2 icmp_seq=3 Destination Host Unreachable mfatty@gns3vm:~$ ip route show default via 10.1.1.1 dev eth0 proto static 10.1.1.0/24 dev eth0 proto kernel scope link src 10.1.1.2 10.1.2.0/24 dev eth1 proto kernel scope link src 10.1.2.2 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
I've ran tcpdump on the UbuntuVM and it's not seeing any icmp packets. I ran icmp debug on Cisco router and it wasn't seeing pings come in either.
The weird thing is that if I use virbr0 interface of the Ubuntu VM and connect that to the router, they can talk to each other. But eth0 or eth1 does not work.
Thanks for the help in advance.