Internet Working

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Reference Textbooks:

&
' ( # ' ) ! !) * + '
! " # $ %

Network 1 (Ethernet)

n
H1

- .
H2 H3 Network 2 (Ethernet) R1

H7

R3

H8

Network 4 (point-to-point)

R2 H4 Network 3 (FDDI)

n
H1 TCP IP ETH ETH IP FDDI R1

.
IP FDDI PPP

H5

H6

H8 R2 IP PPP ETH R3 TCP IP ETH

! " # $

$
n n

0 2 !
n n n n

' +! 0

1 1

* . * . * * .

* .
0 4 Version HLen Ident TTL Protocol SourceAddr DestinationAddr Options (variable) Data Pad (variable) 8 TOS Flags 16

' +

' + 19
Length Offset Checksum

31

! " # $

5 ' +
n n
n n n n n n

#
- . + $6
0$6 7 3 * ! 1 + 9 ' * 6 $ ' + + 8* ' +

) '

' + ! ' + ' + ! 3 0 +

' +1

$6

! " # $

):+*

Start of header Ident= x 0 Rest of header 1400 data bytes Offset= 0

Start of header Ident= x 1 Rest of header 512 data bytes Offset= 0

H1

R1

R2

R3

H8

Start of header

ETH IP (1400)

FDDI IP (1400)

PPP IP (512) PPP IP (512) PPP IP (376)

ETH IP (512) ETH IP (512) ETH IP (376)

Ident= x

1 Offset= 512 Rest of header 512 data bytes

Start of header Ident= x 0 Offset= 1024 Rest of header 376 data bytes

! " # $

$ ' 0 $ 1 # ;<% 5
n

' * ' * .
n n

6* =

) #

0* ' 1 0 + 1 0 0* ' +

+ > > * ? 1 1

n n n n

3 6( : 6 . + # +
! " # $

n
n n

*
' A - .B
A: 0 7 24 Host 14 16 Host 8 Host Network

3
n n n

,%/ %@ < ,, @ <% % < ;;

B:

1 0

Network 21

C:

1 1 0

Network 28

D: 1 1 1 0 Multicast
! " # $

Group

3
n
n n

' +5 '
' +

'
? - . > - . > *

n n n

+ -

' +

+*

- . + '
- . % , / +

):+* 0# %1

:C * # , #

! " # $

<

6
n

$ *
n n

*
* * *

6
n
n

A
! * A ' + * * '

#
n n n n

! " # $

# 3
n

#A
n n n n n

5 +
* ' * * E - .0 '> ) * 0 '> 1 * 1

6* * 6* * C) D ( ( ) ' & * A E ' ! 6 + -

n
n n n n

4+ * '

* *

! " # $

#
0

. 5 +
8 Hardware type = 1 HLen = 48 PLen = 32 16 ProtocolT ype = 0x0800 Operation 31

SourceHardwareAddr (bytes 0 3) SourceHardwareAddr (bytes 4 5) SourceProtocolAddr (bytes 0 1) SourceProtocolAddr (bytes 2 3) TargetHardwareAddr (bytes 0 1) TargetHardwareAddr (bytes 2 5) TargetProtocolAddr (bytes 0 3)

! " # $

3 + C 03C 1
n

'
' -

+
n n

0 . ' F

) !* '

1 * +
& )# A G 3C 7 " 33# C > 33# > 3C 3

3C

n n n

3C #A 3C

0 *

1 -

! " # $

#
n

'&
'
' '*

'
' * * '
A 3 4 C B 9 1 1 D 1 2 E F 6

5 n

- .

n n

+ 5 5
n n

* '

+
! " # $ /

3
n

G
+
(Destination, Cost, NextHop)

)
n

* '
' 0

):
n n

' *
0

* -

' '

1 *

)
n

*
0Destination, Cost)

* 8 9 +
4

n
n n

*
+ + + :! *

:
! " # $

'

):+*
B C A D

Table for node B


3 :C *

3 ) 5

% % % ,

! " # $

# ' 0# 1
n n n n
n n n

2 + !5 3 !

? ' + 3 > * 4% * A * . * * *
+* * * * E ' ' 0 0

& &
n n

* A
A

'
+ =1
= 1 0 1 +*

#'
n

' *
, '

n n

6' ' +*

+ +

'

! " # $

(.
n
n

'
0 1 J ' .0 1 + '

(.
n n n n

. 0( 1
( . ' + 0 )K & 1 06 ( 61 * .

A +! !

! " # $

(.
n

0
'
+

1
( + (

#
n n n n

'
n

( -( *
+ )K &

n n
n

)K & + 6( 6
! " # $

6( 6=
<

#
n n

3 J. (
n n n n n

*
! '

'

+
' * 0- ' 1 * + ' 0 >1 J

0 >1 J

$
0 1 *

M = {s} for each n in N - {s} C(n) = l(s, n) while (N != M) M = M union {w} such that C(w) is the minimum for all w in (N - M) for each n in (N - M) C(n) = MIN(C(n), C (w) + l(w, n ))
! " # $ %

& *
n

5
3 1> . *
0( 1 - .

* +
n n n n

0 > .1

0 A

6 . ) ) +*

0 1 E . : * ' +* +

n
n n

'
5 6 * + & 5 1
! " # $

#
' +* ' + > * ' 1 '0
%

0 '> *

'

*
n

#
! * !

#
n n n

+
: ' +

& 5 & *
n n n n

5
' + ' +
%%

+ . ! * * * * *E E - A ! " # $

' . ' E E %,%@

Cn n
n n

$ .#
C C

'
*

5
21

% %44

0%E = ;@L %4 1 0%44E44, = ,<L

n
n n

6 $
' * *'

- .
*

! " # $

%,

'
n

' *

n n

+ .
Network number

*
Host number

Class B address 111111111111111111111111 00000000 Subnet mask (255.255.255.0) Network number Subnet ID Host ID

Subnetted address
! " # $ %/

):+*
Subnet mask: 255.255.255.128 Subnet number: 128.96.34.0 128.96.34.15 H1 R1 128.96.34.130 128.96.34.129 R2 H3 128.96.33.14 128.96.33.1 Subnet mask: 255.255.255.128 Subnet number: 128.96.34.128 128.96.34.139 H2 128.96.34.1

5 -

'
+

#
$ . :C * %44 %44 %44 %@ %44 %44 %44 %@ %44 %44 %44 # %

Subnet mask: 255.255.255.0 Subnet number: 128.96.33.0

%@ < ,/ %@ < ,/ %@ %@ < ,,

! " # $

%4

5 -

' '

D = destination IP address for each entry (SubnetNum, SubnetMask, NextHop) D1 = SubnetMask & D if D1 = SubnetNum if NextHop is an interface deliver datagram directly to D else deliver datagram to NextHop
n n

'+ ' * + + . * +
! " # $ %

n n

- .

* #
n

' '
. - . 3# ' - . + !3 + ' * *E %

'

n n

'

#* #
n

.. F

(first_network_address, count)
n

% . 3# '
%;

) '> <% /

M <% / ,

+ .0 3#+ . 1 F +
! " # $

Stanford BARRNET regional Berkeley ARC P

NSFNET backbone ISU Westnet regional NCAR UA UNM MidNet regional UNL KU

! " # $

%@

N
Large corporation Consumer ISP Peering point Consumer ISP Large corporation Small corporation ConsumerISP

Backbone service provider

Peering point

! " # $

%<

#
n

*'
+
. . . . - +

O n n n n

'

n
n n n

+
* :+* '

+0

1
+ . - .

+ > +* > ! +

6 ! n n

* *'
' - * ' - * 0 0 !-1 1

! " # $

)
n

):
&
n n

' > *+ A ' I: + * ' C ( E O+ )(& : ' ' I '

n
n

+
' * I * '

'
A :

. ! ! ! ' * * 0 !

* 1

! " # $

2 !/ 2
n
n
n

'

6*
n

+
n

+ +

n
n

)
n n
n n n

+ 2
'

* .
- . - .0 1

! " # $

,%

2
n
n

):+*
% K
<% / ,>
Customer P (AS 4) Customer Q (AS 5) Customer R (AS 6) Customer S (AS 7) 128.96 192.4.153 192.4.32 192.4.3 192.12.69

* .

- . %@ < > <% / 4,> <% / ,%> + %


Regional provider A (AS 2) Backbone network (AS 1) Regional provider B (AS 3)

* .
n

. *

192.4.54 192.4.23

- . %@ < > <% / 4,> <% / ,%> ' * 0 > %1

<% / ,

* .
! " # $

*
,,

) 36 ) 3 #6 & & && (

,/

)
n

! !)
! ! * . - . * ! !* ' !

++
n
n n n n n

*+ ! +

' + ' + ' + + ' * *

F ' + ' '

n
n n n n n n n

++
' +

! !
+ ' + ' + * '+ F + * * * *
,4

+ '

'

* * * * * *

! " # $

6*
n

! !)
+ *:'

+* 0 '> 3 1

# #A

! *

0 '> 1 6 0 '> 1 #

! " # $

+* 3 +
n n n n

*: 0 3 1
' +

)
n n

+ *

*:' *
- !. - *
0 '> 3 :
0

*
SrcPort

4,> . 4 ;1
16 DstPort Length Data

/etc/services

31

Checksum

& *
n n

. +
3 ' B 3 =* B + > > >

! " # $

,;

6
n n n

&
! +
' +

n n

# 2 !
n n n

* * 6 * *

5 *: 5 . * + ' ' . * + ' - .


Application process Read bytes

Application process Write bytes

TCP Send buffer

TCP Receive buffer

Segment

Segment

Segment

Transmit segments

! " # $

,@

3
n
n

