Difference between revisions of "Installation (Ubuntu)"

Jump to navigation Jump to search
m
 
(One intermediate revision by the same user not shown)
Line 195: Line 195:


== Change IP Address (v18 onwards) ==
== Change IP Address (v18 onwards) ==
Ubuntu now uses [https://netplan.io Netplan], do not use the <code>/etc/network/interfaces</code> config file.
Ubuntu now uses [https://netplan.io Netplan], do not use the <code>/etc/network/interfaces</code> config file, use either <code>/etc/netplan/01-netcfg.yaml</code> or <code>/etc/netplan/50-cloud-init.yaml</code>. Formatting is very important with YAML files, indents especially.


# Find the interface name (eg <code>ens2</code>)
# Find the interface name (eg <code>ens2</code>)
Line 215: Line 215:
       nameservers:
       nameservers:
           addresses: [192.168.1.1,8.8.8.8]
           addresses: [192.168.1.1,8.8.8.8]
</pre>
=== Persistent Route ===
To add a persistent route to an interface, add using the following syntax (example sends traffic to 172.32.1.0/24 via eth1 to 192.168.2.100) to add the <code>routes</code> config to the interface the traffic should go through.
<pre>
    ens2:
      addresses:
        - 192.168.2.50/24
      dhcp4: no
      routes:
        - to: 172.32.1.0/24
          via: 192.168.2.100
</pre>
</pre>


Navigation menu