IP Setup RaspberryPi

IP SETUP

SHOW NETWORKS

sudo nmcli -p connection show

 

SET NEW IP ADRESS

sudo nmcli c mod “NETWORK NAME” ipv4.addresses 10.0.0.220/24 ipv4.method manual

 

GATEWAY SETUP

sudo nmcli con mod “NETWORK NAME” ipv4.gateway 10.0.0.1

 

SINGLE DNS SETUP

sudo nmcli con mod “NETWORK NAME” ipv4.dns “10.0.0.1

 

MULTIPLE DNS SETUP (Optional)

sudo nmcli con mod “NETWORK NAME” ipv4.dns “8.8.8.8,8.8.4.4

 

CONFIRM AND SET IP CONFIG

New IP settings will change directly!, Your current SSH connection will be broken

sudo nmcli c down “NETWORK NAME” && sudo nmcli c up “NETWORK NAME

 

SHOW INFO

nmcli -p connection show “NETWORK NAME

 

BACK TO DHCP

sudo nmcli con modify “NETWORK NAME” ipv4.method auto
sudo nmcli c down “NETWORK NAME” && sudo nmcli c up “NETWORK NAME