tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: managed switches on mii(4)
On 8-Apr-08, at 8:31 AM, Jonathan A. Kollasch wrote:
I saw the idea of using bridge(4) to take advantage of the hard-
ware switch, but somehow this seems like an unusual idea. The
switch hardware has more configuration options than just bridg-
ing. (Although those features may not be fully documented pub-
licly.)
So, what options have people thought about? What are their pros
and cons?
In my day-life, on another NetBSD platform, the hardware has a
Marvell switch controlled by ioctl()s sent by a userland
application. It's terribly proprietary and won't see human use, so
it's not intuitive and requires a block diagram of the system in
order to use. Previous attempts to configure the switch were made by
heavily modifying our ifconfig(8) but it was too limited, unwieldy,
and (inconclusively) caused at least one brain aneurism. I provide
the below not as an attempt to influence how this is done in the
future, but just in case someone does implement something, it might
illustrate what functions might be needed by other switches.
(wherever you see an option containing 11 digits or letters, then
those args reference all 11 ports on the switch. ie: DDDFCCDFSCS
usage: switchctl ifname reset switch
e.g. switchctl switch0 reset switch
switchctl ifname reset port port_num
e.g. switchctl switch0 reset port 4
switchctl ifname port read
e.g. switchctl switch0 port read
switchctl ifname port mdix 11_mdix_specifiers (A=auto,
X=MDIX, I=MDI)
e.g. switchctl switch0 mdix XXAAAIIIIIX
switchctl ifname port autoneg 11_autoneg_specifiers (0=AN
off, 1=AN on)
e.g. switchctl switch0 autoneg 00011010101
switchctl ifname port force speed port_num speed_val (0=auto|
10|100|1000)
e.g. switchctl switch0 port force speed 9 100
switchctl ifname port force duplex 11_duplex_states (0=no
force, H=half, F=full)
e.g. switchctl switch0 port force duplex 0FFFHHH0FH00
switchctl ifname port force link 11_link_specifiers (0=no
force, 1=force)
e.g. switchctl switch0 port force link 01111010000
switchctl ifname port_power [on|off] all
e.g. switchctl switch0 port_power on all
switchctl ifname port_power [on|off] port port_NUM
e.g. switchctl switch0 port_power off port 7
switchctl ifname port_power 11_power_states ([ofF|oN])
e.g. switchctl switch0 port_power FFFFFFNNNNN
switchctl ifname port_power read
e.g. switchctl switch0 port_power read
switchctl ifname activeport port_num
e.g. switchctl switch0 activeport 4
switchctl ifname activeport read
e.g. switchctl switch0 activeport read
switchctl ifname id productnum
e.g. switchctl switch0 id productnum
switchctl ifname id rev
e.g. switchctl switch0 id rev
switchctl ifname port_state 11_states ([D|B|L|F)
e.g. switchctl switch0 port_state DDDDDDFFFFF
switchctl ifname port_state port_num 1_port state ([D|B|L|F)
e.g. switchctl switch0 port_state 10 L
switchctl ifname port_state read
e.g. switchctl switch0 port_state read
switchctl ifname secureport [on|off] all
e.g. switchctl switch0 secureport on all
switchctl ifname secureport [on|off] port port_NUM
e.g. switchctl switch0 secureport off port 7
switchctl ifname secureport 11_secure_states ([S|U])
e.g. switchctl switch0 secureport UUUUUUSSSSS
switchctl ifname secureport read
e.g. switchctl switch0 secureport read
switchctl ifname 802_1X interrupt [on|off|read]
e.g. switchctl switch0 802_1X interrupt on
switchctl ifname 802_1X [on|off] all
e.g. switchctl switch0 802_1X on all
switchctl ifname 802_1X [on|off] port port_NUM
e.g. switchctl switch0 802_1X off port 7
switchctl ifname 802_1X 11_802_1X_states ([ofF|oN])
e.g. switchctl switch0 802_1X FFFFFFNNNNN
switchctl ifname 802_1X read
e.g. switchctl switch0 802_1X read
switchctl ifname stats flush [all|port_num]
e.g. switchctl switch0 stats flush 10
switchctl ifname stats histogram [rx|tx|both]
e.g. switchctl switch0 stats histogram both
switchctl ifname stats read [port_num]
e.g. switchctl switch0 stats read 8
switchctl ifname atu read
e.g. switchctl switch0 atu read
switchctl ifname atu age time_in_seconds
e.g. switchctl switch0 atu age 3825
switchctl ifname atu age read
e.g. switchctl switch0 atu age read
switchctl ifname atu flush [all|non-static]
e.g. switchctl switch0 atu flush non-static
switchctl ifname atu learn read
e.g. switchctl switch0 atu learn read
switchctl ifname atu learn 11_states (0|1)
e.g. switchctl switch0 atu learn 10000111111
switchctl ifname atu purge ##:##:##:##:##:##
e.g. switchctl switch0 atu purge 00:30:1B:AF:A9:AC
switchctl ifname atu load ##:##:##:##:##:##
allowed_ports_in_binary [normal|static]
e.g. switchctl switch0 atu load 00:30:1B:AF:A9:AC
10111001010 normal
switchctl ifname vlan port port_num allowed_ports_in_binary
e.g. switchctl switch0 vlan port 0 10111001010
switchctl ifname vlan port read
e.g. switchctl switch0 vlan port read
switchctl ifname vlan port reset
e.g. switchctl switch0 vlan port reset
switchctl ifname vlan 802_1Q interrupt [on|off|read]
e.g. switchctl ifname vlan 802_1Q interrupt read
switchctl ifname vlan 802_1Q mode 11_mode_specifiers ([D|F|C|S])
e.g. switchctl switch0 vlan 802_1Q mode DDDFCCDFSCS
switchctl ifname vlan 802_1Q mode read
e.g. switchctl switch0 vlan 802_1Q mode read
switchctl ifname vlan 802_1Q default_vid port_num vid#
e.g. switchctl switch0 vlan 802_1Q default_vid 2 0xB4A
switchctl ifname vlan 802_1Q read
e.g. switchctl switch0 vlan 802_1Q read
switchctl ifname vlan 802_1Q flush
e.g. switchctl switch0 vlan 802_1Q flush
switchctl ifname vlan 802_1Q purge vid#
e.g. switchctl switch0 vlan 802_1Q purge 0xB4A
switchctl ifname vlan 802_1Q load vid# 11_member_tags ([U|N|T|
D]) 11_port_states ([D|B|L|F)
e.g. switchctl switch0 vlan 802_1Q load 0xB4A
UUUNTTTTDDN LLLFFFDBDBB
Home |
Main Index |
Thread Index |
Old Index