Score:0

Filtering traffic between ports on an ethernet switch

jp flag

I would like to know if there is a standard way of limiting traffic between ports on a managed Ethernet switch? I have a 7-port Ethernet switch (microchip - KSZ9897), which is a layer 2 switch, but with IEEE 802.1X (ACL) and 802.1Q (VLAN) support. What I specifically need is the following:

I need to only allow traffic from port 1 to 2 for one specific IP address. The same from port 2 to port 1, one specific IP address. Port 2 will also need to forward traffic to ports 3-7, using an alias IP address.

Could this be done using ACL or another method? All hosts are on the same subnet, as there are no routers in the system, and I am not able to add a router.

Score:3
cn flag
Bob

Switching is Layer 2 functionality and the kind of ACL you want to create should be acting on Layer 3, the IP layer with IP-addresses en Port numbers.

Therefore "a standard way of limiting traffic between ports on a managed Ethernet switch" does not exist.

Having said that, many managed L2 switches are more capable but there is no standard/universal way of configuring them.

Note that the datasheet for your device suggest that L3 ACL's are supported in your hardware : https://ww1.microchip.com/downloads/en/DeviceDoc/KSZ9897R-Data-Sheet-DS00002330D.pdf says the following:

section §4.4.16 ACCESS CONTROL LIST (ACL) FILTERING

An Access Control List (ACL) can be created for each port to perform filtering on incoming layer 2 MAC, layer 3 IP or layer 4 TCP/UDP packets. Multicast filtering is handled in the Static Address Table and the Reserved Multicast Address Table, but the ACL provides additional capabilities for filtering routed network protocols. As shown in Figure 4-3, ACL filtering may take precedence over other forwarding functions. The ACL allows the switch to filter ingress traffic based on the following header fields:

  • Source or destination MAC address and/or EtherType
  • Source or destination IPv4 address with programmable mask
  • IPv4 protocol
  • Source or destination UDP port
  • Source or destination TCP port
  • TCP Flag with programmable mask

The ACL is implemented as an ordered list of up to 16 access control rules which are programmed into the ACL Table. Each entry specifies certain rules (a set of matching conditions and action rules) to control the forwarding and priority of packets. When a packet is received on an interface, the switch compares the fields in the packet against any applied ACLs to verify that the packet has the permissions required to be forwarded, based on the conditions specified in the lists. Multiple match conditions can be either AND'ed or OR'ed together.

No idea though how you can actually use that though.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.