Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to add same client with two device same IP different MAC

    DHCP and DNS
    6
    15
    767
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      maherg
      last edited by

      hi,

      how can i add a client which have two Wifi devices like Mobile Phones i want to give him same IP so he can use only one at a time.
      how can i add 2 different MAC address with same IP Address on DHCP Static Mapping

      1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott
        last edited by

        That is something you should not be able to do.  Imagine what would happen if you tried to give 2 devices the same IP address.  However, depending on the operating system, you may be able to use just one address.  For example, if I run Linux on my notebook computer, I can always use the WiFi IP address (assuming WiFi is up), even when connected via Ethernet. However, that does not work with Windows, where I have to use the Ethernet IP, if plugged in.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        1 Reply Last reply Reply Quote 0
        • M
          maherg
          last edited by

          yes but when i bind those MAC Address with that ip then he can not use any other IP address because other IP also bind with other MAC and that ips are only allow to use internet in firewall rules so he will only use one IP and one device at a time.

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            This sounds more like you have a user and he has phone, laptop, tablet, 2nd phone etc.. And you only want him to use 1 device not all 4…

            Do you care if user switches off his phone, and then turns on his laptop to user the internet?

            What you want in such a case is captive portal and limit him to 1 session per login.. Do you care if the user "pays" or gets permission for 2 devices at the same time, etc.

            Adding mac address ABC to get IP 1234, and then mac address XYZ to also get IP address 1234 is borked..  It doesn't work that way.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            1 Reply Last reply Reply Quote 0
            • M
              maherg
              last edited by

              @johnpoz:

              This sounds more like you have a user and he has phone, laptop, tablet, 2nd phone etc.. And you only want him to use 1 device not all 4…

              Do you care if user switches off his phone, and then turns on his laptop to user the internet?

              What you want in such a case is captive portal and limit him to 1 session per login.. Do you care if the user "pays" or gets permission for 2 devices at the same time, etc.

              Adding mac address ABC to get IP 1234, and then mac address XYZ to also get IP address 1234 is borked..  It doesn't work that way.

              yes this i need

              user switches off his phone, and then turns on his laptop to user the internet?

              he can use only one device at a time switch off first device WiFi then he can use second device internet.

              how it is possible if can't give him same IP on both devices

              1 Reply Last reply Reply Quote 0
              • GrimsonG
                Grimson Banned
                last edited by

                @johnpoz:

                What you want in such a case is captive portal and limit him to 1 session per login..

                1 Reply Last reply Reply Quote 0
                • KOMK
                  KOM
                  last edited by

                  how it is possible if can't give him same IP on both devices

                  What is the point of this requirement?  Is there a number shortage where you are?  Why can't you set a static reservation for his 4 devices and be done with it?

                  1 Reply Last reply Reply Quote 0
                  • GrimsonG
                    Grimson Banned
                    last edited by

                    Also DHCP is not suitable for access control, a client can simply override the MAC address or set a static IP to gain access.

                    1 Reply Last reply Reply Quote 0
                    • M
                      maherg
                      last edited by

                      @KOM:

                      how it is possible if can't give him same IP on both devices

                      What is the point of this requirement?  Is there a number shortage where you are?  Why can't you set a static reservation for his 4 devices and be done with it?

                      requirement is i don't want to allow that person to use internet on 2 devices at same time he have to use only 1 device at a time.

                      1 Reply Last reply Reply Quote 0
                      • KOMK
                        KOM
                        last edited by

                        requirement is i don't want to allow that person to use internet on 2 devices at same time he have to use only 1 device at a time.

                        Yes, I understand that part.  The question is, why?  What is the problem with him using more than one device at a time?  Is this a monthly capacity issue?  Or is it a bandwidth issue?  Or something else entirely??  Once we know the problem you're trying to solve, perhaps then we can suggest a better solution.

                        1 Reply Last reply Reply Quote 0
                        • M
                          maherg
                          last edited by

                          @KOM:

                          requirement is i don't want to allow that person to use internet on 2 devices at same time he have to use only 1 device at a time.

                          Yes, I understand that part.  The question is, why?  What is the problem with him using more than one device at a time?  Is this a monthly capacity issue?  Or is it a bandwidth issue?  Or something else entirely??  Once we know the problem you're trying to solve, perhaps then we can suggest a better solution.

                          spouse someone is paying me for using my internet and payment is base on per user one mobile but some people want internet on 2 devices but they want to pay for one device and he told me they will use only one device at a time he will not use both devices at same time but how will i know is the both device are same person or different persons and they laying to me for paying me for only one device that why i want this  they can't use both device at a same time

                          bandwidth issue and load is also a issue for this…....

                          1 Reply Last reply Reply Quote 0
                          • johnpozJ
                            johnpoz LAYER 8 Global Moderator
                            last edited by

                            So setup in your captive portal concurrent users.. Only 1 device per user should work unless you disable that.  if he auths with 2nd device 1st device will not work..  That is like the default setting on the captive portal.

                            How exactly are you limiting what users access your network now - Im guess your not using captive portal at all, and just give the user the PSK to your wifi network?

                            concurrentusers.png
                            concurrentusers.png_thumb

                            An intelligent man is sometimes forced to be drunk to spend time with his fools
                            If you get confused: Listen to the Music Play
                            Please don't Chat/PM me for help, unless mod related
                            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                            1 Reply Last reply Reply Quote 0
                            • GrimsonG
                              Grimson Banned
                              last edited by

                              TBH payment based on number of (wireless) devices isn't going to work. All the client needs to circumvent it is a cheap router that's able to run it's WAN in wireless client mode and spoof the MAC of one of the registered devices. You'll never get full control of that.

                              Base the payment per user and used bandwith, both should be doable with the captive portal.

                              1 Reply Last reply Reply Quote 0
                              • jimpJ
                                jimp Rebel Alliance Developer Netgate
                                last edited by

                                Additionally, DHCP does not work that way. The second device will be given a random address from the pool since the first is in use.

                                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                Need help fast? Netgate Global Support!

                                Do not Chat/PM for help!

                                1 Reply Last reply Reply Quote 0
                                • JKnottJ
                                  JKnott
                                  last edited by

                                  @jimp:

                                  Additionally, DHCP does not work that way. The second device will be given a random address from the pool since the first is in use.

                                  Not just while the first device is in use.  DHCP uses leases and until the lease expires, the device the IP address is assigned to "owns" that address until the lease expires.  This means that even if that first device is shut off, the IP address will not be available to any other device, until the lease expires.

                                  PfSense running on Qotom mini PC
                                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                  UniFi AC-Lite access point

                                  I haven't lost my mind. It's around here...somewhere...

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.