本地虚拟机网络配置

**ubuntu 文件位置:/etc/network/interfaces,centos 文件位置: /etc/sysconfig/network-scripts/ifcfg-enp0s3 **

  • 系统版本:ubuntu-16.04.7-server-amd64
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s3
iface enp0s3 inet static
address 192.168.116.60
netmask 255.255.255.0
gateway 192.168.116.254
dns-nameserver **********

auto enp0s8
iface enp0s8 inet dhcp
posted @ 2021-07-26 14:00  Silent-Cxl  阅读(63)  评论(0)    收藏  举报