7 .Nd configure a built-in Ethernet switch
10 .Op Fl "f control file"
13 .Op Fl "f control file"
17 .Op Fl "f control file"
19 .Ar phy.register[=value]
21 .Op Fl "f control file"
23 .Ar [flags] command parameter
25 .Op Fl "f control file"
29 .Op Fl "f control file"
35 utility is used to configure an Ethernet switch built into the system.
37 accepts a number of options:
38 .Bl -tag -width ".Fl f" -compact
39 .It Fl "f control file"
42 control file that represents the switch to be configured.
44 .Li /dev/etherswitch0 .
46 When reporting port information, also list available media options for
49 Produce more verbose output.
50 Without this flag, lines that represent inactive or empty configuration
54 The config command provides access to global switch configuration
56 It support the following commands:
57 .Bl -tag -width ".Ar vlan_mode mode" -compact
59 Sets the switch VLAN mode (depends on the hardware).
62 The phy command provides access to the registers of the PHYs attached
63 to or integrated into the switch controller.
64 PHY registers are specified as phy.register,
67 is usually the port number, and
69 is the register number.
70 Both can be provided as decimal, octal or hexadecimal numbers in any of the formats
73 To set the register value, use the form instance.register=value.
75 The port command selects one of the ports of the switch.
76 It supports the following commands:
77 .Bl -tag -width ".Ar pvid number" -compact
79 Sets the default port VID that is used to process incoming frames that are not tagged.
80 .It Ar media mediaspec
81 Specifies the physical media configuration to be configured for a port.
82 .It Ar mediaopt mediaoption
83 Specifies a list of media options for a port.
91 And the following flags (please note that not all flags
92 are supporterd by all switch drivers):
93 .Bl -tag -width ".Ar addtag" -compact
95 Add VLAN tag to each packet sent by the port.
97 Disable the add VLAN tag option.
99 Strip the VLAN tags from the packets sent by the port.
101 Disable the strip VLAN tag option.
103 This options makes the switch port lock on the first MAC address it seems.
104 After that, usually you need to reset the switch to learn different
107 Disable the first lock option.
108 Note that sometimes you need to reset the
109 switch to really disable this option.
111 Drop packets without a VLAN tag.
113 Disable the drop untagged packets option.
115 Enable QinQ for the port.
117 Disable QinQ for the port.
119 Enable the ingress filter on the port.
121 Disable the ingress filter.
124 The reg command provides access to the registers of the switch controller.
126 The vlangroup command selects one of the VLAN groups for configuration.
127 It supports the following commands:
128 .Bl -tag -width ".Ar vlangroup" -compact
130 Sets the VLAN ID (802.1q VID) for this VLAN group.
131 Frames transmitted on tagged member ports of this group will be tagged
133 Incoming frames carrying this tag will be forwarded according to the
134 configuration of this VLAN group.
135 .It Ar members port,...
136 Configures which ports are to be a member of this VLAN group.
137 The port numbers are given as a comma-separated list.
138 Each port can optionally be followed by
140 to indicate that frames on this port are tagged.
143 .Bl -tag -width /dev/etherswitch? -compact
144 .It Pa /dev/etherswitch?
145 Control file for the ethernet switch driver.
148 Configure VLAN group 1 with a VID of 2 and make ports 0 and 5 its members
149 while excluding all other ports.
150 Port 5 will send and receive tagged frames while port 0 will be untagged.
151 Incoming untagged frames on port 0 are assigned to vlangroup1.
152 .Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 pvid 2