# Version: 20221008_1730 # Louis ## my requirement ## # traffic arriving at a particular interface, fysical or vlan should # also be answered via that interface # Initionall version at server install (not used) written by 'subiquity' # Initionall version after Ubuntu server install (completely modified) written by 'subiquity' ## Some helpfull links ## # https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html # https://linuxconfig.org/netplan-network-configuration-tutorial-for-beginners # https://netplan.io/examples # https://netplan.io/reference # https://manpages.ubuntu.com/manpages/jammy/man5/netplan.5.html ## ISSUES ## # 1) So I did not define a server wide default gateway .... # .... however that is not true if enp5s0 becomes active .... # .... I simply do not know how to assign a routing and routing-policy to # an dhcp provided address # 2) The trunk is a container for vlans, it does not have an address ... # .... however I had to give it a dummy address to make this file work ## Define the network network: version: 2 renderer: networkd ## Define Ethernet ports ethernets: # Define the 2.5G interface enp5s0: dhcp4: true # default is off # don't wait for it to come up during boot optional: true nameservers: addresses: - 8.8.8.8 - 1.0.0.1 # Define the ^startup interface^ # ethernets: enp3s0f0: dhcp4: no dhcp6: no addresses: - 192.168.1.200/24 routes: - to: default # could be 0/0 or 0.0.0.0/0 optionally via: 192.168.1.1 # - to: default # could be ::/0 optionally # via: cf02:de:ad:be:ef::2 on-link: true table: 1 # metric: 100 routing-policy: - from: 192.168.1.0/24 table: 1 nameservers: addresses: - 192.168.1.1 - 8.8.8.8 - 1.0.0.1 # nameserver domain(s) # Search: # - pc.lan # Define the trunk (2e 10G) enp3s0f1: addresses: - 9.9.9.9/32 # dummy! the trunk itself has not address, however that does not work # trunk: # match: # does not work # name: enp3s0f1 # set-name: trunk1 # requires match (on mac !!??) ## Define the vlans # Define vlan100 (vm-managment) vlans: enp3s0f1.100: id: 100 link: enp3s0f1 addresses: - 192.168.100.10/24 routes: - to: default via: 192.168.100.1 on-link: true table: 100 # metric: 100 routing-policy: - from: 192.168.100.0/24 table: 100 nameservers: addresses: - 192.168.100.1 - 8.8.8.8 - 1.0.0.1 # Domain specific nameserver(s) # addresses: # search: # - vm.lan