Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim...

19
1 Session 8. TCP/IP Dongsoo S. Kim ([email protected] ) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis 12/2/2004 EE547 Intro. to Computer Communication Networks, ECE/IUPUI 8-2 IP Packet Version n The current version is 4 n Real-time stream protocol is 5 n IPv6 uses 6 Version IHL Type of Service Total Length Identification Flags Fragment Offset Time to live Protocol Header checksum Source IP address Destination IP address Options Padding 0 4 8 16 19 31

Transcript of Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim...

Page 1: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

1

Session 8.TCP/IP

Dongsoo S. Kim ([email protected]) Electrical and Computer EngineeringIndiana U. Purdue U. Indianapolis

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-2

IP Packet

Versionn The current version is 4n Real-time stream protocol is 5n IPv6 uses 6

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to live Protocol Header checksum

Source IP address

Destination IP address

Options Padding

0 4 8 16 19 31

Page 2: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

2

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-3

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to live Protocol Header checksum

Source IP address

Destination IP address

Options Padding

IP Packet, 2IHL (Internet Header Length)n In 32-bit wordn The default value is 5 (20 bytes)n The maximum is 15 (60 bytes)

TOS (Type of Service)n 3-bit priority (precedence) n 4-bit specific requirement (delay, throughtput, reliability, cost)n Ignored by most of IP routers

Total Lengthn In bytesn Including header and datan The maximum length is 65536 bytes

Identification, Flags, and Fragment offsetn Used for fragmentation and reassembly

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-4

IP Packet, 3

TTL (Time To Live)n The amount of time in seconds the packet is allowed to remain in the networkn Practically, indicate the number of hops the packet is allowed to traveln Each router decrements this by onen The router discards a packet with TTL=0, and send an error message

Protocoln 6 for TCPn 17 for UDPn 1 for ICMP

Header checksumn RFC 1071

Source IP address and Destination IP addressOptionsn Variable lengthn For new protocols

Paddingn To make the header a multiple of 32-bit words

Version IHL Type of Service Total Length

Identification Flags Fragment Offset

Time to live Protocol Header checksum

Source IP address

Destination IP address

Options Padding

Page 3: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

3

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-5

IP Address, OverviewTwo levels – network ID and host IDA unique address to each computer?n Dual-home server or router system has two or more IP addressesn NAT (Network Address Translation)

Address Classes

0

10

110

1110

11110

Network ID

Network ID

Network ID

Host ID

Host ID

Host ID

Multicast address

Reserved for experiments

0 1 2 3 16 24 318Class A

Class B

Class C

Class D

Class E

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-6

IP Address, StructureNetwork Classesn Class A – 7-bit net ID, 24-bit host IDn Class B – 14-bit net ID, 16-bit host IDn Class C – 21 bit net ID, 8-bit host IDn Class D – 28-bit group ID for multicast services (MBONE)n Class E – reserved

Special Host IDn All zeroes – network addressn All ones – broadcast addressn Eg) IUPUI has an class B address

10000110 01000100

10000110 01000100

10000110 01000100

?

00000000 00000000

11111111 11111111

IUPUI Network

broadcast to all hosts in IUPUI network

Page 4: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

4

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-7

IP Address, NotationDotted-decimal Notation Each byte is represented by a DECIMAL number, separated by a dotn Example

w 10000110 01000100 00000001 00001001⇒ 134.68.1.9

Software Loopback addressn 127.x.y.z (mostly 127.0.0.1)

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-8

Subnet AddressingProblem of fixed IP hierarchyn IUPUI has a class B address, which supports 65,536 hostsn How to organize this many hostsn A router supporting 224 hosts (Class A), 216 hosts (Class B)

w The size of routing table and the time complexity for searching

Subnet - another hierarchical leveln Flexible and transparent

Subnet maskn Indication of (net ID + subnet ID) with binary 1’sn The portion of host ID contains all 0’sn Example - 11111111 11111111 11111111 10000000 (255.255.255.128)n Notation of IP address (IP address/subnet mask)

w 134.68.6.132/255.255.255.128, or 134.68.6.132/25

n Operation of subnet maskw Network_address = IP & MASK // 134.68.6.128w Broadcast_address = IP | ~MASK // 134.68.6.255

Network ID Host IDSubnet ID

Page 5: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

5

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-9

134.68.6.0/255.255.255.0

Address Assignment with Subnet

134.68.6.128/255.255.255.128

134.68.6.0/255.255.255.128

134.68.6.64/255.255.255.192

R1

134.68.6.129/25

H1 H2

H5 H6

H4H3

R2

134.68.6.1/25

134.68.6.164/25134.68.6.149/25

134.68.6.54/25134.68.6.9/25

134.68.6.60/25

134.68.6.65/26

134.68.6.74/26 134.68.6.100/26

