How to Connect to an Ethernet Device for Communication

Preparing to load PDF file. please wait...

0 of 0
100%
How to Connect to an Ethernet Device for Communication

Transcript Of How to Connect to an Ethernet Device for Communication

WHITEPAPER
How to Connect to an Ethernet Device for Communication
Bulletin #8501122b-8501116 Tel 248-295-0880 ■ Fax 248-624-9234 ■ [email protected] ■ www.acromag.com ■ 30765 Wixom Rd, Wixom, MI 48393 USA

Introduction

3

Making a Connection to An Ethernet Device

3

What is Ethernet?

3

The Internet Protocol (IP) and Ethernet Addressing

4

The Transmission Control Protocol (TCP)

5

The User-Datagram Protocol (UDP)

5

The MAChine Address

5

Example 1: Directly Connecting One Host PC to One Ethernet Device

5

Change the IP Address of the Wired Ethernet Adapter on a Windows 10 Computer for Direct Connection

6

Making a LAN Connection to an Ethernet Device

9

Public versus Private IP Addresses

9

IP Addresses and Sub-Netting

10

Named IP Addresses

11

Router Operation

11

Packet Routing

12

For Local Delivery within the Same Network LAN

12

For Remote Delivery between Different Network LAN’s

12

Example 2: Connecting an Ethernet Device to a Local Area Network

13

Prepare the Device for Network Connection

13

Determine Your Router IP Address, Username/Password or Access Code

13

Log into Your Router at its LAN IP Address to Make a DHCP Reservation for Your Device

15

Optional – Setting a Static IP Address in the Device You Want to Connect to your Home Network

21

Contrast Example 2 for Making a home LAN Connection with Making a Corporate LAN Connection

21

Example 3: Remotely Accessing an Ethernet Device Connected to Your LAN

22

Connecting to an Ethernet Device

22

How Public Clients Talk to Private Clients?

22

Before You Start - Your Public IP Address Must be Static

22

Port Forwarding, Port Mapping, or Virtual Server

23

Port Number

24

Virtual Private Network (VPN) – A Recommended Option for Increased Security with Open Ports

25

Dynamic DNS Service (One Option for Added Convenience)

26

Firewall Protection

27

Example 3: Using Port Forwarding to Remotely Access a LAN Device on a Home Network

27

Get a Static Public IP Address

27

Connect Your Device to Your LAN Router

28

Pick a Port Number to Assign to your Device

28

Log into Your Router/Gateway at its LAN IP Address and Configure Port Forwarding

28

TIP: How to Find Your Public IP Address

23

Test to See If Your Port is OPEN

34

Contrast Example 3 with Achieving Remote Access on a Corporate Network

35

Glossary

36

Conclusion

38

About Acromag

38

