pCOWeb
+030220966 – rel. 1.1 – 12.12.2017
59
IP ADDRESSES, PROXY SERVER, SUBNET MASK, DNS, GATEWAY
APPENDIX B
IP ADDRESSES
RECEPTION
A message that reaches a device is accepted if the destination IP address contained in the message coincides with the receiver’s address.
TRANSMISSION
A PC can send data only to a limited range of IP addresses, called the subnetwork. The definition of the subnet for a given PC depends on the combination
[IP address – Subnet mask]. A practical test to establish whether two IP addresses belong to the same subnetwork, is as follows:
NETMASK – PRACTICAL TEST
If the Subnet mask of the two devices are identical and the IP addresses corresponding to the “255” positions of the Subnet mask are identical, the
two IPs belong to the same subnetwork.
Example 1: same subnetwork
SUBNET MASK
255. 255. 0. 0
IP1
10. 0. 1. 34
IP2
10. 0. 2.
245
The device with IP address 1 communicates directly with the device with IP address 2.
Example 2: different subnetworks
SUBNET MASK
255. 255. 0. 0
IP1
10. 1. 1. 34
IP2
10. 0. 2.
245
The device with IP address 1 CANNOT DIRECTLY communicate with the device with IP address 2 (a Gateway device will be needed).
PROXY SERVER
For some types of message, the PC can also be configured so that the path travelled by the message includes (if featured in the local network) a special
device called a proxy server, which performs some additional tasks. An example of such tasks is the one that is normally performed when requesting access
to Internet sites from a PC on a local network; in this case, each PC accesses the Internet via a central server on the network, which has the task of managing
the traffic to the outside. Normally, the server features a proxy so as to store the last pages accessed in its memory, and, if on the websites these have not
been changed (date / file size), rather than download them from the sites it provides its own copy, thus avoiding useless data traffic; in general, a proxy
returns a result that depends on the rules set on the proxy.
If
pCOWeb
is installed in a network with a proxy server, the browser on the PCs in the network are normally already set to send their HTML page requests to
the proxy. In this case, if the network server has not yet been set to locate the
pCOWeb
in the network, a personal computer will not be able to access the
pCOWeb
HTML pages via the proxy. Consequently, the easiest solution is to disable the proxy on the PC used to contact the
pCOWeb
. This means however
that the PC will not be able to access the Internet via the intranet.
FURTHER INFORMATION
The mechanism for the transmission of a data packet is illustrated below.
NOTE
A network device can contact another device only if its
MAC address
is known (or the MAC address of the corresponding gateway that it connects
through) and this is included in the transmission packet; in fact, the first filter for reception on each network device is a network board that rejects
all the messages that are not sent to its own
MAC address
. The transmission mechanism can be analysed as follows.
A – request from a program running on a PC to contact a site; role of the communications manager.
It is assumed that a program running on a PC requests the PC operating system to send a certain message to a server, for example
www.myserver.com; the program sends the request to the communications manager on the PC; the communications manager is a program that is
part of the operating system and that can be considered a “switchboard operator” for the PC: it receives transmission requests from the programs
running on the PC, and receives messages from the outside, forwarding them to the programs running.
B – search for the IP address relating to the site’s server.
Once the request has been received, the communications manager on the PC looks up its “table of names-IP addresses” to find the association
between the requested name (URL: www.myserver.com) and the IP address of the server; if the association is not found, it connects to a special
network service called “
DNS
- Domain Name Server”, whose role is to supply the IP addresses corresponding to the names, in the same way as a
telephone directory; the IP address of the DNS is known to the communications manager, being specified by the user in the configuration of the
PC.
NOTE
In the following examples, to simplify the explanations, it is assumed that the DNS server is located within the network; it must also be
remembered that there are no limits to fact whether the DNS server is located within or outside of the network.
B1 – search for the MAC address of the DNS server
In reality, as described, to call the DNS server the communications manager must first acquire the MAC address; to do this, first of all it looks up its
“table of IP addresses-MAC addresses” (ARP table); if it can’t find the address, it sends a message using ARP protocol (Address Resolution
Protocol); the message is sent to the “broadcast” address (see APPENDIX A a pagina 58) and consequently is received by all the devices. The
message asks for a response from the network device whose IP address matches the address of the DNS server; as soon as the DNS responds,
the PC saves the MAC address in the ARP table so that this can be used again in the future, without having to send the request each time; the
table is not static but is constantly updated.