Scale App - Static MAC Address

NobelDwarf

Cadet
Joined
Feb 27, 2024
Messages
4
Hi All,

I am running TrueNAS-SCALE-23.10.2 setup my first app (docker) on the server and looking for a static IP. I found the setting in app settings to set but each time the app starts it gives a different mac address is there any way to set this so it keeps the same so the router can handle it and keep traffic information?

Thanks
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Routers don't do work with MAC addresses, they work with IP addresses, so it's not clear exactly what you want to do.
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
You should elaborate a bit more on the setup and what you are trying to configure.

Routers don't do work with MAC addresses, they work with IP addresses,
Don't they (or at least some) use MAC addresses as an identifier for DHCP reservations?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
A router routes, a DHCP server hands out leases. Some devices combine both of those and other features.
 

NobelDwarf

Cadet
Joined
Feb 27, 2024
Messages
4
With my current setup I have a UDMP which I use to control all the static IPs on my network by using their MAC address which works for everthing as you can see what it shows below. But with the docker (app) it giving it a random MAC each time it starts. So only way is the edit the app settings for a static IP. The other screenshot is same way but instead of an app (docker) its using the VM instead.

1709070981348.png
1709071186585.png
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
With my current setup I have a UDMP which I use to control all the static IPs on my network by using their MAC address
That's not a static IP, that's a DHCP reservation. And that's not a great way of doing things for servers and stuff, so you really should set a suitable static IP address for the application.
 

NobelDwarf

Cadet
Joined
Feb 27, 2024
Messages
4
Yea I know it’s DHCP reservation which gives the an IP based on the MAC address that’s given out by the device. Is there a way to make the docker container have a static or set MAC address so it will be the same no matter how many times the docker is restarted?
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Just out of curiosity, what docker app are you referring to?

Don't the truenas apps have the IP of the server itself by default? (I only use one, so I may be wrong). And usually the docker containers will also have that IP, at least my containers that run on a VM (for that you get s unique IP though) don't have a different IP.

I manage the limitation of all containers having the VM IP with a reverse proxy. I didn't bother setting static IPs for MZ VMs, I just use DCHP reservations from my Fritzbox, but you can set the Mac address of the VM NIC in case it changes in truenas so they keep their IP.
 

NobelDwarf

Cadet
Joined
Feb 27, 2024
Messages
4
Yea it has a internal nic for the docker server then if you edit the config you can add one of the physical NICs which I have and set a static IP on this NIC but the MAC is random each time the docker is started. I have attached the settings for the NIC below. Would it be easier to redo it in a VM which then can control the NIC?

1709104618138.png
 

Bonov

Cadet
Joined
Feb 20, 2024
Messages
1
I have the same question... How to fix MAC address. I'm using router with devices identification on their MAC.
 
Top