Home » 2020 » April

Monthly Archives: April 2020

Ubuntu18.04LTS

vi /etc/netplan/50-cloud-init.yaml

 

network:
ethernets:
ens3:
dhcp4: no
addresses: [103.23.244.36/27]
gateway4: 103.23.244.33
nameservers:
addresses: [8.8.8.8, 8.8.7.7]
dhcp6: no
version: 2

 


network:
ethernets:
eth0:
addresses:
– 192.168.3.218/24
dhcp4: false
gateway4: 192.168.30.193
nameservers:
addresses:
– 192.168.7.2
search: []
version: 2
~

 

CentOS8

/etc/sysconfig/network-scripts/ifcfg-eth0

 

TYPE=”Ethernet”
PROXY_METHOD=”none”
BROWSER_ONLY=”no”
BOOTPROTO=”none”
DEFROUTE=”yes”
IPV4_FAILURE_FATAL=”no”
IPV6INIT=”yes”
IPV6_AUTOCONF=”yes”
IPV6_DEFROUTE=”yes”
IPV6_FAILURE_FATAL=”no”
IPV6_ADDR_GEN_MODE=”stable-privacy”
NAME=”eth0″
UUID=”f5c10145-a984-4783-b8f6-0a906296312b”
DEVICE=”eth0″
ONBOOT=”yes”
IPADDR=”xxx.xxx.x.xxx”
PREFIX=”27″
GATEWAY=”xxx.xxx.xxx.xxx”
DNS1=”xxx.xxx.xxx.xxx”
IPV6_PRIVACY=”no”

 

yum install epel-release