Ports and port mapping – Echelon i.LON 600 LonWorks/IP Server User Manual

Page 90

Advertising
background image

Section 3: Appendixes

Headers contain:

Source IP: 205.229.51.8 (www.echelon.com)

Destination IP:192.168.1.100 (your PC)

Note that the process is completely transparent. Neither your PC nor the Echelon Web
site are aware the translation has taken place. In this case, two sets of addresses and
checksums were replaced. The process is the same for UDP.

Ports and Port Mapping

A fully qualified URL consists of an IP address and a port. The URL
www.echelon.com:80 is a fully qualified URL. Port 80 is recognized as the default port
for Web servers worldwide. In the previous example, the connection was initiated from a
home network to the destination address 205.229.51.8. Internet Explorer automatically
appends a URL with port 80 so you do not have to enter the full URL when accessing a
Web site.

Ports allow a single computer to run multiple services. For example, www.echelon.com
may run both a web server and an FTP server. It may additionally run a time server and
other applications as well. Each service may be assigned different ports. For example,
Internet Explorer uses port 80 as its default when it accesses http://www.echelon.com and
maps the address as 205.229.51.8:80. When accessing an FTP client, Internet Explorer
will use port 21 so ftp://www.echelon.com will map to 205.229.51.8:21. Both the
browser and the FTP client may simultaneously access www.echelon.com because the
requests are differentiated by port.

Most businesses use port 80 for their web site so customers have easy access to their Web
sites. However, if you wanted to host a less public site, you could assign it a non-standard
port number. For example, you could use www.mycompany.com to attract a wide
audience to your business, or you could assign your URL a non-standard port
(www.mycompany.com:81) to “hide” your Web site from the general public. Note that
changing ports does not provide security to your Web site, so other methods of security
must be used for servers that contain sensitive information. Another reason to use non-
standard ports is to allow access from the Internet to one of your home PCs.

The Internet Assigned Numbers Authority (IANA) lists common or “well known” ports
as well as registered and dynamic ports.
See http://www.iana.org/assignments/port-numbers for more information.

In Example 1, two PCs are connected to and communicate through an NAT gateway that
accesses the Internet through a single IP address. The NAT gateway forwards the packets
to the correct PC using different port settings. To ensure that packets are forwarded to the
proper PC, you can setup your NAT gateway to perform static port mapping. Static port
mapping lets your NAT gateway forward incoming Internet requests to different PCs in
your home using the port settings you specified in your PCs.

For example, if you ran a web server on 192.168.1.100 (see Example 1) you would have
to use a port other than 80 since all requests arriving for port 80 are forwarded to
192.168.1.101. To solve this problem, you could run 192.168.1.100’s web server on port
81 and notify people that your secondary web server is located at 131.23.203.17:81. The
NAT gateway will forward requests to your web servers depending on which URL is
accessed.

82

Using NAT, DNS, DHCP & DDNS with a L

ON

W

ORKS

Network

Advertising