Ubuntu networking: Difference between revisions
From Lolly's Wiki
Jump to navigationJump to search
Line 26: | Line 26: | ||
</source> | </source> | ||
==New | ==New since Ubuntu 17.10== | ||
===netplan=== | ===netplan=== | ||
Former configuration in /etc/network/interfaces{,.d} is now found in /etc/netplan in YAML syntax. | Former configuration in /etc/network/interfaces{,.d} is now found in /etc/netplan in YAML syntax. | ||
====DHCP==== | |||
For example: <i>/etc/netplan/ens160.yaml</i> | For example: <i>/etc/netplan/ens160.yaml</i> | ||
<source lang=yaml> | <source lang=yaml> | ||
network: | network: | ||
ethernets: | ethernets: | ||
ens160: | ens160: | ||
dhcp4: yes | |||
version: 2 | version: 2 | ||
</source> | </source> |
Revision as of 07:02, 18 September 2019
Disable IPv6
Create /etc/sysctl.d/60-disable-ipv6.conf
Create a file named /etc/sysctl.d/60-disable-ipv6.conf with this content:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Activate /etc/sysctl.d/60-disable-ipv6.conf
# sysctl -p /etc/sysctl.d/10-disable-ipv6.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Check settings
# cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
New since Ubuntu 17.10
netplan
Former configuration in /etc/network/interfaces{,.d} is now found in /etc/netplan in YAML syntax.
DHCP
For example: /etc/netplan/ens160.yaml
network:
ethernets:
ens160:
dhcp4: yes
version: 2
Bonding
/etc/netplan/bond007.yaml
network:
version: 2
renderer: networkd
ethernets:
slave1:
match:
macaddress: "3c:a7:2a:22:af:70"
dhcp4: no
slave2:
match:
macaddress: "3c:a7:2a:22:af:71"
dhcp4: no
bonds:
bond007:
interfaces:
- slave1
- slave2
parameters:
mode: balance-rr
mii-monitor-interval: 10
dhcp4: no
addresses:
- 192.168.189.202/27
gateway4: 192.168.189.193
nameservers:
search:
- mcs.de
addresses:
- "192.168.3.61"