Friday, April 2, 2010


In the Microsoft/Novell world, you know what the OSI model is: It has layers, and it describes something. But we do not directly deal with OSI like how we do Cisco. The OSI model consists of 7 laters, which are:
-Data Link

The OSI model helps break down network functions and it creates standards for equipment manufacturing. When data needs to be transmitted, it is encapsulated (data is moved down the model) and when the data is received, it is decapsulated (data is moved up the model). Every layer of the OSI model interconnect with each other.

The OSI model allows vendors to focus in specialized areas of the network. Vendors can make specific devices that target specific layers. For example, a vendor who specializes in layer 1 makes wires, connectors and hubs.

The application layer interfaces with the applications. It provides network access to applications. The presentation layer standardizes the data. Encryption services such as AES and 3DES exists on the presentation layer. Formats such as HTML, JPEG and MP3 are also in the presentation layer. The session layer starts and ends a session. It logically keeps sessions separate. These top three layers (known as the "Upper Layers") are the least important in the Cisco world. The lower layers are the most important layers we need to know.

The transport layer describes how the data is sent. It also defines services. In the transport layer, two common ways of transportation is the TCP and the UDP. TCP establishes a connection through the three-way handshake and maintains it. TCP requires acknowledgment for every packet sent and would retransmit if no acknowledgment is received. TCP is typically used for applications sensitive to packet loss such as file transfer and web-surfing. UDP on the other hand is connectionless. It does not maintain sessions and does not retransmit lost packets. This is suitable for real-time applications such as VoIP. Port numbers allow a host to know what services a packet is destined for. For example, when a client wants to access a server's web services, it connects to the server's port 80. When clients have multiple browser windows open, the client's port numbers determine which window packets from the servers should go to.

The network layer provides logical addressing (such as IP). The network layer is also used for path determination (routing). Data link layer provides physical addressing (such as MAC). It ensures the data is error-free. The physical layer finally provides access to the cables. In the physical layer, we deal with electric signals.

When a client opens a browser and tries to access www.cisco.com, a request is sent to the DNS to translate the domain name into an IP address. The application layer then generates a request, and the presentation layer packages that request into the HTTP format. It is then passed into the session layer which creates a separate session for this request. The packet is then passed down the transport layer and the choice of reliability (TCP vs UDP) is made. Since web-browsers are sensitive to dropped packets, TCP is chosen. The source (random) and destination port (80) numbers are then hard-coded. This is so that the message is destined for the web-server (80) instead of the email (25) or the database (1521) server, and the reply goes to the correct browser in the client.

For a quick demo, open two command prompt windows, and in both windows type in:
ftp ftp.cisco.com

Now, open a third command prompt window and type in:

You should be able to see two sessions going to ftp-sj:ftp with two different source ports (Local Address). If you've read the older articles, you would know that FTP control port uses port 21.

After that, the source and destination IP address is hard-coded as well. The IP address tells the start and final destination (your client, to the server). The source and destination MAC address is then put in. The MAC address determines who is the next-hop device in the point-to-point connection and changes throughout the end-to-end path.

For a typical home client, the MAC address for the first hop would typically be the default gateway. As it reaches the physical layer, the frames get transmitted as bits of electrical signals and gets reassembled at the server after it hops around through the internet, going through several MAC address changes.

No comments :

Post a Comment