dnt 1013 data communications ------------------------------------------ chapter 4: network layer

Post on 04-Jan-2016

59 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

DNT 1013 DATA COMMUNICATIONS ------------------------------------------ CHAPTER 4: NETWORK LAYER. Prepared By: Mdm Noor Suhana Bt Sulaiman FKMT-NT, TATiUC. NETWORK LAYER: LOGICAL ADDRESSING. OSI Layers – Network Layer. The Network Layer - PowerPoint PPT Presentation

TRANSCRIPT

DNT 1013DATA COMMUNICATIONS

------------------------------------------CHAPTER 4:

NETWORK LAYER

Prepared By:Mdm Noor Suhana Bt SulaimanFKMT-NT, TATiUC

NETWORK LAYER:LOGICAL ADDRESSING

OSI Layers – Network LayerThe Network LayerPerforms network routing, flow

control, segmentation, and error control functions

The router operates at this layerUses local addressing scheme Example – IP, token ring

Network LayerConcerned with getting packets from source to

destination.The network layer must know the topology of the

subnet and choose appropriate paths through it.When source and destination are in different

networks, the network layer (IP) must deal with these differences.

* Key issue: what service does the network layer provide to the transport layer (connection-oriented or connectionless).

Network Layer Design Goals1. The services provided by the network layer

should be independent of the subnet topology.2. The Transport Layer should be shielded from

the number, type and topology of the subnets present.

3. The network addresses available to the Transport Layer should use a uniform numbering plan (even across LANs and WANs).

Physicallayer

Data linklayer

Physicallayer

Data linklayer

End system

Networklayer

Physicallayer

Data linklayer

Physicallayer

Data linklayer

Transportlayer

Transportlayer

MessagesMessages

Segments

End system

Networkservice

Networkservice

Networklayer

Networklayer

Networklayer

Application

Transport

InternetNetwork Interface

Application

Transport

InternetInternet

Network 1 Network 2

Machine A Machine B

Router/Gateway

Network Interface

Network Interface

Packet 2

Packet 1

Packet 1

Packet 2

Packet 2

Datagram Packet Switching

Destinationaddress

Outputport

1345 12

2458

70785

6

12

1566

Routing Tablein Datagram Network

IP (Internet Protocol) is a Network Layer Protocol.

IP’s current version is Version 4 (IPv4). It is specified in RFC 891.

NetworkLayer

Link Layer

IP

ARPNetworkAccess

Media

ICMP IGMP

TransportLayer

TCP UDP

Orientation

Application protocol IP is the highest layer protocol which is

implemented at both routers and hosts Application

TCP

IP

Data Link

Application

TCP

IP

NetworkAccess

Application protocol

TCP protocol

IP protocol IP protocol

DataLink

DataLink

IP

DataLink

DataLink

IP

DataLink

DataLink

DataLink

IP protocol

RouterRouter HostHost

IP Service Delivery service of IP is minimal IP provide provides an unreliable connectionless best

effort service (also called: “datagram service”). Unreliable: IP does not make an attempt to recover

lost packets Connectionless: Each packet (“datagram”) is handled

independently. IP is not aware that packets between hosts may be sent in a logical sequence

Best effort: IP does not make guarantees on the service (no throughput guarantee, no delay guarantee,…)

Consequences:

• Higher layer protocols have to deal with losses or with duplicate packets

• Packets may be delivered out-of-sequence

IP supports the following services: one-to-one (unicast) one-to-all (broadcast) one-to-several (multicast)

IP multicast also supports a many-to-many service. IP multicast requires support of other protocols (IGMP,

multicast routing)

IP Service

unicastbroadcast multicast

NETWORK LAYER:ADDRESS MAPPING,

ERROR REPORTING & MULTICASTING

Address MappingThe delivery of a packet to a host or a router

requires two levels of addressing: logical and physical.

We need to be able to map a logical address to its corresponding physical address and vice versa.

This can be done by using either static or dynamic mapping.

Figure 21.1 ARP operation

