Ubuntu – NIC Teaming on Ubuntu 17.10 via Netplan

linux-networkingUbuntu

Attempting to NIC team on Ubuntu 17.10 using netplan:

network:
    version: 2
    ethernets:
        switchports:
            match: 
                macaddress: 00:15:5d:ec:d3:07
                macaddress: 00:15:5d:ec:d3:08
            wakeonlan: true
    bridges:
        bond0:
            interfaces: [switchports]
            addresses: [172.30.1.10/18]
            gateway4: 172.30.0.1

After applying cannot ping gateway or ping Ubuntu server from other network nodes. My hunch is I'm missing something simple but reading docs and other examples I'm at a loss :/

Here's ip addr show:

[...]
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:15:5d:ec:d3:07 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether 00:15:5d:ec:d3:08 brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether ae:1e:0c:06:21:8c brd ff:ff:ff:ff:ff:ff
inet 172.30.1.10/18 brd 172.30.63.255 scope global bond0
    valid_lft forever preferred_lft forever
inet6 fe80::ac1e:cff:fe06:218c/64 scope link
    valid_lft_forever preferred_lft forever
[...]

Update 1:
Changes bridges to bonds: as Mark Wagner pointed out.

Pinging gateway is now working but DNS resolution isn't.

ping google.com
ping: google.com: Temporary failure in name resolution

Tried setting name-servers manually using netplan but still no luck:

network:
    version: 2
....
        gateway4: 172.30.0.1
        nameservers: 
            addresses: [172.30.0.1, 8.8.8.8]

Here are the contents of cat /proc/net/bonding/bond0:

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:5d:ec:d3:08
Slave queue ID: 0

Update 2:
Rebooting the machine fixed DNS

Best Answer

This is /etc/netplan/01-netcfg.yaml That I have set up on my DL380 for 4 link aggregation.

network:
version: 2
renderer: networkd
ethernets:
  enp3s0f0:
    dhcp4: false
    dhcp6: false
  enp3s0f1:
    dhcp4: false
    dhcp6: false
  enp4s0f0: 
    dhcp4: false
    dhcp6: false
  enp4s0f1: 
    dhcp4: false
    dhcp6: false
bonds:
  bond0:
    dhcp4: false
    dhcp6: false
    interfaces: 
      - enp3s0f0
      - enp3s0f1
      - enp4s0f0
      - enp4s0f1
    addresses: [192.168.1.156/24]
    gateway4: 192.168.1.1
    parameters:
      mode: 802.3ad
    nameservers:
      addresses: [8.8.8.8,8.8.4.4,84.200.69.80,84.200.70.40]