tailieunhanh - Smart Home Automation with Linux- Part 6

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 . 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 8 and where x can mean any value between 0 and 255. For the purposes of demonstration I will assign my subnet to the 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 designation 10 followed by the Linux server which I will assign . 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 netmask broadcast network This tells the system to use the network card assigned as eth111