Inte

rnet

134.68.7.102

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-10

IP RoutingAn IP packet is eithersent directly to the destination host, orsend to an appropriate router To reduce the size of table, group address can be usedRouting Table Searchn Search an host ID (a complete destination ID)n Search an group ID n Search a default gatewayn Not found – host unreachable ICMP packet

Router – If the destination address is not its own, refer the routing table to determine the next hop

Eth0G134.68.6.129AnyDefault

Eth0GDirect255.255.255.128134.68.6.128

Eth0H134.68.6.149255.255.255.255134.68.6.149

H

Flags

Lo0127.0.0.1255.255.255.255127.0.0.1

InterfaceNext HopMaskDestinationRouting table for H1

Page 6: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

6

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-11

Classless Interdomain Routing (CIDR)Motivationn Shortage of Class B address spacesn No demand for Class C address spacesn Gigantic Class A address spaces

Solutionn Subnetting and Supernetting in routers with submaskn Supernet – utilize contiguous class C addresses

Routingn Routing table with submaskn If there are two entries matching an address, use the longest prefix match first

1111 1111 . 1111 1111 . 1111 1100 . 0000 0000Mask

1100 1101 . 0110 0100 . 0000 0011 . 0000 0000205.100.3.0

1100 1101 . 0110 0100 . 0000 0010 . 0000 0000205.100.2.0

1100 1101 . 0110 0100 . 0000 0001 . 0000 0000205.100.1.0

1100 1101 . 0110 0100 . 0000 0000 . 0000 0000205.100.0.0

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-12

Address Resolution Protocol (ARP)Between IP and a DL protocolOperationn A host know the destination IP address, but not the destination MAC

addressn ARP Table – list of IP and MAC address (initially empty and aged)n If a host need a MAC address, send an ARP request with MAC addressn The intended host sends back an ARP response with a MAC address

134.68.6.12

08:00:5A:C5:3B:94

134.68.6.54

08:00:38:A4:3F:12

134.68.6.12 08:00:5A:C5:3B:94134.68.6.54 ?

ARP Request - Broadcast

134.68.6.12 08:00:5A:C5:3B:94134.68.6.54 08:00:38:A4:3F:12

ARP Response – One2One

Page 7: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

7

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-13

Reverse Address Resolution Protocol (RARP)

MAC address in a firmware; IP address in softwareApplicationn Diskless X terminaln Dynamic host configuration – reuse IP address spaces

RARP server

08:00:5A:C5:3B:94

134.68.6.54

08:00:38:A4:3F:12

? 08:00:5A:C5:3B:94FF:FF:FF:FF:FF:FF

RARP Request - Broadcast

134.68.6.12 08:00:5A:C5:3B:94RARP Response

RARP serverDiskless X terminal

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-14

Fragmentation and ReassemblyMaximum Transfer Unit (MTU)n Ethernet – 1500 bytesn FDDI – 4464 bytes

An IP router can break an IP packet into smaller fragments whose size is no larger than the MTU of the forwarding physical network, unless it says “don’t”The destination IP will reassemble the fragments. Note that intermediate routers won’t reassemble themFields for FAR (SAR:Segmentation and Reassembly)n Identificationn Flagsn Fragment offset

Page 8: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

8

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-15

Operation of FARIdentificationn The source host generates the unique ID

Flags (3-bits)n Unused bitn DF bit (Don’t Fragment)

w 1 – force the router not to fragment the packet. If the packet length is greater than the MTU, the router will discard the packet and send an error message to the source

n MF bit (More Fragment)w 1 – tell the destination whether or not more fragments follow

Offsetn Unit of 8-byte (why?) n Between the beginning of the packet to be fragmented and the

beginning of the fragmentIntelligent Router (Switch)n PPD (Partial Packet Discard)n EPD (Early Packet Discard)

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-16

Example of FAR

…(34,000,0)… Payload (1484 bytes)

Router

MTU=576

…(34,001,0)…

…(34,001,69)…

…(34,000,138)…

Payload (552 bytes)

Payload (552 bytes)

Payload (380 bytes)

69x8=552

138x8=1104

Page 9: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

9

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-17

Internet Control Message Protocol (ICMP)

Send an error message back to the source to report routing problemsn To provide feedback, not to make IP reliablen No ICMP message are sent about ICMP messagesn ICMP message are only sent about errors in handling fragment zero of

fragmented datagramsEncapsulated by IP packets (Protocol=1)Type of ICMP Messagesn Destination Unreachable Message (3)n Time Exceeded Message (11)n Parameter Problem Message (12)n Source Quench Message (4)n Redirect Message (5)n Echo Message(8) and Echo Reply Message (0)n Timestamp Message (13) and Timestamp Reply Message (14)n Information Request Message (15) and Information Reply Message (16)

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-18