HOW TO CONNECT TO AN ETHERNET DEVICE FOR COMMUNICATION
Introduction Acromag manufactures Ethernet-enabled devices that monitor and isolate voltage, current, thermocouple, and RTD signals, plus control analog and digital outputs, and can transmit I/O information over Ethernet and on the internet. However, the complexities of Ethernet communication can make connecting to these devices difficult. This paper outlines each of three ways that you can make a connection to an Ethernet device.
Making a Connection to An Ethernet Device To connect and communicate to an Ethernet device like an Acromag Ethernet module, you have three potential connection scenarios:
1. Direct connect your Ethernet device to your computer – Easiest but the most restrictive, as it dominates the use of your Ethernet port and may temporarily take your computer off-line from the internet.
2. Network connect your Ethernet device to your LAN (Local Area Network) – A little more complicated and does not include remote access from another network.
3. Remotely connect to your Ethernet device over the internet – This requires the second scenario, but adds Port Forwarding, requires a static public IP address, and potentially adds the services of a VPN (Virtual Private Network).
The first connection method is simple and straight-forward, and often used to configure an Ethernet device for network communication. The second connection method is more common, but a little more complicated to do yourself. The third method of using the internet to remotely access your device can be very complex and usually involves the purchase of additional services. For each connection type, the background knowledge required to make the connection will be reviewed first, followed by an example. If you read the background information first, you should have enough information to make the example connection yourself. It is helpful to walk through these connection examples in the order presented and each scenario will build on the concepts of the prior example. If you make it all the way through the three connection scenarios, then at least your insomnia will be cured.
Before we delve into the first connection example of directly connect to an Ethernet device, we need to understand a few basic Ethernet concepts. The second connection example will add additional concepts as required to make a LAN connection. If you complete the third connection example you will have a good understanding of what really goes on when you connect to an Ethernet device and this should be helpful in managing the Ethernet connections of your home network.
What is Ethernet? Ethernet is a system of connecting more than two devices to form a Local Area Network (LAN) for sharing information and resources, technically referred to as the IEEE 802.3 protocol standard. Ethernet is considered a link layer protocol of a TCP/IP stack and controls how network data is formatted and how it is transmitted to other network devices. It includes protocols for passing information between devices while avoiding simultaneous transmission by devices and it is the most widely installed network topology used for Local Area Networks (LAN), Metropolitan Area Networks (MAN or confined to a single geographic area), and Wide Area Networks (WAN or spanning a large geographic area).
Briefly, Ethernet refers to a means for transporting messages across a network as datagrams. The actual payload (data) of a single datagram frame can be up to 1500 bytes. Long streams of Ethernet data are generally divided into shorter datagrams, each inserted into a frame for transport on the same LAN, or additionally in a packet for transport between networks.
A payload is first framed with fields that contain information about the data, such as its origin address and originating MAC (Media Access Control) address, its destination address and destination MAC address, its data type, VLAN tag information, plus QoS (Quality of Service) and error correction information helpful for detecting problems in transmission, allowing damaged frames to be discerned, discarded, and sometimes retransmitted. When destined for travel outside of a network, each framed datagram is additionally wrapped inside a packet which adds information used for establishing a connection and marking where the frame starts.
As a network standard, Ethernet was designed to use a shared medium for communication with other devices. When a device connected to an Ethernet network wants to send data to another device, it senses the presence of the carrier or main wire connecting the devices. If the carrier is free and no other devices are sending data, it transmits the datagram onto the network. All other devices connected to the carrier check that data message to see whether they are the intended destination, until the actual intended recipient discovers and consumes the packet. If instead, the sending device determines there is already a message on the carrier, it holds the datagram back for a moment and retries sending it when it senses the carrier is free. This approach to sharing its connection medium is referred to as CSMA/CD (Carrier Sense Multiple Access with Collision Detection).
Tel 248-295-0880 ■ Fax 248-624-9234 ■ [email protected] ■ www.acromag.com ■ 30765 Wixom Rd, Wixom, MI 48393 USA
3

