The Netgear Switch, GS308Ev4, is an econmical ($23 US), 8-port switch with VLANs and port mirroring.
It use a Realtek chipset, and runs the Realtek Remote Control protocol (RRCP).
Critera:
Configuration Scheme:
| VAN | Ergess Rule | PVID | |
|---|---|---|---|
| Port 1 | VLANs 1,2,3 | Untagged | 1 |
| Port 2 | VLANs 1,2 | untagged | 2 |
| Port 3 | VLANs 1,3 | Untagged | 3 |
Critera:
| Port # | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| VLAN 1 | U | U | U | U | U |
| VLAN 200 | U | U | |||
| VLAN 300 | U | U | |||
| PVID | 1 | 200 | 300 | 1 | 1 |
In the above table, the rows show which ports are in each VLAN and whether the port is tagged (T) or untagged (U).
The last row, Port VLAN ID (PVID), is read by columns e.g. Port 1's PVID is 1 (VLAN 1), Port 2's PVID is 200 (VLAN 200), etc. Every Port has one and only one PVID. It defines and limits, which other ports it can communicate with. For example, Port 2 can only communicate with ports that are members of VLAN 200 (Ports 1 & 2).
This is an expansion of Example 1. It adds Host A2 to form Group A.
Critera:
| Port # | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| VLAN 1 | U | U | U | U | U |
| VLAN 200 | U | U | U | ||
| VLAN 300 | U | U | |||
| PVID | 1 | 200 | 300 | 200 | 1 |
Critera:
| VLAN 1 | VLAN 2 | VLAN 3 | |
| Switch A | Ports 2-4 | Ports 2,4 | Ports 3,4 |
| Swtich B | Ports 1-4 | 1,2,4 | Port 1,3,4 |
| Switch | Switch A | Switch B | |||||
| Port | 2 | 3 | 4 | 1 | 2 | 3 | 4 |
| Egress Rule | Untagged | Untagged | Tagged | Untagged | Untagged | Untagged | Tagged |
| PVID | 2 | 3 | 1 | 1 | 2 | 3 | 1 |
Critera:
| Port # | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| VLAN 1 | U | U | U | T | U |
| VLAN 200 | U | T | |||
| VLAN 300 | U | T | |||
| PVID | 1 | 200 | 300 | 1 | 1 |
| Port # | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| VLAN 1 | U | U | U | T | U |
| VLAN 200 | U | U | T | ||
| VLAN 300 | U | U | T | ||
| PVID | 1 | 200 | 300 | 1 | 1 |
Trunks are used to eliminate multiple cables. On one end, packets, from multiple sources, are merged, and on the other end, the packets are seperated according to the source that generated them. To accomplish this, on the transmitting side, a VLAN Tag that specifies the source is added to the packet. On the recieving end, the VLAN Tag is removed from the packet.
This requires that for each packet traveling accross the trunk, there has to be a VLAN on the other side with the same ID to receive the packet. However, the two VLANs can have diffent memembers. For example, at Switch A, VLAN 200 members are Ports 2 and 4, and on Switch B VLAN 200 members are Ports 1,2 and 4. Thus, in Switch A, Ports 2 and 4 can only communicate with each other, but in Switch B Ports 1,2 and 4 can communicate with other.
Now that we know about Trunks and VLAN Tags, there is one exception. Since all of the other VLANs have VLAN Tags, one of VLANs does not have to have a VLAN tag. This is referred to as the Native VLAN. On Cisco fully monitored switches, you can specify which VLAN is the Native VLAN. On switches with less features, you can not specify which VLAN is the Native VLAN.
For good illustrative explinations of Trunks, VLAN Tags, and the Native VLAN, see the references in this section. However, the first reference, assumes the router is an Enterprize-grade with VLAN capability. Consumer-grade router, do not have VLAN capability.
For diagnostic purposes, most VLAN switches include a port mirroring feature that allows, you to mirror and monitor one or more ports. This feature does require an unused port and software such as Wireshark. This feature does not require any changes to the table for Switch A nor Switch B.
For TP-Link's Example 2, I used Port 1 on Switch A as the monitoring port. See the diagram below.
All of my devices including the switches are in the same subnet. The numbers in blue beside each device is last octet of the IPv4 address. This arragement allowed me to access both switch's web interfaces (and make changes) from the Wireshark Host.
I monitored the trunk (Port 4), and pinged each host: re
| Source | Destination | Request2 | Response |
|---|---|---|---|
| xxx.xxx.xxx.78 | xxx.xxx.xxx.56 | 200 | 200 |
| xxx.xxx.xxx.56 | xxx.xxx.xxx.78 | 200 | 200 | xxx.xxx.xxx.52 | xxx.xxx.xxx.54 | 300 | 300 | xxx.xxx.xxx.54 | xxx.xxx.xxx.52 | 300 | 300 |
| xxx.xxx.xxx.78 | xxx.xxx.xxx.1 | 200 | |
| xxx.xxx.xxx.56 | xxx.xxx.xxx.1 | 200 | |
| xxx.xxx.xxx.52 | xxx.xxx.xxx.1 | 300 | |
| xxx.xxx.xxx.54 | xxx.xxx.xxx.1 | 300 |
This shows that VLAN 1 is the Native VLAN. The only thing suprising is that ping xxx.xxx.xxx.52 to xxx.xxx.xxx.1 (router) is traversing accross the trunk. Ditto for ping xxx.xxx.xxx.56 to xxx.xxx.xxx.1, it too is traversing accross the trunk. It is my believed that this is because VLAN Tag IDs are the same for the requst and respone. Thus, Switch B is unable to determine where the response came from.
The Wireshark Host can also ping the router. However, the results were not what I was expecting.
Port Mirroring attemps to supress duplicate entries. That is, it mergers what the port would normal see with the mirrored port, and it tries not to duplicate entries.
By going through the router, you can SSH into any host without modifying either switch table. That is, connect to the router through one of its ethernet ports or wirelessly. This will allow you to ping from any host. Howver, if the SSH traffic goes through the trunk, you will also see the SSH traffic.
A shared Network Printer is added to the previous example.
Critera:
See the diagram and tables below.
Adding a Network Printer to Switch B, Port 5, requires making two changes to the Switch B Table:
| Port # | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| VLAN 1 | U | U | U | T | U |
| VLAN 200 | U | U | T | ||
| VLAN 300 | U | U | T | ||
| PVID | 1 | 200 | 300 | 1 | 1 |
| Port # | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| VLAN 1 | U | U | U | T | U |
| VLAN 200 | U | U | T | ||
| VLAN 300 | U | U | T | U | |
| PVID | 1 | 200 | 300 | 1 | 1 |
After troubleshooting, you can remove the Wireshark Host at Port 1 on Switch A.
This is the same as TP-Link's Example 2, but we are going to force the router to use a VLAN Tag.
Critera:
You will need to create a new VLAN for this.
Now, whenever you ping the router, if the response going across the trunk it a VLAN 88 Tag.
| Port # | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| VLAN 1 | U | U | U | T | U |
| VLAN 200 | U | T | |||
| VLAN 300 | U | T | |||
| VLAN 88 | U | U | T | ||
| PVID | 1 | 200 | 300 | 1 | 1 |
| Port # | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| VLAN 1 | U | U | U | T | U |
| VLAN 200 | U | U | T | ||
| VLAN 300 | U | U | T | ||
| VLAN 88 | U | U | U | T | |
| PVID | 88 | 200 | 300 | 1 | 1 |