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

    Is it possible to assign the same static IP for two different MAC addresses?

    Scheduled Pinned Locked Moved DHCP and DNS
    23 Posts 6 Posters 3.7k Views
    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.
    • Y
      yekibud
      last edited by

      This would be useful for e.g. docking and undocking a laptop, but the services_dhcp_edit.php page does not seem to allow this.

      A few reasons to do this, I can imagine there are many others:

      • while running a development server, such as a web server, from your laptop - other devices will no longer be able to connect if your IP changes - such as if you are doing mobile app development and want to test development changes on physical mobile devices

      • ssh and other remote access may depend on the IP address remaining the same - so if a user has un-docked their laptop and is calling you for technical support, you might have issues logging in to their machine

      • etc.

      1 Reply Last reply Reply Quote 0
      • K
        kejianshi
        last edited by

        Why…..????

        1 Reply Last reply Reply Quote 0
        • S
          stpq
          last edited by

          thats a good one, some OS are not able to take it, but if u have lets say wired connection on your table and wifi in your garden, u can disconnect your cable and walk in the garden without an interruption to your skype call and downloads….

          its not a problem with isc dhcp server and in some router/firewall distros like zeroshell...

          and no, its not possible in pfsense

          1 Reply Last reply Reply Quote 0
          • Y
            yekibud
            last edited by

            @kejianshi:  See clarification as to "why" in my update to the original post.

            1 Reply Last reply Reply Quote 0
            • K
              kejianshi
              last edited by

              Yep - I see it.

              I never thought to try it.

              I'm pretty sure that all my machines have different MACS for their wireless and ethernet ports.

              Hmmmm - Let me think

              You can set a static IP on the machine, on the laptop its self.  Make sure its outside the DHCP range of the LAN.

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                Or be a network hooligan and clone the wireless MAC to the wired or vice versa.  Expect shenanigans and troubleshooting woes.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

                  Why don't you just use dns to solve this problem - and just make sure the dns record is updated as the "host" machine moves from one network to another, etc.

                  I don't understand why wired and wireless would want to be the same IP - you have given some reasons why you think they should.  Don't agree with them to be honest ;)

                  For one - wired and wireless networks from security standpoint could be debated even they should even be the same segment.  My wireless is isolated from my wired network, and you will find that many enterprise setups this is also the case.  Wired and Wireless are rarely the same segment other than the smallest of shops or home setups.

                  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
                  • S
                    stpq
                    last edited by

                    @johnpoz:

                    Why don't you just use dns to solve this problem - and just make sure the dns record is updated as the "host" machine moves from one network to another, etc.

                    I don't understand why wired and wireless would want to be the same IP - you have given some reasons why you think they should.  Don't agree with them to be honest ;)

                    For one - wired and wireless networks from security standpoint could be debated even they should even be the same segment.  My wireless is isolated from my wired network, and you will find that many enterprise setups this is also the case.  Wired and Wireless are rarely the same segment other than the smallest of shops or home setups.

                    totally agree with you on security issues, i try to isolate the wireless network as much as hardware will allow.

                    How would you solve the, lets take the skype session, , dying connections when u change ip than? (u go from wired to wireless) Like dying sessions are pain especially when u have bunch of ssh sessions open and they die…

                    s

                    1 Reply Last reply Reply Quote 0
                    • K
                      kejianshi
                      last edited by

                      Skype comes back up pretty fast - Thats a minor annoyance.

                      What are you using the ssh sessions for?

                      1 Reply Last reply Reply Quote 0
                      • S
                        stpq
                        last edited by

                        skype: minor, but still anoyance…
                        ssh...

                        well for whats it meant to, beginning with simple remote access, going through x11 export and sometimes some tunneling....

                        how is that important for diying of sessions?

                        and dont take me wrong, i have dropped same IP for different mac a long while ago, to begin with (i begin with users) because of some os (like window$ whatever version) is not able to take same ip on two ifaces, continuing through migration of dhcp to zeroshell, using pools instead of static definitions of ips for the clients and so and so...  Im just saying that sometimes, specially in small network/home environments it can be useful....

                        1 Reply Last reply Reply Quote 0
                        • K
                          kejianshi
                          last edited by

                          I think the cure for you might be to install a headless server that doesn't have to move here and there and everywhere to handle all that and just use your laptop for everything else.

                          1 Reply Last reply Reply Quote 0
                          • DerelictD
                            Derelict LAYER 8 Netgate
                            last edited by

                            Or just get good wireless and stay on it even when docked.

                            Chattanooga, Tennessee, USA
                            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                            Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

                              "Or just get good wireless and stay on it even when docked."

                              Exactly – here is the thing if your going to be changing networks, you have to expect that a session would die, just reconnect - I don't see an issue here at all.  if I had a ssh session open and I went from wired to wireless - then yeah that session would have to be reopened.  What is the saying you can't fix stupid ;)  Anyone that would think they can maintain sessions while changing their connection type doesn't understand networking ;)

                              Even if you move your IP to a different nic - your session like ssh is still going to die..

                              So your complaint is your ssh client doesn't reconnect for you?

                              As stated to solve your problem don't move your connection - use wireless while docked or undocked, there you go problem solved you never loose your connection ;)

                              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
                              • K
                                kejianshi
                                last edited by

                                Unless your wireless drops…  Which never happens (-;

                                1 Reply Last reply Reply Quote 0
                                • DerelictD
                                  Derelict LAYER 8 Netgate
                                  last edited by

                                  Which is why I said good wireless, not some $19 tp-link from walmart.

                                  Chattanooga, Tennessee, USA
                                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    stpq
                                    last edited by

                                    "Even if you move your IP to a different nic - your session like ssh is still going to die.."
                                    ehm, nope..

                                    "So your complaint is your ssh client doesn't reconnect for you?"
                                    yeah, but do u have any clue how long it takes for ssh to timeout?

                                    wireless…. hmm... something like AC than, and even that wont give u gigabit... wire is wire and wireless sux, regardless the price of it..

                                    And again, dont take me wrong, as i stated earlier... I  just think, that it can be a valid argument... I mean its implementen in ISC.. its a feature, not a liability...

                                    s

                                    1 Reply Last reply Reply Quote 0
                                    • DerelictD
                                      Derelict LAYER 8 Netgate
                                      last edited by

                                      So you want:

                                      1: the speed of Gig-E when you're wired
                                      2: the convenience of wireless when you're not
                                      3: total disregard for the OSI model when you switch between them.

                                      Got it.

                                      Chattanooga, Tennessee, USA
                                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                      1 Reply Last reply Reply Quote 0
                                      • K
                                        kejianshi
                                        last edited by

                                        I'm convinced personally - I'm switching all my servers to wifi (-;

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          stpq
                                          last edited by

                                          @Derelict:

                                          So you want:

                                          1: the speed of Gig-E when you're wired
                                          2: the convenience of wireless when you're not
                                          3: total disregard for the OSI model when you switch between them.

                                          Got it.

                                          you are totally right…

                                          but look at this: https://forum.pfsense.org/index.php/topic,36066.msg186013.html#msg186013

                                          so it still might be possible...

                                          and does it violate OSI model to have two interfaces with addresses from the same subnet?

                                          1 Reply Last reply Reply Quote 0
                                          • DerelictD
                                            Derelict LAYER 8 Netgate
                                            last edited by

                                            No.  It violates the OSI model having two interfaces with the same MAC or two MACs with the same IP.

                                            Chattanooga, Tennessee, USA
                                            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                            Do Not Chat For Help! NO_WAN_EGRESS(TM)

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