HOW TO CONNECT TO AN ETHERNET DEVICE FOR COMMUNICATION
The Internet Protocol (IP) and Ethernet Addressing For any network, its “protocols” refer to the various rules its network devices use when they communicate over the network. You can view your own network and the internet as a collection of protocols for accomplishing network services/tasks. One key protocol is the Internet Protocol (IP). IP governs the rules for addressing network messages and exchanging message packets. It operates by placing messages/data into frames that include both destination and return addresses, and sending them along an IP network where they can be routed among many possible destinations, and in packets for traversing across many networks, but will ultimately be delivered to the right address. Linked sub-networks of a WAN do not know the specific location to which a packet is being sent, but only to what network the destination node resides at. They discern this using information stored in their routing tables to determine if a destination address matches a node in their own address domain or subnet, whereupon it can ultimately be routed to the appropriate host. The Internet Protocol address (IP address) refers to the numerical label assigned to each network node--each host computer, printer, router, or other Ethernet device that has been inter-connected to form a network and that uses the Internet Protocol to communicate. An IPv4 address is 4 bytes long (32-bits), and IPv6 address 16 bytes long (128-bits). IPv4 addressing still dominates the internet, but IPv6 has been implemented in parallel to continue to uniquely address Ethernet devices once IPv4 address space has been exhausted. Many modern devices support both IPv4 and IPv6 addressing and should remain operable when that day comes. The most widely supported IPv4 addresses are made up of four octets (four groups of 8 bits), where each octet has an integer value between 0 and 255 (00-FF Hexadecimal), allowing IPv4 to support up to 4.3 billion unique numeric addresses (232-2= 4,294,967,296 addresses). You will see IPv4 addresses commonly expressed as a series of four integers from 0 to 255 with a period placed between them and this format is referred to as dotted-decimal (like 128.1.1.2). A numeric IPv4 address like this is behind every web address name that you commonly use when you surf the internet. Every Ethernet device has an IP address assigned to it either manually, or automatically as part of connecting to a network, and the IP address serves as both a host or network interface ID, and a host/node location address (more on this later). Each node of a sub-network can only communicate directly with another node in its own address space (its own subnet). While IP is the only addressing protocol used by Ethernet, Ethernet networks use two types of data transmission: TCP and UDP. Briefly, TCP refers to Transmission Control Protocol, and UDP refers to User Datagram Protocol. Contrasting the two, TCP is connection-oriented and first seeks to establish the connection, then transmits the data bi-directionally. UDP is simpler and connectionless—it just sends the data without first establishing a connection. The combination TCP/IP denotes the Transmission Control Protocol/Internet Protocol, while UDP/IP denotes User-Datagram Protocol/Internet Protocol. But for Ethernet, each of these protocols represent larger suites of communication protocols or stacks of protocols that define the details of how data is sent and received through inter-connected Ethernet devices such as: adapters, hubs, switches, gateways, and routers. The Dynamic Host Configuration Protocol (DHCP) is a method used to automatically assign temporary IP addresses to devices as needed. A device set to obtain its IP address automatically via DHCP looks up the LAN DHCP server and requests an IP address when connected. The DHCP server maintains a “pool” or range of IP addresses that are dynamically assigned and recycled as needed. If the DHCP server has an address available, it assigns it to the device on a temporary basis. If the server checks its supply and none are available, it returns a busy signal to the client to try again later. The DHCP server itself can be a separate piece of hardware on large corporate networks, but its function is normally built into the small routers used by home networks. Most home routers want to control address assignment to LAN devices via their DHCP, and require that the LAN devices are setup to obtain their IP address via DHCP when connected. To avert delay, some LAN devices can optionally be set to use DHCP but revert to a default IP address if no DHCP server is present. Some home routers and most business class routers will also allow a LAN device to use a static IP address set inside itself. A static IP address does not change and can ensure a connection every time, if the static IP address is unique and within the LAN’s address domain. A Static IP Address is as the name implies—static and doesn’t change on the network and is fixed into the device itself. Conversely, a Dynamic IP Address is an address temporarily assigned to a network node by another host/service provider on that network each time the node connects and may be subject to change “dynamically” as required. Ethernet devices may have the option of being assigned an IP address or have a default IP address already assigned (static assignment), or may be set up to determine their IP address automatically when they connect to a network (dynamic assignment via DHCP).
Tel 248-295-0880 ■ Fax 248-624-9234 ■ [email protected] ■ www.acromag.com ■ 30765 Wixom Rd, Wixom, MI 48393 USA
4

