Isolate hosts in the same vlan

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hi

this is the scenario:

- one single vlan
- I need hosts that access this vlan to be able only to reach the gateway. Communication between hosts in the same vlan should be blocked. Is it possible in Xos?

thanks
Photo of Localhost

Localhost

  • 452 Points 250 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of Jeremy

Jeremy, Embassador

  • 9,788 Points 5k badge 2x thumb
Photo of Baskar

Baskar, Employee

  • 518 Points 500 badge 2x thumb
Hi,

Private VLAN,  helps to achieve  this scenario (port isolation), is a technique  where a VLAN contains switch ports that are restricted such that they can only communicate with a given "uplink"

thanks
Photo of Localhost

Localhost

  • 452 Points 250 badge 2x thumb
thanks !
Photo of Alexandr P

Alexandr P, Embassador

  • 12,192 Points 10k badge 2x thumb
Hi!

Also (as workaround) you can try ACL (but this have to be tested).
For example:
ports 1,2,3 - hosts.
#edit pol XXX
entry permit_def_gate {
if {
destination-address 172.16.0.1/24; #default gateway
} then {
permit;
} }
entry deny_inter-hosts {
if {
destination-address 172.16.0.0/24; #other hosts
} then {
deny; 
} }

#conf access-list XXX ports 1-3 ingress
Photo of Brandon Clay

Brandon Clay, Escalation Support Engineer

  • 13,244 Points 10k badge 2x thumb
One quick tweak to the ACL:

entry permit_def_gate {
if {
destination-address 172.16.0.1/32; #default gateway
} then {
permit;
} }
entry deny_inter-hosts {
if {
destination-address 172.16.0.0/24; #other hosts
} then {
deny; 
} }
If this line had a /24 mask, it would match on all hosts in the subnet, rather than just the gateway.
Photo of Grosjean, Stephane

Grosjean, Stephane, Employee

  • 12,784 Points 10k badge 2x thumb
To summarize a bit:

- if this requirement is local to a single switch (stack), then Port Isolation is certainly the best way to go.
- if the VLAN spans multiple switches, the usual Private VLAN is the way to go.
- ACL can be a workaround, especially if you want some lattitude in your initial requirement
Photo of Paul Russo

Paul Russo, Alum

  • 9,694 Points 5k badge 2x thumb
Hello there is another potential but it depends on your network and what features you actually need.  There is a feature called Upstream Forwarding or Upstream Forwarding Only (UFO) that allows ports to be on the same VLAN but their traffic can only go up the uplink port.  We disable flooding to the other ports so that a user on one port can't see traffic from another user on another port.  This features is used mainly in MAN networks or Fiber to the Home designs where SPs want to restrict user traffic.

It is in the user guide search for upstream forwarding here's s snippet

"Figure 87: Upstream Forwarding or Disabling Egress Flooding Example"
"In this example, the three ports are in an ISP-access VLAN. Ports 1 and 2 are connected to clients 1 and"
"2, respectively, and port 3 is an uplink to the ISP network. Because clients 1 and 2 are in the same VLAN, client 1 could possibly learn about the other client’s traffic by sniffing client 2’s broadcast traffic; client 1 could then possibly launch an attack on client 2."
"However, when you disable all egress flooding on ports 1 and 2, this sort of attack is impossible, for the"
"following reasons:"
"•  Broadcast  and multicast traffic from the clients is forwarded  only to the uplink port."
"•  Any packet with unlearned  destination MAC addresses is forwarded  only to the uplink port."
"•  One client cannot learn any information from the other client. Because egress flooding is disabled on the access ports, the only packets  forwarded  to each access port are those packets  that are specifically targeted for one of the ports. There is no traffic leakage."
"In this way, the communication between client 1 and client 2 is controlled. If client 1 needs to"
"communicate with client 2 and has that IP address, client 1 sends out an ARP request to resolve the IP"
"address  for client 2."

There are pros and cons with using this over private VLAN and really comes down with what you need to do but it is an option

Thanks
P
Photo of Localhost

Localhost

  • 452 Points 250 badge 2x thumb
very valuable information. I will keep this thread in mind even for the future.

thanks everybody!
Photo of MartinS

MartinS

  • 430 Points 250 badge 2x thumb
Hi guys,

is there a way to realise this on EOS (S-Series) Switches as well?

Thanks in advance,
Martin
Photo of Erik Auerswald

Erik Auerswald, Embassador

  • 12,854 Points 10k badge 2x thumb
Hello Martin,

you can use policies on the S-Series, the same idea as the ACL solution for EXOS above.

Br,
Erik