Anda di halaman 1dari 71

Chapter 8 TCP/IP

Chapter Figures

Application

Application

TCP

UDP

ICMP

IP

ARP

RARP

Network interface

Leon-Garcia/Widjaja

Communication Networks

Figure 8.1

HTTP Request

Header contains source & destination port numbers Header contains source and destination IP addresses; transport protocol type Header contains source & destination physical addresses; network protocol type Ethernet header

TCP header

IP header

FCS

Leon-Garcia/Widjaja

Communication Networks

Figure 8.2

Machine A
Application layer Transport layer Internet layer Network interface layer

Machine B
Application layer

Router/gateway
Internet layer Network interface layer

Transport layer Internet layer Network interface layer

Network 1

Network 2

Leon-Garcia/Widjaja

Communication Networks

Figure 8.3

0 Version

4 IHL

8 Type of service

16

19

24 Total length

31

Identification Time to live Protocol

Flags

Fragment offset Header checksum

Source IP address Destination IP address Options Padding

Leon-Garcia/Widjaja

Communication Networks

Figure 8.4

Leon-Garcia/Widjaja

Communication Networks

Figure 8.5

Bit position: Class A

0 1 2 3 0 Net ID

16 Host ID

31

Class B

1 0

Net ID

Host ID

Class C

1 1 0

Net ID

Host ID

Class D

1 1 1 0

Multicast address

Class E

1 1 1 1

Reserved for experiments

Leon-Garcia/Widjaja

Communication Networks

Figure 8.6

Original address

1 0

Net ID

Host ID

Subnetted address 1 0

Net ID

Subnet ID

Host ID

Leon-Garcia/Widjaja

Communication Networks

Figure 8.7

H1
150.100.12.154 150.100.12.128 150.100.12.129 150.100.0.1 To the rest of the Internet

H2
150.100.12.176

R1
150.100.12.4

H3
150.100.12.24

H4
150.100.12.55

150.100.12.0 150.100.12.1

R2
150.100.15.54 150.100.15.0

H5
150.100.15.11

Leon-Garcia/Widjaja

Communication Networks

Figure 8.8

H1
150.100.76.20

H2
150.100.76.21

H3
150.100.76.22

H4
150.100.76.23

ARP request (what is the MAC address of 150.100.76.22?)

H1

H2

H3

H4

ARP response (my MAC address is 08:00:5a:3b:94)

Leon-Garcia/Widjaja

Communication Networks

Figure 8.9

Leon-Garcia/Widjaja

Communication Networks

Figure 8.10

Source IP

Router

Destination IP

Network

Network

Leon-Garcia/Widjaja

Communication Networks

Figure 8.11

0 Type

8 Code

16 Checksum Unused

31

IP header and 64 bits of original datagram

Leon-Garcia/Widjaja

Communication Networks

Figure 8.12

0 Type

8 Code Identifier

16 Checksum Sequence number Data

31

Leon-Garcia/Widjaja

Communication Networks

Figure 8.13

Leon-Garcia/Widjaja

Communication Networks

Figure 8.14

Leon-Garcia/Widjaja

Communication Networks

Figure 8.15

0 Version

4 Traffic class Payload length

12

16

24 Flow label Next header Hop limit

31

Source address

Destination address

Leon-Garcia/Widjaja

Communication Networks

Figure 8.16

Leon-Garcia/Widjaja

Communication Networks

Figure 8.17

n bits 010 Registry ID

m bits Provider ID

o bits Subscriber ID

p bits Subnet ID

(125-m-n-o-p) bits Interface ID

Leon-Garcia/Widjaja

Communication Networks

Figure 8.18

Basic header Next header = TCP

TCP segment

Basic header Next header = routing

Routing header Next header = fragment

Fragment header Next header = authentication

Authentication header Next header = TCP

TCP segment

Leon-Garcia/Widjaja

Communication Networks

Figure 8.19

0 Next header

8 0

16 194

24 Opt len = 4

31

Jumbo payload length

Leon-Garcia/Widjaja

Communication Networks

