exploration network chapter_5_modified

57
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public ITE PC v4.0 Chapter 1 1 OSI Network Layer Network Fundamentals – Chapter 5

Upload: rajesh531

Post on 22-Apr-2015

1.471 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Exploration network chapter_5_modified

© 2007 Cisco Systems, Inc. All rights reserved. Cisco PublicITE PC v4.0Chapter 1 1

OSI Network Layer

Network Fundamentals – Chapter 5

Page 2: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 2© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Objectives Identify the role of the Network Layer, as it describes

communication from one end device to another end device

Examine the most common Network Layer protocol, Internet Protocol (IP), and its features for providing connectionless and best-effort service

Understand the principles used to guide the division or grouping of devices into networks

Understand the hierarchical addressing of devices and how this allows communication between networks

Understand the fundamentals of routes, next hop addresses and packet forwarding to a destination network

Page 3: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Network layer, or OSI Layer 3, 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

Page 4: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols and Internet Protocol (IP) Define the basic role of the Network Layer in data

networks

Page 5: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Page 6: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols

Protocols implemented at the Network layer that carry user data include:

Internet Protocol version 4 (IPv4)

Internet Protocol version 6 (IPv6)

Novell Internetwork Packet Exchange (IPX)

AppleTalkConnectionless Network Service (CLNS/DECNet)

The Internet Protocol (IPv4 and IPv6) is the most widely-used Layer 3 data carrying protocol and will be the focus of this course. Discussion of the other protocols will be minimal.

Page 7: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols and Internet Protocol (IP) Identify the basic characteristics and the role of the

IPv4 protocol

Page 8: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols and Internet Protocol (IP) Describe the implications for the use of the IP protocol

as it is connectionless

Page 9: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Page 10: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols and Internet Protocol (IP) Describe the implications for the use of the IP protocol

as it is considered an unreliable protocol

Page 11: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols and Internet Protocol (IP) Describe the implications for the use of the IP as it is

media independent

Page 12: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Network layer is also not burdened with the characteristics of the media on which packets will be transported. IPv4 and IPv6 operate independently of the media that carry the data at lower layers of the protocol stack. As shown in the figure, any individual IP packet can be communicated electrically over cable, as optical signals over fiber, or wirelessly as radio signals.

It is the responsibility of the OSI Data Link layer to take an IP packet and prepare it for transmission over the communications medium. This means that the transport of IP packets is not limited to any particular medium.

There is, however, one major characteristic of the media that the Network layer considers: the maximum size of PDU that each medium can transport. This characteristic is referred to as the Maximum Transmission Unit (MTU). Part of the control communication between the Data Link layer and the Network layer is the establishment of a maximum size for the packet. The Data Link layer passes the MTU upward to the Network layer. The Network layer then determines how large to create the packets.

In some cases, an intermediary device - usually a router - will need to split up a packet when forwarding it from one media to a media with a smaller MTU. This process is called fragmenting the packet or fragmentation.

Page 13: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 13© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols and Internet Protocol (IP) Describe the role of framing in the Transport Layer and

explain that segments are encapsulated as packets

Page 14: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Network Layer Protocols and Internet Protocol (IP) Identify the major header fields in the IPv4 protocol and

describe each field's role in transporting packets

Page 15: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Layer 3 packet/datagram becomes the Layer 2 data, which is then encapsulated into frames (as previously discussed). Similarly, the IP packet consists of the data from upper layers plus an IP header, which consists of:

· version - indicates the version of IP currently used (4 bits)

·IP header length (HLEN) - indicates the datagram header length in 32 bit words (4 bits)

·type-of-service - specifies the level of importance that has been assigned by a particular upper-layer protocol (8 bits)

total length - specifies the length of the entire IP packet, including data and header, in bytes (16 bits)

identification - contains an integer that identifies the current datagram (16 bits)

flags - a 3-bit field in which the 2 low-order bits control fragmentation – one bit specifying whether the packet can be fragmented, and the second whether the packet is the last fragment in a series of fragmented packets (3 bits)

Page 16: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

fragment offset - the field that is used to help piece together datagram fragments (16 bits)

time-to-live - maintains a counter that gradually decreases, by increments, to zero, at which point the datagram is discarded, keeping the packets from looping endlessly (8 bits)

protocol - indicates which upper-layer protocol receives incoming packets after IP processing has been completed (8 bits)

header checksum - helps ensure IP header integrity(16 bits)

source address - specifies the sending node (32 bits)

destination address-specifies the receiving node (32 bits)

options - allows IP to support various options, such as security (variable length)

data - contains upper-layer information (maximum 64 Kb)

Page 17: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Grouping Devices into Networks and Hierarchical Addressing List several different reasons for grouping devices into

sub-networks and define several terms used to identify the sub-networks

Page 18: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 18© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Page 19: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 19© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Common issues with large networks are: Performance degradation

Security issues

Address Management

Improving Performance

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.

A broadcast is a message sent from one host to all other hosts on the network. Large network can generate broadcast storm.

Page 20: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 20© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Single Broadcast Domain

Page 21: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 21© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

List several ways in which dividing a large network can increase network performance

Grouping Devices into Networks and Hierarchical Addressing

Broadcast Domain 1

Broadcast Domain 2

Page 22: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 22© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Grouping Devices into Networks and Hierarchical Addressing List several ways in which dividing a large network can

increase network security

Router and Firewall are the main devices that are used to provide security between networks

Page 23: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 23© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Page 24: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 24© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Page 25: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 25© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Grouping Devices into Networks and Hierarchical Addressing Explain the communication problems that emerge when

very large numbers of devices are included in one large network

Page 26: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 26© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The Internet consists of millions of hosts, each of which is identified by its unique Network layer address. To expect each host to know the address of every other host would impose a processing burden on these network devices that would severely degrade their performance.Dividing large networks so that hosts who need to communicate are grouped together reduces the unnecessary overhead of all hosts needing to know all addresses. For all other destinations, the hosts only need to know the address of an intermediary device, to which they send packets for all other destinations addresses. This intermediary device is called a gateway. The gateway is a router on a network that serves as an exit from that network.

Page 27: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 27© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Grouping Devices into Networks and Hierarchical Addressing Describe how hierarchical addressing solves the

problem of devices communicating across networks of networks

Page 28: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 28© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Grouping Devices into Networks and Hierarchical Addressing

Page 29: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 29© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Every device connected to a network must have a unique IP address.

IP addresses are 32-bit long and are represented in decimal dotted notation (e.g. 192.200.128.12). These 32-bit long addresses in binary format are split into four octets. Each octet contains 8 bits. For easy understanding, these four octets are separated by a dot and binary numbers are converted into decimal numbers.

Page 30: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 30© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Conversion from Binary to Decimal Numbers  

Binary numbers (8 bits) in each octet are converted into a decimal number. These bits carry weight that increases by the multiple of two from right to left as mentioned in the following example.

 

Here is an example of binary number 01100101 conversion into a decimal number.

Page 31: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

 

128 64 32 16 8 4 2 1 Weight of bits (right to left)

 

0 1 1 0 0 1 0 1 8-bits in binary format

 

To get the equivalent decimal number, add only the weight of the bits that have value of 1

 

64 + 32 + 4 + 1 = 101

 

So, 01100101 (binary number) = 101 (Decimal number)

Page 32: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 32© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

An IP address comprises two parts:

Network address:

First part is called network address and is used to identify the network.

Host address:

Second part is called host address and is used to identify host or device attached to the network.

Subnet mask:

It is used to identify the network and host parts of the IP address. In the subnet mask, all the bits in the network part are represented by the 1s and all the bits in the host part are represented by the 0s. It is called subnet mask as it is used to find the subnet address to which an IP address belongs by performing a logical AND operation with the IP address.

Broadcast Address:In the broadcast address, all the bits in the host part are represented by

the 1s.These addresses are used to send message to all the devices on a network.

Page 33: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 33© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding Describe the role of an intermediary gateway device in

allowing devices to communicate across sub-divided networks

