Describe the bug
In NetworkAttachmentDefinition for Multus Even if Gateway IP in mentioned, Still pods are getting same Gateway IP instead of taking IPs from rangeStart and rangeEnd.
PFA the code

PFA the IP my pod got even if this IP is GATEWAY IP.
"gateway": "100.78.70.1"

Expected behavior
POD should not take GATEWAY IP , it should take IPs from the range given in between RANGE_START and RANGE_END parameter values.
Environment:
- Whereabouts version : N/A
- Kubernetes version (use
kubectl version): N/A
- Network-attachment-definition: N/A
- Whereabouts configuration (on the host): N/A
- OS (e.g. from /etc/os-release): N/A
- Kernel (e.g.
uname -a): N/A
- Others: N/A
HOW I SOLVED THIS ISSUE
How I solved this issue , As a WA, I changed the order of the Parameters in networkattachmentdefinition.
"rangeStart": "100.78.70.3",
"rangeEnd": "100.78.70.7",
"range": "100.78.70.0/27",
"routes": [
{ "dst": "0.0.0.0/0" }
],
"gateway": "100.78.70.1"
}
As we can see above I kept , "range": "100.78.70.0/27", Parameter after, rangeStart and rangeEnd.
**_When I did this , then RANGE_START and RANGE_END IPs taken into consideraion instead of whole subnet "100.78.70.0/27",.
When this range: "range": "100.78.70.0/27" was before RANGE_START and RANGE_END , Then GATEWAY IP 100.78.70.1 also taken into consideraion for PODS even though ranges_tart starts with IP : 100.78.70.3 , "rangeStart": "100.78.70.3"..._**
So its a BUG in whereabouts plugin. It takes into consideration the order of the rangeStart, rangeEnd and range. When RANGE at first given, It takes IP from whole subnet instead of taking from rangeStart and rangeEnd IP range