Vous êtes sur la page 1sur 15

CSE 4471: Computer Networking

Review!
•  Network Layers!
•  TCP/UDP!
•  IP!
Network Layers!
Transport Layers!
•  TCP/UDP!
TCP!
•  Transport Control Protocol!
•  Flow control and responds to congestion!
•  Reliable In-order delivery!
•  “Nice” protocol!
TCP Segment Structure!
32 bits
URG: urgent data ! counting!
(generally not used) source port # dest port #
by bytes !
sequence number of data!
ACK: ACK #!
valid acknowledgement number (not segments!)!
head! not!
PSH: push data now! len used U A P R S F rcvr window size
(generally not used)! # bytes !
checksum ptr urgent data rcvr willing!
RST, SYN, FIN:! to accept!
Options (variable length)
connection estab!
(setup, teardown!
commands)!
application!
Internet! data !
checksum! (variable length)
(as in UDP)!
Reliable Delivery!
•  Sender, receiver keep track of bytes sent
and bytes received!
•  ACKs have an indication of next byte
expected!
•  Three duplicate ACKs considered a packet
loss; sender retransmits!
TCP seq. #’s and ACKs!
Seq. #’s:!
Host A Host B
–  byte stream “number”
of 1st byte in segment’s User! Seq=4
2, AC
types! K=79,
data! ‘C’
data =
‘C’host ACKs!
ACKs:! receipt of!
–  seq. # of next byte = ‘C ’ ‘C’, echoes!
data back ‘C’
expected from other =43,
79, ACK
Seq=
side!
–  cumulative ACK! host ACKs!
receipt of
Q: how receiver handles out- echoed ‘C’
Seq=4
3, ACK
=80
of-order segments!
–  A: TCP spec doesn’t
say, up to implementer!
time
Simple Telnet scenario
TCP Flow Control!
•  Window based!
•  Sender cannot send more data than a
window without acknowledgements.!
•  Window is a minimum of receiver’s buffer
and “congestion window”.!
•  After a window of data is transmitted, in
steady state, ACKs control sending rate.!
Flow Control!
UDP!
•  No reliability, flow control, congestion
control!
•  Sends data in a burst!
•  Provides multiplexing and demultiplexing
of sources!
•  Many multimedia applications using UDP!
UDP: User Datagram Protocol
[RFC 768] !
•  “no frills,” “bare bones”
Internet transport protocol! Why is there a UDP?!
•  “best effort” service: UDP •  no connection establishment
(which can add delay)!
segments may be:!
•  simple: no connection state
–  lost!
at sender, receiver!
–  delivered out of order to app!
•  small segment header!
•  Connectionless:! •  no congestion control: UDP
–  no handshaking between can blast away as fast as
UDP sender, receiver! desired!
–  each UDP segment handled
independently of others!
UDP segment structure!
•  Often used for streaming
32 bits
multimedia apps!
source port # dest port #
–  loss tolerant! Length !
(bytes) ! length checksum
–  rate sensitive!
of UDP!
•  Other UDP uses segment,!
including!
(why?):! header
–  DNS! Application!
data !
–  SNMP!
(message)
•  Reliable transfer over
UDP: add reliability at
application layer! UDP segment format
–  App-specific error recovery!
IP 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
max number! time to! upper! reassembly!
Internet!
remaining hops! live layer checksum
(decremented at !
each router)! 32 bit source IP address
32 bit destination IP address
upper layer protocol!
to deliver payload to! Options (if any) E.g. timestamp,!
record route!
data ! taken, pecify!
(variable length,! list of routers !
typically a TCP ! to visit.!
or UDP segment)
ICMP: Internet Control Message
Protocol!
•  Used by hosts, routers, Type! Code! Description!
gateways to communicate 0! 0! Echo reply (ping)!
network-level 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. network unreachable!
ping)! 3! 3! Dest. port unreachable!
•  Network-layer “above” IP:! 3! 6! Dest. network unknown!
–  ICMP msgs carried in IP 3! 7! Dest. host unknown!
datagrams! 4! 0! Source quench (congestion
control – not used)!
•  ICMP message: type, code
8! 0! Echo request (ping)!
plus first 8 bytes of IP
9! 0! Route advertisement!
datagram causing error!
10! 0! Router discovery!
11! 0! TTL expired!
12! 0! Bad IP header!
Routing in the Internet!
•  The Global Internet consists of Autonomous
Systems (AS) interconnected with each other:!
–  Stub AS: small corporation!
–  Multihomed AS: large corporation (no transit)!
–  Transit AS: provider!

•  Two-level routing: !
–  Intra-AS: administrator is responsible for choice:
RIP, OSPF!
–  Inter-AS: unique standard: BGP!

Vous aimerez peut-être aussi