gns3-server
gns3-server copied to clipboard
Adding a link to a stopped neighbor leads to changing interface state to UP
GNS3 version and operating system:
- OS:
Arch Linux(Linux laptop 5.13.13-zen1-1-zen # 1 ZEN SMP PREEMPT Thu, 26 Aug 2021 19:14:35 +0000 x86_64 GNU/Linux) - GNS3 version
2.2.25 - no GNS3 VM or remote server
To Reproduce
- Tick
Replicate network connection states in Qemu. - Add a link from running node to stopped one.
- See interface state on running node becomes
up. So there is no sense inReplicate network connection states in Qemucheckbox, the node can't feel if the neighbor is down and erroneously believe the neighbor is constantly up.
Screenshots
-
No links, interfaces on re node are in
downstate:

-
Links were added, PC1 and pfe are still stopped, but interfaces on re became
up:

Related issue Link becomes down when one host is down https://github.com/GNS3/gns3-gui/issues/3099
This may because of the adapter type. For instance e1000 could report the link as always UP: https://github.com/GNS3/gns3-gui/issues/2821#issuecomment-520169971
What adapter type do you have?
I've seen this behavior both with e1000 and virtio-net-pci.
Look at my aforementioned screenshots. At the beginning there is no link between nodes, and e1000 adapter inside re node correctly reported the link as DOWN. Then I just added a link between re and pfe. At this moment pfe is still powered off, but the link on re is reported as UP.
I believe that link should be reported as UP not when I attach "virtual patch-cord", but only at the moment when the neighbor is "powered on" (started).
I understand that there are situations when links are always reported as UP and not change their state irrespective of what's going on in the topology. But in my current case we can see that the link state changes, just at the wrong moment.
I've made some experiments with Arch Linux VM and e1000, pcnet, virtio-net-pci and vmxnet3 adapters, and results are the same.
-
Here is my configuration, four different adapters, connection state replication is on:

-
No links in GNS3, all links are in
DOWNstate in the VM:

-
Adding links to stopped neighbors (powered-off VMs):

Now all states are UP, and also we can see LOWER_UP is present, indicating that physical (Ethernet) connection is active.
@grossmj Should I provide any additional info?
@grossmj Should I provide any additional info?
No, all good. It makes sense because nodes operate independently from other nodes, in short they don't know the state of other nodes (running, stopped etc.) This will have to wait for version 3.0 since there is some re-factoring needed to correctly support this.