Figure 8.20

0 Next header

8 Reserved

16 Fragment offset Identification

29

31

Res M

Leon-Garcia/Widjaja

Communication Networks

Figure 8.21

0 Next header Reserved

8 Header length

16 Routing type = 0 Strict/loose bit mask

24 Segment left

31

Address 1

Address 2

...
Address 24

Leon-Garcia/Widjaja

Communication Networks

Figure 8.22

Source

Tunnel head-end Tunnel

Tunnel tail-end

Destination

(a) IPv6 network

IPv6 header IPv4 network

IPv4 header

IPv6 network

Source Link

Destination

(b) IPv6 network IPv6 network

Leon-Garcia/Widjaja

Communication Networks

Figure 8.23

0 Source Port UDP Length

16 Destination Port UDP Checksum

31

Data

Leon-Garcia/Widjaja

Communication Networks

Figure 8.24

16 Source IP address Destination IP address

31

00000000

Protocol = 17

UDP length

Leon-Garcia/Widjaja

Communication Networks

Figure 8.25

Application byte stream

Application byte stream

Segments
Transmitter Receiver

Send buffer ACKs

Receive buffer

Leon-Garcia/Widjaja

Communication Networks

Figure 8.26

10 Source port

16

24 Destination port

31

Sequence number Acknowledgment number Header length Reserved Checksum Options


U A P R S F R C S S Y I G K H T N N

Window size Urgent pointer Padding

Data

Leon-Garcia/Widjaja

Communication Networks

Figure 8.27

16 Source IP address Destination IP address

31

00000000

Protocol = 6

TCP segment length

Leon-Garcia/Widjaja

Communication Networks

Figure 8.28

Host A
SYN, Seq

Host B

_n o = x

_n o q e S , N SY

= y, A

no = _ k c A , CK

x+1

S eq_n

o = x+ 1, ACK

, A ck_

no = y

+1

Leon-Garcia/Widjaja

Communication Networks

Figure 8.29

Host A
SYN, Seq _n o = n

Host B

SYN,

c k _n o = A , K C A n, S e q _n o =

n+1

S eq_n

o = n+

1, ACK

, A ck_

no = n +1

Delayed segment with Seq_no = n+2 will be accepted

Leon-Garcia/Widjaja

Communication Networks

Figure 8.30

Leon-Garcia/Widjaja

Communication Networks

Figure 8.31

Host A (client)

Host B (server)

socket t1 connect (blocks) t

SYN, Seq

_n o = x

socket bind listen accept (blocks)


= x+1

connect returns t3 write read (blocks)

eq_n SYN, S

o=y

_no k c A , K , AC

S eq_n

o = x+ 1, ACK
Re q u e s

, A ck_

no = y

+1

t5

t messa

ge

t4 accept returns read (blocks) t6 read returns write read (blocks)

sa g e Reply mes

read returns
Leon-Garcia/Widjaja Communication Networks Figure 8.32

Host A

Host B

ata 48, No D 0 2 = in 00, W _no = 20 k c A , 1 = Seq_no


Seq_no = 2000, Seq_no = 3024,

t0

t1 t2

Ack_no = 1, Ack_no = 1,

Win = 102 4, Data = Win = 102 4, Data =

2000-302 3

3024-404 7

= 12, Data 5 = in W 048, k_no = 4 c A , 1 = Seq_no


Seq_no = 4048,

1-128

t3

t4

Ack_no = 129, Win = 1024, D ata = 404 8-4559

Leon-Garcia/Widjaja

Communication Networks

Figure 8.33

Data

Header contains source and destination port numbers

TCP Header

Header contains: source and dest. IP addresses; transport protocol type

IP Header

Leon-Garcia/Widjaja

Communication Networks

Figure 8.34

Host A
FIN, seq = 5086
7

Host B

Ack = 5 0 8

Deliver 150 bytes

0 3 , Ac k 3 = . q e s , ta Da

=5087

Ack = 45 3

F I N, s e q

A ck = . = 453,

508 7

Ac k = 4 5

