Learn Networking
485 subscribers
24 photos
6 links
Learn Networking from Scratch.
Download Telegram
Network Reference Models:
Internetworking present challenges - interoperating between products from different manufacturers requires consistent standards.

Network reference models were developed to address these challenges.

A network reference model serves as a blueprint, detailing how communication between network devices should occur.

The two most recognized network reference models are:
1.The Open Systems Interconnection (OSI) model
2.The Department of Defense (DoD) model
OSI Reference Model:
The Open Systems Interconnection (OSI) model was developed by the International Organization for Standardization (ISO), and formalized in 1984.

It provided the first framework governing how information should be sent across a network.

The OSI model consists of seven layers, each corresponding to a specific
network function:

7. Application
6. Presentation
5. Session
4. Transport
3. Network
2. Data-link
1. Physical
OSI Model - The Upper Layers:

The top three layers of the OSI model are often referred to as the upper layers.
•Layer-7 - Application layer
•Layer-6 - Presentation layer
•Layer-5 - Session layer

Protocols that operate at these layers manage application-level functions, and are generally implemented in software.

The function of the upper layers of the OSI model can be difficult to visualize. Upper layer protocols do not always fit perfectly within a layer, and often function across multiple layers.
OSI Model - The Lower Layers:

The bottom four layers of the OSI model are often referred to as the lower layers.
•Layer-4 – Transport layer
•Layer-3 – Network layer
•Layer-2 – Data-Link layer
•Layer-1 – Physical layer

Protocols that operate at these layers control the end-to-end transport of data between devices, and are implemented in both software and hardware.
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.
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.
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.
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
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.
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.
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.
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.
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:
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:
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.
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”.
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
Class A: 0.0.0.0126.255.255.255
Class B: 128.0.0.0191.255.255.255
Class C: 192.0.0.0223.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.010.255.255.255
Class B: 172.16.0.0172.31.255.255
Class C: 192.168.0.0192.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.