Figure 21.2 ARP packet

Figure 21.3 Encapsulation of ARP packet

Figure 21.4 Four cases using ARP

An ARP request is broadcast;an ARP reply is unicast.

Figure 21.5 ARP request packet & reply

Figure 21.6 Proxy ARP

DHCP provides static and dynamic address allocation that can be

manual or automatic.

ICMPThe IP protocol has no error-reporting or

error-correcting mechanism. The IP protocol also lacks a mechanism for

host and management queries. The Internet Control Message Protocol

(ICMP) has been designed to compensate for the above two deficiencies.

It is a companion to the IP protocol

Figure 21.7 General Format of ICMP Message

ICMP always reports error messages to the original source.

Figure 21.8 Error Reporting Message

Important points about ICMP error messages:❏ No ICMP error message will be generated in response to a datagram carrying an ICMP error message.❏ No ICMP error message will be generated for a fragmented datagram that is not the first fragment.❏ No ICMP error message will be generated for a datagram having a multicast address.❏ No ICMP error message will be generated for a datagram having a special address such as 127.0.0.0 or 0.0.0.0.

Figure 21.9 Content of data field for error message

We use the ping program to test the server fhda.edu. The result is shown on the next slide. The ping program sends messages with sequence numbers starting from 0. For each probe it gives us the RTT time. The TTL (time to live) field in the IP datagram that encapsulates an ICMP message has been set to 62. At the beginning, ping defines the number of data bytes as 56 and the total number of bytes as 84. It is obvious that if we add 8 bytes of ICMP header and 20 bytes of IP header to 56, the result is 84. However, note that in each probe ping defines the number of bytes as 64. This is the total number of bytes in the ICMP packet (56 + 8).

Example 21.3

Figure 21.10 Traceroute program operation

We use the traceroute program to find the route from the computer voyager.deanza.edu to the server fhda.edu. The following shows the result:

The unnumbered line after the command shows that the destination is 153.18.8.1. The packet contains 38 bytes: 20 bytes of IP header, 8 bytes of UDP header, and 10 bytes of application data. The application data are used by traceroute to keep track of the packets.

ICMPv6Another protocol that has been modified in

version 6 of the TCP/IP protocol suite is ICMP (ICMPv6).

This new version follows the same strategy and purposes of version 4.

Figure 21.11 Comparison of network layer between IPv4 and IPv6

Table 21.3 Comparison of error-reporting messages in ICMPv4 and ICMPv6

Table 21.4 Comparison of query messages in ICMPv4 and ICMPv6

IP AddressAn IP address is a unique number that is used to identify

a network device.An IP address is represented as a 32-bit binary number,

divided into four octets (groups of eight bits):Example: 10111110.01100100.00000101.00110110

An IP address is also represented in a dotted decimal format.Example: 190.100.5.54

When a host is configured with an IP address, it is entered as a dotted decimal number, such as 192.168.1.5.

Unique IP addresses on a network ensure that data can be sent to and received from the correct network device.

IP Address ClassesClass A

Large networks, implemented by large companies and some countries

Class BMedium-sized networks, implemented by universities

Class CSmall networks, implemented by ISP for customer

subscriptionsClass D

Special use for multicastingClass E

Used for experimental testing

Figure 21.12 Mapping class D to Ethernet physical address

An Ethernet multicast physical address is in the range

01:00:5E:00:00:00 to 01:00:5E:7F:FF:FF.

Figure 21.22 Tunneling

We use netstat (see next slide) with three options: -n, -r, and -a. The -n option gives the numeric versions of IP addresses, the -r option gives the routing table, and the -a option gives all addresses (unicast and multicast). Note that we show only the fields relative to our discussion. “Gateway” defines the router, “Iface” defines the interface.

Note that the multicast address is shown in color. Any packet with a multicast address from 224.0.0.0 to 239.255.255.255 is masked and delivered to the Ethernet interface.

Example 21.9

Example 21.9..cont..

NETWORK LAYER:DELIVERY, FORWARDING &

