Port Configuration Guide Tplink
Port Configuration Guide Tplink
CONTENTS I
7.2.2 Configuration Scheme........................................................................................................................................ 7-4
CONTENTS II
Managing Physical Interface
1 Physical Interface
1.1 Overview
Interfaces of a device are used to exchange data and interact with other network devices.
Interfaces are classified into physical interfaces and logical interfaces.
Physical interfaces are the ports on the front panel or rear panel of the switch.
Logical interfaces are manually configured and do not physically exist, such as loopback
interfaces and routing interfaces.
Basic Parameters
You can configure port status, speed mode, duplex mode, flow control and other basic
parameters for ports.
Port Mirror
This function allows the switch to forward packet copies of the monitored ports to a specific
monitoring port. Then you can analyze the copied packets to monitor network traffic and
troubleshoot network problems.
Port Security
You can use this feature to limit the number of MAC addresses that can be learned on each port,
thus preventing the MAC address table from being exhausted by the attack packets.
Port Isolation
You can use this feature to restrict a specific port to send packets to only the ports in the forward-
port list that you configure.
Loopback Detection
This function allows the switch to detect loops in the network. When a loop is detected on a port,
the switch will display an alert on the management interface and further block the corresponding
port according to your configurations.
Choose the menu Switching > Port > Port Config to load the following page.
Select and configure your desired ports or LAGs. Then click Apply to make the settings effective.
Type: Displays the port type. Copper indicates an Ethernet port, and SFP or SFP+
indicates a fiber port.
Status: With this option enabled, the port forwards packets normally. Otherwise, the
port discards all the received packets. By default, it is enabled.
Speed: Select the appropriate speed mode for the port. When Auto is selected, the
port autonegotiates speed mode with the connected device. The default
setting is Auto. This value is recommended if both ends of the line support auto-
negotiation.
Duplex: Select the appropriate duplex mode for the port. There are three options: Half,
Full and Auto. When Auto is selected, the port autonegotiates duplex mode
with the connected device. The default setting is Auto.
Flow Control: With this option enabled, the switch synchronizes the data transmission speed
with the peer device, thus avoiding the packet loss caused by congestion. By
default, it is disabled.
Jumbo: With this option enabled, the port can send jumbo frames. The default MTU
(Maximum Transmission Unit) size for frames received and sent on all ports is
1518 bytes. For the port with Jumbo enabled, the MTU size is up to 9216 bytes,
thus allowing the port to send jumbo frames. By default, it is disabled.
Note:
We recommend that you set the ports on both ends of a link as the same speed and duplex mode.
Step 1 configure
Enter global configuration mode.
Step 2 interface [fastEthernet port | range fastEthernet port-list | gigabitEthernet port | range
gigabitEthernet port-list | ten-gigabitEthernet port | range ten-gigabitEthernet port-list]
Enter interface configuration mode.
shutdown
no shutdown
Use shutdown to disable the port, and use no shutdown to enable the port. When the
status is enabled, the port can forward packets normally, otherwise it will discard the
received packets. By default, all ports are enabled.
flow-control
Enable the switch to synchronize the data transmission speed with the peer device, avoiding
the packet loss caused by congestion. By default, this feature is disabled.
jumbo
Change the MTU (Maximum Transmission Unit) size on the port to support jumbo frames.
The default MTU size for frames received and sent on all ports is 1518 bytes. For the port
with Jumbo enabled, the MTU size is up to 9216 bytes, thus allowing the port to send jumbo
frames.
Step 4 end
Return to privileged EXEC mode.
The following example shows how to implement the basic configurations of port1/0/1, including
setting a description for the port, making the port autonegotiate speed and duplex with the
neighboring port, and enabling the flow-control and jumbo feature:
Switch#configure
Switch(config-if)#no shutdown
Switch(config-if)#speed auto
Switch(config-if)#duplex auto
Switch(config-if)#flow-control
Switch(config-if)#jumbo
Switch(config-if)#end
Choose the menu Switching > Port > Port Mirror to load the following page.
The above page displays a mirror session, and no more session can be created. Click Edit to
configure this mirror session on the following page.
1) In the Destination Port section, specify a monitoring port for the mirror session, and click
Apply.
2) In the Source Port section, select one or multiple monitored ports for configuration. Then
set the parameters and click Apply to make the settings effective.
Ingress: With this option enabled, the packets received by the monitored port will be
copied to the monitoring port. By default, it is disabled.
Egress: With this option enabled, the packets sent by the monitored port will be copied
to the monitoring port. By default, it is disabled.
Note:
• The member port of an LAG cannot be set as a monitoring port or monitored port.
• A port cannot be set as the monitoring port and monitored port at the same time.
Step 1 configure
Enter global configuration mode.
Step 4 end
Return to privileged EXEC mode.
The following example shows how to copy the received and transmitted packets on port 1/0/1,2,3
to port 1/0/10.
Switch#configure
Monitor Session: 1
Switch(config-if)#end
Choose the menu Switching > Port > Port Security to load the following page.
2) Specify the maximum number of the MAC addresses that can be learned on the port, and
then select the learn mode of the MAC addresses.
Max Learned MAC: Specify the maximum number of MAC addresses that can be learned on the
port. When the learned MAC address number reaches the limit, the port will
stop learning. The default value is 64.
Learned Num: Displays the number of MAC addresses that have been learned on the port.
Learn Mode: Select the learn mode of the MAC addresses on the port. Three modes are
provided:
Dynamic: The switch will delete the MAC addresses that are not used or
updated within the aging time. It is the default setting.
Static: The learned MAC addresses are out of the influence of the aging time
and can only be deleted manually. The learned entries will be cleared after the
switch is rebooted.
Permanent: The learned MAC addresses are out of the influence of the aging
time and can only be deleted manually. The learned entries will be saved even
the switch is rebooted.
Status: Select the status of Port Security. Three kinds of status can be selected:
Drop: When the number of learned MAC addresses reaches the limit, the port
will stop learning and discard the packets with the MAC addresses that have
not been learned.
Forward: When the number of learned MAC addresses reaches the limit, the
port will stop learning but send the packets with the MAC addresses that have
not been learned.
Disable: The number limit on the port is not effective, and the switch follows
the original forwarding rules. It is the default setting.
Note:
• Port Security cannot be enabled on the member port of a LAG, and the port with Port Security enabled
cannot be added to a LAG.
• On one port, Port Security and 802.1X cannot be enabled at the same time.
Step 1 configure
Enter global configuration mode.
Step 2 interface [fastEthernet port | range fastEthernet port-list | gigabitEthernet port | range
gigabitEthernet port-list | ten-gigabitEthernet port | range ten-gigabitEthernet port-list]
Enter interface configuration mode.
mode: Learn mode of the MAC address. There are three modes:
dynamic: The switch will delete the MAC addresses that are not used or updated within the
aging time.
static: The learned MAC addresses are out of the influence of the aging time and can only be
deleted manually. The learned entries will be cleared after the switch is rebooted.
permanent: The learned MAC address is out of the influence of the aging time and can only
be deleted manually. The learned entries will be saved even the switch is rebooted.
Step 4 end
Return to privileged EXEC mode.
The following example shows how to set the maximum number of MAC addresses that can be
learned on port 1/0/1 as 30 and configure the mode as permanent and the status as drop:
Switch#configure
Switch(config-if)#end
Choose the menu Switching > Port > Port Isolation to load the following page.
The above page displays the port isolation list. Click Edit to configure Port Isolation on the
following page.
2) In the Forward Portlist section, select the forward ports or LAGs which the isolated ports
can only communicate with. It is multi-optional.
Step 1 configure
Enter global configuration mode.
Step 2 interface [fastEthernet port | range fastEthernet port-list | gigabitEthernet port | range
gigabitEthernet port-list | ten-gigabitEthernet port | range ten-gigabitEthernet port-list]
Enter interface configuration mode.
Step 4 end
Return to privileged EXEC mode.
The following example shows how to add ports 1/0/1-3 and LAG 4 to the forward list of port
1/0/5:
Switch#configure
Switch(config-if)#end
To avoid broadcast storm, we recommend that you enable storm control before loopback
detection is enabled. For detailed introductions about storm control, refer to Managing QoS.
Choose the menu Switching > Port > Loopback Detection to load the following page.
1) In the Global Config section, enable loopback detection and configure the global
parameters. Then click Apply.
Automatic Set the recovery time globally, after which the blocked port in Auto Recovery
Recovery Time: mode can automatically recover to normal status.
It should be integral times of detection interval. The value ranges from 1-100 and
is 3 by default.
Web Refresh With this option enabled, the switch refreshes the web timely. By default, it is
Status: disabled.
Web Refresh If you enabled web refresh, set the refresh interval between 3 and 100 seconds.
Interval: The default value is 6 seconds.
2) In the Port Config section, select one or multiple ports for configuration. Then set the
parameters and click Apply to make the settings effective.
Operation Mode: Select the operation mode when a loopback is detected on the port:
Alert: The switch will display alerts. It is the default setting.
Port Based: In addition to displaying alerts, the switch will block the port on
which the loop is detected.
Recovery Mode: If you select Port Based as the operation mode, you also need to configure the
recovery mode for the blocked port:
Auto: The blocked port will automatically recover to normal status after the
automatic recovery time. It is the default setting.
Manual: You need to manually release the blocked port. Click the Recovery
button to release the selected port.
Step 1 configure
Enter global configuration mode.
Step 2 loopback-detection
Enable the loopback detection feature globally. By default, it is disabled.
Step 5 interface [fastEthernet port | range fastEthernet port-list | gigabitEthernet port | range
gigabitEthernet port-list | ten-gigabitEthernet port | range ten-gigabitEthernet port-list]
Enter interface configuration mode.
Step 6 loopback-detection
Enable loopback detection of the port. By default, it is disabled.
Step 9 end
Return to privileged EXEC mode.
The following example shows how to enable loopback detection globally (keeping the default
parameters):
Switch#configure
Switch(config)#loopback-detection
Switch(config-if)#end
The following example shows how to enable loopback detection of port 1/0/3 and set the process
mode as alert and recovery mode as auto:
Switch#configure
Switch(config-if)#loopback-detection
Switch(config-if)#end
7 Configuration Examples
As shown below, several hosts and a network analyzer are directly connected to the switch. For
network security and troubleshooting, the network manager needs to use the network analyzer
to monitor the data packets from the end hosts.
Gi1/0/2-5 Gi1/0/1
Switch
Hosts Network Analyzer
To implement this requirement, you can configure port mirror to copy the packets from ports
1/0/2-5 to port 1/0/1. The overview of configuration is as follows:
1) Specify ports 1/0/2-5 as the source ports, allowing the switch to copy the packets from the
hosts.
2) Specify port 1/0/1 as the destination port so that the network analyzer can receive mirrored
packets from the hosts.
Exampled with T2600G-28TS, the following sections provide configuration procedure in two
ways: using the GUI and using the CLI.
1) Choose the menu Switching > Port > Port Mirror to load the following page. It displays the
information of the mirror session.
2) Click Edit on the above page to load the following page. In the Destination Port section,
select port 1/0/1 as the monitoring port and click Apply.
3) In the Source Port section, select ports 1/0/2-5 as the monitored ports, and enable Ingress
and Egress to allow the received and sent packets to be copied to the monitoring port. Then
click Apply.
Switch#configure
Switch(config)#end
Monitor Session: 1
As shown below, three hosts and a server are connected to the switch and all belong to VLAN 10.
With the VLAN configuration unchanged, Host A is not allowed to communicate with the other
hosts except the server, even if the MAC address or IP address of Host A is changed.
Switch
Gi1/0/1 Gi1/0/4
Gi1/0/2 Gi1/0/3
You can configure port isolation to implement the requirement. Set 1/0/4 as the only forwarding
port for port 1/0/1, thus forbidding Host A to forward packets to the other hosts.
Exampled with T2600G-28TS, the following sections provide configuration procedure in two
ways: using the GUI and using the CLI.
1) Choose the menu Switching > Port > Port Isolation to load the following page. It displays
the port isolation list.
2) Click Edit on the above page to load the following page. Select port 1/0/1 as the isolated port,
and select port 1/0/4 as the forwarding port. Click Apply.
Switch#configure
Switch(config-if)#end
......
To reduce the impacts of broadcast storms, users need to detect loops in the network via Switch
A and timely block the port on which a loop is detected.
Switch A
Gi1/0/1 Gi1/0/3
Gi1/0/2 Management Host
Access-layer Switches
Loop
Enable loopback detection on ports 1/0/1-3 and configure SNMP to receive the notifications. For
detailed instructions about SNMP, refer to Managing SNMP. Here we introduce how to configure
loopback detection and monitor the detection result on the management interface of the switch.
Exampled with T2600G-28TS, the following sections provide configuration procedure in two
ways: using the GUI and using the CLI.
1) Choose the menu Switching > Port > Loopback Detection to load the configuration page.
2) In the Global Config section, enable loopback detection and web refresh globally. Keep the
default parameters and click Apply.
3) In the Port Config section, enable ports 1/0/1-3, select the operation mode as Port based so
that the port will be blocked when a loop is detected, and keep the recovery mode as Auto so
that the port will recover to normal status after the automatic recovery time. Click Apply.
4) Monitor the detection result on the above page. The Loop status and Block status are
displayed on the right side of ports.
1) Enable loopback detection globally and configure the detection interval and recovery time.
Switch#configure
Switch(config)#loopback-detection
Switch(config)#loopback-detection interval 30
Switch(config)#loopback-detection recovery-time 3
2) Enable loopback detection on ports 1/0/1-3 and set the process mode and recovery mode.
Switch(config-if)#loopback-detection
Switch(config-if)#exit
Switch(config-if)#loopback-detection
Switch(config-if)#exit
Switch(config-if)#loopback-detection
Switch(config-if)#end
Port Config
Type Copper
Status Enable
Speed Auto
Duplex Auto
Jumbo Disable
Port Mirror
Ingress Disable
Egress Disable
Port Security
Learned Num 0
Status Disable
Loopback Detection