Second MAC address for one IP address



  • Today most new pc/laptop have 2 nics (one ethernet and second wi-fi).
    Would be nice option adding aditional place for second mac in pfsense.

    Example from tomato:




  • What are you proposing should be done with the second MAC address? For example, what should be done if a DHCP lease is active on one address and a DHCP request comes in from the other MAC address?


  • Rebel Alliance Developer Netgate

    He just wants one IP entry for two separate MACs, so if your laptop plugs in or uses wifi it gets the same IP each way.



  • @jimp:

    He just wants one IP entry for two separate MACs, so if your laptop plugs in or uses wifi it gets the same IP each way.

    I think wallabybob's issue was what happens if you leave the wifi on and plug in?  With both interfaces requesting an IP.


  • Rebel Alliance Developer Netgate

    dhcpd tests by ping, it will see that the IP is in use and assign another.

    Then you just have the usual weirdness involved with having two interfaces on the same subnet…



  • @jimp:

    dhcpd tests by ping, it will see that the IP is in use and assign another.

    Then you just have the usual weirdness involved with having two interfaces on the same subnet…

    Behaviour might depend on the client. I have seen some unexpected (by me) behaviour when I have tried to switch my Ubuntu Linux netbook from wireless to wired interface on the same subnet. The wired interface gets assigned a new IP address but then apparently gets shutdown by network manager (because the new address is on the same subnet as another interface?). Here's an extract from the system log:

    Apr 25 07:55:08 xx NetworkManager: <info>dhclient started with pid 5178
    Apr 25 07:55:08 xx dhclient: Internet Systems Consortium DHCP Client V3.1.3
    Apr 25 07:55:08 xx dhclient: Copyright 2004-2009 Internet Systems Consortium.
    Apr 25 07:55:08 xx dhclient: All rights reserved.
    Apr 25 07:55:08 xx dhclient: For info, please visit https://www.isc.org/software/dhcp/
    Apr 25 07:55:08 xx dhclient:
    Apr 25 07:55:08 xx dhclient: Listening on LPF/eth0/00:24:78:13:01:76
    Apr 25 07:55:08 xx dhclient: Sending on  LPF/eth0/00:24:78:13:01:76
    Apr 25 07:55:08 xx dhclient: Sending on  Socket/fallback
    Apr 25 07:55:09 xx dhclient: DHCPREQUEST of 192.168.211.241 on eth0 to 255.255.255.255 port 67
    Apr 25 07:55:09 xx dhclient: DHCPACK of 192.168.211.241 from 192.168.211.173
    Apr 25 07:55:09 xx dhclient: bound to 192.168.211.241 – renewal in 3128 seconds.
    Apr 25 07:55:19 xx NetworkManager: <info>(eth0): canceled DHCP transaction, dhcp client pid 5178</info></info>

    Next time I try a switchover I'll try to take a bit more notice of what's going on with the other interfaces in the hope of working out a more reliable procedure to switchover.



  • After a bit of experimentation I discovered pfSense will let you assign the same IP address to two different MAC addresses but the hostnames have to be different.

    In pfSense I assigned the IP address associated with my netbook's wired interface to the wireless MAC address on my netbook and disabled and enabled the wireless interface and it successfully got the IP address I had previously associated only with the wired interface's MAC address. I can put up with two different names for the same IP address. Now my automatic backup will run regardless of whether the netbook is online through the wired interface or wireless interface.



  • @wallabybob:

    After a bit of experimentation I discovered pfSense will let you assign the same IP address to two different MAC addresses but the hostnames have to be different.

    In pfSense I assigned the IP address associated with my netbook's wired interface to the wireless MAC address on my netbook and disabled and enabled the wireless interface and it successfully got the IP address I had previously associated only with the wired interface's MAC address. I can put up with two different names for the same IP address. Now my automatic backup will run regardless of whether the netbook is online through the wired interface or wireless interface.

    Nice.  I'll have to try it when I get home.


Locked