Score:0

Netplan routing with two uplinks

ni flag

We have servers in a colocation DC and have two uplinks: A fast metered connection (for live traffic) and a slow flat rate one (for things like backups). We'd like to use a Linux box for routing and have a specific uplink be used depending on the local source subnet, effectively meaning two different default routes. This should be possible with separate routing tables, but I haven't quite been able to grok them.

The following is a faulty example netplan config, omitting things like VLANs, nameservers etc:

network:
  version: 2
  ethernets:
    eth0:
      addresses: [ 5.5.5.2/27 ]
      routes:
        - to: default
          via: 5.5.5.1 # provider edge fast uplink
    eth1:
      addresses: [ 6.6.6.2/27 ]
      routes:
        - to: default
          via: 6.6.6.1 # provider edge cheap uplink
    eth2:
      addresses: [ 10.20.30.1/24 ]
    eth3:
      addresses: [ 10.20.40.1/24 ]

Outbound traffic from subnet 10.20.30.0/24 should use the fast uplink, traffic from 10.20.40.0/24 the cheap one. Also the local subnets must be able to reach each other. How should the config look to achieve that? NATing for outgoing traffic will be done via iptables.

Score:0
hn flag

Routing for multiple uplinks/provider: https://lartc.org/howto/lartc.rpdb.multiple-links.html

Quantim avatar
in flag
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/554519)
I sit in a Tesla and translated this thread with Ai:

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.