Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 64

CCE 514 Computer Architecture – 3 Units

CCE 414 COMPUTER AND COMMUNICATION NETWORKS(2 Units}

Lecture 5: Internetwork Layers

Christopher U. Ngene

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 1
CCE 514 Computer Architecture – 3 Units

Internetwork Layers
4. Transport Layer
Internetwork Layer
3. Network Layer

 The transport layer is responsible for end-to-end delivery of


messages.
 The transport layer sets up virtual circuits (when needed) and is
also responsible for
 segmentation (breaking the message into several smaller pieces) at the
sending end and
 reassembly (reconstructing the original message into a single whole) at
the receiving end.

 The network layer is responsible7. Application Layer


for addressing and routing of the
message.
Application
 The network 6. Presentation
and transport layers Layer encapsulation of
also perform
message segments from the application layer, passing them down
to the data link layer on the sending end
5. Session and passing them up to
Layer
the application layer on the receiving end
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 2
CCE 514 Computer Architecture – 3 Units

Transport vs Network Layer


Network layer: logical communication
between hosts
Transport layer: logical communication
between processes
 relies on and enhances network layer services

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 3
CCE 514 Computer Architecture – 3 Units

Encapsulation
 As application data is passed down the protocol stack on its way to be
transmitted across the network media, various protocols add
information to it at each level. This is commonly known as the
encapsulation process.

 The form that a piece of data takes at any layer is called a Protocol Data
Unit (PDU).
 During encapsulation, each succeeding layer encapsulates the PDU
 PDUs are named according to the protocols of the TCP/IP suite.
 Data - The general term for the PDU used at the Application layer
 Segment - Transport Layer PDU
 Packet - Internetwork Layer PDU
 Frame – Data Link Layer PDU
 Bits - A PDU used when physically transmitting data over the medium

 The Network layer PDUs - must also contain hosts 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.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 4
CCE 514 Computer Architecture – 3 Units

Encapsulation

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 5
CCE 514 Computer Architecture – 3 Units

Routing
 Next, the Network layer must provide services to direct these
packets to their destination host.

 The source and destination hosts are not always connected to the
same network.
 In fact, the packet might have to travel through many different networks.
 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.
 As the packet is forwarded, its contents (the Transport layer PDU),
remain intact until the destination host is reached.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 6
CCE 514 Computer Architecture – 3 Units

Decapsulation
 Finally, 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.

 Operating without regard to the application data carried in


each packet allows the Network layer to carry packets for
multiple types of communications between multiple hosts.

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 7
CCE 514 Computer Architecture – 3 Units

Transport Protocols
Provide logical communication between
application processes running on different
hosts
Run on end hosts
Sender: breaks application messages into segments,
and passes to network layer
Receiver: reassembles segments into messages,
passes to application layer
Multiple transport protocol available to
applications
Internet: TCP and UDP

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 8
CCE 514 Computer Architecture – 3 Units

Transport Protocols…
application
transport
 provide logical network
data link
communication between physical

app processes running on

log
different hosts

ica
le
 transport protocols run in

nd
en-
end systems

d
tra
 send side: breaks app

ns
po
messages into segments,

rt
passes to network layer
application
 recv side: reassembles transport
network
segments into messages, data link
physical
passes to app layer
 more than one transport
protocol available to apps
 Internet: TCP and UDP
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 9
Transmission Control
CCE 514 Computer Architecture – 3 Units

Protocol/Internet Protocol (TCP/IP)


 TCP/IP was created in 1974 by Vint Cerf and Bob Kahn
as part of Arpanet, a U.S. Department of Defense
networking research project.

 Arpanet has since evolved into the Internet, making


TCP/IP the protocol suite used by the Internet.

 Almost 70% of all backbone, metropolitan, and wide area


networks use TCP/IP.

 In 1998, TCP/IP surpassed IPX/SPX to become the most


common protocol on local area networks.

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 10
CCE 514 Computer Architecture – 3 Units

