text ubuntu 18上的网络配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text ubuntu 18上的网络配置相关的知识,希望对你有一定的参考价值。

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
   ethernets:
        enp0s3:
            addresses: [10.0.2.11/24]
            gateway4: 10.0.2.2
            dhcp4: true
        enp0s8:
            addresses: [10.25.0.130/24]
            dhcp4: false
            gateway4: 10.25.0.1
   version: 2

*****************************************************************

Using /etc/network/interfaces

source /etc/network/interfaces
auto lo 
iface lo inet loopback

auto enp0s3
iface enp0s3 inet static
        address 10.0.2.11
        netmask 255.255.255.0
        network 10.0.2.0
        broadcast 10.0.2.255
        gateway 10.0.2.2
        dns-nameservers 8.8.4.4 8.8.8.8

auto enp0s8
iface enp0s8 inet static
        address 10.25.0.131
        netmask 255.255.255.0
#       gateway 10.25.0.1        

***************************************************
In virtual box - Network

File -> Preferences -> Network 
Network Name: NatNetwork
Nerwork Options: 10.0.2.0/24
Checkbox Supports DHCP= true

In virtual box - Host Network Manager
Create a new one: 
Name: vboxnet1
IPV4: 10.25.0.1/24
DHCP Server: false

******************************************************


以上是关于text ubuntu 18上的网络配置的主要内容,如果未能解决你的问题,请参考以下文章

text Ubuntu 18.04上的KVM权限被拒绝错误

ubuntu光口配置

ubuntu18.04netplan命令没有

ubuntu18.04网络配置

Ubuntu 18的网络配置

Ubuntu 18 LTS netplan 网络配置