HOW TO CONNECT TO AN ETHERNET DEVICE FOR COMMUNICATION
The Transmission Control Protocol (TCP) With Ethernet, the Transmission Control Protocol complements the Internet Protocol as one of the two main protocols used on the internet. While network IP deals with addressing the nodes, TCP is the method used to manage the data transfer between nodes and provides the following service:
• TCP establishes a connection before transferring data between local hosts/clients/servers using a three-way handshake with each node exchanging SYNch and ACKnowledgment packets to synchronize sequence numbers and setup data transfer before actual data communication begins.
• TCP manages large data transfers by splitting a continuous data stream (many bytes of information) into separate IP-framed segments. • TCP also manages message flow control by pre-specifying the number of bytes that may be sent before additional permission is required. • TCP will multiplex messages to many recipients using port numbers to specify different destinations. • TCP essentially increases reliability of the data transfer by assigning sequence numbers to data bytes and by using special flags to trigger other services.
Sequence numbers help TCP assemble data in the correct order, discern duplicate data, and recover damaged or lost data bytes. For example, a sending TCP requires acknowledgment from a receiving TCP, and if not received within a timeout period, it causes the data to be sent again, helping to ensure its eventual delivery.
The User-Datagram Protocol (UDP) UDP provides an alternative transmission protocol to TCP and is generally used to send shorter messages without first establishing a connection between nodes. In this way, it is less reliable than TCP, but quicker for sending data. A UDP message is limited to 1500-20 (IPv4 Header)- 8 (UDP Header) or 1472 bytes maximum.
The MAChine Address While network routers/gateways use logically assigned 32-bit IP addresses and subnet masks to determine network destinations, a second unique hardcoded number inside every LAN device is called the MAC address (Media Access Control or MAChine address). While an IP address is logically assigned by the network IP and can change, the MAC address is a unique 48-bit (6 byte) number fixed into the device hardware and often expressed as 6 hexadecimal numbers separated by colons, like 00:01:07:B7:EB:6F.
The first three bytes of a MAC address identify the manufacturer of the device. Ethernet devices broadcast MAC addresses continuously on a network to let other devices know where to send/return a frame or packet. The router keeps track of where specific devices are located on its subnet by maintaining a list of MAC addresses associated with its LAN IP addresses, and it is the MAC address that allows a message to be delivered right to the device when the device location or logical IP address has changed.
Example 1: Directly Connecting One Host PC to One Ethernet Device
• Requires a basic understanding of Ethernet static and dynamic IP addresses and the subnet mask. • Requires knowledge for changing the IP Properties of a host computer’s network interface adapter. • May require knowledge for changing the IP address of a device if it doesn’t have a default address set. Direct connection is the simplest, most straight-forward and secure way to connect to an Ethernet device, as it involves the least number of steps and completely isolates the source and destination. But this is not a network connection, it only uses Ethernet to connect one device to one host. Direct connection will involve separately setting up the network interfaces of a host and an Ethernet device, with unique static IP addresses compatible with each other, then using a web browser of the host to communicate with the device (assuming the device supports web connection). Because it is often inconvenient to separate a host computer from its network when you change its address to a static IP address, this method is mainly used for test or configuration of a single Ethernet device apart from a network.
To talk between devices using Ethernet, each device must have a compatible IP address. For the host interface IP address, you have two options: if your computer only has a single wired Ethernet port, you must change that port’s TCP/IP configuration and set it to a static IP address (refer to the TCP/IP Properties of its Network Configuration in Windows®), or you can add another wired network interface card to your host PC for exclusive connection to the device. For convenience sake, the latter option is preferred, as it doesn’t affect your current wired network connection. But if your computer normally connects to the internet via WIFI, but also includes a wired Ethernet port, this will not normally be an issue as your WIFI internet connection can remain intact. But either option requires that you select two different IP addresses, one for each device, compatible with each other, as communication between two devices can only occur if both devices reside at addresses in the same address domain. Compatible IP addresses simply means the two addresses must share the same Network ID, but have different node ID’s. The necessary steps for changing the TCP/IP configuration of the host computer will vary with your operating system. In general, on Windows® computers, you need to navigate to the Control Panel and change the settings of the network adapter with respect to disabling DHCP address assignment of the interface, setting it to a static IP address, and specifying a subnet mask. The steps to changing it at the device to connect should be covered in the device’s manual, or it may already have a default IP address assignment. If your computer is part of your
Tel 248-295-0880 ■ Fax 248-624-9234 ■ [email protected] ■ www.acromag.com ■ 30765 Wixom Rd, Wixom, MI 48393 USA
5

HOW TO CONNECT TO AN ETHERNET DEVICE FOR COMMUNICATION

company network, you may have to consult with your network administrator to temporarily change your TCP/IP configuration. Here are a couple of points about selecting two static IP addresses that are compatible:
• The Ethernet device to connect might already have a default static IP address assigned to it recorded in its documentation or stamped on its side label. Refer to this default IP address and its subnet mask, and reuse its network ID to set another static node address within its domain that you will assign to the host computer’s wired network interface (both IP addresses must share the same subnet address or network ID but have different node ID numbers).
• The wired network interface of the host computer is most likely setup to obtain its IP address automatically using DHCP by default. This means if you set it to a static IP address, the computer will no longer be able to talk on your LAN or to your LAN router using that interface. Thus, it’s often more convenient to install a second interface on the host computer and use that to create a dedicated private direct-connection to an Ethernet device.
But for either scenario, you must change the IP address of your host computer’s network interface card to a compatible address in the address space of the Ethernet device you want to connect. For example, Acromag Ethernet modules include a default communication mode for web-setup that always uses IP address 128.1.1.100 with a subnet mask of 255.255.255.0. If I want to talk to this device, I would set my wired Ethernet interface to a similar address like 128.1.1.105. The node number you pick is any other number from 0-255, except 0, and 255. The first node number of 0 and the last node number of 255 are always reserved and 100 is already used by the Ethernet device, so you must pick a host address with its last octet set from 1-99, or 101-254 and it must also have the same subnet mask 255.255.255.0.
The three connection examples of this paper explains each way to connect to an Acromag 989EN-4016 Ethernet I/O module, with each successive example reusing the prior. Beginning with Example 1 below which shows how to setup your computer’s Ethernet adapter to communicate with a 989EN-4016 module set in its default communication mode, ultimately to configure it for DHCP address assignment outside of default mode, as required for Examples 2 and 3.
You can refer to Acromag Application Note 8500-734 for more detailed information on making a direct connection to your Ethernet device using different versions of the Windows operating system at www.acromag.com. An example procedure for doing this using a Windows 10 based computer is provided for reference below:

