Networking Basics for Automation Engineers Page 1 of 10 mac-solutions.co.uk v1.0 Oct 2014
1. What is Transmission Control Protocol/Internet Protocol (TCP/IP)------------------------------------------------------------ 3 2. Types of Networks -------------------------------------------------------------------------------------------------------------------------- 3 2.1 Wide Area Network (WAN)-------------------------------------------------------------------------------------------------------- 3 2.2 Local Area Network (LAN)---------------------------------------------------------------------------------------------------------- 3 3. The Topology of TCP/IP ------------------------------------------------------------------------------------------------------------------- 3 4. What is an IP Address---------------------------------------------------------------------------------------------------------------------- 4 4.1 Private IP Addresses ----------------------------------------------------------------------------------------------------------------- 4 5. What is a Subnet Mask? ------------------------------------------------------------------------------------------------------------------ 4 6. How You Get Your IP Address ----------------------------------------------------------------------------------------------------------- 6 7. Default Gateway ---------------------------------------------------------------------------------------------------------------------------- 6 8. ewon Network Setup --------------------------------------------------------------------------------------------------------------------- 6 Appendix A: Network Classes -----------------------------------------------------------------------------------------------------------------10 Page 2 of 10 mac-solutions.co.uk v1.0 Oct 2014
1. What is Transmission Control Protocol/Internet Protocol (TCP/IP) TCP/IP is the internationally accepted standard for networking, for both local networks and internet. TCP/IP = TCP (Transmission Control Protocol) + Internet Protocol (IP) TCP = the connection protocol. Internet Protocol = the routing protocol. 2. Types of Networks Networks come in different shapes and sizes. They are usually based on the following factors: The distance the network covers Architecture and connection media Speed Purpose Two main architectures for networks are LANs (Local Area Networks) and WANs (Wide Area Networks). 2.1 Wide Area Network (WAN) A WAN is a network across a large geographic area e.g. the Internet is a WAN. 2.2 Local Area Network (LAN) A LAN is a network across a contained network, e.g. within a building, or within a stand-alone machine. 3. The Topology of TCP/IP Computers and other devices can only talk with other computers and devices that are on the same network. In order to talk with devices outside of their network, routers are required - routers are gateways to other networks. These devices connect networks which are dissimilar from each other. Figure 1 Relationship of LAN and WAN using special hardware called router Page 3 of 10 mac-solutions.co.uk v1.0 Oct 2014
4. What is an IP Address An IP address is a unique identifier for a computer or device on a TCP/IP network. Networks using the TCP/IP protocol route messages, based on the IP address of the destination device. An IP address consists of 32 bits, often shown as 4 octets of numbers from 0-255. For example, the IP address: 168.212.226.204 in binary form is 10101000.11010100.11100010.11001100. It is easier for us to remember decimals than it is to remember binary numbers, so we use decimals to represent the IP addresses when describing them. However, the binary number is important because that will determine which class of network the IP address belongs to. (For details on classes see Appendix A) 4.1 Private IP Addresses No two devices on the same network can have the same IP address. Individuals, ISPs, and companies will have a public Internet IP address, given to them by their Internet Broadband provider. On the internal network, all of the devices will use private IP addresses. Private IP Addresses are listed below: 10.0.0.x 172.16.x.x 192.168.x.x These are the IP addresses we use to configure our private network (e.g. ewon s LAN network). Depending on the number of the devices in the network, one of the above IP ranges can be selected. 5. What is a Subnet Mask? The size of a network is dictated by the subnet mask used with each IP addresses, on the network. ALL devices on the network must use the same subnet mask. A subnet mask and an IP address work together. Like an IP address, a subnet mask contains four bytes (32 bits) and is often written using the same "dotted-decimal" notation. For example, a very common subnet mask in its binary representation is as shown below: 11111111.11111111.11111111.00000000 However, subnet mask is typically shown in decimals, which is a more readable form 11111111.11111111.11111111.00000000 = 255. 255. 255. 0 Network Address Host Address Figure 2 Each block represents each bit of subnet mask A subnet mask and an IP address work together. Applying the subnet mask to an IP address splits the address into two parts the "network address" is the part of the IP address that is common to all devices on the network the host address is the part of the IP address that is specific to each specific device Page 4 of 10 mac-solutions.co.uk v1.0 Oct 2014
Here is an example: IP address = 192.168.5.11 Subnet mask = 255.255.255.0 In the example, 192.168.5 = the "network address" (IP Range) (The part of the IP address that is common to all devices on the network) 11 = the host address (The part of the IP address that is specific to this specific device) So, on this network, the valid IP addresses would be: from 192.168.5.001 to 192.168.5. 254 A Maximum of 254 devices can be connected in this network. WAN (Internet) 192.168.5.44 ewon LAN IP 192.168.5.11 192.168.5.33 192.168.5.22 Network Address Host Address Figure 3 Illustrated representation of a network with a host capacity of 254 devices When configuring Ethernet devices on the ewon LAN side of the ewon, all of these devices should have the same Network Address and different Host Address. Page 5 of 10 mac-solutions.co.uk v1.0 Oct 2014
6. How You Get Your IP Address All devices on the LAN side of the ewon should be given fixed, static IP addresses. However, it is possible to configure the WAN port of the ewon to automatically obtain an IP address from the customer network, at the final site location, to allow it connect to the internet. This is called DHCP and this is how it works. During the start-up process, the ewon WAN port transmit a broadcast message, saying "I need network settings!". A DHCP server (typically a Windows Server PC or a router / firewall / WiFi access point) listens for these requests and gives suitable network settings to the WAN port of the ewon. 7. Default Gateway A default gateway is required if a device needs to communicate with devices outside a local network. If the Gateway setting is left blank, or is incorrect, network is isolated from the outside world. When configuring a device (e.g. a PLC, HMI, etc.) which is connected on the LAN side of the ewon (e.g. the machine network), it is necessary to configure the Gateway setting in this device. This Gateway setting must be the IP address of the ewon LAN port. 8. ewon Network Setup 1. Set-up the IP address and subnet mask on the LAN (machine side) of the ewon, using the ebuddy software. 2. Set-up the IP address and subnet mask for each device on the machine LAN (e.g. PLC, HMI, etc.), using the appropriate software. These IP addresses and the ewon s LAN address must all be part of the same IP network. 3. Set-up the Gateway address for each device on the machine LAN this address must be the IP address of the ewon s LAN. 4. Ensure that the IP address for the ewon WAN and the IP address for the ewon LAN are in different IP ranges. In general, the WAN port of the ewon should be set to use DHCP, so that it receives network settings which are compatible with the site network, where the ewon is be installed. 5. Ensure that the IP address for the company HQ network (the network, from where the engineer will connect) and the IP address for the ewon LAN are in different networks. This is illustrated in the examples below. Page 6 of 10 mac-solutions.co.uk v1.0 Oct 2014
Figure 4 Different network identification and general convention Network 3 = Machine Network Network 2 = Site network Network 1 = Company HQ network = machine devices, with addresses all in same range = addresses that are used on the network at the site = addresses that are used on the network at the HQ of the company that built the machine Network 3 = Machine Network Network 3 Network 2 (in different range). Network 3 Network 1 (in different range). Figure 3 shows an example of illustrated representation of a typical ewon setup. 1 2 3 Figure 5 Illustrated example of an ewon setup Page 7 of 10 mac-solutions.co.uk v1.0 Oct 2014
In the Network Connection adapter (Local Area Connection or Wireless Network Connection which ever one in use) properties select Internet Protocol Version 4 (TCP/IPv4) and click properties to view the window below. Usually most computer on a network are DHCP enabled, therefore Obtain an IP address automatically option is selected along with Obtain DNS server address automatically. 1 Site LAN affects the ewon s WAN. This is where ewon gets its internet connection from. Therefore usually when going through the internet connection wizard on ewon it is set to DHCP (as shown in the diagram below). This option gives the site the control to assign IP address to ewon s WAN. Enabling ewon to stay connected to the internet. No matter what changes on the Site LAN, ewon still stays connected to the internet (provided that the site has internet from service provider) 2 Page 8 of 10 mac-solutions.co.uk v1.0 Oct 2014
ewon s LAN is supposed to have the same Network Address (IP Range) as the devices which will be connected to the ewon. This is usually set as static as the Network Address (IP Range) of the devices connected to ewon won t change. By default the IP Address for all ewons is set to 10.0.0.53 which can be changed within the ewon configuration. The figure below shows the page where ewon s LAN IP Address can be changed. 3 Another way to change IP Address of an ewon is using ebuddy (ewon Maintenance Utility). This is useful when the IP Address of a particular ewon is unknown. Page 9 of 10 mac-solutions.co.uk v1.0 Oct 2014
Appendix A: Network Classes Class A Class A addresses are assigned to networks with a very large number of hosts. Each slot in the diagram below represents a bit. The first octet (first 8 bits) defines the network address. The remaining 24 bits (the last three octets) represent the host address. This allows for 126 networks and 16,777,214 hosts per network. Network Address Host Address Class B Class A Class B addresses are assigned to medium-sized to large-sized networks. The first two octets represent the network address. The remaining 16 bits (last two octets) represent the host address. This allows for 16,384 networks and 65,534 hosts per network. Network Address Host Address Class B Class C Class C addresses are used for small networks. The first three octets represent the network address. The remaining 8 bits (last octet) represent the host address. This allows for 2,097,152 networks and 254 hosts per network Network Address Host Address Class C Page 10 of 10 mac-solutions.co.uk v1.0 Oct 2014