Home » Operating System » Linux » Setting IP Address (Ubuntu 18.04)

Address

Jl. Meranti Wing 22 Level 4
Kampus IPB Darmaga
Bogor 16680, Jawa Barat, Indonesia
Tlp./Fax +62 (251) 8624535

Hours
Monday—Friday: 08:00–16:00

Setting IP Address (Ubuntu 18.04)

Based on this you configuration in .yaml (sudo /etc/netplan/50-xxxx.yaml) can be:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.97/25]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

Or some appropriate netmask.

Netmask cannot be 255.255.255.1. Netmask for class C addresses can be:

Prefix size         | Subnet mask   
/24                 | 255.255.255.0 
/25                 | 255.255.255.128
/26                 | 255.255.255.192
/27                 | 255.255.255.224
/28                 | 255.255.255.240
/29                 | 255.255.255.248
/30                 | 255.255.255.252
# sudo netplan apply

Leave a comment

November 2018
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  

Categories