In this note I'll explain how to manage physical Ethernet (FastEthernet, Gigabit Ethernet) ports (not VLAN interfaces) on 3Com switches: on menu-driven ones (4400, 4900, 4200, etc.) and command-driven - newer ones (4500, etc.).
The menu-driven type looks like this:
Menu options: --------------3Com SuperStack 3 Switch 4900---------------
bridge - Administer bridge-wide parameters
gettingStarted - Basic device configuration
logout - Logout of the Command Line Interface
physicalInterface - Administer physical interfaces
protocol - Administer protocols
security - Administer security
system - Administer system-level functions
trafficManagement - Administer traffic management
Type ? for help
----------------------------------------- (1)---------------------------
Select menu option:
The command-driven type looks like this:
<4500>
%Apr 3 21:48:45:330 2000 4500 SHELL/5/LOGIN:- 1 - VTY(10.0.0.2) in unit1 login
<4500>system-view
System View: return to User View with Ctrl+Z.
[4500]
Going forward I'll assume that you're familiar with managing these types and will understand which commands I'm entering. For the menu-driven type - its own, for the command-driven type - its own.
Don't forget to enter system mode in the command-driven type:
<4500> system-view
Brief contents:
- Copying configuration from one port to another
- Limiting bandwidth for broadcast traffic and multicast traffic
- Port information
- Setting duplex and speed
- Enabling or disabling Flow Control
- Changing the port link mode (for VLANs)
- Enabling and disabling a port
Copying configuration from one port to anotherNote. Available only for command-driven switches.
[4500] copy configuration source ethernet 1/0/1 destination ethernet 1/0/2
Here, instead of 1/0/1 specify the port from which the configuration should be copied, and instead of 1/0/2 - the port whose configuration should be replaced with the copied one.
Limiting bandwidth for broadcast traffic and multicast trafficNote. Available only for command-driven switches.
[4500] interface ethernet 1/0/1
[4500-Ethernet1/0/1]broadcast-suppression 20
Here we first entered the configuration of port 1/0/1, and then set the throughput value to 20%. This means that 80% of the traffic will be dropped and only 20% of packets will be passed through.
Similarly for multicast traffic:
[4500] interface ethernet 1/0/1
[4500-Ethernet1/0/1]multicast-suppression 20
Port informationMenu-driven:
phy eth det 1:20
here instead of 1:20 enter the switch number in the stack and the port number.
Command-driven:
[4500]display interface Ethernet 1/0/1
where instead of 1/0/1 - the switch number in the stack and port number.
Setting duplex and speedMenu-driven:
phy eth portCap
Select Ethernet port (unit:port,?): 1:4
Enter new advertised capabilities - comma separated OR all
(10half,10full,100half,100full,flowControl,all)
[10half,10full,100half,100full,flowControl]:
- Instead of 1:4 specify the switch number in the stack and the port number you'll be managing.
- After the colon, list the allowed port operating modes, separated by commas, including port speed and its duplex.
To set the port operating mode - run the following command:
phy eth portMode
Select Ethernet ports (unit:port...,?): 1:4
Enter auto-negotiation mode (enable,disable)[enable]:
Enter fallback port mode (10half,10full,100half,100full)[100half]:
- Instead of 1:4 enter the switch number in the stack and the port number that will be managed.
- For the "auto-negotiation" question, specify whether this port can automatically select the speed and duplex mode depending on the connected equipment (enable) or whether a fixed mode must be set (disable).
- For the "fallback port mode" question, enter the mode to "fall back" to when it's not possible to operate at the maximum configuration. For example, you can set the switch's behavior so that when full-duplex operation at 100Mbit/s is not possible, it will not switch to 100Mbit/s half-duplex, but go straight to 10Mbit.
Command-driven:
Setting duplex
[4500] interface ethernet 1/0/1
[4500-Ethernet1/0/1]duplex auto
Here, instead of 1/0/1 specify the switch number in the stack and the port you'll be managing, and instead of auto you can set fixed modes full or half.
Setting speed:
[4500]interface ethernet 1/0/1
[4500-Ethernet1/0/1]speed 10
Here, instead of 1/0/1 specify the switch number in the stack and the port you'll be managing, and instead of 10 - specify the speed (10, 100, 1000 or auto).
Enabling or disabling Flow ControlMenu-driven:
phy eth 1:4 flow on
will enable FlowControl for port 1:4.
phy eth 1:4 flow off
will disable FlowControl for port 1:4.
Command-driven:
[4500]interface ethernet 1/0/1
[4500-Ethernet1/0/1]flow-control
will enable FlowControl on port 1/0/1.
[4500]interface ethernet 1/0/1
[4500-Ethernet1/0/1]undo flow-control
will disable FlowControl on port 1/0/1.
Changing the port link mode (for VLANs)From the point of view of a menu-driven switch, managing the traffic type is part of managing VLANs, while from the point of view of a command-driven switch, it's part of the physical port. That's why in menu-driven and command-driven switches these settings are located in different places.
There are three main modes we're interested in: access, trunk and hybrid.
- access : Accepts only untagged traffic,
- trunk : Accepts only tagged traffic (i.e. packets without VLAN information will be dropped);
- hybrid: Accepts both types of traffic, with the ability to route untagged packets into a specific VLAN, and tagged ones - into their own VLANs.
It should be noted that menu-driven switches automatically understand what kind of port is in front of them. So, if you assign an untagged VLAN to a port and then also tell other VLANs to use this port, but in tagged mode only - the port becomes hybrid. Likewise, if we then remove the untagged VLAN from this port afterward - the port turns into a trunk.
Command-driven switches, such as the 3Com 4500, need to be told exactly what kind of port it is and what traffic it will be listening for on it. In this case, if a port is, say, declared trunk and you then try to attach untagged reception of data for a specific VLAN to it - you'll get an error.
Menu-driven:
is done from VLAN management. Just add the needed VLANs in the needed mode (we won't discuss VLAN management here - that's a separate article).
In the following example we'll turn port 1:4 into a hybrid port, make all traditional untagged traffic count as traffic on VLAN=6, while also working in tagged mode with VLAN=20 and VLAN=30.
bridge vlan mod add 6 1:4 untag
bridge vlan mod add 20 1:4 tag
bridge vlan mod add 30 1:4 tag
Command-driven:
[4500]interface ethernet 1/0/1
[4500-Ethernet1/0/1]port link-type trunk
Here we set the trunk operating mode for port 1/0/1 (i.e. receiving and sending only tagged packets).
Enabling and disabling a portSometimes it's necessary to remotely enable or disable a port - in this case the link on the port is forcibly brought down, as if the cable were disconnected, and the device on the other end of the patch cord starts to think it's not plugged in anywhere.
Menu-driven:
Disabling the port
phy eth portState 1:4 disable
Enabling the port
phy eth portState 1:4 enable
In these examples we were playing around with port 1:4.
Command-driven:
Disabling the port
[4500]interface ethernet 1/0/1
[4500-Ethernet1/0/1]shutdown
Enabling the port
[4500]interface ethernet 1/0/1
[4500-Ethernet1/0/1]undo shutdown
Well, that's the essentials in brief. By analogy, you can manage all the other, additional port parameters as well.
Comments