Change the IP Address of the Wired Ethernet Adapter on a Windows 10 Computer for Direct Connection
You would normally only do this if you want to connect your computer to a single Ethernet device, perhaps to configure it for some application or set the device up for network communication, as for our example.

Example Ethernet Device: Default Mode IP Address: Default Mode Subnet Mask:

Acromag 989EN-4016 (This device must be in its Default Mode, see Manual) 128.1.1.100 255.255.255.0

Setup Required for Ethernet Adapter to talk to this device in its default mode:

Disable DHCP Addressing Set Static IP Address: Subnet Mask:

Disable Automatic IP Address Assignment (a common default) 128.1.1.105 (Instead of 105, you could alternately choose from 1-99, or 101-254) 255.255.255.0 (set it identical to device)

Tel 248-295-0880 ■ Fax 248-624-9234 ■ [email protected] ■ www.acromag.com ■ 30765 Wixom Rd, Wixom, MI 48393 USA 6

HOW TO CONNECT TO AN ETHERNET DEVICE FOR COMMUNICATION

Setup Required for our Ethernet Device Outside of its Default Mode and for Examples 2 and 3:

IP Address: Subnet Mask:

The LAN Device is set to use DHCP Address Assignment 255.255.255.0 (set it identical to the adapter)

1. Disconnect your Windows 10 computer’s wired Ethernet port from your network if your router is wired to your computer using this port by unplugging any Ethernet cable connection to it. CAUTION: In changing the IP properties of your wired Ethernet adapter as follows, you will temporarily lose access to your existing network if made using this same interface.

2. On your Windows 10 computer, navigate to the Control Panel and select Settings (selecting the Gear icon after clicking the Start button in the lower left corner of your desktop will also get you to the Settings menu), choose “Network & Internet”, then “Ethernet” as shown at right:

3. Your Ethernet adapter will be indicated similarly as shown below. Click to highlight your wired adapter, and then click to select “Network and Sharing Center” under Related settings.

4. In the Network and Sharing Center, all your computer’s network adapters will be listed similar to the screen below. If you happen to connect to the internet wirelessly via Wi-Fi, right click on the Wi-Fi adapter and select “Disable” to turn it off temporarily before continuing. 5. Right-click on your wired Ethernet adapter and select Properties to display the network properties list shown on the left below (the Ethernet properties of your adapter are listed with checks leading the properties that apply to it). Click to highlight the item “Internet Protocol Version 4 (TCP/IPv4)” and then click the [Properties] button as shown below to display its IPv4 properties as shown in the screen to its right.
Tel 248-295-0880 ■ Fax 248-624-9234 ■ [email protected] ■ www.acromag.com ■ 30765 Wixom Rd, Wixom, MI 48393 USA 7

