How to change the gateway address Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
kimura
Posts: 12
Joined: Thu Apr 30, 2020 8:14 pm

How to change the gateway address

Post by kimura »

Currently the default gateway IP is 192.168.0.1 and the IP is 192.168.0.100.
because almost PC use 192.168.0.1 as default Gateway as well, it will be conflicted in some situation.
Is there any way we can set the default Gateway IP to be 192.168.1.1 and the IP to be 192.168.1.100 without using dietpi-config tool?
I have modified the dietpi.txt in the SD, it doesn't work. please advise
Thanks in advance
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: How to change the gateway address

Post by Joulinar »

Hi,

many thanks for your report. Is there a partikular reason why you don't like to use dietpi-config? It's the easiest way to change/manage network settings. However you should be able to adjust settings as well within /etc/network/interfaces file.

Network setting within dietpi.txt are used during first boot only. They are not applicable during normal run. That's way they are marked starting AUTO_SETUP_NET_*. As well there is a message within config file right before this section.

Code: Select all

#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Automation settings, applied on first boot of DietPi only, ONCE!
#------------------------------------------------------------------------------------------------------
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
donbrew
Posts: 9
Joined: Sun May 10, 2020 6:52 pm

Re: How to change the gateway address

Post by donbrew »

Gateway is the address of your internet modem/router. I don't know how there could be a conflict if all of the machines use the same gateway.
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: How to change the gateway address

Post by Joulinar »

@donbrew
I guess he was pointing out that the default values could lead to local issues and conflict with local settings in some cases if not changed. However the default setting is to use DHCP. This way you will always get an IP address from your router or DHCP server. Therefore you will not run into any issues with default settings. And disabling DHCP you will do actively. Means you know that you need to set correct static IP values.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply