Sunday, August 28

OSI Network Layer

We have seen how network applications and services on one end device can communicate with applications and services running on another end device.

Next, as shown in the figure, we will consider how this data is communicated across the network - from the originating end device (or host) to the destination host - in an efficient way.

The protocols of the OSI model Network layer specify addressing and processes that enable Transport layer data to be packaged and transported. The Network layer encapsulation allows its contents to be passed to the destination within a network or on another network with minimum overhead.

The Network layer - provides services to exchange the individual pieces of data over the network between identified end devices.

To accomplish this end-to-end transport, Layer 3 uses four basic processes:
• Addressing
• Encapsulation
• Routing
• Decapsulation

Addressing – the network layer must provide a mechanism for addressing these end devices. If individual pieces of data are to be directed to an end device, that device must have a unique address.

Encapsulation - Not only must the devices be identified with an address, the individual pieces - the Network layer PDUs - must also contain these addresses. During the encapsulation process, Layer 3 receives the Layer 4 PDU and adds a Layer 3 header, or label, to create the Layer 3 PDU. When referring to the Network layer, we call this PDU a packet.

Routing - the network layer must provide services to direct these packets to their destination host. Along the way, each packet must be guided through the network to reach its final destination. Intermediary devices that connect the networks are called routers. The role of the router is to select paths for and direct packets toward their destination. This process is known as routing.
During the routing through an internetwork, the packet may traverse many intermediary devices. Each route that a packet takes to reach the next device is called a hop.

Decapsulation - the packet arrives at the destination host and is processed at Layer 3. The host examines the destination address to verify that the packet was addressed to this device. If the address is correct, the packet is decapsulated by the Network layer and the Layer 4 PDU contained in the packet is passed up to the appropriate service at Transport layer.

The Internet Protocol (IPv4 and IPv6) is the most widely-used Layer 3 data carrying protocol.

IPv4 basic characteristics:
Connectionless - No connection is established before sending data packets.
Best Effort (unreliable) - No overhead is used to guarantee packet delivery.
Media Independent - Operates independently of the medium carrying the data.

Dividing Networks:
Rather than having all hosts everywhere connected to one vast global network, it is more practical and manageable to group hosts into specific networks.

Networks can be grouped based on factors that include:
Geographic location
Purpose
Ownership

Grouping Host Geographically:
We can group network hosts together geographically. Grouping hosts at the same location - such as each building on a campus or each floor of a multi-level building - into separate networks can improve network management and operation.

Grouping Hosts for specific Purposes:
Users who have similar tasks typically use common software, common tools, and have common traffic patterns. We can often reduce the traffic required by the use of specific software and tools by placing the resources to support them in the network with the users.



Grouping Hosts for Ownership:
Using an organizational (company, department) basis for creating networks assists in controlling access to the devices and data as well as the administration of the networks. In one large network, it is much more difficult to define and limit the responsibility for the network personnel. Dividing hosts into separate networks provides a boundary for security enforcement and management of each network.



Common issues with large networks are:
Performance degradation
Security issues
Address Management

Large numbers of hosts connected to a single network can produce volumes of data traffic that may stretch, if not overwhelm, network resources such as bandwidth and routing capability.

Dividing large networks so that hosts who need to communicate are grouped together reduces the traffic across the internetworks.



To be able to divide networks, we need hierarchical addressing.

Hierarchical Address - uniquely identifies each host. It also has levels that assist in forwarding packets across internetworks, which enables a network to be divided based on those levels.

The logical 32-bit IPv4 address is hierarchical and is made up of two parts. The first part identifies the network and the second part identifies a host on that network. Both parts are required for a complete IP address.



This is hierarchical addressing because the network portion indicates the network on which each unique host address is located. Routers only need to know how to reach each network, rather than needing to know the location of each individual host.

Fundamental of routes:
The routing table stores information about connected and remote networks. Connected networks are directly attached to one of the router interfaces. These interfaces are the gateways for the hosts on different local networks. Remote networks are networks that are not directly connected to the router. Routes to these networks can be manually configured on the router by the network administrator or learned automatically using dynamic routing protocols.

Routes in a routing table have three main features:
• Destination network
• Next-hop
• Metric

The router matches the destination address in the packet header with the destination network of a route in the routing table and forwards the packet to the next-hop router specified by that route. If there are two or more possible routes to the same destination, the metric is used to decide which route appears on the routing table.



As shown in the figure, the routing table in a Cisco router can be examined with the show ip route command.

As you know, packets cannot be forwarded by the router without a route. If a route representing the destination network is not on the routing table, the packet will be dropped (that is, not forwarded). The matching route could be either a connected route or a route to a remote network.

Routing is done packet-by-packet and hop-by-hop. Each packet is treated independently in each router along the path. At each hop, the router examines the destination IP address for each packet and then checks the routing table for forwarding information.

The router will do one of three things with the packet:
• Forward it to the next-hop router
• Forward it to the destination host
• Drop it

Static Routing – routing that depends on manually entered routes in the routing table. if the internetwork structure changes or if new networks become available, these changes have to be manually updated on every router. If updating is not done in a timely fashion, the routing information may be incomplete or inaccurate, resulting in packet delays and possible packet loss.

Dynamic Routing - Routing protocols are the set of rules by which routers dynamically share their routing information. When a router receives information about new or changed routes, it updates its own routing table and, in turn, passes the information to other routers. In this way, all routers have accurate routing tables that are updated dynamically and can learn about routes to remote networks that are many hops way.

Dynamic routing protocols are:
• Routing Information Protocol (RIP)
• Enhanced Interior Gateway Routing Protocol (EIGRP)
• Open Shortest Path First (OSPF)

No comments:

Post a Comment