gns3-server icon indicating copy to clipboard operation
gns3-server copied to clipboard

Adding a link to a stopped neighbor leads to changing interface state to UP

Open andrei-korshikov opened this issue 4 years ago • 4 comments

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

  1. Tick Replicate network connection states in Qemu.
  2. Add a link from running node to stopped one.
  3. See interface state on running node becomes up. So there is no sense in Replicate network connection states in Qemu checkbox, 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 down state: image image

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

Related issue Link becomes down when one host is down https://github.com/GNS3/gns3-gui/issues/3099

andrei-korshikov avatar Sep 19 '21 12:09 andrei-korshikov

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?

grossmj avatar Sep 20 '21 10:09 grossmj

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.

andrei-korshikov avatar Sep 20 '21 12:09 andrei-korshikov

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: image

  • No links in GNS3, all links are in DOWN state in the VM: image image

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

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?

andrei-korshikov avatar Oct 07 '21 11:10 andrei-korshikov

@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.

grossmj avatar Oct 08 '21 09:10 grossmj