Skip to content


Check duplex and speed settings of all interfaces in one go

One of the first things you do when checking connectivity issues on the Checkpoint (or any networking gear for that matter) is to see speed and duplex parameters of the interfaces. But have you tried to do it on a firewall with 15-20 interfaces ?
No fun entering one by one interfaces’ names. Here is the one-liner I use to get speed and duplex settings of all interfaces in one go.

# for ii in $(ifconfig | awk ' /Ethernet/ {print $1}') ;do ethtool $ii; done | egrep  'eth|Speed|Duplex'
Settings for eth0:
Speed: 100Mb/s
Duplex: Full
Settings for eth1:
Speed: 1000Mb/s
Duplex: Full
Settings for eth1.150:
Speed: 1000Mb/s
Duplex: Full
Settings for eth1.160:
Speed: 1000Mb/s
Duplex: Full
Settings for eth1.161:
Speed: 1000Mb/s
Duplex: Full
Settings for eth1.270:
Speed: 1000Mb/s
Duplex: Full
Settings for eth1.271:
Speed: 1000Mb/s
Duplex: Full

Settings for eth1.281:
Speed: 1000Mb/s
Duplex: Full
Settings for eth1.35:
Speed: 1000Mb/s
Duplex: Full
Settings for eth2:
Speed: 100Mb/s
Duplex: Full
Settings for eth3:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.112:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.211:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.311:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.71:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.72:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.73:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.413:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.419:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.451:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.407:
Speed: 1000Mb/s
Duplex: Full
Settings for eth4.408:
Speed: 1000Mb/s
Duplex: Full
Settings for eth5:
Speed: 1000Mb/s
Duplex: Full
Settings for eth7:
Speed: 1000Mb/s
Duplex: Full

Posted in Awk weekly, Checkpoint NG/NGX, Linux.

Tagged with , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.