Transmission Control Protocol

TCP performs segmentation,


that is, breaking up the message into smaller pieces,
numbering the segments and reassembling them at the
destination end of the transmission.

TCP also ensures that the segments are reliably


delivered.

TCP segments have a 192 bit (24 byte) header.

Header fields include: source and destination port


identifiers and a packet sequence number used in
message reassembly.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 11
CCE 514 Computer Architecture – 3 Units

TCP Packet
Source Destination Sequence ACK Header Flow CRC-16 Urgent Options
Unused Flags
port port Number number length control pointer User Data

16 16 32 32 4 6 6 16 16 16 32 Varies
bits bits bits bits bits bits bits bits bits bits bits

 Port Number:
 A port number identifies the endpoint of a connection.
 A pair <IP address, port number> identifies one endpoint of a
connection.
 Two pairs <client IP address, server port number> and
<server IP address, server port number> identify a TCP
connection. Applications

23 80 104 Ports 7 80 16
TCP TCP

IP IP

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 12
CCE 514 Computer Architecture – 3 Units

TCP Header Fields


 Flag bits:
 URG: Urgent pointer is valid
• If the bit is set, the following bytes contain an urgent message in the range:
SeqNo <= urgent message <= SeqNo+urgent pointer
 ACK: Acknowledgement Number is valid
 PSH: PUSH Flag
• Notification from sender to the receiver that the receiver should pass all data
that it has to the application.
• Normally set by sender when the sender’s buffer is empty
 RST: Reset the connection
• The flag causes the receiver to reset the connection
• Receiver of a RST terminates the connection and indicates higher layer
application about the reset
 SYN: Synchronize sequence numbers
• Sent in the first packet when initiating a connection
 FIN: Sender is finished with sending
• Used for closing a connection
• Both sides of a connection must send a FIN
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 13
CCE 514 Computer Architecture – 3 Units

TCP Header Fields...


 Sequence Number (SeqNo):
 Sequence number is 32 bits long.
 So the range of SeqNo is
0 <= SeqNo <= 232 -1  4.3 Gbyte
 Each sequence number identifies a byte in the byte stream
 Initial Sequence Number (ISN) of a connection is set during
connection establishment
 Acknowledgement Number (AckNo):
 Acknowledgements are piggybacked, i.e.
a segment from A --> B can contain an acknowledgement for a data sent
in the B --> A direction
 A hosts uses the AckNo field to send acknowledgements. (If a
host sends an AckNo in a segment it sets the “ACK flag”)
 The AckNo contains the next SeqNo that a hosts wants to receive
Example: The acknowledgement for a segment with
sequence numbers 0-1500 is AckNo=1501
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 14
CCE 514 Computer Architecture – 3 Units

TCP Header Fields...


 Acknowledge Number (cont’d)
TCP uses the sliding window flow protocol to
regulate the flow of traffic from sender to receiver
TCP uses the following variation of sliding window:
• no NACKs (Negative ACKnowledgement)
• only cumulative ACKs
 Example:
Assume: Sender sends two segments with “1..1500”
and “1501..3000”, but receiver only gets the second
segment.
In this case, the receiver cannot acknowledge the
second packet. It can only send AckNo=1

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 15
CCE 514 Computer Architecture – 3 Units

TCP Header Fields...


 Header Length ( 4bits):
 Length of header in 32-bit words
 Note that TCP header has variable length (with minimum 20 bytes)

 Window Size:
 Window size is the maximum number of bytes that a receiver can accept.
 Each side of the connection advertises the window size
 Maximum window size is 216-1= 65535 bytes

 TCP Checksum:
 TCP checksum covers both TCP header and TCP data (also covers some
parts of the IP header)

 Urgent Pointer:
 Only valid if URG flag is set

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 16
CCE 514 Computer Architecture – 3 Units

Transport Layer Functions


