Updated net-tools bits
By joe
- 3 minutes read - 528 wordsSo far, 3 components, and working to fix a few things in formatting. On github, grab it here. First, lsbond.pl to report about bond details
root@unison-mgr-1:~/net-tools# ./lsbond.pl
bond0: mac 0c:c4:7a:48:69:cb
state up
mode fault-tolerance (active-backup)
xmit_hash layer2 0
active slave eth1
polling 100 ms
up_delay 200 ms
down_delay 200 ms
slave nics:
eth1: mac 0c:c4:7a:48:69:cb, link 1, state up, speed 1000,
driver igb, version 5.3.2.2
firmware version 1.61,0x8000090e
bond1: mac 00:12:c0:80:26:76
state up
mode fault-tolerance (active-backup)
xmit_hash layer2 0
active slave eth3
polling 100 ms
up_delay 200 ms
down_delay 200 ms
slave nics:
eth2: mac 00:12:c0:80:26:76, link 1, state up, speed 10000,
driver ixgbe, version 4.1.2
firmware version 0x2b2c0001
eth3: mac 00:12:c0:80:26:77, link 1, state up, speed 10000,
driver ixgbe, version 4.1.2
firmware version 0x2b2c0001
eth4: mac 00:12:c0:80:26:72, link 1, state up, speed 10000,
driver ixgbe, version 4.1.2
firmware version 0x2b2c0001
eth5: mac 00:12:c0:80:26:73, link 1, state up, speed 10000,
driver ixgbe, version 4.1.2
firmware version 0x2b2c0001
Second, lsbr.pl to show bridges components
root@unison-mgr-1:~/net-tools# ./lsbr.pl
br10: interfaces eth0
br20: interfaces bond0,vnet0
br30: interfaces bond1
and finally, lsnet.pl, to (shortly) act as a {bridge,bond,ipv6} aware version of ifinfo (which it should replace).
root@unison-mgr-1:~/net-tools# ./lsnet.pl
DEVICE [ MASTER] LINK: IP Address MTU RX (bytes) TX (bytes)
bond0 [ br20] up: 1500 71.769 MB 90.609 MB
bond1 [ br30] up: 1500 0.001 MB 20.718 MB
br10 [ ] up: 10.100.1.250/16 1500 0.084 MB 0.217 MB
br10 [ ] up: fe80::ec4:7aff:fe48:69ca/64 1500 0.084 MB 0.217 MB
br20 [ ] up: 10.21.100.250/24 1500 70.034 MB 65.839 MB
br20 [ ] up: 10.21.255.250/24 1500 70.034 MB 65.839 MB
br20 [ ] up: fe80::ec4:7aff:fe48:69cb/64 1500 70.034 MB 65.839 MB
br30 [ ] up: 10.21.64.250/24 1500 0.001 MB 6.823 MB
br30 [ ] up: fe80::212:c0ff:fe80:2676/64 1500 0.001 MB 6.823 MB
eth0 [ br10] up: 1500 0.084 MB 0.689 MB
eth1 [ bond0] up: 1500 71.769 MB 90.610 MB
eth2 [ bond1] up: 1500 0.000 MB 4.296 MB
eth3 [ bond1] up: 1500 0.001 MB 7.830 MB
eth4 [ bond1] up: 1500 0.000 MB 4.296 MB
eth5 [ bond1] up: 1500 0.000 MB 4.296 MB
lo [ ] up: 65536 1.894 MB 1.894 MB
lo [ ] up: ::1/128 65536 1.894 MB 1.894 MB
vnet0 [ br20] up: 1500 60.653 MB 0.136 MB
vnet0 [ br20] up: fe80::fc54:ff:fec4:2984/64 1500 60.653 MB 0.136 MB
compare this to ifinfo
root@unison-mgr-1:~/net-tools# ifinfo
device: address/netmask MTU Tx (MB) Rx (MB)
bond0: addr not set/mask not set 1500 68.449 86.434
bond1: addr not set/mask not set 1500 0.001 19.761
br10: 10.100.1.250/255.255.0.0 1500 0.080 0.207
br20: 10.21.100.250/255.255.255.0 1500 66.794 62.806
br30: 10.21.64.250/255.255.255.0 1500 0.001 6.508
eth0: addr not set/mask not set 1500 0.080 0.657
eth1: addr not set/mask not set 1500 68.449 86.434
eth2: addr not set/mask not set 1500 0.000 4.097
eth3: addr not set/mask not set 1500 0.001 7.469
eth4: addr not set/mask not set 1500 0.000 4.097
eth5: addr not set/mask not set 1500 0.000 4.097
lo: 127.0.0.1/255.0.0.0 65536 1.807 1.807
vnet0: addr not set/mask not set 1500 57.862 0.130
Note that its not obvious what interface is associated with what bond/bridge in ifinfo. Still a few bugs I need to quash, but should be ready for general use soon.