Opened 19 months ago
Closed 18 months ago
#926 closed defect (fixed)
CLI/GUI doesn't prevent multiple interfaces from being configured with the same IP address
| Reported by: | gcooper | Owned by: | william |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Backend | Version: | 8.0.2-RELEASE |
| Keywords: | Cc: |
Description
Procedure:
- Log in to CLI/GUI.
- Configure interface A with IP address 192.168.20.1/24.
- Configure interface B with IP address 192.168.20.1/24.
Expected result:
- Interface A should be configured with 192.168.20.1/24; interface B on the other hand should be rejected.
Actual result:
- Both interfaces are configured with 192.168.20.1/24.
Change History (7)
comment:1 follow-up: ↓ 2 Changed 19 months ago by jgreco
comment:2 in reply to: ↑ 1 Changed 19 months ago by gcooper
Replying to jgreco:
If you're going to prevent PEBCAK errors of that class, then it should be noted that you also need to prevent two IP addresses on the same *network* (such as 192.168.20.1/24 and 192.168.20.2/24) or you're just preventing a trivial error while allowing a much more likely error. Blocking two addresses on the same network will also block two identical IP addresses.
That argument doesn't make sense 100% because you can have multiple interfaces on the same network/netmask.. you just can't have multiple physical interfaces bound to the same address. Granted, you can pull tricks where 10.0.0.0/16 and 10.0.2.0/24 both deal with the same address space, but that's not the issue that needs to be resolved here.
FreeBSD doesn't prevent me from doing something like:
ifconfig_em0="inet 10.0.0.1" ifconfig_em1="inet 10.0.0.1"
and that's a problem because it confuses the network subsystem in the kernel -- you should be creating a lagg if you want to do that.
comment:3 Changed 19 months ago by jgreco
FreeBSD now allows two interfaces on the same network with different IP addresses? If so, that's news to me, but I suppose it's possible.
comment:4 Changed 18 months ago by william
- Owner set to william
- Status changed from new to accepted
comment:5 Changed 18 months ago by zippybr
- Resolution set to fixed
- Status changed from accepted to closed
In [8821/freenas]:
comment:6 Changed 18 months ago by william
- Resolution fixed deleted
- Status changed from closed to reopened
comment:7 Changed 18 months ago by william
- Resolution set to fixed
- Status changed from reopened to closed

If you're going to prevent PEBCAK errors of that class, then it should be noted that you also need to prevent two IP addresses on the same *network* (such as 192.168.20.1/24 and 192.168.20.2/24) or you're just preventing a trivial error while allowing a much more likely error. Blocking two addresses on the same network will also block two identical IP addresses.