Académique Documents
Professionnel Documents
Culture Documents
Layer 1 is
the physical 1s and 0s that go over a wire, Layer 2 is the data-link layer, which is protocols
down like Ethernet and Point-To-Point Protocol (PPP), which carries information between
vote adjacent nodes about MAC address from and to and allows for error detection and
retransmission. Layer 3 is the IP layer, which carries information about where in the whole
network the packet is from and to, not just the current hop.
12
I am familiar with the basic OSI model but I always get confused how does a packet travel
from one machine to another over the Internet and what OSI layers do come into picture?
down For example, for the following topology:
vote
4
Machine A<----->Switch<---->Router<---->Router<---->Router<---->Switch<---->Machine B
favorite
where the multiple routers are shown to represent the Internet, what happens at the OSI
layer level, when Machine A send a packet (say a simple "ls" command over FTP) to
Machine B.
The above is just a suggested example, but if any one can explain with any other network
topology, that is fine too. All I am looking a very basic explanation of how the packet gets
transformed to different OSI layers at each nodes (Machine, Switch, Router, etc.).
The question now becomes how this is actually used. When a host wishes to figure out whether a destination
host is local or remote, it goes through the following steps.
1.
The host takes its own IP address and ANDs it with its own subnet mask, producing a result.
2.
The host then takes the destination IP address and ANDs it with its own subnet mask, producing
another result.
3.
Finally, the host compares the two results. In cases where the ANDing results are identical, it means
that the hosts reside on the same subnet. In cases where the results are different, it means that the
destination host is remote.
Consider this example. Computer A has an IP address of 192.168.62.14 with a subnet mask of 255.255.248.0.
It wishes to communicate with host 192.168.65.1. In order to determine whether this destination is local or
remote, it will go through the ANDing process. Its IP address and subnet mask are lined up in binary, and then
vertically compared to find the AND result. The same is then done for the destination address, again using the
subnet mask of the source host. This is illustrated in the figure below.
Figure: The ANDing process.
Notice that when the resulting AND values are converted back to binary, it becomes clear that the two hosts
are on different networks. Computer A is on subnet 192.168.56.0, while the destination host is on subnet
192.168.64.0, which means that Computer A will next be sending the data to a router. Without ANDing,
determining local and remote hosts can be difficult. Once youre very familiar with subnetting and calculating
ranges of addresses, recognizing local and remote hosts will become much more intuitive.
Whenever youre in doubt as to whether hosts are local or remote, use the ANDing process. You should also
notice that the ANDing process always produces the subnet ID of a given host.
Rather Have
Fast andSecure Remote
Control?
Securely access PCs and servers
worldwide through any firewall. Try it and
see for yourself!
The primary reason for looking at any network model is to better understand how systems communicate. In
real-life, network communication requires that data be encapsulated by the sender, transmitted over the
network, and then de-encapsulated by the receiver. This is best illustrated by looking at what happens when
one system running TCP/IP sends data to another. The list below outlines 5 simplified steps in a typical TCP/IP
data transfer over an Ethernetnetwork. Note that each layer considers whatever has been passed down to it
from an upper layer as data. It doesnt concern itself with what was added by the upper layers.
1.
Data is created by an application such an FTP client program. Lets assume that a file transfer is being
initiated with a local FTP server.
2.
The data is passed to the Host-to-host (Transport) layer, where it is encapsulated to include source
and destination port numbers. These uniquely identify the applications that the data should be passed
between. For example, if this data were being sent to an FTP server, the destination port would be
The data is passed to the Internet (Network) layer, where it is again encapsulated to include
information such as the source and destination IP addresses. The data is now considered to be a
packet.
4.
The data is passed down to the Network Interface (Data Link) layer, where it is encapsulated for
Ethernet to include source and destination MAC addresses, as well as the an error-checking
mechanism known as a cyclic redundancy check (CRC). The data is now considered to be a frame.
5.
The data is converted to a series of bits, and transmitted across the network.
Ethernet
II
Internet Protocol, Src Addr: 192.168.0.1 (192.168.0.1), Dst Addr: 192.168.0.135
(192.168.0.135)
Transmission Control Protocol, Src Port: 4653 (4653), Dst Port: ftp (21), Seq:
2739356837,
Ack:
204742999
File Transfer Protocol (FTP)