Linking to the Application Layer
An important transport layer job is knowing which application layer
program to send a message to. This is done using source and destination
port numbers, located in the first two TCP header fields.

Applications sending outgoing messages give TCP both port numbers.


Incoming messages also provide port numbers.

Port addresses are 2-bytes long. Usually, standard port numbers are used:
 Web servers use port number 80
 FTP servers use port number 21
 Telnet, port number 23
 SMTP uses port 25

 Nonstandard port numbers are also possible, but TCP must be specially
configured to use them.

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 17
CCE 514 Computer Architecture – 3 Units

Segmenting
 The application layer sees a message as a single block
(or stream) of data.

 Another transport layer job is breaking large messages


into smaller pieces (segmentation) and putting them
back together at the destination (reassembly).

 The transport layer also decides whether to deliver


incoming packets as
they arrive (as with Web pages) or
to wait until the entire message arrives (as with e-
mail).

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 18
Connection-Oriented Routing
CCE 514 Computer Architecture – 3 Units

TCP
 TCP also handles end-to-end routing, such as setting up a virtual circuit
(called connection-oriented routing).

 Sending data on a virtual circuit means all packets in a message follow the
same route from source to destination.

 The first step in creating a virtual circuit is for the sender to send a special
SYN packet, which requests the virtual circuit and negotiates with the receiver
over what packet size to use.

 Following this, the packets are sent one by one in order from source to
destination using the continuous ARQ.

 Finally, a special FIN packet is sent by TCP to close the virtual circuit.

 HTTP, SMTP, FTP and Telnet all use TCP-based connection-oriented routing.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 19
Connectionless Routing
CCE 514 Computer Architecture – 3 Units

UDP
 Sending packets individually without using a virtual circuit is called
connectionless routing.
 Each packet is sent independently of one another, routed separately and can
follow different routes and arrive at different times.
 With the TCP/IP, the protocol used for connectionless routing is called User
Datagram Protocol (UDP).

 UDP uses only a small packet header (only 8 bytes) that contains only four
fields (source port, destination port, message length and header checksum).
 UDP is commonly used by protocols that send small control messages, such
as
 Streaming multimedia,
 Retransmitting lost/corrupted packets is not worthwhile
 By the time the packet is retransmitted, it’s too late
 E.g., telephone calls, video conferencing, gaming
 DNS, DHCP, RIP and SNMP.
 Overhead of connection establishment is overkill
 Easier to have application retransmit if needed
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 20
CCE 514 Computer Architecture – 3 Units

Reliable Delivery
Reliable delivery means error detection and
correction occurs ensuring that packets are
delivered free of errors. TCP is a reliable protocol

Most error detection techniques work as follows:


An error detection value is first calculated by the
sender and transmitted along with the data.
At the receiving end, the error detection value is
recalculated and checked against the received value.
If the two values are the same, the data has been
received correctly
If they differ, however, an error has occurred and the
data needs to be sent again.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 21
CCE 514 Computer Architecture – 3 Units

Checksum Error Detection


TCP uses a 16 bit checksum calculation on each packet
as an error detection value.

This is done by adding 16 bit pieces of the TCP


packet’s user data field together using “ones-
complement” arithmetic.

The checksum value is then placed in the checksum


field in the TCP segment’s header.

Upon receiving the packet, the checksum is


recalculated and compared to the received value to see
if the data was transmitted error free
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 22
CCE 514 Computer Architecture – 3 Units

Stop-and-Wait Error Correction


 The Stop-and-Wait acknowledgement system is shown
in the next slide.

 First the sender first sends a segment.

 If it was received without error, the receiver sends back


an acknowledgement (ACK)

 When the sender receives the ACK, it sends the next


segment.

 If no ACK is received in a given period of time, a timeout


occurs and the segment is retransmitted by the sender.

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 23
CCE 514 Computer Architecture – 3 Units

Stop-and-Wait Error Correction…

Sender Network Receiver


Send segment 1

Send segment 1
Send ACK 1
Receive ACK 1
Send segment 2
Time

Receive segment 2
Send ACK 2
Receive ACK 2
Send segment 3

Receive segment 3
Send ACK 3

Receive ACK 3

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 24
CCE 514 Computer Architecture – 3 Units

Sliding Window Error Correction


In Sliding Window system, the sender continues
sending packets without waiting for the receiver
to acknowledge their correct receipt.

Sliding window takes less time to send than


stop-and-wait.

Acknowledgements are still sent back by the


receiver once they have been processed and
must include a segment number to identify
which segment was acknowledged.

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 25
CCE 514 Computer Architecture – 3 Units

Sliding Window Error Correction

Sender Network Receiver


Send segment 1
Send segment 2
Send segment 3 Receive segment 1

Send ACK 1

Receive segment 2
Time

Send ACK 2

Receive segment 3

Receive ACK 1 Send ACK 3


Receive ACK 2
Receive ACK 3

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 26
CCE 514 Computer Architecture – 3 Units

Network Layer
 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.

 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
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 27
CCE 514 Computer Architecture – 3 Units

Two key network-layer functions

• Forwarding: move analogy:


packets from router’s  routing: process of
input to appropriate planning trip from
output source to dest
 forwarding: process of
• Routing: determine getting through single
route taken by packets interchange
from source to dest.
routing algorithms

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 28
CCE 514 Computer Architecture – 3 Units

Router architecture overview


Two key router functions:
 running routing protocols (RIP, OSPF, BGP)
 forwarding datagrams from incoming to outgoing link

forwarding tables computed, routing


pushed to input ports routing, management
processor
control plane (software)

forwarding data
plane (hardware)

high-seed
switching
fabric

router input ports router output ports


Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 29
CCE 514 Computer Architecture – 3 Units

Input port functions

lookup,
link forwarding
line layer switch
termination protocol fabric
(receive)
queueing

physical layer:
bit-level reception
data link layer: decentralized switching:
e.g., Ethernet  given datagram dest., lookup output
see chapter 5 port using forwarding table in input
port memory (“match plus action”)
 goal: complete input port processing
at ‘line speed’
 queuing: if datagrams arrive faster
than forwarding rate into switch fabric
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 30
CCE 514 Computer Architecture – 3 Units

Output Ports

datagram
switch buffer link
fabric layer line
protocol termination
(send)
queueing

 buffering required when datagrams arrive from fabric faster than the
transmission rate

 scheduling policy chooses among queued datagrams for


transmission

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 31
CCE 514 Computer Architecture – 3 Units

Switching Fabrics
 Transfer packet from input to correct output buffer

 Switching rate: rate at which packets can be transfer from


inputs to outputs
 often measured as multiple of input/output line rate
 N inputs: switching rate N times line rate desirable

 Three types of switching fabrics

memory

memory bus crossbar

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 32
CCE 514 Computer Architecture – 3 Units

Switching via memory


First generation routers:

 traditional computers with switching under direct control of CPU

 packet copied to system’s memory

 speed limited by memory bandwidth (2 bus crossings per


datagram)

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

system bus

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 33
CCE 514 Computer Architecture – 3 Units

Switching via a bus


 Datagram transferred from input port memory to output
port memory via a shared bus

 Bus contention: switching speed limited by bus


bandwidth

 32 Gbps bus, Cisco 5600: sufficient speed for


access/enterprise routers

bus

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 34
CCE 514 Computer Architecture – 3 Units

Switching via interconnection network

 Overcome bus bandwidth limitations

 Crossbar, banyan networks, other interconnection nets initially


developed to connect processors in multiprocessor

 Advanced design: fragmenting datagram into fixed length cells,


switch cells through the fabric.

 Cisco 12000: switches 60 Gbps through interconnection network

crossbar

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 35
CCE 514 Computer Architecture – 3 Units

Addressing: Internet Protocol


 All devices on the network must have an address.
 A device with an IP address assigned to it is called a Host
 IP is responsible for addressing and routing of data
packets.
 Two versions in current use: IPv4 & IPv6.

 IPv4: uses a 160 bit (20 byte) header, and 32 bit addresses.

 IPv6 was mainly developed to increase IP address space


due to the huge growth in Internet usage during the 1990s.

 IPv6 uses a 320 bit (40 byte) header and 128 bit addresses.

 Header fields include: source and destination addresses,


packet length and packet number.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 36
CCE 514 Computer Architecture – 3 Units

Internet Protocol
Internet Protocol packet ver. 4 (IP v4)
Version Header Type of Total Identifiers Flags Packet Hop Protocol CRC Source DestinationOptions User
number length service length offset limit 16 Address Address data

4 4 8 16 16 3 13 8 8 16 32 32 32 Varies
bits bits bits bits bits bits bits bits bits bits bits bits bits

Internet Protocol packet ver. 6 (IP v6)

Version Header Flow Total Next Hop Source Address Destination User data
number Priority name length Header limit Address

4 4 24 16 8 8 128 128 Varies


bits bits bits bits bits bits bits bits

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 37
CCE 514 Computer Architecture – 3 Units

IPv4 and IPv6 Headers

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 38
CCE 514 Computer Architecture – 3 Units

The Internet network layer

host, router network layer functions:

transport layer: TCP, UDP

routing protocols IP protocol


 path selection  addressing conventions
 RIP, OSPF, BGP  datagram format
network  packet handling conventions
layer forwarding
table
ICMP protocol
 error reporting
 router
“signaling”
link layer

physical layer

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 39
CCE 514 Computer Architecture – 3 Units

IPv4 datagram format


IP protocol version 32 bits
number total datagram
header length length (bytes)
ver head. type of length
(bytes) len service for
“type” of data fragment fragmentation/
16-bit identifier flgs
offset reassembly
max number time to upper header
remaining hops live layer checksum
(decremented at
32 bit source IP address
each router)
32 bit destination IP address
upper layer protocol
to deliver payload to options (if any) e.g. timestamp,
record route
how much overhead? data taken, specify
 20 bytes of TCP (variable length, list of routers
 20 bytes of IP typically a TCP to visit.
 = 40 bytes + app
or UDP segment)
layer overhead
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 40
CCE 514 Computer Architecture – 3 Units

IP fragmentation, reassembly
 network links have MTU
(max. transfer unit) that
limits link-layer frame size
 different link types have fragmentation:
in: one large datagram
different MTUs out: 3 smaller datagrams

 large IP datagram
chopped (“fragmented”) Reassembly
in network into several Fragments
datagrams
 “reassembled” only at final
destination
 IP header bits used to
identify, order fragments

Each of these smaller datagrams is referred to as a fragment.


Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 41
CCE 514 Computer Architecture – 3 Units

IP fragmentation, reassembly…
example:
 4000 byte datagram length ID fragflag offset
(20 bytes IP header + =4000 =x =0 =0
3980 data bytes( IP
payload)) one large datagram becomes
several smaller datagrams
 MTU = 1500 bytes
1480 bytes in length ID fragflag offset
data field =1500 =x =1 =0

offset = length ID fragflag offset


1480/8 =1500 =x =1 =185

length ID fragflag offset


=1040 =x =0 =370

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 42
CCE 514 Computer Architecture – 3 Units

Addressing

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 43
CCE 514 Computer Architecture – 3 Units

Assigning Addresses
 The Internet uses three kinds of addresses:
 Application layer addresses (domain names) are assigned by
network managers and placed in configuration files.
 Some servers have more than one application layer address
 Network layer addresses (IP addresses) are also assigned by
network managers, or by programs such as DHCP, and placed in
configuration files.
 Every network on the Internet is assigned a range of possible IP addresses
for use on its network
 Data link layer addresses are hardware addresses placed on
network interface cards by their manufacturers

 Servers have permanent addresses, clients usually do not.

 For a message to travel from sender to receiver, these


addresses must be translated from one type to another.
This process is called address resolution.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 44
CCE 514 Computer Architecture – 3 Units

IPv4
 IPv4, uses 4 byte (32 bit) addresses which are really
strings of 32 bits.

 To make IP addresses easier to understand for human


readers, dotted decimal notation is used.

 Dotted decimal notation breaks the address into four


bytes separated by periods and writes the digital
equivalent for each byte.

 An example of an IP address in dotted decimal notation


would be: 50.28.9.21

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 45
CCE 514 Computer Architecture – 3 Units

Hierarchical IPv4 Address

32 bits

Network Portion Host Portion

8 bits 8 bits 8 bits 8 bits


(Octet) (Octet) (Octet) (Octet)

194 168 18 57

Network Host

Complete IPv4 Address

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 46
CCE 514 Computer Architecture – 3 Units

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.

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 47
CCE 514 Computer Architecture – 3 Units

Connectionless

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 48
CCE 514 Computer Architecture – 3 Units

Best Effort

An unreliable Network layer protocol, IP does not guarantee


that all sent packets will be received.

Other protocols manage the process of tracking packets and


ensuring their delivery.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 49
CCE 514 Computer Architecture – 3 Units

Media Independent
 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.
 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).
 MTU – Maximum packet size, in bytes, that a particular interface can
handle

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 50
CCE 514 Computer Architecture – 3 Units

IPv4 Legacy Addressing


 Classful Addressing:
 Class A block
Unicast
 Class B block Addresses
 Class C block
 Class D block - Multicast
 Class E block - Experimental

 Class A
 A class A address block was designed to support extremely large networks
with more than 16 million host addresses.
 Class A IPv4 addresses used a fixed /8 prefix with the first octet to indicate
the network address. The remaining three octets were used for host
addresses.
 Class B
 Class B address space was designed to support the needs of moderate to
large size networks with more than 65,000 hosts. A class B IP address used
the two high-order octets to indicate the network address.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 51
CCE 514 Computer Architecture – 3 Units

Classes of IPv4 addresses


 Class C Blocks
 The class C address space was the most commonly available of the
historic address classes.
 This address space was intended to provide addresses for small
networks with a maximum of 254 hosts.

32 bits
Network
Host Identifier
Class A Identifier
0 8 16 24 32

Class B Network Identifier Host Identifier

0 8 16 24 32

Class C Network Identifier Host Identifier

0 8 16 24 32

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 52
CCE 514 Computer Architecture – 3 Units

Classes of IPv4 addresses...

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 53
CCE 514 Computer Architecture – 3 Units

Classes of IPv4 addresses...

Class Range of Values


A 0 through 127
B 128 through 191
C 192 through 223
D 224 through 239
E 240 through 255

Example: Class A = 119.x.x.x = 01110111

Example: Class B = 190.x.x.x = 10111110

Example: Class C = 200.x.x.x = 11001000

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 54
CCE 514 Computer Architecture – 3 Units

IPv4 Address Class: Network and Host

Class Network Host Number of Number of


ID Bits ID Bits Networks Hosts
A 8 24 27– 2 2 24 – 2
7
= 126 = 16,777,214
B 16 16 2 14 – 2 2 16 – 2
14 =16,382 = 65,534
C 24 8 22 1 – 2 28 – 2
=2,097,150 = 254
21

all-0’s and all-1’s (in the Network ID


and/ or Host ID parts) have special
meanings.

Hence the subtraction of 2 from both


the numbers of Networks and Hosts
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 55
CCE 514 Computer Architecture – 3 Units

Limits to the Class-based System

 Not all organizations' requirements fit well into one of


these three classes.

 Classful allocation of address space often wasted


