HON’s Wiki # TP-Link JetStream Switches
Home / Networking
Contents
Using
- TP-Link T2600G-28TS (24+4-port L2 managed switch)
TODO
- Auto install.
- IGMP and MLD snooping.
- RSTP.
- Centralized logging.
- Fast LACP.
- QoS.
- Inactivity timer.
Info
- Supports (T2600G):
- Access security features for both IPv4 and IPv6, like storm control, DHCPv4/v6 snooping, ARP snooping, ND snooping, etc.
- RADIUS and TACACS+.
- SNMP and sFlow.
- DHCP/BOOTP client.
- Default mgmt. address:
192.168.0.1
- Default admin user: Username
admin
and password admin
.
- Console port (micro-USB or RS232 RJ45):
- Baud rate: 38400bps
- Data bits: 8
- Parity: None
- Stop bits: 1
- Flow control: None
- As it uses some outdates SSH algorithms, you may need to enable some older algorithms:
ssh -o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-dss -c aes128-cbc <user>@<host>
LED Statuses
- Power/PWR:
- Off: Powered off.
- On: Powered on.
- Flashing: PSU problem.
- System/SYS:
- Flashing: OK.
- On or off: Problem.
Initial Setup
Warning: These steps are incomplete as we decided not to use these switches when we found out they can’t run IPv4 and IPv6 source guard simultaneously.
- Connect to the switch using serial (see info about for details).
- Note that you may need to use
Ctrl+H
for backspace.
- Login with username
admin
and password admin
and set a new admin password when asked.
- Enter privileged exec mode:
enable
- (Optional) Show version:
show system-info
- See the note below on how to upgrade it.
- Enter config mode:
configure
- Use
exit
to exit.
- Use
no <...>
to negate a command.
- Add new admin user:
user name <username> privilege admin secret 0 <password>
secret 0
will automatically hash the password using MD5.
- The
password-encryption
service is not used for secret
, only password
.
- As I don’t know which hashing algorithm
password-encryption
(or password 7
) uses, I trust it even less than MD5.
- (Optional) Disable old admin user:
no user name admin
- You need to re-log as the new admin first.
- (Optional) Disable HTTP server:
no ip http server
no ip http secure-server
- Enable SSH and disable Telnet:
- Set version:
no ip ssh version v1
- Enable server:
ip ssh server
- Disable Telnet:
telnet disable
- Change Switch Database Management (SDM) template:
- (Note) Show SDM template info:
show sdm prefer {used|default|...}
- (Note) Show actual usage:
ipv6 source binding
- (Note)
enterpriseV6
is required for enabling IPv6 ND inspection.
- Allocate more resources to IPv6:
sdm prefer enterpriseV6
- TODO Check how many entries are actually used. The max count seems low.
- Setup physical interfaces (basics):
- Enter one or multiple interfaces:
int g 1/0/1
or int range g 1/0/25-28
- Set description:
desc <desc>
- Disable (if unused):
shutdown
- Setup LAGs (LACP):
- Set load balancing method (global):
port-channel load-balance src-dst-ip
- Enter the member interfaces:
int range g 1/0/23-24
(example)
- Make them members of the LAG and use LACP:
channel-group <n> mode active
- Enter port channel interface:
interface port-channel <n>
- Configure it as an interface (applies when the LACP interface is up).
- Show the status:
show etherchannel detail
- Define VLANs (L2):
- Enter the VLAN config:
vlan <VID>
- Name it:
name <name>
- Setup VLAN trunk ports:
- Enter the member interface configs.
- Allow only tagged frames:
switchport acceptable frame tagged
- Set allowed tagged VLANs:
switchport general allowed vlan <VID-list> tagged
- Setup VLAN access ports:
- Enter the member interface configs.
- Set allowed PVID VLAN:
switchport general allowed vlan <VID> untagged
- Set the PVID VLAN:
switchport pvid <VID>
- Setup VLAN mixed ports:
- Enter the member interface configs.
- Set allowed tagged VLANs:
switchport general allowed vlan <VID-list> tagged
- Set allowed PVID VLAN:
switchport general allowed vlan <VID> untagged
- Set the PVID VLAN:
switchport pvid <VID>
- Setup L3 interface:
- Enter the interface (physical, VLAN, etc.).
- Set the IPv4 address:
ip address <address> <subnet>
- Enable IPv6:
ipv6 enable
- Set the IPv6 address:
ipv6 address <address>/<prefix-length>
- Disable default VLAN:
- Enter VLAN:
int vlan 1
- Disable it:
shutdown
- Remove the address:
no ip address
- Disable IPv6:
no ipv6 enable
- Set hostname:
hostname
- Set default routes:
- IPv4:
ip route 0.0.0.0 0.0.0.0 <next-hop>
- IPv6:
ipv6 route ::/0 <next-hop>
- Set DNS servers: TODO Not possible?
- Set time and NTP servers:
- Set recurring DST:
system-time dst recurring last Sun Mar 2:00 last Sun Oct 3:00
(Norway)
- (Optional) Set time and NTP servers:
system-time ntp UTC+01:00 <ip-1> <ip-2> <update-hours>
- (Note) Both NTP servers must be IP addresses and using the same IP version, but they may be the same address.
- Enable LLDP:
- Enable globally:
lldp
- Enter physical interface configs.
- (Optional) Disable transmit:
no lldp transmit
- (Optional) Disable receive:
no lldp receive
- (Optional) Enable LLDP-MED:
lldp med-status
- (Optional) Enable flow control:
- (Note) Flow control requires that the connected devices support it in order for it to work. As it pauses all traffic when “triggered”, setting up QoS instead of flow control is a much better option if possible.
- Enter the interface configs (physical or LAG).
- Enable:
flow-control
- Show status:
show int status
- Enable Enerfy Efficient Ethernet (EEE):
- (Note) EEE is safe to enable on all ports and does not require that the connected devices are compatible in any way.
- Enter the physical interfaces (preferably all ports).
- Enable:
eee
- Show status:
show int eee
- Enable storm control:
- Enter an interface range.
- Set to drop on exceed:
storm-control exceed drop
- Set rate mode:
storm-control rate-mode {kbps|ratio|pps}
(e.g. ratio)
- Enable for broadcast:
storm-control broadcast <threshold>
(e.g. 5%)
- Enable for multicast:
storm-control multicast <threshold>
(e.g. 5%)
- Enable for unknown unicast:
storm-control unicast <threshold>
(e.g. 5%)
- Enable DHCPv4/DHCPv6/ND snooping:
- (Note) Snooping by itself doesn’t do anything but is used by other protection mechanisms.
- Enable globally (global):
{ip|ipv6} {dhcp|nd} snooping
- Enable for VLAN (global):
{ip|ipv6} {dhcp|nd} snooping vlan <vid-range>
- Set max number of bindings per port (interface):
{ip|ipv6} {dhcp|nd} snooping max-entries <n>
(e.g. 2)
- Show bindings:
show {ip|ipv6} source binding
- Enable ARP (IPv4) inspection/detection:
- (Note) ARP detection prevents ARP spoofing and flooding.
- Enable globally:
ip arp inspection
- Enable for VLAN (global):
ip arp inspection vlan <vid-range>
- (Debug) Enable logging (global):
ip arp inspection vlan <vid-range> logging
- Validate source MAC address (global):
ip arp inspection validate src-mac
- Validate destination MAC address (global):
ip arp inspection validate dst-mac
- Validate sender/target IP address (global):
ip arp inspection validate ip
- Set trusted interface (interface):
ip arp inspection trust
- TODO Rate limiting interfaces.
- (Note) To restore an interface that has exceeded the rate limit, run
ip arp inspection recover
on it.
- Enable ND (IPv6) detection:
- (Note) ND detection will validate the source IPv6 and MAC addresses for ND packets and will discard router adversisements and router redirects on untrusted ports.
- Enable globally (global):
ipv6 nd detection
- Enable for VLAN (global):
ipv6 nd detection vlan <vid-range>
- (Debug) Enable logging (global):
ipv6 nd detection vlan <vid-range> logging
- Set trusted interface (interface):
ipv6 nd detection trust
- TODO Fix, seems to fail to learn link local addresses from newly connected devices and then drops RSes and NAs from them due to IMPB mismatch.
- Enable IPv4/IPv6 source guard:
- (Note) IP source guard validates the source IP and MAC addresses for normal traffic.
- Enable DHCPv4/DHCPv6/ND snooping (see above).
- TODO Enable globally?
- Enable for IP and MAC (interface):
{ip|ipv6} verify source sip[v6]-mac
- (Debug) Enable logging (global):
ip verify source logging
TODO IPv4 only?
- TODO Fix, enabling for IPv6 drops all traffic for both IPv4 and IPv6.
- WARNING: These switches don’t have enough resources to run both IPv4 and IPv6 source guard. On one switch I tested, it caused it to drop all traffic for both protocols. On another switch, it simply denied me from activating IPv4 source guard when using the “enterpriseV6” SDM template.
- Enable DoS prevention:
- (Note) Make sure everything still works as normal afterwards. Maybe don’t use this, for stability.
- Enable globally:
ip dos-prevent
- Prevent scan-synfin:
ip dos-prevent type scan-synfin
- Prevent xma-scan:
ip dos-prevent type xma-scan
- Setup IGMP (IPv4) snooping: TODO
- Setup MLD (IPv6) snooping: TODO
- (Optional) Setup TACACS+: TODO
- Enable SNMP: TODO
- Setup RSTP:
- Set variant:
spanning-tree mode rstp
- Enable globally:
spanning-tree
- Enable on all ports (interface):
spanning-tree
- Enable portfast for edge ports (interface):
spanning-tree common-config portfast enable
- Enable BPDU guard for edge ports (interface):
spanning-tree bpduguard
- Enable loop guard for uplink ports (interface):
spanning-tree guard loop
- (Optional) Setup sFlow: TODO
- Set terminal idle timer: TODO
- Save the config (exec mode):
copy run start
Commands
Basics
- System info:
- Systrem info:
show system-info
- Image info:
show image-info
- CPU utilization:
show cpu-utilization
- Memory utilization:
show memory-utilization
- Configuration:
- Show startup config:
show startup-config
- Show running config:
show running-config
- Save configuration:
copy run start
- Interfaces:
- Show short operational L2 status:
show int status
- Show short configured L2 status:
show int conf
- Show short L3 status:
show ip int brief
Configuration Mode
- Enter interface range:
int range <type> <full-start>-<end>
(e.g. int range g 1/0/1-24
)
Miscellanea
- Reset config and restart:
reset
- Restart:
reboot
Tasks
Setup Netboot
- See: How to configure DHCP Auto Install to let Switch get configuration file and image file from TFTP server? (TP-Link)
- Show status (enable mode):
show boot autoinstall
- When autoinstall is enabled, mode should show
Start
(not Stop
) and state should show something like Waiting for boot options
(not Stopped
).
- Configuration:
- Set autoinstall to begin on boot (as well as now):
boot autoinstall persistent-mode
- Save the autoinstall config as the startup config:
boot autoinstall auto-save
- Reboot after autoinstalling (used with
auto-save
): boot autoinstall auto-reboot
- Set the retry count:
boot autoinstall retry-count <count>
(e.g. 3)
- Enable autoinstall (now!):
boot autoinstall start
- Note that only certain autoboot options are saved in the config.
- Enabling autoinstall will immediately change to DHCP client mode for whichever interface/VLAN has an IP address (which exactly?).
- The config does not need to be saved before rebooting the device, since persistent mode and enablement isn’t stored in it.
- When persistent mode is enabled, it’s only enabled for the next boot (not permanently, disables itself on reboot).
- Since autoinstall can’t be enabled permanently, it may be required to SSH/telnet into the device and run
boot autoinstall start
in config mode to kickstart it? (TODO Needs more testing.)
- The loaded configuration file is just like any saved/exported configuration file from the switch.
- Some things need to be set at boot time, like setting the SDM template (required for enabling IPv6 ND inspection). Since the autoinstall config is loaded after boot, either the autoinstall config must be saved and the switch rebooted, or the startup config must have it already set.
TODO IPv6?
TODO NTP broken (show system-time ntp
).
TODO It seems to get merged with the existing config. Add explicit “no” statements to override startup?
Upgrade Firmware
TODO
hon.one
| HON95/wiki
| Edit page