Static IP entry for Raspberry PI not working?

Hello :),

I would like to assign a static IP address to my Raspberry Pi 5. I have a Huawei router that also offers this option, but when I create a rule that assigns an IP address to the Pi's MAC address, it doesn't work. The DHCP server's address range is set so that the IP address the Pi is supposed to receive doesn't fall within it (the range goes up to .253, and the Pi is supposed to receive .254). It gets the same address from the router every time I restart the Pi, etc., but never the address I chose myself. I've also tried creating a static entry on the Pi, but as soon as I restart the router, I can no longer connect to the Pi via cable (it's actually connected via a LAN cable). It doesn't work via Wi-Fi either. The MAC address entered on the router is 100% the same as the Pi's actual address, and I don't know what else to do. Regards

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
14 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Xandros0506
2 months ago

I have a Huawei router where this option also exists

To assign static IP addresses to terminals is not an option of the router.
The fact that these clients requesting the addresses via an integrated DHCP server is, on the other hand, an option (or better function) of the router if it offers this.

The manual configuration of a terminal with IP addresses always works. If the router is DHCP, it has an address pool with IP addresses that it manages and distributes. These IPs should be avoided for manual assignment so that there are no conflicts.

The address range from the DHCP server is selected such that the IP address to which the PI is to be received does not fall within it.

Okay. Then you’ve already thought about using an IP outside the area.

He gets the same address from the router every time

If it receives an IP from the router, it has not received a manual (static) specification in its network configuration, but it still uses DHCP from the router.

I’ve also tried to make a static entry on PI

Wasn’t that the target?

In addition to the IP address, the computer then needs its subnet mask, the router IP as gateway and at least one IP for the DNS server to be used. If the data is not complete, it may use the set IP, but has no connection to the network.

Transistor3055
2 months ago

You write LAN connection and Wi-Fi connection of PI. You have to decide which 2 MAC addresses to receive xxx.xxx.xxx.254 from the DHCP server. If there is a ~cribable IP address anyway, as it is the last in the pool, 254 will be used for repeaters and other things (e.g. also as a default). Try another IP, for example 200, is also a nice number.

Both MAC addresses Wi-Fi and LAN of PI are Other, select/reserve the “right” MAC address. Whether two different network interfaces LAN-Mac and WLAN-MAC can lead to the same IP address can be doubted.

If the router restarts after such DHCP changes, maybe it will.

Good luck!

CatsEyes
2 months ago

So I left my Pis the DHCP address and set these addresses permanently in the router. It’s been working for years. Isn’t that how you are?

CatsEyes
2 months ago
Reply to  DaNike31

The Raspi stands for DHCP and in the router I set this IP permanently. My pi-hole and stubby have been working for years. Not in the Raspi Config. set a fixed IP.

NackterGerd
2 months ago

The address range from the DHCP server is selected such that the IP address to which the PI is to be received does not fall within it.

Of course, the IP must be within the range

Xandros0506
2 months ago
Reply to  NackterGerd

If you want to use DHCP. Not if you want to specify the IP statically on the terminal.
And probably something was done here by both….

NackterGerd
2 months ago
Reply to  Xandros0506

At the Fritzbox it already works

NackterGerd
2 months ago
Reply to  DaNike31

I don’t know if the 253 on your router is a reserved IP.

And if you enter a free IP as a static IP in the server, it will no longer be dynamically assigned

alpakka892
2 months ago

Why not set up the fixed IP directly on the Pi?

NackterGerd
2 months ago
Reply to  DaNike31

I use WLAN and static IP works very well with me.

Of course I also use an IP within the router area