Microsoft Azure: In case of 2 NICs receiving same packets same time.

2 NICs receiving same packet same time

Make new VM with Rocky Linux 8

I use Official image of Rocky Linux 8 this time.

There are 2 NICs

[azureuser@test ~]$ ifconfig
eth0: flags=4163  mtu 1500
inet 10.1.1.4  netmask 255.255.255.0  broadcast 10.1.1.255
inet6 fe80::222:48ff:fe66:db2d  prefixlen 64  scopeid 0x20
ether 00:22:48:66:db:2d  txqueuelen 1000  (Ethernet)
RX packets 14178478  bytes 3176165614 (2.9 GiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 15528187  bytes 2536536133 (2.3 GiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
.
eth1: flags=6211  mtu 1500
ether 00:22:48:66:db:2d  txqueuelen 1000  (Ethernet)
RX packets 12240546  bytes 2866691246 (2.6 GiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 15678660  bytes 2546465920 (2.3 GiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1 does’t have IP address.
MAC address are same.
But I didn’t made additional NIC during installation step.

ls
ifcfg-ens3  ifcfg-eth0  ifup-hdlc

no files for eth1.
It looks something strange.

Check packets

sudo tcpdump -nvA -i eh0 port 6060
sudo tcpdump -nvA -i eh1 port 6060

checking port 6060 for eth0 and eth1.

sipsak -r 6060 -vv -s sip:1000@xxxxx.com

send SIP packets using sipsak(sip swiss army knife)
And then I can see 2 NICs receiving same packets same with tcpdump.

If I will check using sngrep It seem there are double request and reply.

Ask to Microsoft Q&A

Azure - Microsoft Q&A
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a w...

In my case Microsoft employee replied to my question.
And finally he recommended take one time technical support.
I sent support request from Azure portal.

I got a phone call from Microsoft!!

I got a phone call from US number (I live in Tokyo)
First 5 minutes talked with phone, and we tried to switch to Microsoft’s web sharing tool. But it not working fine at that time.
So he invited me to MS Teams and sharing screen for discuss problem.
I got phone call from MS for 3 days.
MS engineer he live in Costa Rica.

Enable accelerated networking

Step Networking on “Create a Virtual machine”

There is check box for Enable accelerated networking.
And “The selected VM size does not support accelerated networking”
If I chose large size VM(cpu/mem) this check box checked as default.

MS engineer said that If I will make new VM with enable accelerated networking, Azure will make 2nd NIC. it is normal behavior.

Accelerated Networking overview
Learn how Accelerated Networking can improve the networking performance of Azure VMs.

Benefits:

Lower Latency / Higher packets per second (pps):
Eliminating the virtual switch from the data path removes the time packets spend in the host for policy processing. It also increases the number of packets that can be processed inside the VM.

Reduced jitter:
Virtual switch processing depends on the amount of policy that needs to be applied. It also depends on the workload of the CPU that’s doing the processing. Offloading the policy enforcement to the hardware removes that variability by delivering packets directly to the VM. Offloading also removes the host-to-VM communication, all software interrupts, and all context switches.

Decreased CPU utilization:
Bypassing the virtual switch in the host leads to less CPU utilization for processing network traffic.

disable / enable

You can only enable this function during installation step.
After that you can disable from Power Shell of Azure, and enable again like below.

Disable:
az network nic update -g “resourcegroup-name” -n “NICname” --accelerated-networking false
Enable:
az network nic update -g “resourcegroup-name” -n “NICname” --accelerated-networking true

Or edit like this.

TwitterFacebookLinkedInHatenaPocketCopy Link