User Tools

Site Tools


linux:raspbian:ip:static

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:raspbian:ip:static [2019/09/25 18:07]
els created
linux:raspbian:ip:static [2019/09/25 18:13] (current)
els
Line 1: Line 1:
 +If want to use a fix ip on Raspbian following can be added to /​etc/​dhcpcd.conf.\\
 +With this, the static ip will only be set if no address is provided by dhcp.
 +
 +<​Code:​bash>​
 +profile static_eth0
 +static ip_address=192.168.1.23/​24
 +static routers=192.168.1.1
 +static domain_name_servers=192.168.1.1
 +
 +# fallback to static profile on eth0
 +interface eth0
 +fallback static_eth0
 +</​Code>​
 +
 +=== What is done: ===
 +  * static ip will be set to **192.168.1.23** //​(ip_address)//​
 +  * route will be added to **192.168.1.1** //​(routers)//​
 +  * name server is set to **192.168.1.1** //​(domain_name_server)//​
 +  * configuring interface **eth0**
 +  * only use if no dhcp is available **fallback**
  
linux/raspbian/ip/static.txt ยท Last modified: 2019/09/25 18:13 by els