Unable to use my static IP

I have a Intel network card with two interfaces:
1: enp2s0f0: inet 192.168.2.242/24 brd 192.168.2.255 scope global enp2s0f0
2: enp2s0f1: inet 192.168.2.77/24 brd 192.168.2.255 scope global dynamic enp2s0f1

I have these interfaces configured as I would like them. enp2s0f0 staticallty set to 192.168.2.242 and enp2s0f1 dynamically set from DHCP.

I am able to access the webui and apps from the 192.168.2.77 address but I want to access them from the address I statically set. I do get a response from 192.168.2.242 when I ping the address and the static address shows that it is assigned to the network card when I run the “ip addr” command in shell.

For refrence this was my previous configuration looked something like this:

  • enp2s0f0 (Intel Corporation Ethernet 10G 2P X540-t Adapter)

    • MAC: a0:36:9f:47:bf:3c
    • MTU: 9000
    • IP: 192.168.2.242 (Static)
  • enp2s0f1

    • MAC: a0:36:9f:47:bf:3e
    • MTU: 9000
    • IP: NONE
  • br5: enp2s0f1

    • Members:
    • IP: DHCP

Multiple network interfaces on the same subnet is an invalid configuration:

2 Likes

You can’t do it this way. If you have more than one adapter and want failover you can add a bridge interface that uses the two real interfaces. With TrueNAS, give it a device name (e.g. br0) but but leave off the full path when creating the devcie in the middleware. If you try to add /dev/br0 or similar it will be unhappy. Do all your adapter and IP reconfiguration from the TrueNAS CLI, though, as I’ve found the WebUI to be unreliable for more complex network reconfiguration activities.

You can also only have one real or virtual (e.g. aggregated or bridged) interface configured for DHCP on the same network. If you try to add more than one on the client it will give you appropriate errors. If you opt to bridge With TrueNAS, you’ll want to add the virtual interface and then have that device use DHCP. If you want to assign more than one address on the same network to your virtual interface, the TrueNAS middleware calls them “aliases.” On Scale, this is similar to what you would do with ip address add, so that’s where you’d put your non-DHCP addresses if you want them.

I’ve had to do aliases on bridged interfaces with TrueNAS for the same reason, and also to handle issues where TrueNAS doesn’t ensure a fixed MAC address or your DHCP server is trying to reserve the MAC for a different system interface. This is often an artifact of having used the non-virtual interfaces directly at some point or doing a full reinstall which will create a new MAC for your virtual interface, but unborking that without aliases may depend heavily on other services in your network.