How to manually configure the network interface in the OS? Print

  • Сеть
  • 1

On Ubuntu 17 and above:

Edit the file /etc/netplan/00-installer-config.yaml:
#
network:
version: 2
renderer: networkd
ethernets:
enp6s0:
addresses: [8.8.8.88/24]
gateway4: 8.8.8.254
nameservers:
addresses: [8.8.8.8]

 

On CentOS 7 and higher:

Edit the file /etc/sysconfig/network-scripts/ifcfg-enp2s0:
#
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
NAME=enp2s0
UUID=838a9a98-fe50-40bd-9442-300dbc0fb4f2
DEVICE=enp2s0
ONBOOT=yes
IPADDR=8.8.8.88
PREFIX=25
GATEWAY=8.8.8.254
DNS1=8.8.8.8


On Windows Server 2008 and higher:
#
netsh interface ip set address name="Local Area Connection" static 8.8.8.88 255.255.255.0 8.8.8.254
netsh interface ip set dns "Local Area Connection" static 8.8.8.8


Was this answer helpful?

« Back