Title: School of Computing Science Simon Fraser University
1School of Computing Science Simon Fraser
University
- CMPT 371 Data Communications and Networking
- Review
-
2Course Objectives
- Understand principles of designing and operating
computer networks, - Understand the structure and protocols of the
largest network of networks (Internet), - Know how to implement network protocols and
networked applications, and - Have fun!
3A snapshot of the Internet in 1999 showing major
ISPs
4Internet structure packet journey
- a packet passes through many networks!
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
5Layering of airline functionality
- Layers each layer implements a service
- via its own internal-layer actions
- relying on services provided by layer below
6Internet protocol stack
- application supporting network applications
- FTP, SMTP, HTTP
- transport host-host data transfer
- TCP, UDP
- network routing of datagrams from source to
destination - IP, routing protocols
- link data transfer between neighboring network
elements - PPP, Ethernet
- physical bits on the wire
7Encapsulation
datagram
frame
8What is a network app?
- Programs that
- run on different end systems and
- communicate over a network.
- e.g., Web Web server software communicates with
browser software - little software written for devices in network
core - network core devices do not run user application
code - application on end systems allows for rapid app
development, propagation
9How to create a network app?
- Design application architecture
- how to organize the app over end systems
- Choose network transport service(s)
- which service to use (TCP, UDP)
- depends on app requirements (delay, loss, bw, )
- Design app protocol
- message types, format, actions,
- Write code
- implement the protocol
10Socket Programming
- process sends/receives messages to/from its
socket - socket analogous to door
- sending process shoves message out door
- sending process relies on transport
infrastructure on other side of door which brings
message to socket at receiving process
controlled by app developer
Internet
controlled by OS
- socket is the interface (API) between application
and transport layer
11Sample app-level protocols
- Web and HTTP
- web caching
- FTP
- Domain Name System (DNS)
12Transport layer
- provide logical communication between app
processes - transport protocols run in end systems
- send side breaks app messages into segments,
passes to network layer - rcv side reassembles segments into messages,
passes to app layer - more than one transport protocol available to
apps - Internet TCP and UDP
13Reliable data transfer principles
send side
receive side
14Reliable data transfer Go-Back-N
- Sender
- k-bit seq in pkt header
- window of up to N, consecutive unacked pkts
allowed
- ACK(n) ACKs all pkts up to, including seq n -
cumulative ACK - may receive duplicate ACKs (see receiver)
- timer for each in-flight pkt
- timeout(n) retransmit pkt n and all higher seq
pkts in window - i.e., go back to n
15Reliable data transfer Selective repeat
16TCP Overview RFCs 793, 1122, 1323, 2018, 2581
- point-to-point
- one sender, one receiver
- reliable, in-order byte steam
- no message boundaries
- congestion controlled
- will not overwhelm network
- send receive buffers
- full duplex data
- bi-directional data flow in same connection
- MSS maximum segment size
- connection-oriented
- handshaking (exchange of control msgs) inits
sender, receiver state before data exchange - flow controlled
- sender will not overwhelm receiver
17TCP Congestion Control Summary
- Initially
- Threshold is set to large value (65 Kbytes), has
not effect - CongWin 1 MSS
- Slow Start (SS) CongWin grows exponentially
- till a loss event occurs (timeout or 3 dup ack)
or reaches Threshold - Congestion Avoidance (CA) CongWin grows
linearly - 3 duplicate ACK occurs
- Threshold CongWin/2 CongWin Threshold CA
- Timeout occurs
- Threshold CongWin/2 CongWin 1 MSS SS
till Threshold
18Network layer
- transport segment from sending to receiving host
- on sending side encapsulates segments into
datagrams - on receiving side, delivers segments to transport
layer - network layer protocols in every host, router
- Router examines header fields in all IP datagrams
passing through it
19Network Taxonomy
Telecommunication networks
- Datagram network is neither connection-oriented
- nor connectionless.
- Internet provides both connection-oriented (TCP)
and - connectionless services (UDP) to apps.
20Interplay between routing and forwarding
21Router Architecture Overview
- Two key router functions
- run routing algorithms/protocol (RIP, OSPF, BGP)
- forward datagrams from incoming to outgoing link
22Addressing, Subnets
- Subnet is
- a group of devices that can reach each other
without intervening router - identified by high order bits of IP addresses
11011111 00000001 00000001 00000001
Host ID
Subnet ID
223.1.1.0/24
/24 bits in subnet portion of address, subnet
mask
23Hierarchical addressing route aggregation
Hierarchical addressing allows efficient
advertisement of routing information
Organization 0
Organization 1
Send me anything with addresses beginning
200.23.16.0/20
Organization 2
Fly-By-Night-ISP
Internet
Organization 7
Send me anything with addresses beginning
199.31.0.0/16
ISPs-R-Us
24Routing algorithms Graph abstraction
- cost of link (x1, x2)
- Metric value, e.g., c(w,z) 5
- could be
- 1, or
- inversely related to bandwidth, or
- inversely related to congestion
- Cost of path (x1, x2, x3,, xp)
- c(x1,x2) c(x2,x3) c(xp-1,xp)
Routing algorithm algorithm that finds
least-cost path
25Classification of Routing Algorithms
- Global or local information?
- Global
- all routers have complete topology, link cost
info - link state algorithms
- local
- router knows physically-connected neighbors, link
costs to neighbors - iterative process of computation, exchange of
info with neighbors - distance vector algorithms
26Hierarchical Routing
- aggregate routers into regions, autonomous
systems (AS) - routers in same AS run same routing protocol
- intra-AS routing protocol
- routers in different AS can run different
intra-AS routing protocol - Gateway router
- Direct link to router in another AS
27Hierarchical Routing
- Forwarding table is configured by both intra- and
inter-AS routing algorithm - Intra-AS sets entries for internal dests
- Inter-AS Intra-As sets entries for external
dests
28BGP reachability and policy routing
- A,B,C are provider networks
- X,W,Y are customer (of provider networks)
- X is dual-homed attached to two provider
networks - X does not want to route traffic from B via X to
C - .. so X will not advertise to B a route to C
29Unicast, multicast, broadcast
- Unicast one source, one destination
- E.g., web session
- Multicast one source, multiple destinations
- Subset of all possible destinations
- E.g., streaming a hockey game to interested fans
- Broadcast one source, all destinations
- E.g., broadcasting link state info to ALL routers
in a domain in OSPF protocol - Anycast multiple possible sources, one
destination - Sources have same (anycast) address
- Request is forwarded to appropriate source
- (Still in research phases)
30Link Layer
- Some terminology
- hosts and routers are nodes
- communication channels that connect adjacent
nodes along communication path are links - wired links
- wireless links
- LANs
- layer-2 packet is a frame, encapsulates datagram
data-link layer has responsibility of
transferring datagram from one node to adjacent
node over a link
31Adaptors Communicating
datagram
rcving node
link layer protocol
sending node
adapter
adapter
- receiving side
- looks for errors, rdt, flow control, etc
- extracts datagram, passes to rcving node
- adapter is semi-autonomous
- link physical layers
- link layer implemented in adaptor (aka NIC)
- Ethernet card, PCMCI card, 802.11 card
- sending side
- encapsulates datagram in a frame
- adds error checking bits, rdt, flow control, etc.
32CRC basic idea
- Sender and receiver agree on a divisor polynomial
G(x) of degree r - Sender transmits T(x), which consists of d1
data bits AND r redundant bits such that
G(x)T(x), - i.e., the remainder of dividing T(x) by G(x) is 0
- Receiver gets T(x) which may have corrupted
bits - If G(x) T(x) then no errors occurred
33MAC Protocols a taxonomy
- Three broad classes
- Channel Partitioning
- divide channel into smaller pieces (time slots,
frequency, code) - allocate piece to node for exclusive use
- Random Access
- channel not divided, allow collisions
- recover from collisions
- Taking turns
- Nodes take turns, but nodes with more to send can
take longer turns
34MAC and IP addresses
- Why do we have TWO addresses (IP,MAC)? Do we have
to have MAC addresses? - Yes, we must have both
- To allow different network-layer protocols over
same card (e.g., IP, Novell IPX, DECnet) - Enable flexibility, mobility of cards
- Efficiency imagine that nodes have only IP
addresses ? ALL packets sent over LAN will be
forwarded by NIC to the IP layer ? too many
useless interrupts
35Ethernet CSMA/CD algorithm
- 1. Adaptor receives datagram from net layer
creates frame - 2. If adapter senses channel idle, it starts to
transmit frame. If it senses channel busy, waits
until channel idle and then transmits - 3. If adapter transmits entire frame without
detecting another transmission, the adapter is
done with frame !
- 4. If adapter detects another transmission while
transmitting, aborts and sends jam signal - 5. After aborting, adapter enters exponential
backoff after the mth collision, adapter chooses
a K at random from 0,1,2,,2m-1. Adapter waits
K?512 bit times and returns to Step 2
36Institutional network
mail server
to external network
web server
router
switch
IP subnet
hub
hub
hub
37Point to Point Data Link Control
- one sender, one receiver, one link easier than
broadcast link - no Media Access Control
- no need for explicit MAC addressing
- e.g., dialup link, ISDN line
- popular point-to-point DLC protocols
- PPP (point-to-point protocol)
- HDLC High level data link control
38The Internet virtualizing networks
- Gateway
- embed internetwork packets in local packet
format or extract them - route (at internetwork level) to next gateway
gateway
satellite net
ARPAnet
39What is next?
- If you have passion for networking
- More networking
- CMPT 471 (Systems)
- CMPT 408 (Theory)
- Some theory
- Computer Simulation and Modelling CMPT 305
- Probability and Statistics
- Algorithms and graph theory
- Some systems
- C/C coding and Unix
- OS CMPT 300, CMPT 401
40- That is all!
- Good luck on your final