“Shared” IP Addressing
-
I am presently running my personal notebook with the same private IP address on both the ethernet and wifi interfaces. These are assigned with static mappings through pfSense DHCP. I do of course not operate both interfaces concurrently. I find this convenient particularly when designing pfSense rules that are agnostic to whether I am wired or wireless at any given time. I am hoping that someone with a deeper knowledge of networking and pfSense in particular could suggest areas where this policy could come unstuck.
-
@BrucexLing Basically, connecting them at the same time. :)
Windows will complain if you assign an IP on two interfaces like that. It offers to remove it from the other interface.
I’ve not tried but maybe it would work to have both DHCP and use a reservation? If pfSense allows that.(reread OP in daylight) -
@SteveITS said in “Shared” IP Addressing:
@BrucexLing Basically, connecting them at the same time. :)
This won't happen, except due to carelessness.
Windows will complain if you assign an IP on two interfaces like that. It offers to remove it from the other interface.
Windows will not be used on this machine. OS is Ubuntu 22.04
I’ve not tried but maybe it would work to have both DHCP and use a reservation? If pfSense allows that.
It does already work with my DHCP Static Mappings in pfSense, as far as I have been able to battle test it.
I guess what I am wondering is the prospect of corruption in ARP table, States table, Routing table etc. -
@BrucexLing said in “Shared” IP Addressing:
I guess what I am wondering is the prospect of corruption in ARP table, States table, Routing table etc.
Why wonder ? Why wait ? try it out right now.
Normally, you are protected : the second interface will probably not obtain a lease / IP, as the first one was already using a lease with the same IP.
DHCP warning / error log lines will probably be logged, warning the admin that an 'bad' situation has occurred.@BrucexLing said in “Shared” IP Addressing:
This won't happen, except due to carelessness.
You will test Murphy's law.
-
@BrucexLing the arp table could be problematic - but depends on what your doing exactly, if you want some other device to start a conversation with with that IP, once you have switched.. That other device might have the old arp entry and send the traffic to the wrong mac.
How long the arp cache is stored on this other device might be the issue, windows keeps a really short arp cache, while for example freebsd (at least pfsense) uses a 20 minute arp cache.
What are you wanting to accomplish with this setting? It is not good practice that is for sure. I thought pfsense wouldn't even allow this? Oh it does allow it - but it does warn you about it
-
Why not use two IP addresses and just put them in an alias. Then use that in the firewall rules.
-
@stephenw10 hmm I had somehow read OP as NAT rules but if just regular rules that is far easier.
-
@BrucexLing said in “Shared” IP Addressing:
This won't happen, except due to carelessness.
Do you shut off WiFi when you plug in Ethernet?
Windows will not be used on this machine. OS is Ubuntu 22.04
Just allow 2 addresses. If you want to connect to the computer use the WiFi address. Even with Ethernet plugged in, the WiFi address is still reachable. At least that's the case with my ThinkPad running openSUSE Linux.
-
I think I have now received enough cautionary feedback to convince me that it was an ill-conceived proposition. I will abandon the “shared” IP plan and follow better, if not good, practice. I like the alias suggestion and that will overcome my reservations about “redundancy” in rules. Thanks to all for your heads up.