Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNS3 2.2.50 docker containers sometimes don't get the configured MAC address #3651

Open
JKPla opened this issue Oct 25, 2024 · 3 comments
Open

Comments

@JKPla
Copy link

JKPla commented Oct 25, 2024

Describe the bug
First of all thank you for fixing MAC address assignments for docker containers in 2.2.50.
Previously duplicate MACs were causing major headache for me.

However, I'm still occasionally having an issue where a container doesn't get its configured MAC but a random address, typically fe:1f:64:fc:1e:fa.
Often multiple containers are affected and they all seem to get the same MAC, leading to conflicts.

Stopping and starting the container fixes the issue.

My project contains 26 containers + 14 QEMU VMs.
The containers use bullseye-slim based, ipterm derived images, with additional packages installed.
They are all configured with 2 network adapters.

I have "Open this project in the background when GNS3 server starts" and "Start all nodes when this project is opened" in case this is a startup timing related problem.

GNS3 version and operating system (please complete the following information):

  • OS: Ubuntu 22.04.5
  • GNS3 version 2.2.50
  • GNS3-server itself is running on ESXi 7

To Reproduce
Steps to reproduce the behavior:

  1. Start project and all nodes
  2. Check container MACs

Additional context
A container was created with

  • eth0: fe:1f:64:fc:1e:fa
  • eth1: 02:42:eb:78:b9:01

gns3-server log snippet on the affected node

gns3server[1149]: 2024-10-25 10:26:08 INFO base_node.py:701 Starting new uBridge hypervisor 0.0.0.0:45781
gns3server[1149]: 2024-10-25 10:26:08 INFO hypervisor.py:169 starting ubridge: ['/usr/bin/ubridge', '-H', '0.0.0.0:45781']
gns3server[1149]: 2024-10-25 10:26:08 INFO hypervisor.py:171 logging to MASKED/ubridge.log
gns3server[1149]: 2024-10-25 10:26:08 INFO hypervisor.py:179 ubridge started PID=12065
gns3server[1149]: 2024-10-25 10:26:08 INFO base_node.py:704 Hypervisor 0.0.0.0:45781 has successfully started
gns3server[1149]: 2024-10-25 10:26:08 INFO ubridge_hypervisor.py:83 Connected to uBridge hypervisor on 127.0.0.1:45781 after 0.1027 seconds
...
gns3server[1149]: 2024-10-25 10:26:08 INFO docker_vm.py:978 Created adapter 0 with MAC address 02:42:eb:78:b9:00 in namespace 11748
gns3server[1149]: 2024-10-25 10:26:08 INFO docker_vm.py:978 Created adapter 1 with MAC address 02:42:eb:78:b9:01 in namespace 11748
gns3server[1149]: 2024-10-25 10:26:08 INFO docker_vm.py:554 Docker container 'MASKED' [MASKED] started listen for telnet on 5076
gns3server[1149]: 2024-10-25 10:26:08 INFO web_log.py:211 127.0.0.1 [25/Oct/2024:10:26:07 +0000] "POST /v2/compute/projects/MASKED/start HTTP/1.1" 204 189 "-" "Python/3.10 aiohttp/3.10.10"

ubridge.log

uBridge version 0.9.19 running with libpcap version 1.10.1 (with TPACKET_V3)
Hypervisor TCP control server started (IP 0.0.0.0 port 45781).
UDP tunnel connecting from local port 20158 to IPv4 address 127.0.0.1 on port 20159
Destination NIO listener thread for bridge0 has started
Source NIO listener thread for bridge0 has started
send: Input/output error
UDP tunnel connecting from local port 20166 to IPv4 address 127.0.0.1 on port 20167
Source NIO listener thread for bridge1 has started
Destination NIO listener thread for bridge1 has started
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error
send: Input/output error

@JKPla JKPla added the Bug label Oct 25, 2024
@grossmj
Copy link
Member

grossmj commented Oct 27, 2024

However, I'm still occasionally having an issue where a container doesn't get its configured MAC but a random address, typically fe:1f:64:fc:1e:fa.

Have you configured this MAC address in the template or the node properties?

grossmj added a commit to GNS3/gns3-server that referenced this issue Oct 28, 2024
@JKPla
Copy link
Author

JKPla commented Oct 28, 2024

In the node properties though I haven't changed anything, the nodes have their MACs set automatically by GNS3.
I checked the template as well, it only has blanks in the base MAC field.

@grossmj
Copy link
Member

grossmj commented Nov 25, 2024

Have you tried with version 2.2.51? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants