On Sat, Jun 11, 2011 at 02:13:56PM +0300, Andrew O. Shadoura wrote:
> This isn't really needed as it can use `ip link show` to determine the
> interface status.

I'm afraid I'm not sure that is correct. Take the following example of a
system that has eth0 and eth1 and only the second one (eth0) has a network
cable plugged in:

jfs@silicio$ ip link show eth0 
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state 
UNKNOWN qlen 1000
    link/ether 00:11:2f:80:11:1b brd ff:ff:ff:ff:ff:ff
jfs@silicio:$ ip link show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state 
UNKNOWN qlen 1000
    link/ether 00:c0:df:03:c5:e9 brd ff:ff:ff:ff:ff:ff
jfs@silicio:$ sudo mii-tool eth0
eth0: no link
jfs@silicio:$ sudo mii-tool eth1
eth1: negotiated 100baseTx-FD flow-control, link ok

And 'ip link show up' lists both of these interfaces, even if eth0 does not
have a hardware link.

I'm afraid that as soon as an interface is 'UP' in the system 'ip link show'
will indicate it is up even though it does not have link.

I would appreciate if you could proppose an exact way in which to use ip in
this context. If not, I will have to close this bug.

Regards

Javier

Attachment: signature.asc
Description: Digital signature

Reply via email to