-3

I'm setting up a Raspberry Pi with OpenVPN on my home network. The router for my network is a NetGear Orbi.

In the router's configuration I'm able to assign a static internal IP address (say 10.0.1.200) to the VPN server based on its MAC address.

I could also set the VPN server to use a static internal IP address (10.0.1.200) by adding an entry to its /etc/dhcpcd.conf file.

So one way I'm telling the router to assign a static IP address to the VPN server using DHCP, and the other way I'm telling the VPN server directly to use a static address.

Can I do both (for the same IP address, obviously) or will they interfere with each other? Should I do both? If not, which way is preferable?

Robert
  • 117
  • 4
  • Welcome to Server Fault. Your question isn't really clear, that's why it deserves a downvote. To be able to understand what you want, you should be more clear: the title is talking about a router, and in the body of the question, there's not router IP or somehting like that. Where is your router gone? Another point is that you should learn the basics of TCP/IP. What I understood from your question was "I have an IP ; if I set it in the DHCP or statically, will it interfer?". For sure it will, do some reseach before posting please. – LeRouteur Sep 30 '20 at 12:02
  • @LeRouteur Thank you for your help. I thought my question was clear, but clearly I was wrong! I've edited to make it clearer. I'm setting up a VPN and not sure which approach I should take to assigning it an internal IP address. If you could read the edit and let me know if it's still unclear I would appreciate it. Thanks! – Robert Sep 30 '20 at 12:16
  • no problem, I'm glad you understood my bad English and you improved your question. – LeRouteur Sep 30 '20 at 12:20

1 Answers1

0

When I go ahead to configure a server, I'll use a static IP (IP set on the device), because I simply don't trust my DHCP failover. If the DHCP fails, your server is down.

For critical servers, like my hypervisor, a static IP needs to be set.

To explain a little, you'll use a DHCP reservation (that's what you asked for) for printers or specific end-user devices (maybe computers, but I've never seen that). For example, a printer will obtain an IP from a DHCP reservation.

Imagine you work with VLANs, and you decide to migrate 100 printers from VLAN 200 to VLAN 300. If you printers have a static IP, you'll have to go on the 100 printers and set the new IP manually. By using DHCP reservations, just open the DHCP console and change the IP from there.

To resume, use static IP for servers, storage, routers, L3 switches, etc...

LeRouteur
  • 376
  • 2
  • 13