User Datagram Protocol (UDP)Unreliable and connectionless

Main functions: demultiplexing and error checkingApplicationsn TFTP (Trivial File Transfer Protocol)n DNS (Domain Name System)n SNMP (Simple Network Management Protocol)n RTP (Real-time Transport Protocol)

No checksum is calculated if the UDP checksum field contains allzero

Source Port Destination PortUDP Length UDP Checksum

Data

0 16 31

Page 10: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

10

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-19

Transmission Control Protocol (TCP)Connection-oriented, reliable, in-sequence, byte-stream, flow controlMain functionsn Acknowledge

w Selective repeat ARQw Long sequence number to count the number of bytes (32bits, count up to

4 Gigabytes)n Flow control

w Dynamic advertised windown Advertised window size = buffer size – (Rnew – Rnext)n Rnew: the highest numbered byte that has been received correctlyn Rnext: the lowest numbered byte that has not yet been received correctly (the

next byte it expects to receive)

n Retransmission w Set a timer each time a segment is transmittedw How much do we need to set? (Dynamic behavior of TCP/IP)w Adaptive timer using the average round-trip time (tRTT)w Averaging samples in a real-time? Too much overhead!

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-20

Exponential Mean and DeviationThe Fourth Mean, after arithmetic mean, harmonic mean, and geometric meanThe weights α and β instruct how fast they can forget the historySuitable for a real-time computationn One sample at a timen Modification to an integer operation (addition, subtraction,

multiplication, shift, but no division and floating-point)

nnnn

nnn

txdd

xtt

−−+=

