Đang chuẩn bị liên kết để tải về tài liệu:
Smart Home Automation with Linux- Part 6
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Smart Home Automation with Linux- P6:I will end on a note of carefree abandon—learn to steal! Once you’ve learned the pieces of the puzzle and how to combine them, there is very little new to invent. Every new idea you discover is a mere permutation of the old ideas. And ideas are free! Every cool feature discussed on TV shows or presented in the brochures or web sites of commercial HA companies can be taken, adapted, and implemented with the information presented here using very little effort | CHAPTER 1 APPLIANCE CONTROL For a machine to have an address it must be given one either by a human or by a suitably configured computer. It cannot randomly generate one in case the address conflicts with another machine on the network or is one of the reserved addresses such as 127.0.0.1. All the networked machines in the home should exist within a specific range of addresses known as a subnet and should be assigned to one of the private address ranges provided by the IPv4 specification. This not only stops conflicts with other existing sites on the Internet but also ensures the data within these networks is secure and invisible to machines outside the network because all routers switches and gateways do not recommunicate any traffic with a private address range outside the local network. These private address ranges are 10.x.x.x 8 172.16-31.x.x and 192.168.x.x where x can mean any value between 0 and 255. For the purposes of demonstration I will assign my subnet to the 192.168.1.x range giving me 2549 possible devices on the network. Most people use this for private networks because nearly all the routers sold for the home allocate addresses within this range. Also most questions found on the various Internet forums will probably have answers detailed using the same addresses as you have. Now knowing the address range of your network you have to consider the individual addresses. The first one to assign is the router which usually earns the 192.168.1.1 designation 10 followed by the Linux server which I will assign 192.168.1.2. Caution Configuring properties such as IP addresses requires you to be logged in as root so tread carefully You can provide a Linux machine a static address either by using the tools in your desktop GUI or by configuring the etc network interfaces file directly auto eth1 iface eth1 inet static address 192.168.1.2 netmask 255.255.0.0 broadcast 192.168.1.255 network 192.168.1.0 This tells the system to use the network card assigned as eth111