[BUG] Multiple NIC configurations - Static IP Configuration requires unnecessary gateway address when using internal/non routed networks
- Dominant language
- PowerShell
- Stars
- 66
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
**Description:**
When I add additional network adapters to the AKS Edge Essentials configuration and opt for a static IP setup, I am required to provide values for all three fields: Ip4Address, Ip4GatewayAddress, and Ip4PrefixLength, even when configuring a flat, internal, or non-routable network. In such cases, the Ip4GatewayAddress is not necessary.
The issue arises because the system enforces the requirement to provide all three values, even though gateways aren’t relevant for certain internal networks.
```json
{
...,
"LinuxNode": {
...,
"SecondaryNetworks": [
{
"VMSwitchName": "INTERNAL",
"Ip4Address": "192.168.175.10",
"Ip4PrefixLength": 24
}
]
}
}
````
When I try to omit the Ip4GatewayAddress, I encounter the following error: `Invalid values provided for the subnet details. Either provide values for all (Ip4Address, Ip4PrefixLength & Ip4GatewayAddress) or for none of them.`
More details:
```txt
[10/21/2024 08:22:47] Invalid values provided for the subnet details. Either provide values for all (Ip4Address, Ip4PrefixLength & Ip4GatewayAddress) or for none of them.
[10/21/2024 08:22:47] Validating AksEdge network parameters...
[10/21/2024 08:22:47] 1 errors found in the deployment configuration. Fix errors before deployment
[10/21/2024 08:22:47] AksEdge - JSON configuration contains errors
```
**Expected Behavior**
Specifying the Ip4GatewayAddress should not be a mandatory field, particularly when it is not required or relevant for internal or non-routable networks. The configuration should allow for the omission of this field in such cases.
**Work arround:**
I can use a workaround by specifying a bogus gateway address, which allows me to deploy the configuration. However, this results in an unnecessary and incorrect gateway being configured, which doesn’t make sense for internal or non-routable networks.
Contributor guide
Research direction
Start by reproducing the validation error with the LinuxNode SecondaryNetworks configuration shown in the issue, omitting Ip4GatewayAddress while retaining Ip4Address and Ip4PrefixLength. Trace the validation that emits “Invalid values provided for the subnet details”; done means internal or non-routable networks can omit the gateway without requiring a bogus value, while invalid subnet combinations remain rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, kubernetes, powershell
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100