( .G
+
: *

6
+

*
+

n
n

'# 6 6
* + + +

n
n

'
* *

- .
* . *

n
n

' *
++

n
n

'
* *
! " # $

- . *
- . '
,<

' +
0 4

5 +
10 SrcPort SequenceNum Acknowledgment HdrLen 0 Checksum Options (variable) Data Flags AdvertisedWindow UrgPtr 16 DstPort 31

! " # $

' +
n

5 +
-B -

0
-

1
/! *

)
n

(SrcPort, SrcIPAddr, DsrPort, DstIPAddr)

n
n

'-

acknowledgment, SequenceNum, AdvertisedWindow


Data(SequenceNum) Sender Acknowledgment + AdvertisedWindow Receiver

5 '
n

SYN, FIN, RESET, PUSH, URG, ACK

n
n

. +
*
! " # $

B6

B
/

6
Passive open

3 ' +
CLOSED Active open /SYN Close Close LISTEN

SYN_RCVD

SYN/SYN + ACK Send/ YN S SYN/SYN + ACK ACK SYN + ACK/ACK ESTABLISHED Close /FIN FIN/ACK

SYN_SENT

Close /FIN

FIN_WAIT_1 ACK FIN_WAIT_2


AC

CLOSE_WAIT FIN/ACK
K + FI N /A

Close /FIN CLOSING LAST_ACK

FIN/ACK

ACK Timeout after two ACK segment lifetimes TIME_WAIT CLOSED

! " # $

/%

'"
n
n n

6
0 #1 K

*
) 0 A +1 ) ! 0

"

! " # $

/,

//

+ '
n

C
cheltenham.cs.princeton.edu 192.12.69.17 192.12.69.17 80:23:A8:33:5B:9F

5
/usr/llp/tmp/foo (server, fileid)

Larry Peterson

llp@cs.princeton.edu

! " # $

/4

):+*
n

1
2 cs.princeton.edu User 1 user @ cs.princeton.edu

:
Name server

Mail program 192.12.69.5 3 192.12.69.5 TCP 192.12.69.5 IP 5 4

nearby ps printer with short queue and 2MB


! " # $ /

3 +
n

+ '

C
edu princeton mit com cisco gov yahoonasa nsf arpa mil org navy acm ieee net uk fr

cs

ee physics

ux01 ux04

+
chinstrap.cs.princeton.edu
! " # $ /;

+
n
edu princeton mit com cisco gov yahoo nasa nsf arpa

F
mil org navy acm ieee net uk fr

cs

ee physics

ux01 ux04 Root name server

) F +* + +

Princeton name server

Cisco name server

CS name server

EE name server

! " # $

/@

#
n

#
+ + +
(Name, Value, Type, Class, TTL)

n n

+E G 6*
n n

G G ' + . $) G ' $P G ' * + ' +

+ + + + * +

* *

' + + I '+

n
n

* '
/<

6( 6

! " # $

#
(princeton.edu, cit.princeton.edu, NS, IN) (cit.princeton.edu, 128.196.128.233, A, IN) (cisco.com, thumper.cisco.com, NS, IN) (thumper.cisco.com, 128.96.32.20, A, IN)

! " # $

(cs.princeton.edu, optima.cs.princeton.edu, NS, IN) (optima.cs.princeton.edu, 192.12.69.5, A, IN) (ee.princeton.edu, helios.ee.princeton.edu, NS, IN) (helios.ee.princeton.edu, 128.196.28.166, A, IN) (jupiter.physics.princeton.edu, 128.196.4.1, A, IN) (saturn.physics.princeton.edu, 128.196.4.2, A, IN) (mars.physics.princeton.edu, 128.196.4.3, A, IN) (venus.physics.princeton.edu, 128.196.4.4, A, IN)

! " # $

(cs.princeton.edu, optima.cs.princeton.edu, MX, IN) (cheltenham.cs.princeton.edu, 192.12.69.60, A, IN) (che.cs.princeton.edu, cheltenham.cs.princeton.edu, CNAME, IN) (optima.cs.princeton.edu, 192.12.69.5, A, IN) (opt.cs.princeton.edu, optima.cs.princeton.edu, CNAME, IN) (baskerville.cs.princeton.edu, 192.12.69.35, A, IN) (bas.cs.princeton.edu, baskerville.cs.princeton.edu, CNAME, IN)

! " # $

4%

+ #
n

'

1 cicada.cs.princeton.edu Client 192.12.69.60 8

Local name server

(
n

. * 0 !! " # $

u .e d ton 3 e .23 inc 28 3 .p r s .1 96 a.c ad 8.1 12 cic u, ed . ton ce 4 n pri cicada.cs.princeton.edu Princeton name cs.princeton.edu, 192.12.69.5 server 5 c ic ad a .c c ic s .p 19 ada r in 2 .1 .c s ce 2 .6 .p r to n in c 9.6 .ed 6 e to 0 u n .e du , CS name 7 server

Root name server

4,

++
n

$
n

!
( .( - 0 )))@ % - .(
n n

. *
0 )))@ % ,1> 533 > 6 $> 1
0 1 * # > 5> !/ & 2

'*

n n

* ( + '3
! " # $

3 > 6

4/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy