วันพุธที่ 18 กรกฎาคม พ.ศ. 2561

static ubuntu 18.04

Configuring Static IP Addresses With Networkd

To configure a static IP address using the new NetPlan tool, the file should look like this: IPv4 address (192.168.1.2), Gateway (192.168.1.1), DNS Servers (8.8.8.8,8.8.4.4)
Run the commands below to create a new network configuration file
sudo nano /etc/netplan/01-netcfg.yaml
Then configure IPv4 addresses as shown below… take notes of the format the lines are written…
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
 version: 2
 renderer: networkd
 ethernets:
   ens33:
     dhcp4: no
     dhcp6: no
     addresses: [192.168.1.2/24]
     gateway4: 192.168.1.1
     nameservers:
       addresses: [8.8.8.8,8.8.4.4]
Exit and save your changes by running the commands below
sudo netplan apply

ไม่มีความคิดเห็น:

แสดงความคิดเห็น