Martian packets logged by Linux kernel
What happened:
I provisioned an AKS cluster of version 1.14.8, and then deployed a logging stack. I noticed a large amount of logs coming from the Linux kernel on every node:
# dmesg | grep -e "martian" -e "ll header" | tail -n 20
[194917.354255] IPv4: martian source 10.196.4.83 from 10.196.4.14, on dev eth0
[194917.354281] ll header: 00000000: ff ff ff ff ff ff 6e f3 8f 42 93 86 08 06 ......n..B....
[194917.600151] IPv4: martian source 10.196.4.1 from 10.196.4.31, on dev eth0
[194917.600153] ll header: 00000000: ff ff ff ff ff ff 02 54 07 99 51 fa 08 06 .......T..Q...
[194919.836234] IPv4: martian source 10.196.4.77 from 10.196.4.25, on dev eth0
[194919.836238] ll header: 00000000: ff ff ff ff ff ff a6 2c 90 bb 31 e9 08 06 .......,..1...
[194920.851834] IPv4: martian source 10.196.4.80 from 10.196.4.25, on dev eth0
[194920.851837] ll header: 00000000: ff ff ff ff ff ff a6 2c 90 bb 31 e9 08 06 .......,..1...
[194921.196781] IPv4: martian source 10.196.4.109 from 10.196.4.25, on dev eth0
[194921.196785] ll header: 00000000: ff ff ff ff ff ff a6 2c 90 bb 31 e9 08 06 .......,..1...
[194923.016143] IPv4: martian source 10.196.4.101 from 10.196.4.28, on dev eth0
[194923.016146] ll header: 00000000: ff ff ff ff ff ff 42 ba 87 4a 8e a5 08 06 ......B..J....
[194925.034908] IPv4: martian source 10.196.4.72 from 10.196.4.13, on dev eth0
[194925.034913] ll header: 00000000: ff ff ff ff ff ff 7a b4 22 3f 7e 5e 08 06 ......z."?~^..
[194927.631130] IPv4: martian source 10.196.4.97 from 10.196.4.18, on dev eth0
[194927.631132] ll header: 00000000: ff ff ff ff ff ff e6 d8 c3 41 9c 71 08 06 .........A.q..
[194929.836319] IPv4: martian source 10.196.4.77 from 10.196.4.25, on dev eth0
[194929.836322] ll header: 00000000: ff ff ff ff ff ff a6 2c 90 bb 31 e9 08 06 .......,..1...
[194930.008913] IPv4: martian source 10.196.4.109 from 10.196.4.25, on dev eth0
[194930.008918] ll header: 00000000: ff ff ff ff ff ff a6 2c 90 bb 31 e9 08 06 .......,..1...
There are many, many more logs like this.
What you expected to happen:
Martian packets seem to indicate that there is a problem with the netwerk configuration. I am not at all familiar with the low-level networking stuff, so I had to do some research.
The IANA defines a Martian packet as one which arrives on an interface where the interface does not use that network. For Linux, it’s any packet that arrives on an interface which is not configured for that subnet in any way.
The IPv4: martian line logs the source IP, destination IP, and network device of the received packet. The ll header line directly after logs the header of the received LinkLayer packet. The first 12 octets are the destination MAC address (ff ff ff ff ff ff), and the 12 after those are the source MAC address (ex: a6 2c 90 bb 31 e9 08 06) The final 4 octets indicate the protocol of the packet, which is ARP in this case (08 06).
I managed to reproduce this problem on two empty clusters: one with the default network configuration, and one with the Azure CNI plugin. The log messages appear much more often on our larger clusters that have more activity.
Some of the sources I used:
- https://www.thegeekdiary.com/how-to-interpret-linux-martian-source-messages/
- https://lists.fedoraproject.org/pipermail/users/2014-July/451705.html
- https://en.wikipedia.org/wiki/EtherType
How to reproduce it (as minimally and precisely as possible):
Provision an AKS cluster and check the kernel logs. Deploying a workload is not necessary, but will probably trigger the log messages more often.
Anything else we need to know?:
My clusters are all located in West Europe. I have not tried a different region.
I can provide the Terraform configuration that was used to provision the clusters that we initially saw the problem on. However, deploying a cluster through the portal with default settings will also log martian packets.
Environment:
- Kubernetes version (use
kubectl version): 1.14.8 - Size of cluster (how many worker nodes are in the cluster?): Anywhere from 1 to 5
- General description of workloads in the cluster (e.g. HTTP microservices, Java app, Ruby on Rails, machine learning, etc.): Irrelevant, happens on empty cluster.
Please don't hesitate to ask me for more information.
We are also seeing the same in our AKS clusters. We haven't changed anything from the default configuration. We are using Kubernetes 1.15.7.
We see the same thing with a cluster in West US 2.
Also seeing a lot of this in Canada central with 1.15.7 and still with 1.15.10
I am seeing the same issues overwhelming my Linux logs as well. I am using the latest AKS 1.18.2 with Azure network plugin. It doesn't seem to affect the pod function or virtual network operation in any way.
Action required from @Azure/aks-pm
Action required from @Azure/aks-pm
@palma21 - Can we please get this prioritized/assigned? This generates ~1GB of logs on each of our nodes.
@palma21
@aanandr @tamilmani1989 could we investigate the network misconfiguration that is triggering all this logging?
Internally saw somethign similar with icm #197481427.
In that case the dns servicewas set to an invalid range 172.29.0.10 (with service cidr "172.29.0.0/20") Were any special networking settings specified for these clusters? Going to try and validate on a vanilla azure cni cluster. Alternatively if you give me the fqdn I can look up settings.
Action required from @Azure/aks-pm
Issue needing attention of @Azure/aks-leads
I don't have any special network settings other than 10.3.x.x/16 IP range. Still seeing it like this:
[6679206.082350] IPv4: martian source 10.3.128.32 from 10.3.128.219, on dev eth0 [6679206.082417] ll header: 00000000: ff ff ff ff ff ff fa 87 ec eb d5 fc 08 06 ..............
Could you share your Pod CIDR (or subnet CIDR for azure CNI) and service CIDR?
We're also experiencing this issue. Our subnet CIDR is "10.240.128.0/17" (azure CNI).
We're also able to reproduce this:
- Pod CIDR: N/A (using Azure VNet networking; network address space
10.146.40.0/23and node pool subnet10.146.40.0/24) - Service CIDR:
10.146.41.0/24 - DNS service IP:
10.146.41.10 - Docker bridge CIDR:
172.17.0.1/16
I'd be happy to DM the FQDN/resource IDs if helpful.
That or a support ticket number that would have the details of the cluster would definitely help.
Feel free to DM @jorgefpalma on twitter if you prefer the former.
I accidentally found that this change https://github.com/Azure/azure-container-networking/pull/709 (changing default Azure CNI network mode from bridge to transparent) will fix the martian packet.
Previously under bridge mode, a L2 bridge named azure0 will be created and it got assigned the cluster ip range:

The limited broadcast ARP packets arrive on eth0. Since the source is an IP from the cluster ip range and the packet arrives on eth0 whose IP range does not contain the source IP and limited broadcast is only intended for host in 'local network', the kernel rejects the packet as martian. I got this idea from example 2 of the blog post https://www.thegeekdiary.com/how-to-interpret-linux-martian-source-messages/

Then I create a new cluster with network mode set to transparent, which doesn't need the azure0 L2 bridge. Instead, the cluster ip range is assigned to eth0 now so the source ip aligns with the eth0 ip range and the limited broadcast ARP packets are no longer be considered martian.

The fix will be included in v1.2.0 of Azure CNI, which hasn't been released that. The change has been merged into Azure CNI master so it will be released soon. Don't have a specific date but will update this thread.
Thanks for reaching out. I'm closing this issue as it was marked with "Answer Provided" and it hasn't had activity for 2 days.