0

I've got a simple testbed for Ubuntu that I've hit a very unusual issue on. For some reason it appears that my IP addresses are changing between interfraces without any intervention from the user and I can't explain it.

Here's what I've got: A machine with Ubuntu 18.10 Server (Cosmic?) on it with a 1GB interface that is mapped via DHCP static reservation to IP 172.16.222.63 and a 10GB interface that is statically assigned with IP 172.16.222.64 (using ifconfig). This server is blank with only OpenSSH-Server selected during installation.

It is attached to an HP Procurve 2900-48G switch which is factory defaulted. There are no VLANs configured or at play, all switchports are defaulted. The 1GB interface and the 10GB interface are attached to this switch as is a test box.

From the test box, I start pinging 172.16.222.63 (1G) in one terminal window and I start pinging 172.16.222.64 (10G) in another terminal window. Only the 1G interface responds.

If I disconnect the 1G interface, the 10G interface starts pinging. If I reconnect the 1G interface, the 10G interface stops pinging.

I've checked iptables, and there are no rules, everything is set to default allow. Arp tables shows the MAC for my test box and the default gateway as expected.

On Friday, I asked about this issue in the Linux subreddit, although that had slightly different symptoms. Both interfaces would ping when both were connected. If the 1G interface was disconnected, the 10G interface would remain pingable, however after a few minutes, the 1G IP address would start responding on the 10G interface! Re-attaching the 1G interface and disconnecting the 10G interface would cause both IPs to move to the 1G interface.

After talking it over with my coworkers, the general consensus appears to be that netplan is causing problems. Has anyone else seen this? Is there any way I can fix this so the IP addresses "stay put" on the interfaces they're assigned to?

The whole reason for this is I'm going to be doing some performance testing on the 1G versus 10G interfaces and I need to be able to send data to both interfaces. With it in its current state, I can't be guaranteed I am sending data to the right interface by IP address.

Thank you!

Edit: As requested:

Netplan yaml file:

root@ubuntu:~# cat /etc/netplan/*.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp5s0f0:
      dhcp4: yes

lshw output

root@ubuntu:~# lshw -C network
  *-network
       description: Ethernet interface
       product: MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s]
       vendor: Mellanox Technologies
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: b0
       serial: 00:02:c9:56:1c:88
       size: 10Gbit/s
       capacity: 10Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msix pciexpress bus_master cap_list ethernet physical fibre 10000bt-fd
       configuration: autonegotiation=off broadcast=yes driver=mlx4_en driverversion=4.0-0 duplex=full firmware=2.9.1000 ip=172.16.222.64 latency=0 link=yes multicast=yes port=fibre speed=10Gbit/s
       resources: irq:16 memory:b9a00000-b9afffff memory:b8800000-b8ffffff
  *-network DISABLED
       description: Ethernet interface
       product: MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s]
       vendor: Mellanox Technologies
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: enp4s0
       version: b0
       serial: 00:02:c9:54:00:a2
       capacity: 10Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msix pciexpress bus_master cap_list ethernet physical fibre 10000bt-fd
       configuration: autonegotiation=off broadcast=yes driver=mlx4_en driverversion=4.0-0 firmware=2.9.1000 latency=0 link=no multicast=yes port=fibre
       resources: irq:17 memory:b9900000-b99fffff memory:b8000000-b87fffff
  *-network:0
       description: Ethernet interface
       product: 80003ES2LAN Gigabit Ethernet Controller (Copper)
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: enp5s0f0
       version: 01
       serial: 00:15:17:45:f3:08
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=1.0-0 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:24 memory:b9820000-b983ffff memory:b9400000-b97fffff ioport:2020(size=32)
  *-network:1 DISABLED
       description: Ethernet interface
       product: 80003ES2LAN Gigabit Ethernet Controller (Copper)
       vendor: Intel Corporation
       physical id: 0.1
       bus info: pci@0000:05:00.1
       logical name: enp5s0f1
       version: 01
       serial: 00:15:17:45:f3:09
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=1.0-0 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:25 memory:b9800000-b981ffff memory:b9000000-b93fffff ioport:2000(size=32)

Ifconfig output:

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.222.64  netmask 255.255.255.0  broadcast 172.16.222.255
        inet6 fe80::202:c9ff:fe56:1c88  prefixlen 64  scopeid 0x20<link>
        ether 00:02:c9:56:1c:88  txqueuelen 1000  (Ethernet)
        RX packets 1446  bytes 134815 (134.8 KB)
        RX errors 2  dropped 0  overruns 0  frame 2
        TX packets 1169  bytes 121183 (121.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp5s0f0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::215:17ff:fe45:f308  prefixlen 64  scopeid 0x20<link>
        ether 00:15:17:45:f3:08  txqueuelen 1000  (Ethernet)
        RX packets 875  bytes 87240 (87.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 421  bytes 48304 (48.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 18  memory 0xb9820000-b9840000

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 3312  bytes 235824 (235.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3312  bytes 235824 (235.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  • Edit your question to include your /etc/netplan/*.yaml file, and sudo lshw -C network and ifconfig. Report back to @heynnema – heynnema Mar 19 at 1:25
  • @heynnema - as requested – firestorm.v1 Mar 19 at 18:13
  • I've put together a skeleton .yaml file in my answer. If you're going to use netplan, then you have to define all of the interfaces. Report back to @heynnema – heynnema Mar 19 at 19:06
  • Status please... – heynnema Mar 24 at 14:38
0

Try something more like this skeleton .yaml file... make sure there are no tabs or extra spaces... some addresses may need to be adjusted...

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      addresses: 172.16.222.64/24
      gateway4: 172.16.222.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]
    enp4s0:
      dhcp4: no
      dhcp6: no
    enp5s0f0:
      addresses: 172.16.222.63/24
      gateway4: 172.16.222.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]
    enp5s0f1:
      dhcp4: no
      dhcp6: no

Then:

sudo netplan --debug generate # generate config files

sudo netplan apply # activate new config

reboot # may be optional... reboot computer

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.