Title: CPS 356: Introduction to Computer Networks Lecture 2: Network Architectures
1CPS 356 Introduction to Computer Networks
Lecture 2 Network Architectures
Reference Chapter 1 of PD
- Xiaowei Yang
- xwy_at_cs.duke.edu
2Overview
- Updated course administrative stuff
- Grading policy, office hours, piazza
- Design requirements of the original Internet
- Concepts of Network Architectures
- An Example of how the Internet works
3Updated Grading Policy
- Old
- Class participation and pop quizzes 20
- Assignments 50
- In a group assignment, both students get the same
grade for the assignment - Exams 30
- New
- Class participation and pop quizzes 10
- Assignments 60
- In a group assignment, both students get the same
grade for the assignment - Exams 30
4Office hours
- Instructor
- Fridays 3-5pm
- TA
- Tuesdays 7-9pm
5Discussion Forum
- Piazza sign up link
- piazza.com/duke/spring2014/compsci356
6Overview
- Updated course administrative stuff
- Grading policy, office hours, piazza
- Design requirements of the original Internet
- Concepts of Network Architectures
- An Example of how the Internet works
71st Mission of this course
- Understand the concepts and design principles
that make the Internet work - Design paradigm
- Identify requirements, brainstorm design
choices/mechanisms, make design decisions - What requirements make sense to you?
- Scalable connectivity
- Cost-effective resource sharing
- Support for different types of services
- Manageability
-
- It remains an open challenge how to incorporate
other requirements such as security into the
Internet design
8Features of computer networks
- Generality
- Carry many different types of data
- Support an unlimited range of applications
9Whats the Internet?
- The Internet is a large-scale general-purpose
computer network. - Run more than one applications
- The Internet transfers data between computers.
- The Internet is a network of networks.
10Design requirements and techniques to meet them
- Scalable connectivity
- Cost-effective resource sharing
- Support for common services
- Manageability
111. Scalable Connectivity
- A network must provide connectivity among a set
of computers - Open vs close to connect all computers or a
subset of them? - Internet is an open network
- Scalability A system is designed to grow to an
arbitrary large size is said to scale - How to connect an arbitrary large number of
computers on a network?
12Connectivity recursively occurs at different
levels
Point-to-Point
Multiple-Access
- Link-level connect two or more computers via a
physical medium - Computers are referred to as nodes
- The physical medium is referred to as a link
13Switching
- Switching is a mechanism to achieve connectivity
- Nodes that are attached to at least two links
forward data from one link to another link - They are called switches
- Computers outside the cloud are called hosts
- A question switch vs router, what can become a
switch?
14- Circuit switching
- Sets up a circuit before nodes can communicate
- Switches connect circuits on different links
- Packet switching
- Data are split into blocks of data called packets
- Store and forward
- Nodes send packets and switches forward them
15Internetworking Another way to
achieve connectivity
- An internetwork of networks
- Each cloud is a network/a multiple-access link
- A node that is connected to two or more networks
is commonly called a router - Speaks different protocols than switches
- An internet can be viewed as a cloud. We can
recursively build larger clouds by connecting
smaller ones - Autonomous system (AS)
16Addressing and routing
- Physical connectivity ! connectivity
- Addressing and routing are mechanisms to achieve
connectivity - Nodes are assigned addresses
- Routers compute how to reach them by running
routing protocols - intra-AS OSPF, RIP, IS-IS
- Inter-AS BGP
172. Cost-effective resource sharing
- Question how do all the hosts share the network
when they want to communicate with each other? - Use at the same time
- Fair
- Multiplexing a system resource is shared among
multiple users - Analogy CPU sharing
- Mechanisms to multiplexing
- Time-division multiplexing (TDM)
- Frequency-division multiplexing (FDM)
- Statistical multiplexing
18Multiplex
Demultiplex
19TDM and FDM
20Problems with FDM and TDM
- What if a user does not have data to send all the
time? - Consider web browsing
- ? Inefficient use of resources
- Max of flows is fixed and known ahead of time
- Not practical to change the size of quantum or
add additional quanta for TDM - Nor add more frequencies in FDM
21Statistical Multiplexing
10 Mb/s Ethernet
C
A
statistical multiplexing
1.5 Mb/s
B
queue of packets waiting for output link
D
E
- The physical link is shared over time (like TDM)
- But does not have fixed pattern ? statistical
multiplexing - Sequence of A B packets are sent on demand, not
predetermined slots
22Pros and Cons
- Assumption traffic is largely bursty
- Pros Resources are not wasted when hosts are
idle - Cons No guarantee flows would have their turns
to transmit - Some possible fixes
- Limit maximum packet size
- Scheduling which packets got transmitted, e.g.,
fair queuing
23Maximum Packet Size
- Divide an application message into blocks of data
? packets - Segments, frames
- Maximum packet size limit
- Flows send on demand
- Must give each flow its turn to send
- Solution defines an upper bound on the size of
the block of data
24Packet scheduling
- Scheduling which packet to send
- First come first serve (FIFQ)
- Weighted fair queuing
25Switching vs multiplexing
- TDM and FDM are used in circuit switching
- Require a setup as max of flows is fixed
- SM is used in packet switching
26Congestion
- Aggregate incoming rate gt outgoing rate
- An open question
- A large buffer can help temporary congestion
27Packet switching versus circuit switching
- Packet switching allows more users to use network!
- 1 Mb/s link
- each user
- 100 kb/s when active
- active 10 of time
- circuit-switching fixed capacity
- 10 users
- packet switching
- with 35 users, probability gt 10 active less than
.0004
N users
1 Mbps link
283. Support for common services
- Application developers want a network to provide
services that make application programs
communicate with each other, not just sending
packets - E.g. reliably delivering an email message from a
sender to a receiver - Many complicated things need to happen
- Can you name a few?
- Design choices
- Application developers build all functions they
need - Network provides common services ? a layered
network architecture - Build it once, and shared many times
29- Interactive request/reply
- Streaming of data
- Bulk data transfer
- Key challenges what services/channels to provide
that can satisfy most applications at lowest
costs? - Approach identify common patterns, then decide
- What functions to implement
- Where to implement those functions
- We will discuss end-to-end arguments in future
class
30Ex how to provide reliability as a common service
- Failures may occur at different scopes
- Bit transmission errors
- Packet loss
- Component failures link, node
- Design choices
- Link layer
- Every hop in the router
- End systems
- In future classes, we will discuss how to cope
with these failures
314. Manageability
- Manage the network as it grows and when things go
wrong - An open research challenge
- Datacenter networks
- Backbones
- Home networks
- IP cameras, printers, network attached storage
32Overview
- Updated course administrative stuff
- Grading policy, office hours, piazza
- Design requirements of the original Internet
- Concepts of Network Architectures
- An Example of how the Internet works
33Network Architectures
- Many ways to build a network
- Use network architectures to characterize
different ways of building a network - The general blueprints that guide the design and
implementation of networks are referred to as
network architectures
34Central concepts
35Layering
Not so strict
- An abstraction to handle complexity
- A unifying model that capture important aspect of
a system - Encapsulate the model in an object that has an
interface for others to interact with - Hide the details from the users of the object
36Advantages of layering
- Simplify the design tasks
- Each layer implements simpler functions
- Modular design
- Can provide new services by modifying one layer
37Protocols
- The abstract objects that make up the layers of a
network system are called protocols - Each protocol defines two different interfaces
- Service interface
- Peer interface
38A protocol graph
- Peer-to-peer communication is indirect
- Except at the hardware level
- Potentially multiple protocols at each level
- Show the suite of protocols that make up a
network system with a protocol graph
39A sample protocol graph
40Protocol standardization
- Standard bodies such as IETF govern procedures
for introducing, validating, and approving
protocols - The Internet protocol suite uses open standard
- Set of rules governing the form and content of a
protocol graph are called a network architecture
41We reject kings, presidents, and voting. We
believe in rough consensus and running code-
David Clark
42Encapsulation
- Upper layer sends a message using the service
interface - A header, a small data structure, to add
information for peer-to-peer communication, is
attached to the front message - Sometimes a trailer is added to the end
- Message is called payload or data
- This process is called encapsulation
43(No Transcript)
44Multiplexing Demultiplexing
- Same ideas apply up and down the protocol graph
45Examples of Network Architectures
46The protocol graph of Internet
Applicatoin layer
Transport layer
Network layer
Link layer
- No strict layering. One can do cross-layer design
- Hourglass shaped IP defines a common method for
exchanging packets among different networks - To propose a new protocol, one must produce both
a spec and one/two implementations
47Functions of the Layers
- Link Layer
- Service Reliable transfer of frames over a
link Media Access Control on a LAN - Functions Framing, media access control, error
checking - Network Layer
- Service Move packets from source host to
destination host - Functions Routing, addressing
- Transport Layer
- Service Delivery of data between hosts
- Functions Connection establishment/termination,
error control, flow control - Application Layer
- Service Application specific (delivery of
email, retrieval of HTML documents, reliable
transfer of file) - Functions Application specific
48The Open Systems Interconnection (OSI)
architecture
Seven-layer
49- International Telecommunications Union (ITU)
publishes protocol specs based on the OSI
reference model - X dot series
- Physical layer handles raw bits
- Data link layer aggregate bits to frames.
Network adaptors implement it - Network layer handles host-to-host packet
delivery. Data units are called packets - Transport implements process channel. Data units
are called messages - Session layer handles multiple transport streams
belong to the same applications - Presentation layer data format, e.g., integer
format, ASCII string or not - Application layer application specific protocols
50Summary of New Terms
- Layering is an abstraction that captures
important aspects of the system, provides service
interfaces, and hides implementation details - Protocols are abstract objects that make up the
layers of a network system are - A protocol graph represents protocols that make
up a system - Nodes are protocols
- Links are depend-on relations
- Set of rules governing the form and content of a
protocol graph are called a network architecture - Attaching a header/trailer to an upper layer data
unit is referred to as encapsulation
51An Example
52A simple TCP/IP Example
- A user on host argon.tcpip-lab.edu (Argon)
makes web access to URL - http//neon. tcpip-lab.edu/index.html.
- What actually happens in the network?
53HTTP Request and HTTP response
- Web server runs an HTTP server program
- HTTP client Web browser runs an HTTP client
program - sends an HTTP request to HTTP server
- HTTP server responds with HTTP response
54HTTP Request
GET /example.html HTTP/1.1 Accept image/gif,
/ Accept-Language en-us Accept-Encoding gzip,
deflate User-Agent Mozilla/4.0 Host
192.168.123.144 Connection Keep-Alive
55HTTP Response
HTTP/1.1 200 OK Date Sat, 25 May 2002 211032
GMT Server Apache/1.3.19 (Unix) Last-Modified
Sat, 25 May 2002 205133 GMT ETag
"56497-51-3ceff955" Accept-Ranges
bytes Content-Length 81 Keep-Alive timeout15,
max100 Connection Keep-Alive Content-Type
text/html ltHTMLgt ltBODYgt ltH1gtInternet
Lablt/H1gt Click lta href"http//www.tcpip-lab.net/i
ndex.html"gtherelt/agt for the Internet Lab
webpage. lt/BODYgt lt/HTMLgt
- How does the HTTP request get from Argon to Neon
?
56From HTTP to TCP
- To send request, HTTP client program establishes
an TCP connection to the HTTP server Neon. - The HTTP server at Neon has a TCP server running
57Resolving hostnames and port numbers
- Since TCP does not work with hostnames and also
would not know how to find the HTTP server
program at Neon, two things must happen - 1. The name neon.tcpip-lab.edu must be
translated into a 32-bit IP address. - 2. The HTTP server at Neon must be identified by
a 16-bit port number.
58Translating a hostname into an IP address
- The translation of the hostname
neon.tcpip-lab.edu into an IP address is done via
a database lookup - gethostbyname(host)
- The distributed database used is called the
Domain Name System (DNS) - All machines on the Internet have an IP
address argon.tcpip-lab.edu 128.143.137.144 ne
on.tcpip-lab.edu 128.143.71.21
59Finding the port number
- Note Most services on the Internet are reachable
via well-known ports. E.g. All HTTP servers on
the Internet can be reached at port number 80. - So Argon simply knows the port number of the
HTTP server at a remote machine. - On most Unix systems, the well-known ports are
listed in a file with name /etc/services. The
well-known port numbers of some of the most
popular services are - ftp 21 finger 79
- telnet 23 http 80
- smtp 25 nntp 119
60Requesting a TCP Connection
connect(s, (struct sockaddr)sin, sizeof(sin))
- The HTTP client at argon.tcpip-lab.edu requests
the TCP client to establish a connection to port
80 of the machine with address 128.141.71.21
61Invoking the IP Protocol
- The TCP client at Argon sends a request to
establish a connection to port 80 at Neon - This is done by asking its local IP module to
send an IP datagram to 128.143.71.21 - (The data portion of the IP datagram contains the
request to open a connection)
62Sending the IP datagram to the default router
- Argon sends the IP datagram to its default router
- The default gateway is an IP router
- The default gateway for Argon is
Router137.tcpip-lab.edu (128.143.137.1).
63Invoking the device driver
- The IP module at Argon, tells its Ethernet device
driver to send an Ethernet frame to address
00e0f923a820 - Ethernet address of the default router is found
out via ARP
64The route from Argon to Neon
- Note that the router has a different name for
each of its interfaces.
65Sending an Ethernet frame
- The Ethernet device driver of Argon sends the
Ethernet frame to the Ethernet network interface
card (NIC) - The NIC sends the frame onto the wire
66Forwarding the IP datagram
- The IP router receives the Ethernet frame at
interface 128.143.137.1 - recovers the IP datagram
- determines that the IP datagram should be
forwarded to the interface with name 128.143.71.1 - The IP router determines that it can deliver the
IP datagram directly
67Invoking the Device Driver at the Router
- The IP protocol at Router71, tells its Ethernet
device driver to send an Ethernet frame to
address 0020af039828
68Sending another Ethernet frame
- The Ethernet device driver of Router71 sends the
Ethernet frame to the Ethernet NIC, which
transmits the frame onto the wire.
69Data has arrived at Neon
- Neon receives the Ethernet frame
- The payload of the Ethernet frame is an IP
datagram which is passed to the IP protocol. - The payload of the IP datagram is a TCP segment,
which is passed to the TCP server
70Summary
- Updated course administrative stuff
- Grading policy, office hours, piazza
- Design requirements of the original Internet
- Concepts of Network Architectures
- An Example of
- how the Internet works