−+=

)1(deviation

)1(mean

1

1

ββ

αα

,,,,, samplesFor 121 +nn xxxx L

Page 11: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

11

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-21

Timeout Calculation

Notation n tn: exponential mean of round-trip timen dn: exponential deviation of round-trip timen c: some constant

If the round-trip time is highly fluctuated, then a larger timeout value is usedIf the round-trip time is stable, the timeout value is slightly larger than the mean

nnout cdt +=t

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-22

TCP Format, Overview

HeaderLength

Reserved

Checksum

Window Size

Options Padding

Data

Urgent Pointer

Source Port Destination Port

Sequence Number

Acknowledgement Number

0 4 10 16 31

URG

ACK

PSH

RST

SYN

FIN

Page 12: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

12

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-23

TCP Format, 1Source port and Destination port: identify the sending and receiving applicationsSequence number: the first data byte of this segmentn For the initial connection establishment (SYN=1), it is the init ial

sequence number (ISN)Acknowledgement number: the sequence number of the next data byte expected to receiveHeader Length: the length of the TCP header in 32-bit words (to handle the variable option field)URG: the urgent field is valid if this is setACK: the acknowledgement number filed is valid if this is setPSH: tells the receiver to handle this packet immediately (Flush)RST: tells the receiver to abort the connection (Reset)SYN: requests a connectionFIN: tell the receiver there is no more data left (Final)

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-24

TCP Format, 2Window size: dynamic advertised window sizeChecksumUrgent point: sequence # + urgent pt = the last byte of urgent data if URG=1Optionsn MSS (Maximum Segment Size) during connection setup

Page 13: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

13

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-25

TCP, Connection EstablishmentThree-way Handshake

Host A Host B

SYN, Seq_no = x

SYN, Seq_no = y, ACK, Ack_no = x+1

Seq_no = x+1, ACK, Ack_no = y+1

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-26

TCP, Client/Server

connect (blocks)

Host A (Client) Host B (Server)

SYN, Seq_no = x

SYN, Seq_no = y, ACK, Ack_no = x+1

Seq_no = x+1, ACK, Ack_no = y+1

socketbindlistensocket

connect returns

accept returns

writeread (blocks)

read returns

request message

reply message

accept (blocks)

Writeread (blocks)

read (blocks)

read returns

Page 14: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

14

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-27

TCP, Data TransferHost A Host B

Seq_no = 3024, Ack_no = 1, Win = 1024, Data = 3024-4047

Seq_no = 1, Ack_no = 4048, Win = 512, Data = 1-128

Seq_no = 2000, Ack_no = 1, Win = 1024, Data = 2000-3023

Seq_no = 4048, Ack_no = 129, Win = 1024, Data = 4048-4559

t1

t2

t3

t4

Seq_no = 1, Ack_no = 2000, Win = 2048, No Data t0

piggyback

Adjust window

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-28

TCP, Connection Termination

FIN, seq = 5086

ACK = 5087

Data, seq. = 303, ACK = 5087

Deliver 150 bytes

FIN, seq. =453, ACK = 5087

ACK = 454

Host A Host B

ACK = 453

Page 15: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

15

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-29

Dynamic Host Configuration Protocol (DHCP)

On BOOTP (Bootstrap Protocol), port # 67 for server, 68 for clientn Diskless workstation to be remotely booted up

Assign temporary IP addresses to hostsOperationn Broadcast DHCP Discover messagen The server responds with a DHCP Offer message (IP address

and other configuration information)n Select one DHCP offer among servers, and broadcast a DHCP

Request message with the ID of the servern The server sends a DHCP ACK message and assigns the IP

address for some period of timen The host can extend the expiration time

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-30

Overview of Routing ProtocolsAutonmous System (AS)n Stub AS – single-homed ASn Multihomed AS – multiple connection to the outside but no transit

trafficn Transit AS – multiple connection to the outside and carry transit and

local trafficGlobally unique AS number (ASN)Classes of routing protocolsn Interior Gateway Protocol (IGP) – within an AS, use IP addresses

w Deal with performancew Routing Information Protocol (RIP)w Open Shortest Path First (OSPF)

n Exterior Gateway Protocol (EGP) – among AS’s, use AS numbers w Deal with policiesw Border Gateway Protocol (BGP)

Page 16: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

16

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-31

Routing Information Protocol (RIP)Based on distance-vector algorithm

Operating on UDP port number 520Metrics – the number of hops (maximum=15 and infinity=16)Exchange “update message” every 30 secUse “split horizon with poisoned reverse” for a fast convergencen The minimum cost to a given destination(Y) is set to infinity if the

neighbor(Z) is the next node along the shortest path. n A --- X --- Z -*- Yn Z sends the infinity minimum cost(Y) to Xn X sends the infinity minimum cost(Y) to A

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-32

RIP FormatCommandn 1 : request the other system to send its routing infon 2 : response containing the routing info

Versionn 1 : RIP-1, 2 : RIP-2

Addr Family ID (2 for IP)IP Address : Destination address either a network or host addressMetric : # of hops to the destination in the range of 1 to 15, infinity(16)

Command Version Zero Zero Addr Family ID

IP addressZeroZeroMetric

Other RIP entries

0 8 16 31

RIP Entry

Page 17: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

17

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-33

Open Shortest Path First (OSPF)Base on the link-state routing algorithmIGPFeaturesn Multiple routes to a given destination, one for each IP TOSn Support CIDR (Classless InterDomain Routing)n Flexible link cost (16-bit)n Load balancing over multiple pathsn Authentication for trusted neighbors

n Multicast rather than broadcastn Election of designated router

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-34

OSPF, BasicAreas in OSPFn Area ID (32 bit)n Special area in an AS (backbone area: 0.0.0.0)

Types of routers in OSPFn Internal router – all links in the same arean Area border router – links connected to more than one area

w ABR summarizes one area information

n Backbone router – links to the backbonen AS border router – links to another AS

Page 18: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

18

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-35

OSPF, Sample

R1

R2

R7

R5

N2

N1

N3

N4

N5

N6

N7

Area 0.0.0.1

Area 0.0.0.2

Area 0.0.0.3

To another AS

Area 0.0.0.0

R6

R8

R4

R3

Intern

al Ro

uter

Intern

al Ro

uterInt

ernal

Route

r

Area

Borde

r Rou

ter

Area

Borde

r Rou

ter

Area

Borde

r Rou

ter

Backb

one R

outer

Backb

one R

outer

Backb

one R

outer

Backb

one R

outer

Backb

one R

outer

AS Bro

der

Route

r

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-36

OSPF, FormatRun directly over IP (Protocol 89)OSPF Header Packet Formatn Type

w Hello, Database description, Link-state request, Link-state update, Link-state acknowledgements

Version (2) Type Packet Length (in byte)

Router ID (sending router)

Area ID

Checksum Authentication type

Authentication

Authentication

Data

OSPF Header

Page 19: Session 8. TCP/IPet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch08.pdfTCP/IP Dongsoo S. Kim (dskim@iupui.edu) Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

19

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-37

OSPF, OperationStage 1: discovery of neighbors, and election of designated routersn Transmit “hello” packet to each interface every 10 secn Respond the hello packet attaching router Ids it has seenn Elect designated router based on the priority and ID

Stage 2: Establishing adjacencies and synchronizing databasen “database description”n Flood link-state info within the area onlyn ABR summarizes the info, and sends them to other area routers and

ASBRsStage 3: Propagation of link-state info, and building of routing tablen “link-state request”, “link-state update”, and “link-state ack”n Use reliable floodingn Repeated “link-state update” until receiving its acknowledge

12/2/2004

EE547 Intro. to Computer Communication Networks, ECE/IUPUI

8-38

Reading AssignmentLeon-Garcia and Widjaja “Communication Networks: Fundamental Concepts and Key Architecture” 2000, pp 544 – 618