- Raspberry Pi 2 Server Essentials
- Piotr J.Kula
- 325字
- 2021-07-16 11:10:05
A static network address
Some DHCP servers on routers tend to change your private address every now and then. Setting a static private address is a quick way to prevent this from happening, and it is easier to remember what the IP address is.
However, many newer routers have the ability to assign a preferred IP address in the DHCP settings or will automatically assign a long-term IP to the device based on its MAC address. A long-term IP usually means that the router is reset to factory defaults or it will run out of IP addresses and replace the oldest entry in the DHCP list.
The downfall of using static addresses with most home routers is that the router might not know about this device. The reason for this is because it would have to scan the entire network endlessly, thus taking up valuable resources. If the DNS service does not advertise the IP address of the Raspberry Pi, you will not be able to use its hostname (which is, by default, raspberry
), and instead, you will have to type in the full IP address. Furthermore, if you want to use your Raspberry Pi as a media center, it will take much longer or may even not show up in the network list. Worst of all, some routers will not allow you to forward ports to your Raspberry Pi if it is not in the DHCP client list.
It is good practice to always have a DHCP server control that's assigned IP addresses on the network so that the DNS server running beside it can work properly. Assigning a static IP address is easy with wicd-curses
, but you could disable DHCP and DNS on your router and use your Raspberry Pi as a separate firewall, DHCP, and DNS server.
Setting up your own DHCP and DNS is not covered in this book as the topic itself could span several chapters depending on your needs.
- 從零開(kāi)始:數(shù)字圖像處理的編程基礎(chǔ)與應(yīng)用
- 數(shù)據(jù)結(jié)構(gòu)和算法基礎(chǔ)(Java語(yǔ)言實(shí)現(xiàn))
- Learning Docker
- Java高手真經(jīng)(高級(jí)編程卷):Java Web高級(jí)開(kāi)發(fā)技術(shù)
- Groovy for Domain:specific Languages(Second Edition)
- SEO實(shí)戰(zhàn)密碼
- Hands-On GPU:Accelerated Computer Vision with OpenCV and CUDA
- Mastering Predictive Analytics with Python
- Mastering Apache Spark 2.x(Second Edition)
- Haxe Game Development Essentials
- Java EE 8 Application Development
- 51單片機(jī)C語(yǔ)言開(kāi)發(fā)教程
- ElasticSearch Cookbook(Second Edition)
- Python+Office:輕松實(shí)現(xiàn)Python辦公自動(dòng)化
- Leaflet.js Essentials