HOW TO CONNECT TO AN ETHERNET DEVICE FOR COMMUNICATION
The computer’s Ethernet adapter must be set to a unique static IP address in the same address domain as the 989EN-4016 default communication mode address of 128.1.1.100, and with a subnet mask set to 255.255.255.0. Thus, our choice for the adapter IP address simply requires that its first 3 octets equal 128.1.1 to match the module’s first 3 octets, and the last octet can be anything from 1-254, except for 100 already used by the module (128.1.1.105 for this example).
6. In the adapters IPv4 properties screen shown on the right above, click the button adjacent “Use the following IP address:”, then enter IP address 128.1.1.105 into the IP address field as shown. Also enter 255.255.255.0 in the Subnet mask field and leave the Default Gateway and DNS settings alone, as they are not used when making a direct to device Ethernet connection. Click the [OK] button to save your changes. 7. At this point, connect an Ethernet cable from the Ethernet port of your computer to the Ethernet port of the Acromag 989EN-4016 module and apply power to the module and place it in its default communication mode (refer to its instruction manual if needed). On your computer, load a web browser and type the address 128.1.1.100 into its web address field and press [Enter]. Your browser should then display the home page of the Acromag 989EN-4016 module as shown below: The Home page is used to access other web pages of the module for configuring its network parameters, changing its password, and operating the module. Because we intend to prepare this module for connection to a LAN in examples 2 and 3 of this paper, we need to select the Network Configuration Page (password required). To access the Network Configuration Page, you will be prompted to enter a “User name:” and “Password:”. The default settings are User and password respectively (Refer to the 989EN User Manual 8500-805 for more information). After entering the username and password, the 989EN will return the Network Configuration Page shown below.
Tel 248-295-0880 ■ Fax 248-624-9234 ■ [email protected] ■ www.acromag.com ■ 30765 Wixom Rd, Wixom, MI 48393 USA 8

HOW TO CONNECT TO AN ETHERNET DEVICE FOR COMMUNICATION

Here, we need to set its Subnet Mask field to 255.255.255.0 and click to enable the option “Use DHCP” and direct the module to obtain its IP address automatically when we connect it to our LAN router with it outside of default mode.
After making the required changes, click on the [submit] button to write the changes to the module.
To this point, you have successfully connected your computer to an Ethernet module and have set the module up for reuse in the second and third examples of this paper.

Making a LAN Connection to an Ethernet Device
Example 1 showed how to directly connect to an Ethernet device to test its operation or to accomplish device setup—this was not a network connection. In Example 2 that follows this section, we show how to connect the same device to a Local Area Network. Example 3 will cover remotely accessing this device over the internet.
To make a LAN connection, we need to access the home router’s configuration console to setup a DHCP reservation to make our device IP address the same every time we access it on our network. But before walking jumping into Example 2, we need to explore a little more about IP addressing, sub-netting, and router operation.

Public versus Private IP Addresses
Because we plan to connect our device to a router, it’s now important to make a distinction between public and private IP addresses. A public IP address refers to the IP address used on the internet—this is essentially the address your ISP assigns to your router’s WAN/internet port. Your router shares its public IP address among the different network devices connected to its LAN ports. On the other hand, a private IP address refers to the local IP addresses that are used behind the router that your LAN devices receive. As a rule, private IP addresses are separate from public addresses, cannot be routed to the internet, and are unique only on their own LAN. Public IP addresses are unique globally among the billions of LAN’s that connect over the internet.
Public IP address space is managed globally by IANA (Internet Assigned Numbers Authority) using five Regional Internet Registries (RIR’s) that administer IP addresses to guaranty they remain unique among billions of possible network devices on the public internet.
Each regional registry makes unique assignments to end users and other local internet registries operating in their territory, which may include your own Internet Service Provider (ISP). Your ISP or private network administrator assigns a public IP address to each public device connected to its network from a finite collection of IP addresses to which it subscribes from its Regional Internet Registry.

PRIVATE ADDRESS SPACE RESERVED BY IANA

START ADDR END ADDR

SIZE (NODES)

10.0.0.0

10.255.255.255 16777214

172.16.0.0

172.31.255.255 1048576

192.168.0.0 192.168.255.255 65534

These private LAN addresses cannot be routed on the public internet, effectively keeping your router’s public IP address always different from any of its LAN IP addresses.

Tel 248-295-0880 ■ Fax 248-624-9234 ■ [email protected] ■ www.acromag.com ■ 30765 Wixom Rd, Wixom, MI 48393 USA 9

