Score:0

Netplan config for ubuntu with two interfaces and two subnets, favoring one for web traffic

cn flag

I have a server with two NICs running Ubuntu 20.04:

NIC1: 192.168.1.51 - connected to ISP1-GATEWAY part of LAN1
NIC2: 192.168.100.51 - connected to ISP2-GATEWAY part of LAN2

I would like to have them set up via netplan for:

static IPs for their respective subnets - no dhcp4
don't need to route traffic between LAN1 and LAN2, they can be invisible etc
set interface or route metric so that server WAN traffic favors NIC2 and consequently ISP2
ISP1 must not be restricted to account for redundancy (eg: ISP2 is down)
i can either disable IPv6 or have it work exactly is IPv4 with the same weights.

I don't seem to find a clear example of this, netplan.io example assumes traffic should be routed between LAN1 and LAN2.

I run several services on the box (eg: plex media server) which I want both LAN1 and LAN2 clients to access separately via their respective interfaces, all the while WAN traffic generated by the server (eg: Deluge) to favor NIC2 over NIC1 (ISP2 over ISP1).

Thanks

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.