0

I recently connected my second NIC on my server (running Ubuntu server LTS 22.04) and changed /etc/netplan/00-installer-config.yaml as described below to add multiple IPs to the second NIC (eno1 has IP 10.0.30.21 assigned from DHCP reservation).

Afterwards, service A (in a docker container) could no longer by reached by service B (in a VM on the same machine) at service A's IP (10.0.30.21), despite the fact that (1) I could access them and the control them just fine using that IP, and (2) I used the

   ports:
      - "10.0.30.21:8080:8080"
      - "10.0.30.21:8443:8443"
      - "10.0.30.21:5911:5911"

syntax in my docker-compose file so they should just stay at 10.0.30.21:PORT.

Service A seemed to become discoverable by service B at an IP like 172.19.0.12, which looks like a docker network IP.

What's more, service B (DHCP reservation: 10.0.30.61) was also reachable at that internal IP through browser, but no longer worked when using the FQDN (I use nginx via the linuxserver/swag docker container).

I'm thinking I did something wrong with my netplan, as I'm far from an expert on this, I mostly just followed instructions, e.g., this. So I'm not really sure what I am doing wrong here.

"old" netplan (works, but only one IP per NIC):

network:
  ethernets:
    eno1:
      dhcp4: true
    eno2:
      dhcp4: true
  version: 2
  bridges:
    br0:
      dhcp4: yes
      interfaces:
             - eno1
      parameters:
        stp: true
  vlans:
    vlan40:
      accept-ra: no
      id: 40
      link: eno2

that I switched to this (= problems, and lots of them) - none of the IPs conflict with anything in the DHCP server:

network:
  ethernets:
    eno1:
      dhcp4: true
    eno2:
      addresses:
        - 10.0.30.22/24
        - 10.0.30.23/24
        - 10.0.30.24/24
        - 10.0.30.25/24
  version: 2
  bridges:
    br0:
      dhcp4: yes
      interfaces:
             - eno1
      parameters:
        stp: true
  vlans:
    vlan40:
      accept-ra: no
      id: 40
      link: eno2
Aephir
  • 157
  • 6

0 Answers0