User Tools

Site Tools


ubuntu:networking:netplan:configure_networking_with_netplan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ubuntu:networking:netplan:configure_networking_with_netplan [2020/12/22 02:22] – created peterubuntu:networking:netplan:configure_networking_with_netplan [2021/07/15 08:29] (current) – [Find the name of the active network interfaces that you want to configure] peter
Line 27: Line 27:
 <code bash> <code bash>
 ip a ip a
 +</code>
 +
 +returns:
 +
 +<code bash>
 +...
 +enp3s0
 +...
 </code> </code>
  
 <WRAP info> <WRAP info>
 **NOTE:**  Note the interface name that you want to configure using Netplan. **NOTE:**  Note the interface name that you want to configure using Netplan.
 +
 +  * In this case, **enp3s0**.
 </WRAP> </WRAP>
  
Line 39: Line 49:
  
 <file yaml /etc/netplan/01-network-manager-all.yaml> <file yaml /etc/netplan/01-network-manager-all.yaml>
 +# Let NetworkManager manage all devices on this system
 +#network:
 +#  version: 2
 +#  renderer: NetworkManager
 +
 network: network:
-    Version: 2 +  version: 2 
-    Renderer: NetworkManagernetworkd +  #renderer: NetworkManager 
-    ethernets: +  renderer: networkd 
-       DEVICE_NAME+  ethernets: 
-          Dhcp4yes/no +    enp3s0
-          Addresses: [IP_ADDRESS/NETMASK+      dhcp4no 
-          GatewayGATEWAY +      # disable existing configuration for ethernet 
-          Nameservers+      #addresses: [192.168.1.69/24] 
-             Addresses: [NAMESERVER_1NAMESERVER_2]+      #gateway4: 192.168.1.1 
 +      #nameservers: 
 +        #addresses: [192.168.1.1] 
 +      dhcp6: no 
 + 
 +  # add configuration for bridge interface 
 +  bridges: 
 +    br0: 
 +      interfaces: [enp3s0] 
 +      dhcp4: no 
 +      addresses: [192.168.1.69/24
 +      gateway4192.168.1.1 
 +      nameservers
 +        addresses: [192.168.1.1] 
 +        #addresses: [192.168.1.26,192.168.1.2,192.168.1.25,192.168.1.1,1.1.1.1] 
 +      parameters: 
 +        # stp: false 
 +        stp: true 
 +        forward-delay:
 +      dhcp6: no
 </file> </file>
 +
 +<WRAP info>
 +**NOTE:**
 +
 +  * **renderer**: Either networkd or NetworkManager.
 +    * **networkd** uses the settings in the Netplan config file.  This is preferred.
 +    * **NetworkManager** uses the settings in the Ubuntu Network GUI settings.
 +
 +  * **stp**:  Defines whether the bridge should use Spanning Tree Protocol
 +  * **forward-delay**:  Specifies the period of time the bridge will remain in the Listening and Learning states before getting to the Forwarding state.
 +
 +</WRAP>
  
 ---- ----
ubuntu/networking/netplan/configure_networking_with_netplan.1608603728.txt.gz · Last modified: 2020/12/22 02:22 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki