You are on page 1of 117

Introduction to Mobile

Communications
EHB 453
2022 – 2023
Ibraheem Shayea
Electronics and Communication Engineering Department,
Faculty of Electrical and Electronics Engineering
İstanbul Teknik Üniversitesi - İTÜ
Syllabus 11

IP and Network Layer


Lecture Objectives
What you should Learn from this Lecture ?

To understand the main services handled and provided by the


Network Layer :
o Addressing

o Routing (path selection)

o Forwarding versus routing

o Functions offered by Network Layer

o Internet Protocols

o Packet Structure 3
General Outline
❑ Introduction
❑ Functions
❑ Protocols
❑ Internet Protocol (IP)
❑ Internet Protocol (IPv4)
❑ Internet Protocol (IPv6)
❑ Tunnelling
❑ Private IP Addresses
❑ More Network Protocols
❑ Router
❑ Routing
4
Introduction

5
Introduction
What is Network Layer ?
Machine A Machine B

Application Application
Presentation Presentation
Session Session
Transport Router Transport

Network Network Network

Data Link Data Link Data Link

Physical Physical Physical

Network 1 Network 2

6
Layers of the OSI Reference Model
Introduction
What is Network Layer ?

Machine A Machine B

Application Application
Presentation Presentation
Session Session
Transport Transport

Network Bridge Network

Data Link Data Link Data Link

Physical Physical Physical

7
Layers of the OSI Reference Model
Introduction
What is Network Layer ?

Machine A Machine B

Application Application
Presentation Presentation
Session Session
Transport Transport

Network Network

Data Link Repeater Data Link

Physical Physical Physical

Layers of the OSI Reference Model 8


Introduction
What is Network Layer ?
Network Layer is standard to define the management of network
connections between nodes in the network

❑ Establishing and Maintaining the connection between two


connected nodes.

❑ Transmitting data between networks in the form of packets.

❑ Assigning source and destination IP addresses to the data segments


9
Introduction
What is Network Layer ?
❑ Determining the best paths for data delivery

❑ Providing functionality of routing to enable data packets to be efficiently sent over


multiple hops in a network [1].

❑ Store-and-Forward Packet Switching

❑ Providing service to the transport layer


o At the receiving side, delivers segments to transport layer

10
Functions

11
Functions
❖ Encapsulates Segments into Packet

❖ Logical Addressing

❖ Routing

❖ Forwarding

12
Functions
Encapsulates Segments into Packet
❑ The network layer is responsible for Encapsulating “Segment” coming
fromTransport Layer into a “Packet”

Protocol Data Unit (PDU) of OSI Model:


Data of Transport layer is called as a “Segment”, or the ”Datagram”.
Data of the network layer is called as a “Packet”
Data of the data link layer is called as a “Frame”
13
Data of Physical layer is called as a “raw bits (1s or 0s)”
Functions
Encapsulates Segments into Packet
❑ The data segment is encapsulated inside the packet.

❑ Packets have a source IP Address

❑ Packets have a destination IP Address

❑ Packets travel one or more hops, through multiple routers until reaching the destination.

❑ There is a header checksum used to detect damage to the packet. Damaged packets are
discarded.

14
Functions
Encapsulates Segments into Packet
Differences Between Frame and Packet
❑ Frame is the data unit used in the Data Link layer.
❑ Packet is the data unit used in the Network Layer.

❑ Frames are formed in Data Link Layer of the OSI


❑ Packets are formed in Network Layer.

❑ Framing includes the source and destination MAC addresses


❑ Packet includes the source and destination IP addresses.

❑ Packet encapsulates segment in the network layer.


❑ Frames encapsulate packets in the data link layer. 15
Functions
Logical Addressing
❑ Network Layer assigns Logical Addressing (LA), a unique IP address, to the
transmitter and receiver

❑ Each host/client /User in the network must have a unique IP address

o It will determine where it is.

o It is normally assigned from a hierarchical system.

❑ Logical addressing (a unique IP address) added to each data packets before


transmitting

16
Functions
Logical Addressing
❑ Each data packets contains three addition components mask, sender IP, receiver IP.

➢ Sender IP address determines which user sent the data packet.

➢ Mask address determines which network the data needs to be delivered.

➢ Receiver IP address determines which user needs to receive the data packet.

❑ The first IP part identifies a network on which the host resides

❑ The second IP part identifies the particular host on the given network.

17
Functions
Routing
❑ Routing is a method used for transferring data packets from source to destination.
o Routing Algorithms

❑ Routers operate in the network layer.

❑ Routing Mechanism is provided by Network Layer for routing the packets from the
transmitter to final destination.

❑ Routing uses the combination of Mask and IP address to transfer the data to the
correct destination.

❑ Network Layer protocols determine which route is suitable from source to


destination. 18
Functions
Forwarding
❑ Move packets from router’s input to appropriate router output

❑ Terms ‘forwarding’ and ‘switching’ are often used interchangeably.

❑ Every router has a forwarding table.


o A router forwards a packet by examining the value of a field in the arriving packet’s header,
and then using this header value to index into the router’s forwarding table.

o The value stored in the forwarding table entry for that header indicates the router’s
outgoing link interface to which that packet is to be forwarded.

19
Functions
Forwarding
Interaction between routing and forwarding
Routing algorithm determines
end-end-path through network

Forwarding table determines


local forwarding at this router
Functions
Interaction between Routing and Forwarding

❑ Forwarding refers to the router-local action of transferring the packet


from an input link interface to the appropriate output link interface.

❑ Routing refers to the network-wide process that determines end-to-


end paths that packets take from source to destination.
Functions
❖ Path Determination
❖ Network layer determines the optimal path for data transmission.

❖ Connection Setup
❖ Some network architectures require router Connection setup along the path before data
flows
o ATM, frame relay, X.25

❖ Before datagrams flow, two end hosts and principal routers establish a virtual connection.

❖ Congestion Control
❖ Network layer Control the Congestion that may occur due to :
o Massive PacketsTransmitted
o Insufficient Memory:
o Slow Processors.
22
Functions
❖ Internetworking

❖ Error Handling

❖ Packet Sequencing

❖ Relaying

❖ Terminating Connections
Network Layer Protocols

24
Network Layer Protocols
❖ IP: Internet Protocol
o IPv4
o IPv6
❖ IPX: Internetwork Packet Exchange
❖ IPsec: Internet Protocol Security

Routing
❖ RIP: Routing Information Protocol
❖ OSPF: Open Shortest Path First
❖ BGP: Border Gateway Protocol
❖ IS-IS: Intermediate System to Intermediate System 25
Network Layer Protocols
❖ ICMP: Internet Control Message Protocol
❖ ARP : Address Resolution Protocol.
❖ RARP: Reverse Address Resolution Protocol.
❖ CLNS: Connectionless-mode Network Service
❖ DDP: Datagram Delivery Protocol
❖ EGP: Exterior Gateway Protocol
❖ EIGRP: Enhanced Interior Gateway Routing Protocol
❖ IGMP: Internet Group Management Protocol
❖ PIM: Protocol Independent Multicast
❖ WireGuard

26
Network Layer Protocols
Routing Protocols for AD-HOC Networks

27
Network Layer Protocols
Routing Protocols for AD-HOC Networks

28
Network Layer Protocols
IPv4 companion protocols (1)
◼ ARP: Address Resolution Protocol
❑ Mapping from IP address to MAC address

◼ ICMP: Internet Control Message Protocol


❑ Error reporting & Query

◼ IGMP: Internet Group Management Protocol


❑ Multicast member join/leave

◼ Unicast Routing Protocols (Intra-AS)


❑ Maintaining Unicast Routing Table

❑ E.g. RIP, OSPF (Open Shortest Path First)

29
Network Layer Protocols
IPv4 Companion Protocols (1)

◼ Multicast Routing Protocols


o Maintaining Multicast Routing Table
o E.g. DVMRP, MOSPF, CBT, PIM

◼ Exterior Routing Protocols (Inter-AS)


o E.g. BGP (Border Gateway Protocol)

◼ Quality-of-Service Frameworks
o Integrated Service (ISA, IntServ)
o Differentiated Service (DiffServ)
30
Internet Protocol (IP)

31
Internet Protocol (IP)
Internet Protocol (IP)
❑ Internet Protocol (IP) is a protocol, or set of rules used in wired and wireless
networks for routing and addressing packets of data.

❑ IP is the principal communications protocol for relaying datagrams across network


boundaries.

❑ IP is responsible for addressing hosts

❑ IP address enables every host on the IP network to be uniquely identifiable.

32
Internet Protocol (IP)
Internet Protocol (IP)
❑ IP has the task of routing (delivering) packets from the source host to the destination
host across the networks based on the IP addresses in the packet headers.

❑ IP Routing Function enables internetworking, and essentially establishes the Internet.

❑ IP has the task of routing (delivering) packets from the source host to the destination
host across the networks based on the IP addresses in the packet headers.

❑ IP Routing Function enables internetworking, and essentially establishes the Internet.

33
Internet Protocol (IP)
❖ Internet Protocol Version
o Internet Protocol Version 4 (IPv4)
o Internet Protocol Version 6 (IPv6)

❖ Internet Protocol Size


o IPv4 is 32-bit addressing scheme used as IP host addressing mechanism.
o IPv6 is 128-bit addressing scheme used as IP host addressing mechanism.

❖ Hierarchical Addressing
o IPv4 provides a hierarchical addressing scheme
o IPv6 provides hierarchical addressing based on prefixes rather than address classes

34
IPv4

35
IPv4
❑ IPv4 is the first version deployed for production in 1983, It still routes most
Internet traffic today

❑ IPv4 uses Fixed length of 32-bits address size, which means that the number of
unique hosts is :

❑ 232 = 4,294,967,296.

❑ The 32-bit IP address is usually presented in “dot decimal” format as a


series of four decimal numbers between 0 and 255,

o For example:

▪ In “dot decimal
200.100.50.10

▪ In binary format as:


11001000.01100100.00110010.00001010 36
IPv4
IPv4 Datagram
❑ Each IPv4 datagram has two components:
1. A Header
2. A Payload.

1. Header
Header is also known as IP header, which includes:
o Source IP address,
o Destination IP address,
o other metadata needed to route and deliver the datagram

1. Payload
The payload is the data that is transported that received from the Upper layer .

37
IPv4
IPv4 Datagram
IPv4
Payload
Header

38
IPv4
IPv4 Datagram
❑ Version : Version no. of Internet Protocol used (e.g. IPv4).

❑ IHL : Internet Header Length; Length of entire IP header.

❑ DSCP : Differentiated Services Code Point; this is Type of Service.

❑ ECN : Explicit Congestion Notification; It carries information about the congestion seen
in the route.

❑ Total Length : Length of entire IP Packet (including IP header and IP Payload).

❑ Identification: If IP packet is fragmented during the transmission, all the fragments


contain same identification number. to identify original IP packet they belong to.

39
IPv4
IPv4 Datagram
❑ Flags : As required by the network resources, if IP Packet is too large to handle, these
‘flags’ tell if they can be fragmented or not. In this 3-bit flag, the MSB is always set to ‘0’.

❑ Fragment Offset : This offset tells the exact position of the fragment in the original IP
Packet.

❑ Time to Live − To avoid looping in the network, every packet is sent with some TTL
value set, which tells the network how many routers (hops) this packet can cross. At each
hop, its value is decremented by one and when the value reaches zero, the packet is
discarded.

❑ Protocol − Tells the Network layer at the destination host, to which Protocol this
packet belongs to, i.e. the next level Protocol. For example protocol number of ICMP is
1,TCP is 6 and UDP is 17.

40
IPv4
IPv4 Datagram
❑ Header Checksum − This field is used to keep checksum value of entire header
which is then used to check if the packet is received error-free.

❑ Source Address : 32-bit address of the Sender (or source) of the packet.

❑ Destination Address : 32-bit address of the Receiver (or destination) of the packet.

❑ Options : This is an optional field, which is used if the value of IHL is greater than 5.
These options may contain values for options such as Security, Record Route, Time
Stamp, etc.

41
IPv4
IPv4 Categories
❖ IP addresses are divided into many categories:
❑ Class A
It uses the first octet for network addresses and last three octets for host addressing

❑ Class B
It uses the first two octets for network addresses and last two for host addressing

❑ Class C
It uses the first three octets for network addresses and last one for host addressing

❑ Class D
It provides a flat IP addressing scheme in contrast to hierarchical structure for
above three.

❑ Class E
It is used as experimental. 42
IPv4
IPv4 Categories

43
IPv4
IPv4 Categories

IP address formats.
44
Source: Tanenbaum Chapter 5 Network
IPv4
IPv4 Addressing
IP address also uniquely identifies the network that the device is connected
to.
Table: Local and Remote IP Addresses

o Host ID

o Network ID:

o Subnet Mask

o Default Gateway

45
Source: 2007__Steve Rackley - Wireless Networking Technology (P14)
IPv4
IPv4 Addressing
❖ IP address
IP of 32-bits identified for : 223.1.1.1
o Each Host
223.1.2.1
o Each Router interface 223.1.1.2
223.1.1.4 223.1.2.9
Interface
❖ Interface 223.1.1.3 223.1.3.27
223.1.2.2
It is a connection between the
host/router and physical link
▪ The Router typically has multiple
interfaces
223.1.3.1 223.1.3.2
▪ The Host typically has one interface
▪ IP addresses associated with each
interface
223.1.1.1 = 11011111 00000001 00000001 00000001
46
223 1 1 1
IPv4
IPv4 Addressing
Subnets subnet
❖ What’s a subnet ? 223.1.2.1
223.1.1.1
▪ Device interfaces with same
subnet part of IP address
223.1.1.2
▪ Can physically reach each other
without intervening router 223.1.1.4 223.1.2.9

223.1.1.3 223.1.3.27
subnet 223.1.2.2
❖ IPv4 address:
▪ Subnet part - high order bits 223.1.3.1 223.1.3.2
▪ Host part - low order bits

