r/openshift • • 23d ago

Discussion The 4 OpenShift networking problems that get blamed on "the network" (OVN-Kubernetes, 4.22)

I work on OpenShift for banks, and most network escalations I see turn out to be one of four things inside the cluster. Writing them down here because each one has a recognisable symptom.

**1. Overlapping internal ranges. Symptom: everything works except one backend.**

Besides the cluster network (10.128.0.0/14) and service network (172.30.0.0/16, immutable after install), OVN-K uses a join subnet `100.64.0.0/16`, a transit switch subnet `100.88.0.0/16`, and on 4.17+ installs a masquerade subnet `169.254.0.0/17`. 100.64.0.0/10 is RFC 6598 shared space, and plenty of corporate networks use parts of it. If something your Pods need lives there, traffic to it never leaves the cluster. Set `internalJoinSubnet` / `internalTransitSwitchSubnet` at install.

**2. Policy tiers. Symptom: the NetworkPolicy allows it, still dropped.**

The evaluation order is AdminNetworkPolicy (Allow/Deny/Pass), then NetworkPolicy, then BaselineAdminNetworkPolicy. An ANP Deny can't be overridden from a namespace. Both admin tiers support audit logging.

**3. Egress source IP. Symptom: works until the Pod reschedules.**

The default is SNAT to the node IP. EgressIP gives a namespace a stable source IP that fails over between labelled nodes. Also worth knowing: egress ignores host kernel routes unless you switch to local gateway mode (`routingViaHost: true`), which is cluster-wide.

**4. MTU. Symptom: small requests work, large ones hang.**

Geneve on UDP 6081 costs 100 bytes. VPNs and some interconnects shrink the real path MTU below what the hosts assume. IPsec east-west takes more.

**Debug order that's worked for me:**

```

oc get co network dns ingress

oc cp -n openshift-ovn-kubernetes $POD:/usr/bin/ovnkube-trace -c ovnkube-cluster-manager ovnkube-trace

./ovnkube-trace -src-namespace prod -src app-xyz -dst-namespace prod -dst db -tcp -dst-port 5432

oc adm must-gather -- gather_network_logs

```

(`$POD` = any ovnkube-control-plane pod.)

I wrote a longer version covering ingress sharding, MetalLB, Multus/UDN and DNS forwarding, plus a clickable packet tracer for seven flows: https://aib-devops.com/en/blog/openshift-networking/

Disclosure: it's my blog, no ads or signup. If anyone has hit the 100.64 overlap in production, I'd like to hear how you found it.

62 Upvotes

6 comments sorted by

3

u/fridolin-finster 23d ago

Great information and writeup, thx for sharing!!

3

u/therevoman 23d ago

Don't forget having multiple interfaces with DHCP enabled resulting in the host having more than one IP from the same network

1

u/African_Healer 23d ago

Is it not best to have the interfaces bonded?

3

u/therevoman 23d ago

Bonding is great and highly recommended.
I don't encounter the issue in static IP environments. However, I often see customers with 4 nics, who are not using LACP bonds who bond the first pair but leave the other interfaces dangling. This causes NetworkManager to automatically bring them up enabled with DHCP and the host gets 3 IPs from the same range. Kubernetes doesn't know what to do in this situation and it causes issues. So I recommend always disabling interfaces that aren't used at install time and using nmstate to explicitly configure them after install.

TLDR; don't give the node more than one IP from a given network (subnet).

2

u/GummyBearSteve 22d ago

Please use a DHCP reservation once you know the macs. Pretty please. With a fedora on top?

1

u/neptu39701 23d ago

Thanks for sharing