I have a headless Debian server with two network cards:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 01:02:1d:54:7c:01 brd ff:ff:ff:ff:ff:ff
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 01:02:1d:54:7e:01 brd ff:ff:ff:ff:ff:ff
If I disconnect the cable connected to eth1
, then port will go down, but administratively it will stay up:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 01:02:1d:54:7c:01 brd ff:ff:ff:ff:ff:ff
2: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000
link/ether 01:02:1d:54:7e:01 brd ff:ff:ff:ff:ff:ff
This means that routes associated with eth1
are still present in routing table. Is there a way to force eth1
administratively down once it's physically disconnected?