Skip to content

Commit 3082727

Browse files
committed
Clarify network policy behaviour for L2/L3 protocols
Signed-off-by: Nadia Pinaeva <[email protected]>
1 parent cf80f24 commit 3082727

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

content/en/docs/concepts/services-networking/network-policies.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ description: >-
1616

1717
<!-- overview -->
1818

19-
If you want to control traffic flow at the IP address or port level (OSI layer 3 or 4), then you
20-
might consider using Kubernetes NetworkPolicies for particular applications in your cluster.
19+
If you want to control traffic flow at the IP address or port level for TCP, UDP, and SCTP protocols,
20+
then you might consider using Kubernetes NetworkPolicies for particular applications in your cluster.
2121
NetworkPolicies are an application-centric construct which allow you to specify how a {{<
2222
glossary_tooltip text="pod" term_id="pod">}} is allowed to communicate with various network
2323
"entities" (we use the word "entity" here to avoid overloading the more common terms such as
@@ -257,7 +257,18 @@ creating the following NetworkPolicy in that namespace.
257257
This ensures that even pods that aren't selected by any other NetworkPolicy will not be allowed
258258
ingress or egress traffic.
259259

260-
## SCTP support
260+
## Network traffic filtering
261+
262+
NetworkPolicy is defined for [layer 4](https://en.wikipedia.org/wiki/OSI_model#Layer_4:_Transport_layer)
263+
connections (TCP, UDP, and optionally SCTP). For all the other protocols, the behaviour may vary
264+
across network plugins.
265+
When a `deny all` network policy is defined, it is only guaranteed to deny TCP, UDP and SCTP
266+
connections. For other protocols, such as ARP or ICMP, the behaviour is undefined.
267+
The same applies to allow rules: when a specific pod is allowed as ingress source or egress destination,
268+
it is undefined what happens with (for example) ICMP packets. Protocols such as ICMP may be allowed by some
269+
network plugins and denied by others.
270+
271+
### SCTP support
261272

262273
{{< feature-state for_k8s_version="v1.20" state="stable" >}}
263274

0 commit comments

Comments
 (0)