Page 34: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 34© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding Trace the steps of an IP packet as it traverses

unchanged via routers from sub network to sub-network

Page 35: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 35© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding

Page 36: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 36© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding Describe the role of a gateway and the use of a simple

route table in directing packets toward their ultimate destinations

Page 37: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 37© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Gateway-The Way Out of Our Network The gateway, also known as the default gateway, is

needed to send a packet out of the local network. If the network portion of the destination address of the packet is different from the network of the originating host, the packet has to be routed outside the original network. To do this, the packet is sent to the gateway. This gateway is a router interface connected to the local network. The gateway interface has a Network layer address that matches the network address of the hosts. The hosts are configured to recognize that address as the gateway.

Page 38: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 38© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Page 39: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 39© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Page 40: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 40© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

A Route – The Path to a Network A route for packets for remote destinations is added

using the default gateway address as the next hop. Although it is not usually done, a host can also have routes manually added through configurations.

Routes in a routing table have three main features:

Destination network

Next-hop

Metric

Page 41: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 41© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

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.

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. The router may also use a default route to forward the packet.

Page 42: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 42© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Default Route

A router can be configured to have a default route. A default route is a route that will match all destination networks. In IPv4 networks, the address 0.0.0.0 is used for this purpose. The default route is used to forward packets for which there is no entry in the routing table for the destination network. Packets with a destination network address that does not match a more specific route in the routing table are forwarded to the next-hop router associated with the default route.

The default route is used when the destination network is not represented by any other route in the routing table.

A Default route can also be referred as a Gateway of Last Resort.

Page 43: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 43© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

If no default route is set, router discards the packet or forwards the packet out the interface indicated by the default route entry.

Page 44: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 44© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding Define a route and its three key parts

Page 45: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 45© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding Describe the purpose and use of the destination

network in a route

Page 46: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 46© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding Describe the purpose and use of the next hop in a route

Page 47: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 47© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding Trace the steps of several IP packets as they are

routed through several gateways from devices on one sub network to devices on other sub networks

Page 48: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 48© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Page 49: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 49© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Static Routing Routes to remote networks with the associated next hops can be

manually configured on the router. This is known as static routing. A default route can also be statically configured.

If the router is connected to a number of other routers, knowledge of the internetworking structure is required. To ensure that the packets are routed to use the best possible next hops, each known destination network needs to either have a route or a default route configured. Because packets are forwarded at every hop, every router must be configured with static routes to next hops that reflect its location in the internetwork.

Further, 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.

Page 50: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 50© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding Describe the purpose of routing protocols and the need

for both static and dynamic routes

Page 51: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 51© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Dynamic Routing

Although it is essential for all routers in an internetwork to have up-to-date extensive route knowledge, maintaining the routing table by manual static configuration is not always feasible. Therefore, dynamic routing protocols are used. Routing protocols are the set of rules by which routers dynamically share their routing information. As routers become aware of changes to the networks for which they act as the gateway, or changes to links between routers, this information is passed on to other routers. 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.

Page 52: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 52© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Common routing protocols are:

•Routing Information Protocol (RIP)•Enhanced Interior Gateway Routing Protocol (EIGRP)•Open Shortest Path First (OSPF)

Although routing protocols provide routers with up-to-date routing tables, there are costs. First, the exchange of route information adds overhead that consumes network bandwidth. This overhead can be an issue, particularly for low bandwidth links between routers. Second, the route information that a router receives is processed extensively by protocols such as EIGRP and OSPF to make routing table entries. This means that routers employing these protocols must have sufficient processing capacity to both implement the protocol's algorithms and to perform timely packet routing and forwarding.

Page 53: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 53© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Fundamentals of Routes, Next Hop Addresses and Packet Forwarding Explain how routes are manually configured to build

routing table

Page 54: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 54© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Use Netstat -a to display all connections and listening ports

Page 55: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 55© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Use netstat -r to display the contents of the IP routing table

Page 56: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 56© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

Page 57: Exploration network chapter_5_modified

ITE PC v4.0Chapter 1 57© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public