many addresses, which exhausted the availability of
IPv4 addresses.
 For example, a company that had a network with
260 hosts would need to be given a class B address
with more than 65,000 addresses.

 Classful system was all but abandoned in the late


1990s
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 56
CCE 514 Computer Architecture – 3 Units

The Need for IPv6 Addressing


 IPv4’s 32 bit addresses correspond to a total of one billion
possible addresses.

 Because IP addresses have been allocated in very large


groups, giving out many numbers at a time, IPv4 address
space has been used up quickly.

 For example, Indiana University was allocated a Class A IP


address space which includes 65,000 addresses, many
thousands more than the university needed.

 IPv6 uses 128 bit addresses, corresponding to 3.2 x 1038


possible addresses. Given how large a number this is, the
problem of using up the huge IPv6 address space will likely
not be an issue for some time, if ever.
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 57
CCE 514 Computer Architecture – 3 Units

IPv6 Motivation
 initial motivation: 32-bit address space soon to be
completely allocated.
 additional motivation:
 header format helps speed processing/forwarding
 header changes to facilitate QoS

IPv6 datagram format:


 fixed-length 40 byte header
 no fragmentation allowed

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 58
CCE 514 Computer Architecture – 3 Units

IPv6 datagram format


priority: identify priority among datagrams in flow
flow Label: identify datagrams in same “flow.”
(concept of“flow” not well defined).
next header: identify upper layer protocol for data

ver pri flow label


payload len next hdr hop limit
source address
(128 bits)
destination address
(128 bits)

data

32 bits
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 59
CCE 514 Computer Architecture – 3 Units

Other changes from IPv4


 checksum: removed entirely to reduce processing time at
each hop
 options: allowed, but outside of header, indicated by “Next
Header” field
 ICMPv6: new version of ICMP
 additional message types, e.g. “Packet Too Big”
 multicast group management functions

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 60
CCE 514 Computer Architecture – 3 Units

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
IPv4 datagram

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 61
CCE 514 Computer Architecture – 3 Units

Tunneling
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: F
dest: E
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
IPv6 inside IPv6 inside
IPv4 IPv4
Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 62
Who Assigns the Different
CCE 514 Computer Architecture – 3 Units

Addresses
IP address assignment is managed by ICANN (Internet
Corporation for Assigned Names and Numbers)
ICANN is a non-profit corporation that was formed to assume
responsibility for the IP address space allocation,
protocol parameter assignment,
domain name system management, and
root server system management functions previously performed
under U.S. Government contract by IANA and other entities

ICANN assigns portions of the IP address space to other


authorities.

Some of the authorities which assign addresses to ISPs


Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 63
Who Assigns the Different
CCE 514 Computer Architecture – 3 Units

Addresses...
 Internet Assigned Numbers Authority (IANA) ( http://www.iana.net ) is the
master holder of the IP addresses.
 IANA is a department of ICANN
 The IP multicast addresses and the IPv6 addresses are obtained directly from
IANA. Until the mid-1990s, all IPv4 address space was managed directly by the
IANA. At that time, the remaining IPv4 address space was allocated to various
other registries to manage for particular purposes or for regional areas.
 These registration companies are called Regional Internet Registries (RIRs).

 The major registries are:

 AfriNIC (African Network Information Centre) - Africa Region http://www.afrinic.net


 APNIC (Asia Pacific Network Information Centre) - Asia/Pacific Region
http://www.apnic.net
 ARIN (American Registry for Internet Numbers) - North America Region
http://www.arin.net
 LACNIC (Regional Latin-American and Caribbean IP Address Registry) - Latin
America and some Caribbean Islands http://www.lacnic.net
 RIPE NCC (Reseaux IP Europeans) - Europe, the Middle East, and Central Asia
http://www.ripe.net

Engr. Prof. Christopher U. Ngene, Dept. of Communication and Computer Engineering, ATBU , email:ngene@unimaid.edu.ng 64

You might also like