Network Consisting of 3 subnets


47
IPv4
IPv4 Addressing
Q: How does a host get IP address?
❖ Coded by System Admin in a file
▪ Windows:
Control-panel → network → configuration → tcp/ip → properties

▪ UNIX:
/etc/rc.config

❖ DHCP: Dynamic Host Configuration Protocol:


o It is a scenario of “Plug-and-Play”
o IP address is dynamically assigned by the server

48
IPv4
IPv4 Addressing
Overview: DHCP: Dynamic Host Configuration Protocol
❑ DHCP allows the host to dynamically obtain its IP address from the network server
when it joins the network.

❑ Allows reuse of addresses (only hold address while connected/“on”)

❑ Support for mobile users who want to join network (more shortly)

49
IPv4
IPv4 Addressing
DHCP client-server scenario
DHCP
223.1.1.0/24
server
223.1.1.1 223.1.2.1

223.1.1.2 223.1.2.9 arriving DHCP


223.1.1.4 client needs
address in this
223.1.2.2
network
223.1.1.3 223.1.3.27
223.1.2.0/24

223.1.3.1 223.1.3.2

50
223.1.3.0/24
IPv4
IPv4 Addressing
DHCP server: 223.1.2.5 DHCP discover arriving
client
src : 0.0.0.0, 68
dest.: 255.255.255.255,67
yiaddr: 0.0.0.0
transaction ID: 654

DHCP offer
src: 223.1.2.5, 67
dest: 255.255.255.255, 68
yiaddrr: 223.1.2.4
transaction ID: 654
lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255, 67
yiaddrr: 223.1.2.4
transaction ID: 655
lifetime: 3600 secs

DHCP ACK
src: 223.1.2.5, 67
dest: 255.255.255.255, 68
yiaddrr: 223.1.2.4
transaction ID: 655
51
lifetime: 3600 secs
IPv4
IPv4 Addressing
DHCP: more than IP addresses

DHCP can return more than just allocated IP address on subnet:

o Address of the first-hop router for client

o Name and IP address of the DNS server

o Network mask (indicating network versus host portion of the address)

52
IPv4
IPv4 Addressing
DHCP: example
❖ connecting laptop needs its IP address,
address of the first-hop router, address
of DNS server: use DHCP DHCP DHCP
DHCP UDP
DHCP IP
❖ DHCP request encapsulated in UDP, DHCP Eth
encapsulated in IP, encapsulated in 802.1 Phy
DHCP
Ethernet

❖ Ethernet frame broadcast (dest: DHCP DHCP 168.1.1.1


FFFFFFFFFFFF) on LAN, received at router DHCP UDP
DHCP IP
running DHCP server Eth
DHCP router with DHCP
Phy server built into
❖ Ethernet demuxed to IP demuxed, UDP router
demuxed to DHCP
53
IPv4
IPv4 Addressing
DHCP: Example
❖ DCP server formulates DHCP ACK DHCP DHCP
containing client’s IP address, IP DHCP UDP
address of first-hop router for client, DHCP IP
name & IP address of DNS server DHCP Eth
Phy

❖ encapsulation of DHCP server, frame


forwarded to client, demuxing up to
DHCP
DHCP at client DHCP
DHCP UDP
DHCP IP
DHCP Eth router with DHCP
❖ client now knows its IP address, name Phy
and IP address of DSN server, IP DHCP
server built into
address of its first-hop router router

54
IPv4
IPv4 Addressing
DHCP: Wireshark output (home LAN)
request reply
Message type: Boot Request (1) Message type: Boot Reply (2)
Hardware type: Ethernet Hardware type: Ethernet
Hardware address length: 6 Hardware address length: 6
Hops: 0 Hops: 0
Transaction ID: 0x6b3a11b7 Transaction ID: 0x6b3a11b7
Seconds elapsed: 0 Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast) Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0) Client IP address: 192.168.1.101 (192.168.1.101)
Your (client) IP address: 0.0.0.0 (0.0.0.0) Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0) Next server IP address: 192.168.1.1 (192.168.1.1)
Relay agent IP address: 0.0.0.0 (0.0.0.0) Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Wistron_23:68:8a (00:16:d3:23:68:8a) Client MAC address: Wistron_23:68:8a (00:16:d3:23:68:8a)
Server host name not given Server host name not given
Boot file name not given Boot file name not given
Magic cookie: (OK) Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Request Option: (t=53,l=1) DHCP Message Type = DHCP ACK
Option: (61) Client identifier Option: (t=54,l=4) Server Identifier = 192.168.1.1
Length: 7; Value: 010016D323688A; Option: (t=1,l=4) Subnet Mask = 255.255.255.0
Hardware type: Ethernet Option: (t=3,l=4) Router = 192.168.1.1
Client MAC address: Wistron_23:68:8a (00:16:d3:23:68:8a) Option: (6) Domain Name Server
Option: (t=50,l=4) Requested IP Address = 192.168.1.101 Length: 12; Value: 445747E2445749F244574092;
Option: (t=12,l=5) Host Name = "nomad" IP Address: 68.87.71.226;
Option: (55) Parameter Request List IP Address: 68.87.73.242;
Length: 11; Value: 010F03062C2E2F1F21F92B IP Address: 68.87.64.146
1 = Subnet Mask; 15 = Domain Name Option: (t=15,l=20) Domain Name =
3 = Router; 6 = Domain Name Server "hsd1.ma.comcast.net."
44 = NetBIOS over TCP/IP Name Server 55
……
IPv4
IPv4 Addressing
Q: How does network get subnet part of IP address?

A: Gets allocated portion of its provider ISP’s address space

ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20

Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23


Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23
Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23
... ….. …. ….
Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23

56
IPv4
IPv4 Addressing
Q: How does network get subnet part of IP address?
Hierarchical addressing: route aggregation
Hierarchical addressing allows efficient advertisement of routing
information:
Organization 0
200.23.16.0/23
Organization 1
“Send me anything
200.23.18.0/23 with addresses
Organization 2 beginning
200.23.20.0/23 . Fly-By-Night-ISP 200.23.16.0/20”
.
. . Internet
.
Organization 7 .
200.23.30.0/23
“Send me anything
ISPs-R-Us
with addresses 57
beginning
IPv4
IPv4 Addressing
Q: How does network get subnet part of IP address?
Hierarchical addressing: more specific routes
ISPs-R-Us has a more specific route to Organization 1
Organization 0
200.23.16.0/23

“Send me anything
with addresses
Organization 2 beginning
200.23.20.0/23 . Fly-By-Night-ISP 200.23.16.0/20”
.
. . Internet
.
Organization 7 .
200.23.30.0/23
“Send me anything
ISPs-R-Us
with addresses
Organization 1 beginning 199.31.0.0/16
or 200.23.18.0/23” 58
200.23.18.0/23
IPv4
IPv4 Addressing
Q: How does an ISP get a block of addresses?

A: ICANN: Internet Corporation for Assigned Names and Numbers


http://www.icann.org/

o Allocates addresses

o Manages DNS

o Assigns domain names

59
IPv6

60
IPv6
IPv6
❖ Larger Address Space
o IPv6 Greatly expanded address space (2128 )
o IPv6 protocol provides the availability & extensibility of IP addresses : Large-scale
sensor networks, IP Security, Mobile IPv6, IP-based Multimedia

❖ Support for mobility


o IPv6 provides a new feature of IPv6 mobility
o Mobile IPv6 equipped machines can roam around without the need of changing
their IP addresses.

❖ Support for More Security


o Built-in, strong IP-layer encryption and authentication

61
IPv6
IPv6
❑ Support for Resource Allocation

❑ Better Header Format

❑ New Options

❑ Allowance for Extension

62
IPv6
IPv6 Datagram

63
IPv6
IPv6 Datagram

64
IPv6
IPv6 Datagram
Header IPv4 to IPv6
Removed

Changed

65
IPv6
IPv6 Addressing
"Preferred" form: 1080:0:FF:0:8:800:200C:417A

Compressed form: FF01:0:0:0:0:0:0:43


becomes FF01::43

IPv4-mapped: 0:0:0:0:0:FFFF:10.1.68.3
or ::FFFF:10.1.68.3

66
IPv6
IPv6 Addressing
❑ x:x:x:x:x:x:x:x, where x is a 16-bit hexadecimal field

❑ Leading zeros in a field are optional:


o 2031:0:130F:0:0:9C0:876A:130B

❑ Successive fields of 0 can be represented as ::, but only once per address.
Examples:
2031:0000:130F:0000:0000:09C0:876A:130B
2031:0:130f::9c0:876a:130b
FF01:0:0:0:0:0:0:1 >>> FF01::1
0:0:0:0:0:0:0:1 >>> ::1
0:0:0:0:0:0:0:0 >>> :: 67
Tunnelling

68
Tunnelling
Tunneling IPv6 through IPv4
❖ Tunneling scheme allows encapsulating IPv6 packets in IPv4 packets
in order to transport over IPv4 only network.

❖ It allows IPv6 only end stations to communicate over IPv4 only


networks.

69
Tunnelling
Transition from IPv4 to IPv6
❖ not all routers can be upgraded simultaneously
▪ no “flag days”
▪ how will network operate with mixed IPv4 and IPv6
routers?
❖ tunneling: IPv6 datagram carried as payload in IPv4 datagram
among IPv4 routers

IPv4 header fields IPv6 header fields


IPv4 payload
IPv4 source, dest addr IPv6 source dest addr
UDP/TCP payload

IPv6 datagram
70
IPv4 datagram
Tunnelling
Transition from IPv4 to IPv6
A B IPv4 tunnel E F
connecting IPv6 routers
logical view:
IPv6 IPv6 IPv6 IPv6

A B C D E F
physical view:
IPv6 IPv6 IPv4 IPv4 IPv6 IPv6

flow: X src:B src:B flow: X


src: A dest: E src: A
dest: E
dest: F dest: F
Flow: X Flow: X
Src: A Src: A
data Dest: F Dest: F data

data data

A-to-B: E-to-F:
IPv6 B-to-C: B-to-C: IPv6
71

IPv6 inside IPv6 inside


Private IP Addresses

72
Private IP Addresses
❑ Private IP Addresses is used within the networks that did not require Internet connect

❑ It enabling many organisations to reuse the same sets of addresses within their private networ

Table 2-3: Private IP Address Ranges

73
More Network Protocols

74
More Network Protocols
IPX: Internetwork Packet Exchange
❑ IPX is a network layer protocol used for routing packets from one node to another
throughout an internetwork.

❑ IPX provides connectionless datagram services for Ethernet, Token Ring, and other
common data-link layer protocols.

❑ IPX is the commonly used local area network (LAN) protocol on legacy NetWare-based
LANs but has recently been replaced with TCP/IP

❑ IPX may act as a transport layer protocol as well.

75
More Network Protocols
Routing Information Protocol (RIP)
❑ RIP is one of the Distance Vector Routing Protocols.

❑ RIP employs the hop count as a routing metric.

❑ RIP allows only for16 hops as maximum


o Limits the size of networks that RIP can support.

❑ Versions
o RIP version 1: defined in RFC 1058, published in 1988
o RIP version 2: defined in RFC 1723, published in 1994
o RIPng, defined in RFC 2080, support IPv6

❑ RIP uses the User Datagram Protocol (UDP) as its transport protocol
76
More Network Protocols
Open Shortest Path First (OSPF)
❑ OSPF is a routing protocol for IP networks.

❑ OSPF runs on top of IP,


o i.e., an OSPF packet is transmitted with IP data packet header.

❑ OSPF is defined as OSPF Version 2 in RFC 2328 (1998) for IPv4.

❑ OSPF is defined as OSPF Version 3 in RFC 5340 (2008) for IPv6.

❑ OSPF uses a link state routing (LSR) algorithm and falls into the group of interior
gateway protocols (IGPs)

❑ OSPF is an interior gateway protocol (IGP) used in an autonomous system such as


a local area network (LAN). 77
More Network Protocols
Border Gateway Protocol (BGP)
❑ The replacement for EGP is BGP, the 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.

78
More Network Protocols
IS-IS: Intermediate System to Intermediate System
❑ ISIS is one of an IP Routing protocols family, and is an Interior Gateway Protocol (IGP)
for the Internet,

❑ It used to distribute IP routing information throughout a single Autonomous System


(AS) in an IP network.

❑ IS-IS is a Link-State Routing Protocol


o That means the routers exchange topology information with their nearest
neighbours.

❑ ISIS is a routing protocol designed to move information efficiently within a computer


network, a group of physically connected computers or similar devices.

❑ It determines the best route for data through a packet-switched network.


79
More Network Protocols
Wireless Routing Protocol (WRP)
❖ WRP is a table-based distance-vector routing protocol.

❖ Each node in the network maintains :


o A Distance table,
o A Routing table,
o A Link-Cost table,
o A Message Retransmission list,

80
More Network Protocols
ICMP: Internet Control Message Protocol

❖ ICMP is a network diagnostic and error reporting protocol.

❖ ICMP belongs to the IP protocol suite and uses IP as carrier protocol.

❖ After constructing a ICMP packet, it is encapsulated in the IP packet.

❖ ICMP contains dozens of diagnostic and error reporting messages.

81
More Network Protocols
ICMP : Internet Control Message Protocol.
❑ ICMP is a network layer protocol used by hosts and routers to send the notifications of IP
datagram problems back to the sender.

❑ ICMP uses echo test/reply to check whether the destination is reachable and responding.

❑ ICMP handles both control and error messages, but its main function is to report the error
but not to correct them

82
More Network Protocols
ARP : Address Resolution Protocol.

❑ It is used to associate an IP address with the MAC address.

❑ ARP is used to find the MAC address of the node when an internet address is known.

83
More Network Protocols
RARP: Reverse Address Resolution Protocol.
❑ RARP is a protocol used to request the Internet Protocol (IPv4) address
for a host from a server

