Why does my Pi always have the same IP address?












12














My router uses DHCP, and whenever I reformat my raspberry pi, even when using a different microSD card, it always has the same LAN ip. I'm not quite sure how IPs are assigned, but I assume the device has a unique id on the network which my router recognises?










share|improve this question



























    12














    My router uses DHCP, and whenever I reformat my raspberry pi, even when using a different microSD card, it always has the same LAN ip. I'm not quite sure how IPs are assigned, but I assume the device has a unique id on the network which my router recognises?










    share|improve this question

























      12












      12








      12







      My router uses DHCP, and whenever I reformat my raspberry pi, even when using a different microSD card, it always has the same LAN ip. I'm not quite sure how IPs are assigned, but I assume the device has a unique id on the network which my router recognises?










      share|improve this question













      My router uses DHCP, and whenever I reformat my raspberry pi, even when using a different microSD card, it always has the same LAN ip. I'm not quite sure how IPs are assigned, but I assume the device has a unique id on the network which my router recognises?







      networking dhcp






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Archie BaerArchie Baer

      6816




      6816






















          2 Answers
          2






          active

          oldest

          votes


















          29














          Your Raspberry Pi has a unique ID, called a MAC address, actually two to be precise. Each network adapter has one of those. So the Wi-Fi adapter has one unique ID and the Ethernet adapter does.



          And this is why your Raspberry Pi gets the same IP. For your router it's not important what you are doing with the device exactly. It just recognizes the MAC and provides the same IP as before.



          Edit: As Beege pointed out, the IP can still change as the 'D' in DHCP stands for dynamic. But if your device gets the same IP as before via DHCP its because of the MAC that's recognized.






          share|improve this answer










          New contributor




          ItsKiddow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.














          • 7




            Good explanation. I think it's worth mentioning that the same MAC address will not always get the same IP from the DHCP server -- it is still a "dynamic" service, so it's possible the IP gets taken by another device and your Pi ends up with a different IP assignment.
            – Beege
            yesterday






          • 3




            @Beege oh yes, absolutely, thanks! One can choose to reserve a specific IP for the Pi when a permanent IP is desired, for example when running a server on it. But this is to be enabled specifically with the router (or whatever device else provides DHCP service in the network)
            – ItsKiddow
            yesterday






          • 2




            actually two to be precise - assuming pi3b or 3b+
            – Jaromanda X
            yesterday






          • 3




            The fact that the IP is the same is NOT because of the MAC. The MAC is an identifier that the router has access. The router can be configured to try to give you the same IP when the lease is renewed, or it can randomly assign you a different one. Your router is configured (by the manufacturer) to do the former. This actually prevents a lot of network problems caused by dynamic IP related issues (IP printing ports comes to mind). The ability to obtain the same IP is due to the MAC, but I can easily setup the DHCP on the router to give a pile of different devices the same IP.
            – Nelson
            yesterday



















          11














          In addition to the already given answers I will give some additional background information.



          In general the DHCP protocol is made to reduce dynamic changes as much as possible. It is an aspect of stability. It does not matter much on small home networks but big networks with switches and routers need some time to get into an optimized state. Switches have to learn its neighbors and router have to learn the routes. Heavy changes of ip addresses is not good for this state.



          Most people may think the DHCP server just give an ip address to a client and that's it. But it is only half the truth. Here is a typical DHCP handshake:



          (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
          (server) DHCPACK on 192.168.10.75 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


          As you can see the client identified with its mac address b8:27:eb:0e:3c:6f requests a specific ip address it prefers. It knows what ip address it has before, also after a new startup. The DHCP server only confirms it. That what it gives to the client is called a lease. It contains a timeout (together with many other important options) how long the client can use the ip address without requesting again. The timeout depends on the setup and is mostly set to some hours. The DHCP server stores the lease in its cache and will reserve it as long as possible for the same client, also if it is shutdown. So it will just confirm the client for its lease when it bootup again. Only when the server does not have other unused leases to give to clients it will take the used one. The handshake then will look like this:



          (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
          (server) DHCPNAK on 192.168.10.75 to b8:27:eb:0e:3c:6f via wlan0
          (client) DHCPDISCOVER from b8:27:eb:0e:3c:6f via wlan0
          (server) DHCPOFFER on 192.168.10.99 to b8:27:eb:0e:3c:6f via wlan0
          (client) DHCPREQUEST for 192.168.10.99 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
          (server) DHCPACK on 192.168.10.99 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


          As you can see the DHCP server rejects (DHCPNAK) the request and offers a new ip address that then in the next step is requested by the client. This additional step is made to give the client the possibility to not accept the offered ip address ...






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("schematics", function () {
            StackExchange.schematics.init();
            });
            }, "cicuitlab");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "447"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f92736%2fwhy-does-my-pi-always-have-the-same-ip-address%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            29














            Your Raspberry Pi has a unique ID, called a MAC address, actually two to be precise. Each network adapter has one of those. So the Wi-Fi adapter has one unique ID and the Ethernet adapter does.



            And this is why your Raspberry Pi gets the same IP. For your router it's not important what you are doing with the device exactly. It just recognizes the MAC and provides the same IP as before.



            Edit: As Beege pointed out, the IP can still change as the 'D' in DHCP stands for dynamic. But if your device gets the same IP as before via DHCP its because of the MAC that's recognized.






            share|improve this answer










            New contributor




            ItsKiddow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.














            • 7




              Good explanation. I think it's worth mentioning that the same MAC address will not always get the same IP from the DHCP server -- it is still a "dynamic" service, so it's possible the IP gets taken by another device and your Pi ends up with a different IP assignment.
              – Beege
              yesterday






            • 3




              @Beege oh yes, absolutely, thanks! One can choose to reserve a specific IP for the Pi when a permanent IP is desired, for example when running a server on it. But this is to be enabled specifically with the router (or whatever device else provides DHCP service in the network)
              – ItsKiddow
              yesterday






            • 2




              actually two to be precise - assuming pi3b or 3b+
              – Jaromanda X
              yesterday






            • 3




              The fact that the IP is the same is NOT because of the MAC. The MAC is an identifier that the router has access. The router can be configured to try to give you the same IP when the lease is renewed, or it can randomly assign you a different one. Your router is configured (by the manufacturer) to do the former. This actually prevents a lot of network problems caused by dynamic IP related issues (IP printing ports comes to mind). The ability to obtain the same IP is due to the MAC, but I can easily setup the DHCP on the router to give a pile of different devices the same IP.
              – Nelson
              yesterday
















            29














            Your Raspberry Pi has a unique ID, called a MAC address, actually two to be precise. Each network adapter has one of those. So the Wi-Fi adapter has one unique ID and the Ethernet adapter does.



            And this is why your Raspberry Pi gets the same IP. For your router it's not important what you are doing with the device exactly. It just recognizes the MAC and provides the same IP as before.



            Edit: As Beege pointed out, the IP can still change as the 'D' in DHCP stands for dynamic. But if your device gets the same IP as before via DHCP its because of the MAC that's recognized.






            share|improve this answer










            New contributor




            ItsKiddow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.














            • 7




              Good explanation. I think it's worth mentioning that the same MAC address will not always get the same IP from the DHCP server -- it is still a "dynamic" service, so it's possible the IP gets taken by another device and your Pi ends up with a different IP assignment.
              – Beege
              yesterday






            • 3




              @Beege oh yes, absolutely, thanks! One can choose to reserve a specific IP for the Pi when a permanent IP is desired, for example when running a server on it. But this is to be enabled specifically with the router (or whatever device else provides DHCP service in the network)
              – ItsKiddow
              yesterday






            • 2




              actually two to be precise - assuming pi3b or 3b+
              – Jaromanda X
              yesterday






            • 3




              The fact that the IP is the same is NOT because of the MAC. The MAC is an identifier that the router has access. The router can be configured to try to give you the same IP when the lease is renewed, or it can randomly assign you a different one. Your router is configured (by the manufacturer) to do the former. This actually prevents a lot of network problems caused by dynamic IP related issues (IP printing ports comes to mind). The ability to obtain the same IP is due to the MAC, but I can easily setup the DHCP on the router to give a pile of different devices the same IP.
              – Nelson
              yesterday














            29












            29








            29






            Your Raspberry Pi has a unique ID, called a MAC address, actually two to be precise. Each network adapter has one of those. So the Wi-Fi adapter has one unique ID and the Ethernet adapter does.



            And this is why your Raspberry Pi gets the same IP. For your router it's not important what you are doing with the device exactly. It just recognizes the MAC and provides the same IP as before.



            Edit: As Beege pointed out, the IP can still change as the 'D' in DHCP stands for dynamic. But if your device gets the same IP as before via DHCP its because of the MAC that's recognized.






            share|improve this answer










            New contributor




            ItsKiddow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            Your Raspberry Pi has a unique ID, called a MAC address, actually two to be precise. Each network adapter has one of those. So the Wi-Fi adapter has one unique ID and the Ethernet adapter does.



            And this is why your Raspberry Pi gets the same IP. For your router it's not important what you are doing with the device exactly. It just recognizes the MAC and provides the same IP as before.



            Edit: As Beege pointed out, the IP can still change as the 'D' in DHCP stands for dynamic. But if your device gets the same IP as before via DHCP its because of the MAC that's recognized.







            share|improve this answer










            New contributor




            ItsKiddow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            share|improve this answer



            share|improve this answer








            edited yesterday





















            New contributor




            ItsKiddow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            answered yesterday









            ItsKiddowItsKiddow

            38626




            38626




            New contributor




            ItsKiddow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.





            New contributor





            ItsKiddow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






            ItsKiddow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.








            • 7




              Good explanation. I think it's worth mentioning that the same MAC address will not always get the same IP from the DHCP server -- it is still a "dynamic" service, so it's possible the IP gets taken by another device and your Pi ends up with a different IP assignment.
              – Beege
              yesterday






            • 3




              @Beege oh yes, absolutely, thanks! One can choose to reserve a specific IP for the Pi when a permanent IP is desired, for example when running a server on it. But this is to be enabled specifically with the router (or whatever device else provides DHCP service in the network)
              – ItsKiddow
              yesterday






            • 2




              actually two to be precise - assuming pi3b or 3b+
              – Jaromanda X
              yesterday






            • 3




              The fact that the IP is the same is NOT because of the MAC. The MAC is an identifier that the router has access. The router can be configured to try to give you the same IP when the lease is renewed, or it can randomly assign you a different one. Your router is configured (by the manufacturer) to do the former. This actually prevents a lot of network problems caused by dynamic IP related issues (IP printing ports comes to mind). The ability to obtain the same IP is due to the MAC, but I can easily setup the DHCP on the router to give a pile of different devices the same IP.
              – Nelson
              yesterday














            • 7




              Good explanation. I think it's worth mentioning that the same MAC address will not always get the same IP from the DHCP server -- it is still a "dynamic" service, so it's possible the IP gets taken by another device and your Pi ends up with a different IP assignment.
              – Beege
              yesterday






            • 3




              @Beege oh yes, absolutely, thanks! One can choose to reserve a specific IP for the Pi when a permanent IP is desired, for example when running a server on it. But this is to be enabled specifically with the router (or whatever device else provides DHCP service in the network)
              – ItsKiddow
              yesterday






            • 2




              actually two to be precise - assuming pi3b or 3b+
              – Jaromanda X
              yesterday






            • 3




              The fact that the IP is the same is NOT because of the MAC. The MAC is an identifier that the router has access. The router can be configured to try to give you the same IP when the lease is renewed, or it can randomly assign you a different one. Your router is configured (by the manufacturer) to do the former. This actually prevents a lot of network problems caused by dynamic IP related issues (IP printing ports comes to mind). The ability to obtain the same IP is due to the MAC, but I can easily setup the DHCP on the router to give a pile of different devices the same IP.
              – Nelson
              yesterday








            7




            7




            Good explanation. I think it's worth mentioning that the same MAC address will not always get the same IP from the DHCP server -- it is still a "dynamic" service, so it's possible the IP gets taken by another device and your Pi ends up with a different IP assignment.
            – Beege
            yesterday




            Good explanation. I think it's worth mentioning that the same MAC address will not always get the same IP from the DHCP server -- it is still a "dynamic" service, so it's possible the IP gets taken by another device and your Pi ends up with a different IP assignment.
            – Beege
            yesterday




            3




            3




            @Beege oh yes, absolutely, thanks! One can choose to reserve a specific IP for the Pi when a permanent IP is desired, for example when running a server on it. But this is to be enabled specifically with the router (or whatever device else provides DHCP service in the network)
            – ItsKiddow
            yesterday




            @Beege oh yes, absolutely, thanks! One can choose to reserve a specific IP for the Pi when a permanent IP is desired, for example when running a server on it. But this is to be enabled specifically with the router (or whatever device else provides DHCP service in the network)
            – ItsKiddow
            yesterday




            2




            2




            actually two to be precise - assuming pi3b or 3b+
            – Jaromanda X
            yesterday




            actually two to be precise - assuming pi3b or 3b+
            – Jaromanda X
            yesterday




            3




            3




            The fact that the IP is the same is NOT because of the MAC. The MAC is an identifier that the router has access. The router can be configured to try to give you the same IP when the lease is renewed, or it can randomly assign you a different one. Your router is configured (by the manufacturer) to do the former. This actually prevents a lot of network problems caused by dynamic IP related issues (IP printing ports comes to mind). The ability to obtain the same IP is due to the MAC, but I can easily setup the DHCP on the router to give a pile of different devices the same IP.
            – Nelson
            yesterday




            The fact that the IP is the same is NOT because of the MAC. The MAC is an identifier that the router has access. The router can be configured to try to give you the same IP when the lease is renewed, or it can randomly assign you a different one. Your router is configured (by the manufacturer) to do the former. This actually prevents a lot of network problems caused by dynamic IP related issues (IP printing ports comes to mind). The ability to obtain the same IP is due to the MAC, but I can easily setup the DHCP on the router to give a pile of different devices the same IP.
            – Nelson
            yesterday













            11














            In addition to the already given answers I will give some additional background information.



            In general the DHCP protocol is made to reduce dynamic changes as much as possible. It is an aspect of stability. It does not matter much on small home networks but big networks with switches and routers need some time to get into an optimized state. Switches have to learn its neighbors and router have to learn the routes. Heavy changes of ip addresses is not good for this state.



            Most people may think the DHCP server just give an ip address to a client and that's it. But it is only half the truth. Here is a typical DHCP handshake:



            (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
            (server) DHCPACK on 192.168.10.75 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


            As you can see the client identified with its mac address b8:27:eb:0e:3c:6f requests a specific ip address it prefers. It knows what ip address it has before, also after a new startup. The DHCP server only confirms it. That what it gives to the client is called a lease. It contains a timeout (together with many other important options) how long the client can use the ip address without requesting again. The timeout depends on the setup and is mostly set to some hours. The DHCP server stores the lease in its cache and will reserve it as long as possible for the same client, also if it is shutdown. So it will just confirm the client for its lease when it bootup again. Only when the server does not have other unused leases to give to clients it will take the used one. The handshake then will look like this:



            (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
            (server) DHCPNAK on 192.168.10.75 to b8:27:eb:0e:3c:6f via wlan0
            (client) DHCPDISCOVER from b8:27:eb:0e:3c:6f via wlan0
            (server) DHCPOFFER on 192.168.10.99 to b8:27:eb:0e:3c:6f via wlan0
            (client) DHCPREQUEST for 192.168.10.99 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
            (server) DHCPACK on 192.168.10.99 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


            As you can see the DHCP server rejects (DHCPNAK) the request and offers a new ip address that then in the next step is requested by the client. This additional step is made to give the client the possibility to not accept the offered ip address ...






            share|improve this answer




























              11














              In addition to the already given answers I will give some additional background information.



              In general the DHCP protocol is made to reduce dynamic changes as much as possible. It is an aspect of stability. It does not matter much on small home networks but big networks with switches and routers need some time to get into an optimized state. Switches have to learn its neighbors and router have to learn the routes. Heavy changes of ip addresses is not good for this state.



              Most people may think the DHCP server just give an ip address to a client and that's it. But it is only half the truth. Here is a typical DHCP handshake:



              (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
              (server) DHCPACK on 192.168.10.75 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


              As you can see the client identified with its mac address b8:27:eb:0e:3c:6f requests a specific ip address it prefers. It knows what ip address it has before, also after a new startup. The DHCP server only confirms it. That what it gives to the client is called a lease. It contains a timeout (together with many other important options) how long the client can use the ip address without requesting again. The timeout depends on the setup and is mostly set to some hours. The DHCP server stores the lease in its cache and will reserve it as long as possible for the same client, also if it is shutdown. So it will just confirm the client for its lease when it bootup again. Only when the server does not have other unused leases to give to clients it will take the used one. The handshake then will look like this:



              (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
              (server) DHCPNAK on 192.168.10.75 to b8:27:eb:0e:3c:6f via wlan0
              (client) DHCPDISCOVER from b8:27:eb:0e:3c:6f via wlan0
              (server) DHCPOFFER on 192.168.10.99 to b8:27:eb:0e:3c:6f via wlan0
              (client) DHCPREQUEST for 192.168.10.99 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
              (server) DHCPACK on 192.168.10.99 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


              As you can see the DHCP server rejects (DHCPNAK) the request and offers a new ip address that then in the next step is requested by the client. This additional step is made to give the client the possibility to not accept the offered ip address ...






              share|improve this answer


























                11












                11








                11






                In addition to the already given answers I will give some additional background information.



                In general the DHCP protocol is made to reduce dynamic changes as much as possible. It is an aspect of stability. It does not matter much on small home networks but big networks with switches and routers need some time to get into an optimized state. Switches have to learn its neighbors and router have to learn the routes. Heavy changes of ip addresses is not good for this state.



                Most people may think the DHCP server just give an ip address to a client and that's it. But it is only half the truth. Here is a typical DHCP handshake:



                (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
                (server) DHCPACK on 192.168.10.75 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


                As you can see the client identified with its mac address b8:27:eb:0e:3c:6f requests a specific ip address it prefers. It knows what ip address it has before, also after a new startup. The DHCP server only confirms it. That what it gives to the client is called a lease. It contains a timeout (together with many other important options) how long the client can use the ip address without requesting again. The timeout depends on the setup and is mostly set to some hours. The DHCP server stores the lease in its cache and will reserve it as long as possible for the same client, also if it is shutdown. So it will just confirm the client for its lease when it bootup again. Only when the server does not have other unused leases to give to clients it will take the used one. The handshake then will look like this:



                (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
                (server) DHCPNAK on 192.168.10.75 to b8:27:eb:0e:3c:6f via wlan0
                (client) DHCPDISCOVER from b8:27:eb:0e:3c:6f via wlan0
                (server) DHCPOFFER on 192.168.10.99 to b8:27:eb:0e:3c:6f via wlan0
                (client) DHCPREQUEST for 192.168.10.99 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
                (server) DHCPACK on 192.168.10.99 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


                As you can see the DHCP server rejects (DHCPNAK) the request and offers a new ip address that then in the next step is requested by the client. This additional step is made to give the client the possibility to not accept the offered ip address ...






                share|improve this answer














                In addition to the already given answers I will give some additional background information.



                In general the DHCP protocol is made to reduce dynamic changes as much as possible. It is an aspect of stability. It does not matter much on small home networks but big networks with switches and routers need some time to get into an optimized state. Switches have to learn its neighbors and router have to learn the routes. Heavy changes of ip addresses is not good for this state.



                Most people may think the DHCP server just give an ip address to a client and that's it. But it is only half the truth. Here is a typical DHCP handshake:



                (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
                (server) DHCPACK on 192.168.10.75 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


                As you can see the client identified with its mac address b8:27:eb:0e:3c:6f requests a specific ip address it prefers. It knows what ip address it has before, also after a new startup. The DHCP server only confirms it. That what it gives to the client is called a lease. It contains a timeout (together with many other important options) how long the client can use the ip address without requesting again. The timeout depends on the setup and is mostly set to some hours. The DHCP server stores the lease in its cache and will reserve it as long as possible for the same client, also if it is shutdown. So it will just confirm the client for its lease when it bootup again. Only when the server does not have other unused leases to give to clients it will take the used one. The handshake then will look like this:



                (client) DHCPREQUEST for 192.168.10.75 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
                (server) DHCPNAK on 192.168.10.75 to b8:27:eb:0e:3c:6f via wlan0
                (client) DHCPDISCOVER from b8:27:eb:0e:3c:6f via wlan0
                (server) DHCPOFFER on 192.168.10.99 to b8:27:eb:0e:3c:6f via wlan0
                (client) DHCPREQUEST for 192.168.10.99 from b8:27:eb:0e:3c:6f (raspi3) via wlan0
                (server) DHCPACK on 192.168.10.99 to b8:27:eb:0e:3c:6f (raspi3) via wlan0


                As you can see the DHCP server rejects (DHCPNAK) the request and offers a new ip address that then in the next step is requested by the client. This additional step is made to give the client the possibility to not accept the offered ip address ...







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 18 hours ago

























                answered yesterday









                IngoIngo

                6,1142637




                6,1142637






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Raspberry Pi Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f92736%2fwhy-does-my-pi-always-have-the-same-ip-address%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    An IMO inspired problem

                    Management

                    Investment