Debian 11で2つのイーサネットeth0とeth1を設定する方法は?

Debian 11で2つのイーサネットeth0とeth1を設定する方法は?

Debian 11.6でeth0とeth1を設定したいと思います。

現在、次のように設定しています。

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static


address 192.168.1.125
netmask 255.255.255.0
gateway 192.168.1.1

allow-hotplug eth1
iface eth1 inet static


address 192.168.1.126
netmask 255.255.255.0
gateway 192.168.1.2

設定後は、eth1の代わりにeth0のみをpingできます。

どんな助けでも大変感謝します!

ベストアンサー1

route add -net 192.168.1.126 netmask 255.255.255.255 gw 192.168.1.2 dev eth1

おすすめ記事