❑ If the host wants to know its IP address, then it broadcast the RARP
query packet that contains its physical address to the entire network. A
RARP server on the network recognizes the RARP packet and responds
back with the host IP address.

84
More Network Protocols
ICMP: internet control message protocol
• used by hosts & routers to
Type Code description
communicate network-level 0 0 echo reply (ping)
information 3 0 dest. network unreachable
• error reporting: unreachable 3 1 dest host unreachable
host, network, port, protocol 3 2 dest protocol unreachable
• echo request/reply (used by 3 3 dest port unreachable
ping) 3 6 dest network unknown
3 7 dest host unknown
• network-layer “above” IP: 4 0 source quench (congestion
• ICMP msgs carried in IP control - not used)
datagrams 8 0 echo request (ping)
9 0 route advertisement
• ICMP message: type, code plus 10 0 router discovery
first 8 bytes of IP datagram 11 0 TTL expired
causing an error 12 0 bad IP header

85
More Network Protocols
Traceroute and ICMP
❖ The source sends a series of ❖ when ICMP messages arrives,
UDP segments to dest source records RTTs
▪ The first set has TTL =1
▪ The second set has TTL=2, etc.
▪ Unlikely port number
Stopping Criteria:
❖ UDP segment eventually
❖ when nth set of datagrams
arrives at the destination host
arrives to nth router:
❖ The destination returns
▪ Router discards datagrams
▪ and sends source ICMP ICMP “port unreachable”
messages (type 11, code 0) message (type 3, code 3)
▪ ICMP messages includes name ❖ Source stops
of router & IP address

86
Router
Router
Functions of Router
❖ Run Routing
Run Routing Protocols (RIP, OSPF, BGP)
➢ Routing Information Protocol (RIP Version 1 and RIP Version 2),
➢ Open Shortest Path First (OSPF)
➢ Border Gateway Protocol (BGP).
➢ OSPF and RIP are Interior Gateway Protocols (IGP)

❖ Forwarding
Forwarding datagrams from incoming to the outgoing link

❖ Examining
The router examines header fields in all IP datagrams passing through it
Router
Structure of Router

Switching
Fabric

Router Input Ports Router Output Ports


Routing
Processor

4-89
Router
A. Input Port Functions

Lookup,
Link Forwarding
Line Layer Switch
Protocol Fabric
Termination
(Receive)
Physical Layer: Queueing
bit-level reception

Data Link Layer: Decentralized Switching:


e.g., Ethernet ❖ Given datagram dest., lookup output port using
forwarding table in input port memory
❖ Goal: complete input port processing at ‘line
speed’
❖ Queuing: if datagrams arrive faster than
forwarding rate into switch fabric
4-90
Router
B. Switching Fabrics

Switching
Fabric

Router Input Ports Router Output Ports


Routing
Processor

4-91
Router
B. Switching Fabrics
❖ Transfer packet from input buffer to appropriate output buffer

❖ Switching Rate:
The rate at which packets can be transferred from inputs to outputs

o Often measured as multiples of input/output line rate


o N inputs: Switching rate N times line rate desirable

4-92
Router
B. Switching Fabrics
Types of Switching Fabrics
o Three types of switching fabrics

memory

Memory Bus Crossbar

4-93
Router
B. Switching Fabrics
Switching Via Memory
First Generation Routers:
❖ Procedure: Packet copied to system’s memory
❖ Disadvantage: Speed limited by memory bandwidth (2 bus crossings per datagram)

input output
port Memory port
(e.g., (e.g.,
Ethernet) Ethernet)

system bus

4-94
Router
B. Switching Fabrics
Switching via a bus
❖ Procedure: Datagram from input port memory to output port memory via a
shared bus.
❖ Disadvantage: switching speed limited by bus bandwidth
❖ Example: 32 Gbps bus, Cisco 5600: sufficient speed for access and enterprise
routers.

bus 4-95
Router
B. Switching Fabrics
Switching via Crossbar
❖ Procedure:
➢ Crossbar is an another interconnection nets
initially developed to connect processors in
the multiprocessor
➢ Advanced Design: fragmenting datagram
into fixed length cells, switch cells through
the fabric.

❖ Advantage: Switching via Crossbar


Overcomes the bandwidth limitations that is in
the Switching via Bus

❖ Example: Cisco 12000: switches 60 Gbps


through the interconnection network crossbar
Router
C. Output Ports
❖ Buffering required when datagrams arrive from fabric faster
than the transmission rate

❖ Scheduling Discipline chooses among queued datagrams for


transmission

Datagram
Buffer Link
Switch Layer Line
Fabric Protocol Termination
(send)
queueing

