RSS

Set IP Address Ubuntu 23

Install Net-Tools
apt install net-tools

Masuk ke direktory netplan
root@server:/# cd /etc/netplan/
root@server:/etc/netplan#
pico 50-cloud-init.yaml

#network:
#    ethernets:
#        eno1:
#            dhcp4: true
#    version: 2

# create new
network:
  ethernets:
    # interface name
    enp1s0:
      dhcp4: false
      # IP address/subnet mask
      addresses: [10.0.0.30/24]
      # default gateway
      # [metric] : set priority (specify it if multiple NICs are set)
      # lower value is higher priority
      routes:
        - to: default
          via: 10.0.0.1
          metric: 100
      nameservers:
        # name server to bind
        addresses: [10.0.0.10,10.0.0.11]
        # DNS search base
        search: [srv.world,server.education]
      dhcp6: false
  version: 2

# apply changes
root@localhost:~# netplan apply

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Posting Komentar