Alta switches include a diagnostic utility called “diag.” This utility, accessed via SSH or debug terminal, can be used to configure and monitor low-level functionality of the Switch Fabric.
Misconfiguration can lead to loss of connectivity, potentially requiring a reboot of the switch back to UI-based configuration.
Using the utility
The diag utility has a shell of its own. In other words, if you execute “diag” alone, you can then enter all of the commands as outlined in this guide. If you would like to run a command directly from the Linux shell, without entering the diag shell, you can enter your diag command like so:
diag "l2-table dump mac-ucast port 8 all"This will run the l2-table command, and return back to the Linux shell immediately.
Command Persistence
If you would like your manual diag configuration to persist, add the commands to the /cfg/post-cfg.sh file (using the vi editor). Please ensure that your quotes are normal quotes, and not slanted/unicode quotes.
Example post-cfg.sh file:
#!/bin/sh
diag "port set auto-nego port 0 ability 1000f"Once you are done with your file, always make sure that it is executable:
chmod +x /cfg/post-cfg.shThe command(s) will then run after every configuration, including after a reboot. If the configuration renders the switch unreachable, you may need to factory reset the switch by holding the reset button down for 5 seconds. As long as the switch has not been deleted in the Alta management platform, it will pick up its most recent UI-based configuration after you click "Set up" on it, even after the factory reset.
Sample Commands
The diag utility has hundreds of potentially useful commands, so we will only focus on some of the most useful here.
Show learned MAC addresses on a specific port:
l2-table dump mac-ucast port 8 allShow per-port statistics
mib dump counter port 0Alta Switch Diag Port Mappings
Diag references ports using raw, physical port numbers. For example, on the S12, to dump all learned MAC addresses on Port 2 (according to User Interface), use the command:
l2-table dump mac-ucast port 8 allS8-POE
UI Port number plus 7
| UI | Diag | UI | Diag | UI | Diag | UI | Diag |
| 1 | 8 | 3 | 10 | 5 | 12 | 7 | 14 |
| 2 | 9 | 4 | 11 | 6 | 13 | 8 | 15 |
S16-POE
Generally UI Port number minus 1, except as outlined in red
| UI | Diag | UI | Diag | UI | Diag | UI | Diag |
| 1 | 0 | 6 | 5 | 11 | 10 | 16 | 15 |
| 2 | 1 | 7 | 6 | 12 | 11 | SFP1 | 24 |
| 3 | 2 | 8 | 7 | 13 | 12 | SFP2 | 26 |
| 4 | 3 | 9 | 8 | 14 | 13 | ||
| 5 | 4 | 10 | 8 | 15 | 14 |
S24-POE
Generally UI Port number minus 1, except as outlined in red
| UI | Diag | UI | Diag | UI | Diag | UI | Diag |
| 1 | 0 | 8 | 7 | 15 | 14 | 22 | 21 |
| 2 | 1 | 9 | 8 | 16 | 15 | 23 | 22 |
| 3 | 2 | 10 | 9 | 17 | 16 | 24 | 23 |
| 4 | 3 | 11 | 10 | 18 | 17 | SFP1 | 24 |
| 5 | 4 | 12 | 11 | 19 | 18 | SFP2 | 25 |
| 6 | 5 | 13 | 12 | 20 | 19 | ||
| 7 | 6 | 14 | 13 | 21 | 20 |
S48-APOE
Generally UI Port number minus 1, except as outlined in red
| UI | Diag | UI | Diag | UI | Diag | UI | Diag |
| 1 | 0 | 13 | 12 | 27 | 26 | 41 | 48 |
| 2 | 1 | 14 | 13 | 28 | 27 | 42 | 49 |
| 3 | 2 | 15 | 14 | 29 | 28 | 43 | 50 |
| 4 | 3 | 16 | 15 | 30 | 29 | 44 | 51 |
| 5 | 4 | 17 | 16 | 31 | 30 | 45 | 42 |
| 5 | 5 | 18 | 17 | 32 | 31 | 46 | 43 |
| 6 | 6 | 19 | 18 | 33 | 32 | 47 | 46 |
| 7 | 7 | 20 | 19 | 34 | 33 | 48 | 47 |
| 7 | 8 | 21 | 20 | 35 | 36 | SFP1 | 52 |
| 8 | 9 | 22 | 21 | 36 | 37 | SFP2 | 53 |
| 9 | 10 | 23 | 22 | 37 | 40 | SFP3 | 54 |
| 10 | 11 | 24 | 23 | 38 | 41 | SFP4 | 55 |
| 11 | 12 | 25 | 24 | 39 | 44 | ||
| 12 | 13 | 26 | 25 | 40 | 45 |
S12
| UI | Diag | UI | Diag | UI | Diag |
| 1 | 0 | 5 | 32 | 9 | 52 |
| 2 | 8 | 6 | 40 | 10 | 53 |
| 3 | 16 | 7 | 48 | 11 | 54 |
| 4 | 24 | 8 | 50 | 12 | 55 |
IGMP Daemon
Alta Switches include an IGMP multicast daemon named "igmpd." When IGMP Snooping is enabled on a specific VLAN, IGMPv2, IGMPv3, and MLD frames will configure hardware multicast forwarding based on the configurations within the subscriptions and fast-leave frames.
To view the current software state of the subscriptions:
cat /var/run/igmpd-state.json | jqThe hardware state of the subscriptions varies based on the chipset generation, and as such is not documented here. However, raw commands used, and subscription updates in real-time can be gleaned from the debug output of the daemon:
/var/run/igmpd.sh stop
igmpd -dIGMP Querier
When IGMP Snooping is enabled on a VLAN, Alta Switches will automatically enable an IGMP querier for each VLAN. There is no election process, as each Alta switch will use a random backoff each time they hear another switch send a query. Once a specific switch has started broadcasting IGMP queries, that switch will likely continue to broadcast queries indefinitely, since other switches' back-offs will be much longer once a single switch has been heard.
In order to be considered an IGMP Query, the Group number must be 0 and the Destination IP address must be 224.0.0.1 (for IPv4).
Related to
Comments
0 comments
Please sign in to leave a comment.