Answer the question
In order to leave comments, you need to log in
How to set up netplan in Ubuntu for 2 networks per 1 interface?
There is a current network: 192.168.10.0/24
Gateway: 192.168.10.1
DNS: 192.168.10.1
There is a second network where the domain controller is: 192.168.20.0/24
Gateway: 192.168.20.1
DNS: 192.168.20.1
The gateway is one piece of iron, with two interfaces . Set up computers under win, everything works fine.
Under Ubuntu, the second network pings, but something is wrong with the DNS, it does not see the domain.
ifconfig shows 2 interfaces: lo and eno1
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
addresses: [192.168.10.10/24]
gateway4: 192.168.10.1
nameservers:
addresses: [192.168.10.1, 8.8.8.8]
eno1:1:
dhcp4: no
addresses: [192.168.20.10/24]
gateway4: 192.168.20.1
nameservers:
search: [my.domain.com]
addresses: [192.168.20.1, 8.8.8.8]
Answer the question
In order to leave comments, you need to log in
Now network interface aliases (eno1:1) are not fashionable, several addresses are assigned to one interface:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
addresses: [192.168.10.10/24, 192.168.20.10/24]
gateway4: 192.168.10.1
nameservers:
search: [my.domain.com]
addresses: [192.168.10.1, 192.168.20.1, 8.8.8.8]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question