Leon-Garcia/Widjaja

Communication Networks

Figure 8.35

CLOSED Applipassive open, cation create TCB close , YN CK LISTEN S e A v , ei se rec d SYN nd e v i n e e SY s rec T application close N S R or timeout, receive SYN, SYN_SENT delete TCB SYN_RCVD send ACK ive CK, rece e ive A rec N, A ACK CK SY end application s ESTABLISHED re close, ceiv e, e FI send s s e o l n N, dA c n FIN C o K ati FIN c i l d p CLOSE_WAIT ap sen receive FIN application close CLOSING FIN_WAIT_1 send ACK send FIN re receive c se eiv nd e LAST_ACK ACK receive receive AC FIN ACK K ,A ACK CK receive FIN 2MSL timeout FIN_WAIT_2 TIME_WAIT send ACK delete TCB
e tiv ac , en op B TC N te SY ea d cr en s
Leon-Garcia/Widjaja Communication Networks Figure 8.36

20

Congestion avoidance Time-out

Congestion window

15 Threshold 10 Slow start

0 Round-trip times
Leon-Garcia/Widjaja Communication Networks Figure 8.37

0 Command

8 Version

16 Zero Zero

31

Address family identifier IP address Zero Zero

...
Figure 8.38

Metric

Leon-Garcia/Widjaja

Communication Networks

To another AS N1 R1 N2 R2 R3 R6 N4 N5 R7 N6 R5

R4

N3 Area 0.0.0.1 R8 Area 0.0.0.0 Area 0.0.0.2

N7

Area 0.0.0.3

R = router N = network

Leon-Garcia/Widjaja

Communication Networks

Figure 8.39

0 Version

8 Type

16 Packet length Router ID Area ID

31

OSPF common

Checksum

Authentication type

header

Authentication

Authentication
OSPF

Data

packet body

Leon-Garcia/Widjaja

Communication Networks

Figure 8.40

16 Network mask Hello interval Dead interval Designated router Backup designated router Neighbor 1 Options

24

31

Priority

...
Neighbor n

Leon-Garcia/Widjaja

Communication Networks

Figure 8.41

0 Interface MTU

16 Options

24 Zero

29 I M

31 M S

Database description sequence number

LSA header

Leon-Garcia/Widjaja

Communication Networks

Figure 8.42

0 Link-state age

16 Options Link-state ID Advertising router Link-state sequence number Link-state checksum

24 Link-state type

31

Length

Leon-Garcia/Widjaja

Communication Networks

Figure 8.43

0 Link-state type Link-state ID Advertising router

31

...

Leon-Garcia/Widjaja

Communication Networks

Figure 8.44

0 Number of LSAs

31

LSA 1

...
LSA n

Leon-Garcia/Widjaja

Communication Networks

Figure 8.45

Leon-Garcia/Widjaja

Communication Networks

Figure 8.46

R2 AS2 R1 AS1

R3

R4 AS3

N1

Leon-Garcia/Widjaja

Communication Networks

Figure 8.47

AS2 AS1 AS6

AS3

AS5

AS4

AS7

Leon-Garcia/Widjaja

Communication Networks

Figure 8.48

eBGP iBGP

eBGP

R iBGP R

R iBGP iBGP R eBGP iBGP

iBGP

eBGP

Leon-Garcia/Widjaja

Communication Networks

Figure 8.49

16

24

31

Marker

Length

Type

Leon-Garcia/Widjaja

Communication Networks

Figure 8.50

16

24

31

Marker

Length My autonomous system

Type: OPEN Hold time BGP identifier

Version

Optional parameters length

Optional parameters

Leon-Garcia/Widjaja

Communication Networks

Figure 8.51

16

24

31

Marker

Length

Type: KEEPALIVE

Leon-Garcia/Widjaja

Communication Networks

Figure 8.52

16

24

31

Marker

Length Error subcode

Type: NOTIFICATION Data

Error code

Leon-Garcia/Widjaja

Communication Networks

Figure 8.53

