0

I have a central machine with Ubuntu 18.04 LTS Server installed that is connected to the internet via a static IP address, and I created a subnetwork with several (6) other computers (also with Ubuntu 18.04 LTS) connected to it via a PCI network card. They should all share the master's internet connection, which is assigned via a static IP. At this stage, my subnetwork is up and running correctly, however I am not able to share the internet connection of the master, despite my several attempts. Any help would be very appreciated. Here's some more details.

On the master, I set up a bridge using the following netplan yaml:

 network:
  version: 2
  renderer: networkd
  ethernets:
    enp4s0:
      addresses: [ xxx.xxx.xxx.200/24 ]
      gateway4: xxx.xxx.xxx.xxx
      nameservers:
        addresses:
          - "xxx.xx.xxx.xx"
          - "xxx.xx.xxx.xx"
    switchports:
      match:
        name: enp[4-8]*
  bridges:
    br0:
      interfaces: [switchports]
      addresses: [10.28.11.1/24]

Each "slave" machine is asking for a static address using:

network:
  version: 2
  renderer: networkd
  ethernets:
          enp4s0:
                  addresses: [ 10.28.11.24/24 ]
                  gateway4: 10.28.11.1
                  nameservers:
                          addresses:
                                  - xxx.xx.xxx.9
                                  - xxx.xx.xxx.10

I can correctly connect from the master to the slave using ssh and their static IP and I can connect between the slaves on the "10.28.11" (random number I picked to avoid conflict within my organization) network.

However, the slaves do not have access to internet.

This is my ifconfig output on the master:

br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.28.11.1  netmask 255.255.255.0  broadcast 10.28.11.255
        inet6 fe80::44d5:adff:feff:26fd  prefixlen 64  scopeid 0x20<link>
        ether 46:d5:ad:ff:26:fd  txqueuelen 1000  (Ethernet)
        RX packets 4467  bytes 560333 (560.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1835  bytes 186596 (186.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet xxx.xxx.xxx.200  netmask 255.255.255.0  broadcast xxx.xxx.xxx.255
        inet6 fe80::7285:c2ff:fedf:cc9b  prefixlen 64  scopeid 0x20<link>
        ether 70:85:c2:df:cc:9b  txqueuelen 1000  (Ethernet)
        RX packets 34809  bytes 2362331 (2.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5721  bytes 791301 (791.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp7s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:26:55:de:ec:fd  txqueuelen 1000  (Ethernet)
        RX packets 3321  bytes 375922 (375.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2345  bytes 381403 (381.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 59  memory 0xfc820000-fc840000  

enp7s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:26:55:de:ec:fc  txqueuelen 1000  (Ethernet)
        RX packets 298  bytes 36481 (36.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 996  bytes 245397 (245.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 30  memory 0xfc800000-fc820000  

enp8s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:26:55:de:ec:ff  txqueuelen 1000  (Ethernet)
        RX packets 449  bytes 116670 (116.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 550  bytes 122340 (122.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 33  memory 0xfc620000-fc640000  

enp8s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:26:55:de:ec:fe  txqueuelen 1000  (Ethernet)
        RX packets 447  bytes 116748 (116.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 559  bytes 122916 (122.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 28  memory 0xfc600000-fc620000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 91  bytes 6940 (6.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 91  bytes 6940 (6.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

This is my brctl show output on the master:

bridge name bridge id       STP enabled interfaces
br0     8000.46d5adff26fd   no      enp7s0f0
                            enp7s0f1
                            enp8s0f0
                            enp8s0f1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.