HOW TO CONNECT TO AN ETHERNET DEVICE FOR COMMUNICATION
Private IP addresses are reserved for use behind a Network Address Translation (NAT) device (like your router). Your router will have a LAN IP address from one of these ranges, and your Ethernet devices will get similar IP address assignments in these ranges. While public IP addresses cannot be used by devices inside a home or business LAN (except by a router’s WAN port), private IP addresses can be used many times by different LAN’s without additional restrictions on sub-netting or address assignment.
Essentially, the internet is a Wide Area Network (WAN) of smaller inter-connected Local Area Networks (LAN’s) that exchange information between network nodes using private IP addresses, but communicate network-to-network by passing data packets between routers/gateways using public IP addresses.
In addition to private IP addresses, be aware of some other IP address ranges reserved by IANA as follows:
0.0.0.0 to 0.255.255.255 are reserved and do nothing at present (these do not function on any network) 100.64.0.0 to 100.127.255.255 is for use between an ISP and subscribers using a carrier grade NAT. 127.0.0.0 to 127.255.255.255 is reserved for looping data back and specialized diagnostic functions. 169.254.0.0 to 169.254.255.255 is reserved for Automatic Private IP Addressing (APIPA) 224.0.0.0 to 255.255.255.255 is reserved for multi-casting (Class D 224-239) or future use (Class E 240-254)
Public or private, the numeric IP address of any device is always unique on a network—public IP addresses are unique globally on the internet and governed by IANA, while private IP addresses are unique on their own LAN and governed by the LAN (router/device). No two Ethernet devices on a network, public or private, may have the same IP address assignment on the same network at the same time.
Since public IP addresses are unique and regional, that address can be traced back to its source location. For example, you could extract the source IP address from an email header and use that information to find the geographic location of the source (or at least its ISP). Of course, the address that is discerned is really the address of the router/gateway that connects to the device. Locating the LAN device itself would require additional information from the router. There are many free websites that can extract geographic detail from an IP address, such as www.whatismyipaddress.com. Online companies and their networks continually monitor IP activity and know you access their site, and sometimes restrict or grant access to website resources based on your location. Likewise, hackers can use these IP addresses to break into networks and sometimes take control of network devices. As such, other measures are taken to help ensure privacy and security (more on this later).
Normally your RG’s public WAN port is dynamically addressed by your ISP, unless you pay up for a static public IP. Your home router typically assigns private IP addresses to its LAN devices dynamically using DHCP. The router/gateway allows the LAN devices to share its public WAN IP address using Network Address Translation (NAT) to communicate between networks, helping to preserve public IP address space. Communication sent between a private LAN address and a public WAN address is not permitted without passing through the intermediary RG (Router/Gateway or Residential Gateway). Dividing the total IP address space into public and private sets conserves address space, and using routers to gate access between the two sets is how billions of devices across the globe can talk together on the internet at the same time without bogging down the shared connection.
If you happen to set the destination IP address of a message packet to an address in another network, your message will be blocked by your RG—the externally bound message must be sent to the router/gateway to be forwarded properly, because each node of a network can only communicate directly with another node in its own address space (its own subnet).
IP Addresses and Sub-Netting Network nodes of an address domain only communicate directly with other nodes in the same address domain. Billions of conversations occur simultaneously on the internet by separating IP addresses into public and private address groups and gating communication between them. But how do very large networks handle many nodes needing to communicate at the same time? Large networks use sub-netting of their address space to divide themselves into smaller networks or communication groups and they use a subnet mask to do this. This division into independent communication groups is how simultaneous/parallel network chatter can work without becoming bogged by many nodes competing for shared communication media.
The term subnet refers to the contiguous string of IP addresses exclusive to the nodes of a group that share some common element for communication. Sub-netting address space helps separate larger numbers of nodes into smaller groups to allow them to communicate more efficiently. The subnet mask is another 32-bit number used to parse the IP address into two parts: a network address/ID and a node address/ID. This is done by logically AND’ing each bit of the two numbers, bit-by-bit, and the leading bits of the result correspond to the sub-network’s address, and the trailing bits correspond to the node address space.
The first node address of a subnet (0) is the network ID and used to identify the subnet itself, while the last node address of a subnet is always used as a broadcast address to all nodes of that subnet--anything sent to the last IP address of a subnet is sent to every host on that subnet.
Tel 248-295-0880 ■ Fax 248-624-9234 ■ [email protected] ■ www.acromag.com ■ 30765 Wixom Rd, Wixom, MI 48393 USA
10
Ethernet DeviceDeviceNetworkInternetConnection