ROUTING

RoutingRouting algorithm:: that part of the Network

Layer responsible for deciding on which output line to transmit an incoming packet.Remember: For virtual circuit subnets the routing decision is made ONLY at set up.

Algorithm properties:: correctness, simplicity, robustness, stability, fairness, optimality, and scalability.

Routing ClassificationAdaptive Routing

based on current measurementsof traffic and/or topology.

1. centralized2. isolated3. distributed

Non-Adaptive Routing

1. flooding

2. static routing using shortest path algorithms

Shortest Path Routing1. Bellman-Ford Algorithm [Distance Vector]2. Dijkstra’s Algorithm [Link State]

What does it mean to be the shortest (or optimal) route?

a. Minimize mean packet delayb. Maximize the network throughputc. Mininize the number of hops along the path

Internetwork Routing [Halsall]

Adaptive Routing

Centralized Distributed

Intradomain routing Interdomain routing

Distance Vector routing Link State routing

[IGP] [EGP]

[BGP,IDRP]

[OSPF,IS-IS,PNNI][RIP]

[RCC]

InteriorGateway Protocols

ExteriorGateway Protocols

Distance Vector RoutingHistorically known as the old ARPANET routing

algorithm {or known as Bellman-Ford algorithm}.

Basic idea: each network node maintains a Distance Vector table containing the distance between itself and ALL possible destination nodes.

Distances are based on a chosen metric and are computed using information from the neighbors’ distance vectors.

Metric: usually hops or delay

Distance Vector Routing Information kept by DV router

1. each router has an ID2. associated with each link connected to a

router, there is a link cost (static or dynamic) the metric issue!

Distance Vector Table Initialization

Distance to itself = 0

Distance to ALL other routers = infinity number

Distance Vector Algorithm1. Router transmits its distance vector to each of its

neighbors.2. Each router receives and saves the most recently

received distance vector from each of its neighbors.

3. A router recalculates its distance vector when:a. It receives a distance vector from a neighbor

containing different information than before.b. It discovers that a link to a neighbor has gone

down (i.e., a topology change).The DV calculation is based on minimizing the cost to each destination.

Distance Vector Routing

Figure 5-9.(a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.

Routing Information Protocol (RIP)RIP had widespread use because it was

distributed with BSD Unix in “routed”, a router management daemon.

RIP is the most used Distance Vector protocol.RFC1058 in June 1988.Sends packets every 30 seconds or faster.Runs over UDP.Metric = hop countBIG problem is max. hop count =16

RIP limited to running on small networks!!Upgraded to RIPv2

Link State Algorithm1. Each router is responsible for meeting its

neighbors and learning their names.2. Each router constructs a link state packet (LSP)

which consists of a list of names and cost to reach each of its neighbors.

3. The LSP is transmitted to ALL other routers. Each router stores the most recently generated LSP from each other router.

4. Each router uses complete information on the network topology to compute the shortest path route to each destination node.

Open Shortest Path First(OSPF)OSPF runs on top of IP, i.e., an OSPF packet is

transmitted with IP data packet header.Uses Level 1 and Level 2 routersHas: backbone routers, area border routers,

and AS boundary routersLSPs referred to as LSAs (Link State

Advertisements)Complex algorithm due to five distinct LSA

types.

Area 0.0.0.1Area 0.0.0.2

Area 0.0.0.3

R1

R2

R3

R4 R5

R6 R7

R8

N1

N2

N3

N4

N5

N6

N7

To another AS

Area 0.0.0.0

R = router N = network

OSPF Areas

Figure 5-65.The relation between ASes, backbones, and areas in OSPF.

Border Gateway Protocol (BGP)

The replacement for EGP is BGP. Current version is BGP-4.

BGP assumes the Internet is an arbitrary interconnected set of AS’s.

In interdomain routing the goal is to find ANY path to the intended destination that is loop-free. The protocols are more concerned with reachability than optimality.

And one truly last word…

ThAnKs

top related