使用 Netplan 的多個介面和網路:無法 ping 通本地網絡

使用 Netplan 的多個介面和網路:無法 ping 通本地網絡

我的 netplan 配置具有多個介面和網絡,與 ping 到(或來自?)本地網路的情況完全不同。

這是我的設定:

network:
  version: 2
  ethernets:
    ens160:
      dhcp4: no
      addresses:
      - 172.16.1.114/16
      match:
          macaddress: 00:50:56:aa:00:1d
      mtu: 1500
      nameservers:
        addresses:
        - 172.16.1.11
        - 172.16.1.20
        search:
        - domain.com
      set-name: production
      routes:
        - to: 0.0.0.0/0
          via: 172.16.1.1
          metric: 100
          on-link: true
          table: 800
      routing-policy:
        - from: 0.0.0.0/0
          table: 800
    ens192:
      dhcp4: no
      addresses:
      - 172.21.2.114/16
      match:
          macaddress: 00:50:56:aa:6f:ed
      mtu: 1500
      nameservers:
        addresses:
        - 172.16.1.11
        - 172.16.1.20
        search:
        - domain.com
      set-name: quality
      routes:
        - to: 0.0.0.0/0
          via: 172.21.1.1
          metric: 100
          on-link: true
          table: 801
      routing-policy:
        - from: 0.0.0.0/0
          table: 801
    ens224:
      dhcp4: no
      addresses:
      - 172.21.1.114/16
      match:
          macaddress: 00:50:56:aa:16:92
      mtu: 1500
      nameservers:
        addresses:
        - 172.16.1.11
        - 172.16.1.20
        search:
        - domain.com
      set-name: development
      routes:
        - to: 0.0.0.0/0
          via: 172.21.1.1
          metric: 100
          on-link: true
          table: 802
      routing-policy:
        - from: 0.0.0.0/0
          table: 802

感謝您的幫忙!

順便問一下,有沒有辦法選擇從哪個裝置發送資料包,以進行故障排除?

相關內容