OSI Model - The Application Layer:
The Application layer(Layer-7) provides the interface between the user application and the network. A web browser and an email client are examples of user applications.
The user application itself does not reside at the Application layer - the protocol does. The user interacts with the application, which in turn interacts with the application protocol.
Examples of Application layer protocols include:
•FTP, via an FTP client
•HTTP, via a web browser
•POP3 and SMTP, via an email client
•Telnet
The Application layer provides a variety of functions:
•Identifies communication partners
•Determines resource availability
•Synchronizes communication
The Application layer interacts with the Presentation layer below it. As it is the top-most layer, it does not interact with any layers above it.
The Application layer(Layer-7) provides the interface between the user application and the network. A web browser and an email client are examples of user applications.
The user application itself does not reside at the Application layer - the protocol does. The user interacts with the application, which in turn interacts with the application protocol.
Examples of Application layer protocols include:
•FTP, via an FTP client
•HTTP, via a web browser
•POP3 and SMTP, via an email client
•Telnet
The Application layer provides a variety of functions:
•Identifies communication partners
•Determines resource availability
•Synchronizes communication
The Application layer interacts with the Presentation layer below it. As it is the top-most layer, it does not interact with any layers above it.
OSI Model - The Presentation Layer:
The Presentation layer (Layer-6) controls the formatting and syntax of user data for the application layer.
This ensures that data from the sending application can be understood by the receiving application.
Standards have been developed for the formatting of data types, such as text, images, audio, and video. Examples of Presentation layer formats include:
•Text - RTF, ASCII, EBCDIC
•Images - GIF, JPG, TIF
•Audio - MIDI, MP3, WAV
•Movies - MPEG, AVI, MOV
If two devices do not support the same format or syntax, the Presentation layer can provide conversion or translation services to facilitate communication.
Additionally, the Presentation layer can perform encryption and compression of data, as required. However, these functions can also be performed at lower layers as well. For example, the Network layer can perform encryption, using IPSec.
The Presentation layer (Layer-6) controls the formatting and syntax of user data for the application layer.
This ensures that data from the sending application can be understood by the receiving application.
Standards have been developed for the formatting of data types, such as text, images, audio, and video. Examples of Presentation layer formats include:
•Text - RTF, ASCII, EBCDIC
•Images - GIF, JPG, TIF
•Audio - MIDI, MP3, WAV
•Movies - MPEG, AVI, MOV
If two devices do not support the same format or syntax, the Presentation layer can provide conversion or translation services to facilitate communication.
Additionally, the Presentation layer can perform encryption and compression of data, as required. However, these functions can also be performed at lower layers as well. For example, the Network layer can perform encryption, using IPSec.
OSI Model - The Session Layer:
The Session layer (Layer-5) is responsible for establishing, maintaining and ultimately terminating sessions between devices. If a session is broken,this layer can attempt to recover the session.
Sessions communication falls under one of three categories:
• Full-Duplex – simultaneous two-way communication
• Half-Duplex – two-way communication, but not simultaneous
• Simplex – one-way communication
Many modern protocol suites, such as TCP/IP, do not implement Session layer protocols. Connection management is often controlled by lower layers,such as the Transport layer.
The lack of true Session layer protocols can present challenges for highavailability and failover. Reliance on lower-layer protocols for session management offers less flexibility than a strict adherence to the OSI model.
The Session layer (Layer-5) is responsible for establishing, maintaining and ultimately terminating sessions between devices. If a session is broken,this layer can attempt to recover the session.
Sessions communication falls under one of three categories:
• Full-Duplex – simultaneous two-way communication
• Half-Duplex – two-way communication, but not simultaneous
• Simplex – one-way communication
Many modern protocol suites, such as TCP/IP, do not implement Session layer protocols. Connection management is often controlled by lower layers,such as the Transport layer.
The lack of true Session layer protocols can present challenges for highavailability and failover. Reliance on lower-layer protocols for session management offers less flexibility than a strict adherence to the OSI model.
OSI Model - The Transport Layer:
The Transport layer (Layer-4) does not actually send data, despite its name. Instead, this layer is responsible for the reliable transfer of data, by ensuring that data arrives at its destination error-free and in order.
Transport layer communication falls under two categories:
• Connection-oriented – requires that a connection with specific agreed-upon parameters be established before data is sent.
• Connectionless – requires no connection before data is sent.
Connection-oriented protocols provide several important services:
• Segmentation and sequencing – data is segmented into smaller pieces for transport. Each segment is assigned a sequence number, so that the receiving device can reassemble the data on arrival.
• Connection establishment – connections are established, maintained and ultimately terminated between devices.
• Acknowledgments – receipt of data is confirmed through the use of acknowledgments. Otherwise, data is retransmitted, guaranteeing delivery.
• Flow control (or windowing) – data transfer rate is negotiated to prevent congestion.
The TCP/IP protocol suite incorporates two Transport layer protocols:
• Transmission Control Protocol (TCP) – connection-oriented
• User Datagram Protocol (UDP) - connectionless
The Transport layer (Layer-4) does not actually send data, despite its name. Instead, this layer is responsible for the reliable transfer of data, by ensuring that data arrives at its destination error-free and in order.
Transport layer communication falls under two categories:
• Connection-oriented – requires that a connection with specific agreed-upon parameters be established before data is sent.
• Connectionless – requires no connection before data is sent.
Connection-oriented protocols provide several important services:
• Segmentation and sequencing – data is segmented into smaller pieces for transport. Each segment is assigned a sequence number, so that the receiving device can reassemble the data on arrival.
• Connection establishment – connections are established, maintained and ultimately terminated between devices.
• Acknowledgments – receipt of data is confirmed through the use of acknowledgments. Otherwise, data is retransmitted, guaranteeing delivery.
• Flow control (or windowing) – data transfer rate is negotiated to prevent congestion.
The TCP/IP protocol suite incorporates two Transport layer protocols:
• Transmission Control Protocol (TCP) – connection-oriented
• User Datagram Protocol (UDP) - connectionless
OSI Model - The Network Layer:
The Network layer (Layer-3) controls internetwork communication, and has two key responsibilities:
• Logical addressing – provides a unique address that identifies both the host, and the network that host exists on.
• Routing – determines the best path to a particular destination network, and then routes data accordingly.
Two of the most common Network layer protocols are:
• Internet Protocol (IP)
• Novell’s Internetwork Packet Exchange (IPX).
IPX is almost entirely deprecated.
The Network layer (Layer-3) controls internetwork communication, and has two key responsibilities:
• Logical addressing – provides a unique address that identifies both the host, and the network that host exists on.
• Routing – determines the best path to a particular destination network, and then routes data accordingly.
Two of the most common Network layer protocols are:
• Internet Protocol (IP)
• Novell’s Internetwork Packet Exchange (IPX).
IPX is almost entirely deprecated.
OSI Model - The Data-Link Layer:
While the Network layer is concerned with transporting data between networks, the Data-Link layer (Layer-2) is responsible for transporting data within a network.
The Data-Link layer consists of two sublayers:
• Logical Link Control (LLC) sublayer
• Media Access Control (MAC) sublayer
The LLC sublayer serves as the intermediary between the physical link and all higher layer protocols. It ensures that protocols like IP can function regardless of what type of physical technology is being used.
Additionally, the LLC sublayer can perform flow-control and errorchecking, though such functions are often provided by Transport layer protocols, such as TCP.
The MAC sublayer controls access to the physical medium, serving as mediator if multiple devices are competing for the same physical link. Datalink layer technologies have various methods of accomplishing this -Ethernet uses Carrier Sense Multiple Access with Collision Detection (CSMA/CD), and Token Ring utilizes a token.
The Data-link layer packages the higher-layer data into frames, so that the data can be put onto the physical wire. This packaging process is referred to as framing or encapsulation.
The encapsulation type will vary depending on the underlying technology.
Common Data-link layer technologies include following:
• Ethernet – the most common LAN data-link technology
• Token Ring – almost entirely deprecated
• FDDI (Fiber Distributed Data Interface)
• 802.11 Wireless
• Frame-Relay
• ATM (Asynchronous Transfer Mode)
The data-link frame contains the source and destination hardware (or physical) address. Hardware addresses uniquely identify a host within a network, and are often hardcoded onto physical network interfaces.
However, hardware addresses contain no mechanism for differentiating one network from another, and can only identify a host within a network.
The most common hardware address is the Ethernet MAC address.
While the Network layer is concerned with transporting data between networks, the Data-Link layer (Layer-2) is responsible for transporting data within a network.
The Data-Link layer consists of two sublayers:
• Logical Link Control (LLC) sublayer
• Media Access Control (MAC) sublayer
The LLC sublayer serves as the intermediary between the physical link and all higher layer protocols. It ensures that protocols like IP can function regardless of what type of physical technology is being used.
Additionally, the LLC sublayer can perform flow-control and errorchecking, though such functions are often provided by Transport layer protocols, such as TCP.
The MAC sublayer controls access to the physical medium, serving as mediator if multiple devices are competing for the same physical link. Datalink layer technologies have various methods of accomplishing this -Ethernet uses Carrier Sense Multiple Access with Collision Detection (CSMA/CD), and Token Ring utilizes a token.
The Data-link layer packages the higher-layer data into frames, so that the data can be put onto the physical wire. This packaging process is referred to as framing or encapsulation.
The encapsulation type will vary depending on the underlying technology.
Common Data-link layer technologies include following:
• Ethernet – the most common LAN data-link technology
• Token Ring – almost entirely deprecated
• FDDI (Fiber Distributed Data Interface)
• 802.11 Wireless
• Frame-Relay
• ATM (Asynchronous Transfer Mode)
The data-link frame contains the source and destination hardware (or physical) address. Hardware addresses uniquely identify a host within a network, and are often hardcoded onto physical network interfaces.
However, hardware addresses contain no mechanism for differentiating one network from another, and can only identify a host within a network.
The most common hardware address is the Ethernet MAC address.
OSI Model - The Physical Layer:
The Physical layer (Layer-1) controls the signaling and transferring of raw bits onto the physical medium. The Physical layer is closely related to the Data-link layer, as many technologies (such as Ethernet) contain both datalink and physical functions.
The Physical layer provides specifications for a variety of hardware:
• Cabling
• Connectors and transceivers
• Network interface cards (NICs)
• Wireless radios
• Hubs
Physical-layer devices and topologies are covered extensively in other guides.
The Physical layer (Layer-1) controls the signaling and transferring of raw bits onto the physical medium. The Physical layer is closely related to the Data-link layer, as many technologies (such as Ethernet) contain both datalink and physical functions.
The Physical layer provides specifications for a variety of hardware:
• Cabling
• Connectors and transceivers
• Network interface cards (NICs)
• Wireless radios
• Hubs
Physical-layer devices and topologies are covered extensively in other guides.
IP Protocol:
IP (Internet Protocol) determines where we are going to send packets to by looking at the destination IP address. How we determine where to send them is up to the routing protocol, we‟ll talk more about routing later.
IP uses Packets called IP packets to carry information. Every IP packet is a single unit of information and besides data it carries information to determine where to send the packet.
Let's take a look at some of its characteristics:
1. Operates at the network layer of the OSI model.
2. Connectionless protocol: IP itself does not setup a connection, in order to transport data you need the “transport” layer and use TCP or UDP.
3. Every packet is treated independently; there is no order in which the packets are arriving at their destination.
4. Hierarchical: IP addresses have a hierarchy; we'll discuss this a bit more in depth when we talk about subnetting and subnet masks.
IP (Internet Protocol) determines where we are going to send packets to by looking at the destination IP address. How we determine where to send them is up to the routing protocol, we‟ll talk more about routing later.
IP uses Packets called IP packets to carry information. Every IP packet is a single unit of information and besides data it carries information to determine where to send the packet.
Let's take a look at some of its characteristics:
1. Operates at the network layer of the OSI model.
2. Connectionless protocol: IP itself does not setup a connection, in order to transport data you need the “transport” layer and use TCP or UDP.
3. Every packet is treated independently; there is no order in which the packets are arriving at their destination.
4. Hierarchical: IP addresses have a hierarchy; we'll discuss this a bit more in depth when we talk about subnetting and subnet masks.
We need an IP address to uniquely identify each network device on the network.
An IP address is just like a phone number (I'm talking about regular phone numbers, no cellphones).
Everyone in a city who has a phone at home has a unique phone number where you can reach them.
An IP address is 32-bit and consists of 2 parts, the network part and the host part:
An IP address is just like a phone number (I'm talking about regular phone numbers, no cellphones).
Everyone in a city who has a phone at home has a unique phone number where you can reach them.
An IP address is 32-bit and consists of 2 parts, the network part and the host part:
The IP address is 32-bit but we write it down in 4 blocks of 8 bits. 8 bits is what we call a
“byte”. So the IP address will look like this:
“byte”. So the IP address will look like this:
The network part will tell us to which “network” the IP address will belong, you can compare this to the city or area code of a phone number.
The “host” part uniquely identifies the network device; these are like the last digits of your phone number.
The “host” part uniquely identifies the network device; these are like the last digits of your phone number.
IP address 192.168.1.1 would come along with the subnet mask 255.255.255.0. The subnet mask tells your computer which part is the “network” part and which part is the “host” part.
Despite the name it does not “hide” or “mask” anything. We'll talk about binary and subnetting calculations later on, for now just hold the thought that your subnet mask tells us which part of the IP address is the “network” part and which part is for “hosts”.
Despite the name it does not “hide” or “mask” anything. We'll talk about binary and subnetting calculations later on, for now just hold the thought that your subnet mask tells us which part of the IP address is the “network” part and which part is for “hosts”.
IP address that we just used (192.168.1.1) is an example of a class C network.
We have 3 different classes to work with:
- Class A
- Class B
- Class C
We have 3 different classes to work with:
- Class A
- Class B
- Class C
Class A: 0.0.0.0 – 126.255.255.255
Class B: 128.0.0.0 – 191.255.255.255
Class C: 192.0.0.0 – 223.255.255.255
Hmm now this raises 2 questions:
- If you look closely, do you see a 127.0.0.0 subnet? It‟s not in the class A range so what happened to it?
- Why does Class C stop at 223.255.255.255?
To answer the first question: Go to your command prompt of your computer and type in “ping 127.0.0.1” and you'll get a response. This network range is being used as “loopback”. Your loopback interface is something to check if your IP stack is OK.
To answer the second question I have to tell you that there‟s actually a class D range, we don‟t use those IP addresses to assign to computers but it‟s being used for “multicast”.
We'll get back to multicast later in the book; it starts with the 224.0.0.0 range.
Class B: 128.0.0.0 – 191.255.255.255
Class C: 192.0.0.0 – 223.255.255.255
Hmm now this raises 2 questions:
- If you look closely, do you see a 127.0.0.0 subnet? It‟s not in the class A range so what happened to it?
- Why does Class C stop at 223.255.255.255?
To answer the first question: Go to your command prompt of your computer and type in “ping 127.0.0.1” and you'll get a response. This network range is being used as “loopback”. Your loopback interface is something to check if your IP stack is OK.
To answer the second question I have to tell you that there‟s actually a class D range, we don‟t use those IP addresses to assign to computers but it‟s being used for “multicast”.
We'll get back to multicast later in the book; it starts with the 224.0.0.0 range.
The last thing I need to tell you about classes is the difference between “private” and “public” IP addresses.
- Public IP addresses are used on the Internet.
- Private IP addresses are used on your local area network and should not be used on the Internet.
These are the Private IP address ranges:
Class A: 10.0.0.0 – 10.255.255.255
Class B: 172.16.0.0 – 172.31.255.255
Class C: 192.168.0.0 – 192.168.255.255
Do you see our 192.168.1.1 example IP address falls within class C and is a private IP address? I like to use this IP address since it's most common to people, it's used a lot on home networks and SOHO (small office home office) routers.
- Public IP addresses are used on the Internet.
- Private IP addresses are used on your local area network and should not be used on the Internet.
These are the Private IP address ranges:
Class A: 10.0.0.0 – 10.255.255.255
Class B: 172.16.0.0 – 172.31.255.255
Class C: 192.168.0.0 – 192.168.255.255
Do you see our 192.168.1.1 example IP address falls within class C and is a private IP address? I like to use this IP address since it's most common to people, it's used a lot on home networks and SOHO (small office home office) routers.
There are 2 IP addresses we cannot use on our network.
- Network address.
- Broadcast address.
The network address cannot be used on a computer as an IP address because it's being
used to “define” the network.
The broadcast address cannot be used on a computer as an IP address because it's used by
broadcast applications. A broadcast is an IP packet that will be received by all devices in
your network.
So how do we recognize these two IP addresses that we cannot use?
- Set all the host bits to 0 gives you the network address.
- Set all the host bits to 1 gives you the broadcast address.
- These 2 IP addresses we cannot use for computers.
- Network address.
- Broadcast address.
The network address cannot be used on a computer as an IP address because it's being
used to “define” the network.
The broadcast address cannot be used on a computer as an IP address because it's used by
broadcast applications. A broadcast is an IP packet that will be received by all devices in
your network.
So how do we recognize these two IP addresses that we cannot use?
- Set all the host bits to 0 gives you the network address.
- Set all the host bits to 1 gives you the broadcast address.
- These 2 IP addresses we cannot use for computers.
IP addresses can be configured statically or dynamically. If you go the static way you have to configure the IP address yourself on your computer, router or switch.
Dynamic means we use DHCP (Dynamic Host Configuration Protocol). DHCP is a server process that assigns IP addresses from a “pool” to network devices.
A cisco router can be used as a DHCP server but you will also see this often on Microsoft or Linux servers.
Dynamic means we use DHCP (Dynamic Host Configuration Protocol). DHCP is a server process that assigns IP addresses from a “pool” to network devices.
A cisco router can be used as a DHCP server but you will also see this often on Microsoft or Linux servers.
The Transport Layer TCP and UDP:
Let's work our way up the OSI-model, we just covered IP and now it's time to pick a “transport” protocol.
Keep in mind IP is “nothing more” but a number (ok that's very simplistic) but I want to make sure you understand we need a transport protocol for actually setting up the connection and sending data between our computers.
I want to focus on the transport protocols that are used most of the time:
- TCP (Transmission Control Protocol)
- UDP (User Datagram Protocol)
Let's work our way up the OSI-model, we just covered IP and now it's time to pick a “transport” protocol.
Keep in mind IP is “nothing more” but a number (ok that's very simplistic) but I want to make sure you understand we need a transport protocol for actually setting up the connection and sending data between our computers.
I want to focus on the transport protocols that are used most of the time:
- TCP (Transmission Control Protocol)
- UDP (User Datagram Protocol)
So why do we have 2 different transport protocols here, why do we care and when do we need one over another?
The short answer is:
- TCP is a reliable protocol.
- UDP is a unreliable or best-effort protocol.
Unreliable you might think? Why do I want data transport which is unreliable? Does that make any sense? Let me tell you a little story to explain the difference between the two protocols.
The short answer is:
- TCP is a reliable protocol.
- UDP is a unreliable or best-effort protocol.
Unreliable you might think? Why do I want data transport which is unreliable? Does that make any sense? Let me tell you a little story to explain the difference between the two protocols.