4-97
Router
Output Port Queueing
❖ Buffering when arrival rate via switch exceeds output line speed

❖ Queueing (delay) and loss due to output port buffer overflow!

switch
switch
fabric
fabric

at t, packets more One packet time later


from input to output
4-98
Router
Input Port Queuing
❖ Queueing may occur at input queues if the Fabric slower than input
ports combined.

❖ Queueing delay and loss due to input buffer overflow!

switch switch
fabric fabric

Output port contention: only one one packet time later: green
red datagram can be transferred. packet experiences HOL blocking
lower red packet is blocked 4-99
Routing

4-100
Routing
What is Routing ?
❖ Routing
Routing determines “good” path (sequence of routers) over network from source to
destination.

❖ “Good” Path:
Typically means !!!

o Minimum cost path ??

o Shortest Path ???

o Fastest Path ??? or


o Other definitions possible
101
Routing
Routing Algorithm

Routing Algorithm: This part of the Network Layer responsible for


deciding on which output line to transmit an incoming packet.

For virtual circuit subnets, the routing decision is made ONLY at set
up.

102
Routing
Routing Algorithm

❖ Routing Algorithms
There are different types of Routing Algorithms such as:

o Link State

o Distance Vector

o Hierarchical Routing

103
Routing
Routing Algorithm
Routing Algorithms in TCP/ IP
o Shortest Path Routing
o The Optimality Principle
o Flooding
o Distance Vector Routing
o Link State Routing
o Hierarchical Routing
o Broadcast Routing
o Multicast Routing
o Routing for Mobile Hosts
o Routing in Ad Hoc Networks
104
Routing
Routing Algorithm
❖ Routing in the WLAN

❖ Routing in the Cellular Systems

❖ Broadcast and Multicast Routing

105
Routing
Routing Algorithm
Routing Algorithm Classification
Global or Decentralized information? Static or dynamic?
Static:
Global: • Routes change slowly over time
• All routers have complete topology, link (usually by humans)
cost info
• “link state” algorithms Dynamic:
Decentralized: • Routes change more
• The router knows physically-connected quickly/automatically
neighbors, link costs to neighbors – periodic update
• The iterative process of computation, – in response to link cost changes
exchange of info with neighbors
• A “distance vector” algorithms 106
Routing
Routing Classification
A. Adaptive Routing
Based on current measurements of traffic and/or topology.
i. Centralized
ii. Isolated
iii. Distributed

B. Non-Adaptive Routing
i. Flooding
ii. Static routing using shortest path algorithms

107
Routing
Routing Protocols

❖ Routing Protocols in the Internet


There are different types of Routing Protocols such as:

o Routing Information Protocol (RIP Version 1 and RIP Version 2)

o Open Shortest Path First (OSPF)

o Border Gateway Protocol (BGP)

108
Routing
Shortest Path Routing

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

a. Minimize mean packet delay

b. Maximize the network throughput

c. Minimize the number of hops along the path

109
Routing
Shortest Path Routing
Example

The first 5 steps used in computing the shortest path from A to D.


The arrows indicate the working node. 110
Routing
Link State Routing
Each Router must do the following:

❑ Discover its neighbors, learn their network address.

❑ Measure the delay or cost to each of its neighbors.

❑ Construct a packet telling all it has just learned.

❑ Send this packet to all other routers.

❑ Compute the shortest path to every other router.

111
Routing
Link State Routing
• Each router is responsible for meeting its neighbors and learning their names.

• Each router constructs a Link State Packet (LSP) which consists of a list of names and cost
to reach each of its neighbors.

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

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

112
Routing
Distance Vector Routing
❑ The router transmits its distance vector to each of its neighbors.

❑ Each router receives and saves the most recently received distance vector from each
of its neighbors.

❑ 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.

113
Routing
Distance Vector Routing
❑ 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
neighbours' distance vectors.
Information kept by DV router
1. Each router has an ID
2. 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
114
The End

Thank You

115
Ref
IPv6 References
• RFC 2460: IPv6
• RFC 2461: Neighbor Discovery
• RFC 2462: Stateless Address Auto-configuration
• RFC 3513: Addressing Architecture
• RFC 3679: Flow Label Specification
• RFC 4443: ICMPv6
• RFC 3810: Multicast Listener Discovery (MLDv2)
116
References
[1] Garg, “Wireless Communications And Networking”, 2007, (Chapter 14:
Mobile Network and Transport Layer)

[2] Data Communications and Networking Book 5Th Edition 2012 : Forouzan,
(Chapter 23 & 24)

[3] James F. Kurose, “Computer Networking”, 2012, (Chapter 4)

[4] Peter Boait, “Open Systems Interconnection”, 1998, (Chapter 6)

[5] Chapter 4: network layer”, James Slides

117

You might also like