Unfeasible routes length (two octets) Withdrawn routes (variable) Total path attribute length (two octets) Path attributes (variable) Network layer reachability information (variable)

Leon-Garcia/Widjaja

Communication Networks

Figure 8.54

Attribute type

Attribute length

Attribute value

Leon-Garcia/Widjaja

Communication Networks

Figure 8.55

O T

Attribute type code

Leon-Garcia/Widjaja

Communication Networks

Figure 8.56

10.1.2.0/24 10.10.1.2

R4 R1

AS2

10.10.3.0/24

10.10.4.2

eBGP

iBGP

10.10.4.1

iBGP

iBGP R2 AS1
10.10.1.3

R3 10.10.1.1

- Reach 10.1.2.0/24 via next hop 10.10.1.2 - Reach 10.10.3.0/24 via next hop 10.10.4.1
Leon-Garcia/Widjaja

- Reach 10.1.2.0/24 via next hop 10.10.1.2 - Reach 10.10.3.0/24 via next hop 10.10.4.2
Communication Networks Figure 8.57

10.1.1.0/24 with MED=100

R2

R1

AS1

10.1.1.0/24 with MED=200

R3 AS2

Leon-Garcia/Widjaja

Communication Networks

Figure 8.58

Leon-Garcia/Widjaja

Communication Networks

Figure 8.59

G1
1 2 3

G1 7 2
3 2 1 8 3 4 4 3 4

2 4
1 5 2

G1 G1

1 1 3 5 4 2 1 2 2 3 1

4
1

6 3
4

3
3

G2

G3

G3

Leon-Garcia/Widjaja

Communication Networks

Figure 8.60

G1
1 2 3

G1 7 2
3 2 1 3 4 4 3 4

2 4
1 5 2

G1 G1

1 3
2 1

5 4 1 2 2 4 3 1

6 3
4

3
3

G2

G3

G3

Leon-Garcia/Widjaja

Communication Networks

Figure 8.61

G1
1 2 1 3

G1 7 2
3 2 1 8 3 4 4 3 4

2 4
5 2

G1 G1

1 1 3 5 4 2 1 2 2 3 1

4
1

6 3
4

3
3

G2

G3

G3

Leon-Garcia/Widjaja

Communication Networks

Figure 8.62

G1
1 2 1 2 3

G1 7 2
3 2 1 8 3 4 3 4

2 4
5

G1 G1

1 1 3 5 4 2 1 2 2 3 1

4
1

6 3
4

3
3

G2

G3

G3

Leon-Garcia/Widjaja

Communication Networks

Figure 8.63

0 Version

4 Type

8 Unused

16 Checksum

31

Group address (Class D IP address)

Leon-Garcia/Widjaja

Communication Networks

Figure 8.64

G1
1 2 1 2 3

G1 7 2
3 2 1 8 3 4 3 4

2 4
5

G1 G1

1 1 3 5 4 2 1 2 2 3 1

4
1

6 3
4

3
3

G2

G3

G3
Graft message

Leon-Garcia/Widjaja

Communication Networks

Figure 8.65

Foreign network Home network 2 Internet 1 Correspondent host Foreign agent

Mobile host

Home agent

Leon-Garcia/Widjaja

Communication Networks

Figure 8.66

Outer IP header IP header IP header

IP payload

IP payload

Leon-Garcia/Widjaja

Communication Networks

Figure 8.67

Foreign network Home network 2a Internet 2b 1 3 4 Foreign agent

Mobile host

Home agent

Correspondent host

Leon-Garcia/Widjaja

Communication Networks

Figure 8.68

L1,2

R2 L4,1

L6,4 R5 L9,2

R1

L3,4 L5,3

R4

L7,5 R6 L10,2

R7

L2,1 R3 L8,4

Leon-Garcia/Widjaja

Communication Networks

Figure for Problem 8.54

AS1 R7

R6

AS2 R4

R3 AS3 R2

R5 AS6 R9 AS5 R8 R1 AS4

Leon-Garcia/Widjaja

Communication Networks

Figure for Problem 8.61

Anda mungkin juga menyukai