Ubuntu networking: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 24: Line 24:
# cat /proc/sys/net/ipv6/conf/all/disable_ipv6
# cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
1
</source>
==New in 17.10==
===netplan===
Former configuration in /etc/network/interfaces{,.d} is now found in /etc/netplan in YAML syntax.
For example: <i>/etc/netplan/ens160.yaml</i>
<source lang=bash>
network:
  ethernets:
    ens160: {dhcp4: true}
  version: 2
</source>
</source>

Revision as of 09:46, 15 February 2018

Networking Networking

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 in 17.10

netplan

Former configuration in /etc/network/interfaces{,.d} is now found in /etc/netplan in YAML syntax.

For example: /etc/netplan/ens160.yaml

network:
  ethernets:
    ens160: {dhcp4: true}
  version: 2