Score:0

Bind/route subnet to specific interface

us flag

I have a server with 2 network interfaces, ens160 routed (gateway assigned) for management and ens192 non-routed (no gateway) for iSCSi. How can I either bind iSCSI to only use the ens192 interface or only have the iSCSI subnet (10.0.250.0/24) routed through the ens192 interface?

This is my current netplan YAML file:

# This is the network config written by 'subiquity'
network:
  ethernets:
    ens160:
      addresses:
      - 10.0.29.14/24
      gateway4: 10.0.29.1
      nameservers:
        addresses:
        - 10.0.20.43
        - 10.0.20.7
        search:
        - ***redacted***
    ens192:
      addresses:
      - 10.0.250.14/24
      nameservers:
        addresses: []
        search: []
    bigmtu1:
      match:
        macaddress: ***redacted***
      mtu: "9000"
  version: 2
Score:0
us flag

I was able to resolve my issue. I found that the bigmtu1 section under my interface was actually causing the interface to lose the static IP. I removed that section and added mtu: directly under the interface and all was good.

us flag
Glad you figured it out. Yes, you shouldn't have two interface config blocks pointing to the same device under different names. But it was not at all obvious from the posted config that this is what you were doing!
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.