Mod 0 Intro F24
Mod 0 Intro F24
Module 0
Introduction & Course Overview
Chenren Xu(许辰人)
Fall 2024
Includes material from lectures by David Wetherall (UW) and Jim Kurose (UMASS)
1
What does Honor Track mean for this course?
• Bilingual – English slides but taught in Mandarin
• Focus on WHY rather than WHAT and HOW
- Learn material (MOOC video, textbook, etc.) before coming to class
• Practice, practice, practice – this is a CS (not a EE) course!
• Class formulation
- Course review, quiz, lab assignment, recitation, guest lecture and student presentation
• Examination approach
- Open-notes quiz, in class discussion, and NO written midterm and final exam
- Lab projects and mini research project
• Depth and breadth both matter
- Get to know the state of art by reading top conference paper
- Get familiar with different accents
2
6
Goals
• Learn the principles of computer networking
- Internet architecture/protocols (TCP/IP) as a case study
- Generic problems and solutions: reliability despite failures, network growth and evolution,
resource allocation, security, offloading
• Get the hands-on practice of computer networking
- Understand the composition and transmission of Internet data at both packet and bit level
- Write a simplified TCP/IP protocol
• Connect you with the state-of-art of computer networking
- Exposed classic and recent impactful research paper in the field
- Involved in mini research project to gain research experiences
• Benefits
- Preliminary high-standard system research practice and training in networking field
- Get my reference letter if you do well in this course
7
Course Staff & Logistics
• Instructor • Lecture
- Prof. Chenren Xu(许辰人) - Mon. 13:00 – 14:50, Wed. 8:00 – 9:50
▪ Tenured Associate Professor in SCS - Rm. 423, Teaching Building No.2
▪ Email: [email protected]
• Office hour
• Teaching Assistants - By appointment
- Mr. Muhan Li(李牧涵)
• Online Post & Technical Discussion
▪ Ph.D. Student in SCS
- pku-compnet-24.slack.com
▪ Email: [email protected]
- Wechat group
- Mr. Xinyuming Liu(刘星宇明)
▪ Ph.D. Student in SCS
▪ Email: [email protected]
8
Course Information
• Both introductory and advanced course in computer networking
• Recommended prerequisites
- System programming: Introduction to Computer Systems (Linux C/C++ programming)
▪ Ideally 85+ or you think yourself as a system guy or geek
• Course materials
Recommended
Textbook readings
https://handoutset.com/wp-content/uploads/2022/02/Computer-Networks-Global-Edition-by-Andrew-Tanenbaum-Nick-Feamster-David-Wetherall.pdf
9
More (electronically available) supplementary readings
Sensor/Embedded/IoT/CPS systems Wireless Communication and Network
10
Topics
• Computer Networks 101 • Protocol support for Network Applications
- Usage and Applications, Components, Socket API, - DNS, HTTP, CDN and P2P
Protocol and Layering, Reference Model, History • Network Security
• PHY concepts and Wireless Fundamentals - Crypto, VPN, Middlebox, IPSec, TLS, DDoS
- Signals, Radio Propagation, Channels Properties, • Multimedia Networking
Modulation, Coding, Multiplexing, MIMO, OFDM, Spread - Video Streaming, QoS, RTP, Traffic Engineering
Spectrum, CDMA, RADAR, Backscatter • Emerging Technologies
• (W)LAN Concepts and Link Technologies - 5G Communication, IoT/Edge/Fog Architecture,
- Framing, Error Control, MAC and CSMA, LAN and Bluetooth, 802.15.4 and ZigBee, Vehicular
Switch, 802.11 and WiFi Networking, RFID and Localization, VLC, 802.11ah
• Internetworking and Internet and LoRaWAN, SDN and NFV
- Network Service, Addressing and Scaling, Routing
• End-to-end Transport
- Connection and Flow Management, Congestion
Management, Linux TCP/IP
11
Week Date Instructor Topics Note Date Instructor Topics Note
1-2 9/14 Chenren Wireless 9/18 Chenren Link Tech Lab 1 out
4 9/30 Chenren Wireless Sensing and AIoT 10/2 No class MOOC (Cellular and rest)
5 10/7 No class MOOC (Cellular and rest) Lab 1 due 10/9 Qirui Cellular Lab 2 out
6 10/14 Chenren Internet(working) Quiz 1; 1 pre 10/16 Chenren End-to-End Data Transfer 1 pre
7 10/21 Chenren NetApp Protocols 1 pre 10/23 Muhan Recitation Lab 2 due; Lab 3 out
10 11/11 Chenren Project introduction 11/13 Chenren My Research Journey Lab 3 due
11 11/18 Chenren Project meeting Proposal due; Quiz 3 11/20 Chenren Proposal presentation
12 11/25 Chenren TBD 1 pre; Lab 4 due 11/27 Chenren TBD 1 pre
• ACM/IEEE Fellow
• Fellow of the Canadian Academy of Engineering
• SIGCOMM Doctoral Dissertation Awardee
• SIGCOMM/CCS Best Paper Awardee
• Co-inventor of TCP CUBIC
• Alibaba DAMO XG Lab Director
• China Mobile Principle Network Architect
• Meta Senior Engineering Manager
13
Grading policy
• Main course (50%) • Practicum (50+5%)
- Three quizzes (10% for each) - Four labs covering full-stack system software (35%)
▪ Open notes: one A4 cheating sheet ▪ Write your own TCP/IP and network applications (35%)
➢ MUST be hand-written ▪ Premium track (5%)
▪ Source: lecture notes and readings - One mini research project (15%)
- Research paper pre (10%) ▪ Team size of <= three members
▪ NO COPY from authors’ slides! ▪ Poster (5%) + Live demo (5%) + Write-up (5%)
- Class participation (10%) ▪ To be elaborated in Research Methods
▪ In-class discussion
• Late penalty: 10% credits lost per day
15
Practicum
• Logistics
- TA will give the tutorial and office hour in class
- Cheating penalty: 20% credits of overall grade at a time
- Get started early!
• One group (<=2) lab project and one group (<=3) research project
- Lab 4 (10%): Secure File Transfer Protocol implementation using OpenSSL
- Lab X (15+5%): Mini Research Project
16
Research project report (15+5%)
• Introduction (5%) • Guidelines
- Motivation + problem statement (1%) - https://www.overleaf.com/latex/templates/acm-
- Prior work (1%) conference-proceedings-new-master-
- Key ideas (1%) template/pnrfvrrdbfwt
- Evaluation results (1%) - 6 to 10 pages in double column
- Contribution summary (1%) - Submit by TBD on Slack
• System design (4%)
• Evaluation (5%)
- Experimental methodology (1%)
- Results (2%)
- Interpretation (2%)
• Discussion, conclusion and future work (1%)
• Live demo video for extra credits (5%)
18
Where computer scientists publish research papers
• Computer science is dominated by major conferences
- They attract top researchers from all over the world
- They often only accept ~15% (30 ~ 50) from the total submissions
- They are often annually held in interesting international locations
• Plan before
• Meet people
• Ask questions
• Make friends
• Taste food
• Travel around
Enjoy the trip
19
23
Oversea Research Opportunities
• Mobile systems and XG • Wireless and IoT sensing systems
- Prof. Lin Zhong, Yale University - Prof. Cheng Zhang, Cornell Univ.
- Prof. Feng Qian, University of Minnesota - Prof. Jie Xiong, Umass – Amherst
- Prof. Chunyi Peng, Purdue University - Prof. Dinesh Bharadia, UCSD
- Prof. Nic Lane, University of Cambridge - Prof. Deepak Vasisht, UIUC
- Prof. Mo Li, Nanyang Technical University - Prof. Lili Qiu, UT Austin
- Prof. Cecilia Mascolo, University of Cambridge - Prof. Omid Abari, UCLA
- Dr. Pengyu Zhang, Alibaba - Prof. Swarun Kumar, CMU
• Networking for AI and AI for networking - Prof. Xinyu Zhang, UCSD
- Prof. Minlan Yu, Harvard University - Prof. Xia Zhou, Columbia Univ.
- Prof. Junchen Jiang, University of Chicago - Prof. Fadel Abib, MIT Media Lab
- Dr. Ming Zhang & Hongqiang Liu, Alibaba - Prof. Dina Katabi, MIT CSAIL
- Dr. Chuanxiong Guo & Yibo Zhu, Bytedance
24
Introduction of Today’s Internet
• Goal and Motivation
• Uses of Networks
• Network Components
• Sockets and Services
• Peek inside the Network using Traceroute
• Protocol and Layering
• Reference Models
• Internet History
25
Focus of the course used to be …
26
Core Internet and
Cloud Infrastructure
20 ~ 200
ms
Service Cache
Edge Service Cache Service Cache
Network
Mobile Network Home Network Enterprise Network
< 5 ms
Mobile IoT
Device Device
27
Goals and Motivations
• To learn how the Internet works
- Why and how?
- What’s the impact on our world?
- What really happens when you “browse the web”?
- What are TCP/IP, DNS, HTTP, NAT, VPNs, 802.11 etc., and why do we need all of them?
28
From this experimental network …
29
30
The Impact of Internet
• An enabler of societal change • An engine of economic growth
- Easy access to knowledge - Advertising-sponsored search
- Sharing economy
31
Fundamentals
• Intellectual interest Key problem Example solutions
- Example key problem: Reliability! Reliability despite failures Codes for error detection/correction
Routing around failures
▪ Any part of the Internet might fail
Network growth and Addressing and naming
▪ Messages might be corrupted evolution Protocol layering
▪ So how do we provide reliability? Allocation of resources like Multiple access
- Reliability solutions bandwidth Congestion control
Security against various Confidentiality of messages
▪ Codes to detect/correct errors
threats Authentication of communicating parties
▪ Routing around failures …
• Reinvention Growth / Tech Driver Upheaval
- The Internet is constantly being re-invented! Emergence of the web Content Distribution Networks
▪ Growth over time and technology trends drive Digital songs/videos Peer-to-peer file sharing
upheavals in Internet design and usage Falling cost/bit Voice-over-IP calling
Many Internet hosts IPv6
- Today’s Internet is different from yesterday’s
Wireless advances Mobile devices
▪ Tomorrow’s will be different again
▪ But the fundamentals remain the same Examples of upheavals in the past 1-2 decades
32
Introduction of Today’s Internet
• Goal and Motivation
• Uses of Networks
• Network Components
• Sockets and Services
• Peek inside the Network using Traceroute
• Protocol and Layering
• Reference Models
• Internet History
33
Human Communication and Resource Sharing
• From the telephone onwards:
- VoIP (voice-over-IP)
- Instant messaging
- Video conferencing
- Social networking
34
Statistical Multiplexing
• Sharing of network bandwidth between users • With 30 independent users, still unlikely (2%
according to the statistics of their demand chance) to need more than 100 Mbps!
- Useful because users are mostly idle and their - Binomial probabilities
traffic is bursty • Can serve more users with the same size network!
5
• Key question: 100 ... - Statistical multiplexing gain is 30/20 or 1.5X
- How much does it help? ISP 5 - p is over claimed
5 - But users will have degraded service if unlucky
• Example: Users in an ISP network
- Network has 100 Mbps
- Each user subscribes to 5 Mbps, for videos
- Assume a user is active only 50% of the time …
• How many users can the ISP support?
- With dedicated bandwidth for each user: 20
- Probability all bandwidth is used (assuming
independent users)? 35
Content Delivery
• Same content is delivered to many users
- Videos, songs, apps and upgrades, web pages, games, (and slides) …
• More efficient than sending a copy all the way to each user
- Uses replicas in the network
Sending content from the source to 4 users But sending content via replicas takes only 4 +
takes 4 x 3 = 12 “network hops” in the example 2 = 6 “network hops”
User User
... ...
Source Source Replica
User User
36
Computer/Device Communication and Connectivity
• To let computers interact with other computers
- E.g., e-commerce, reservations
• Enables automated information processing across different parties
• For gathering sensor data, and for manipulating the world
- E.g., webcams, location on mobile phones, door locks, …
- This is a rich, emerging usage, namely Internet-of-Things
• The value of connectivity
- “Metcalfe’s Law” ~1980:
▪ The value of a network of N nodes is proportional to N 2
▪ Large networks are relatively more valuable than small ones
- Example: both sides have 12 nodes, but the left network has more connectivity
38
Parts of a Network
app • Types of link • Types of transmission
- Full-duplex: bidirectional - Broadcast: everyone will receive
at the same time - Unicast: appointed one will receive
- Half-duplex: bidirectional, - Multicast: group members will receive
host router link one at a time - Anycast: appointed “anyone” can
- Simplex: unidirectional receive
39
Example networks and their name by scale
100 ~ 1000
Country, continent WAN (Wide Area Network) Large ISP, VPN
km
40
Key interfaces for determining the network boundaries
• Between (1) apps and network, and (2) network components
Network-application interfaces define Network-network interfaces define how
how apps use the network – Sockets nodes work together – Traceroute can
are widely used in practice peek in the network
app app
host host
41
Introduction of Today’s Internet
• Goal and Motivation
• Uses of Networks
• Network Components
• Sockets and Services
• Peek inside the Network using Traceroute
• Protocol and Layering
• Reference Models
• Internet History
42
Network Application Interface
• Defines how apps use the network
- Which primitive operations and services the
lower layer makes available to the upper one
- Lets apps talk to each other via hosts; hides the
details of the network
• Motivating Application
- Simple client-server setup
▪ Client app sends a request to server app
▪ Server app returns a (longer) reply
- This is the basis for many apps!
▪ Echo: send message, get it back
▪ File transfer: send name, get file
▪ Web browsing: send URL, get page
43
Socket API
• Simple abstraction to use the network Primitive Meaning
- The network service API used to write all SOCKET Create a new communication endpoint
Internet applications BIND Associate a local address with a socket
- Part of all major OSes and languages; Announce willingness to accept
originally Berkeley (Unix) ~1983 LISTEN connections; give queue size; block
waiting for an incoming connection
• Supports two kinds of network services
Actively establish a connection with a
- Streams: reliably send a stream of bytes CONNECT
waiting peer
- Datagrams: unreliably send separate messages
Passively establish an incoming
• Sockets let apps attach to the local network ACCEPT
connection from a peer
at different ports Send some data over the connection to
SEND
the peer
Receive some data from the
RECEIVE
connection
CLOSE Release/terminate the connection
44
Using Sockets
45
Introduction of Today’s Internet
• Goal and Motivation
• Uses of Networks
• Network Components
• Sockets and Services
• Peek inside the Network using Traceroute
• Protocol and Layering
• Reference Models
• Internet History
46
Network Service API Hides Details
• Apps talk to other apps with no real idea of what is inside the network
- This is good! But you may be curious …
47
Traceroute
• Widely used command-line tool to
let hosts peek inside the network
- On all OSes (tracert on Windows)
- Developed by Van Jacobson ~1987
- Uses a network-network interface (IP)
in a way we will explain later
• Probes successive hops to find
network path
48
Introduction of Today’s Internet
• Goal and Motivation
• Uses of Networks
• Network Components
• Sockets and Services
• Peek inside the Network using Traceroute
• Protocol and Layering
• Reference Models
• Internet History
49
Networks need modularity
• The network does much for apps:
- Make and break connections
- Find a path through the network
- Transfers information reliably
They can’t be managed by a
- Transfers arbitrary length information
single entity!
- Send as fast as the network allows
- Shares bandwidth among users
- Secures information in transit
- Lets many new hosts be added
50
Protocols and Layers
• Protocols and layering are the main structuring methods used to divide up network functionality
- Each instance of a protocol talks virtually to its peer using the protocol
- Each instance of a protocol uses only the services of the lower layer
• Protocols are horizontal, • Set of protocols in use is • An example protocol stack used
layers are vertical called a protocol stack by mobile web browser
51
Encapsulation
• Encapsulation is the mechanism used to effect
protocol layering
- Lower layer wraps higher layer content, adding its own
information to make a new message for delivery
- Like sending a letter in an envelope; postal service
doesn’t look inside
• Message “on the wire” begins to look like an onion
- Lower layers are outermost
• Normally draw message like this:
- Each layer adds its own header
• More involved in practice
- Trailers as well as headers, encrypt/compress contents
- Segmentation (divide long message) and reassembly 52
Demultiplexing
• Incoming message must be passed to the protocols that it uses
53
Comments on Services, Protocols and Layers
• Service and protocol
- Services relate to the interfaces between layers
- Protocols relate to the packets sent between peer entities on different machines
• Layers are guidelines, not strict
- May have multiple protocols working together in one layer
- May be difficult to assign a specific protocol to a layer
- Information hiding and reuse
- But:
▪ Adds overhead for transmission and header processing
▪ Hides information from the app dev who cares the underlying information 54
Introduction of Today’s Internet
• Goal and Motivation
• Uses of Networks
• Network Components
• Sockets and Services
• Peek inside the Network using Traceroute
• Protocol and Layering
• Reference Models
• Internet History
55
A Little Guidance …
• What functionality should we implement at which layer?
- This is a key design question
- Reference models provide frameworks that guide us
56
OSI “7 layer” Reference Model
• A principled, international standard, to connect systems
- Influential, but not used in practice
57
Internet Reference Model
• A four layer model based on experience; omits some OSI layers and uses IP as
the network layer.
• IP is the “narrow waist” of the Internet
- Supports many different links below and apps above
58
Layer-based Names
• For units of data: • For devices in the network:
Repeater or hub
Layer Unit of Data
Application Message Switch or bridge
59
60
61
Standards Bodies
• Where all the protocols come from!
- Focus is on interoperability
63
Rough Internet Timeline
• ARPANET by U.S. DoD was the precursor to the Internet
- Motivated for resource sharing
- Launched with 4 nodes in 1969, grew to hundreds of hosts
- Packet switching (Kleinrock, Davies), decentralized control (Baran)
- Internetworking became the basis for the Internet; pioneered by Cerf & Kahn in 1974
(popularly known as the “fathers of the Internet”), later became TCP/IP
- First “killer app” was email
• Growing Up – NSFNET and early Internet architecture
- NSFNET 85 supports educational networks
▪ Initially connected supercomputer sites, but soon became the backbone for all networks
- Classic Internet protocols we use emerged
▪ TCP/IP (transport), DNS (naming), Berkeley sockets (API) in 83, BGP (routing) in 93
- Much growth from PCs and Ethernet LANs
▪ Campuses, businesses, then homes
▪ 1 million hosts by 1993 …
• Modern Internet – Birth of the Web
- After ’95, connectivity is provided by large ISPs who are competitors
▪ They connect at Internet eXchange Point (IXP) facilities
▪ Later, large content providers connect
- Web bursts on the scene in 1993
▪ Growth leads to CDNs, ICANN in ’98: most bits are video (soon wireless); content is driving the Internet
64
Internet history milestone
• 1961 – 1972: Early packet-switching principles • 1990, 2000’s: commercialization, the Web, new apps
- 1961: Kleinrock – queueing theory shows effectiveness of packet- - Early 1990’s:
switching ▪ ARPAnet and NSFnet decommissioned, 1995
▪ Web: HTML, HTTP: Berners-Lee (hypertext [Bush 1945, Nelson
- 1964: Baran – packet-switching in military nets
1960’s]); commercialization of the Web (1994: Mosaic, later Netscape)
- 1967: ARPAnet conceived by Advanced Research Projects Agency
- Late 1990’s – 2000’s:
- 1969: First ARPAnet node operational ▪ more killer apps: instant messaging, P2P file sharing
- 1972: ARPAnet public demo; NCP (Network Control Protocol) first ▪ network security to forefront
host-host protocol; first e-mail program; ARPAnet has 15 nodes ▪ Est. 50 million host, 100 million+ users
▪ backbone links running at Gbps
• 1972 – 1980: Internetworking, new and proprietary nets
- 1970: ALOHAnet satellite network in Hawaii
• 2005 – present
- ~1 billion traditional hosts (desktops, laptops, tablets)
- 1974: Cerf and Kahn – architecture for interconnecting networks
- 4 ~ 5 billion phones about a billion of which are data capable
- 1976: Ethernet at Xerox PARC
- Aggressive deployment of broadband access
- 1979: ARPAnet has 200 nodes
- Increasing ubiquity of high-speed wireless access
• 1980 – 1990: new protocols, a proliferation of networks - Emergence of online social networks:
- 1982: SMTP e-mail protocol ▪ Facebook: ~1 billion users
- 1983: deployment of TCP/IP - Service providers (Google, Microsoft) create their own networks
- 1983: DNS defined for name-to-IP-address translation ▪ Bypass Internet, providing “instantaneous” access to search, email, etc.
- 1985: FTP protocol defined - E-commerce, universities, enterprises running their services in
- 1988: TCP congestion control “cloud”
65
Homework – Course Overview
• MOOC
- Overview
▪ http://media.pearsoncmg.com/ph/streaming/esm/tanenbaum5e_videonotes/tanenbaum_videoNotes.html
- “Design Philosophy in Networked Systems” guest lecture by Justine Sherry from CMU CSD
▪ https://disk.pku.edu.cn/link/7D10AD2DEE444D14207944AAA46D357C
- “Towards Realizing the Internet-of-Things Vision: In-body, Homes, Cities and Farms” job talk by Deepak
Vasisht from MIT CSAIL [Optional]
▪ https://www.microsoft.com/en-us/research/video/towards-realizing-the-internet-of-things-vision-in-body-homes-cities-
and-farms/
• Supplemental material
- A Brief History of the Internet [Optional]
- The Design Philosophy of the DARPA Internet Protocols [Optional]
▪ http://ccr.sigcomm.org/archive/1995/jan95/ccr-9501-clark.pdf
▪ http://web.mit.edu/6.829/www/currentsemester/papers/ARPAdesign-revisited13.pdf
- End-to-end Arguments in System Design [Optional]
66
Homework – PHY concepts and Wireless
• MOOC
- Physical Layer
▪ http://media.pearsoncmg.com/ph/streaming/esm/tanenbaum5e_videonotes/tanenbaum_videoNotes.html
- MIT Principles of Digital Communications [Optional]
▪ https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-450-principles-of-digital-communications-i-
fall-2006/
▪ https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-451-principles-of-digital-communication-ii-
spring-2005/
- Principles of Wireless Mobile Communications by Prof. Aditya K. Jagannatham [Optional]
• Supplemental material
- Defining, Designing and Evaluating Digital Communication Systems, IEEE Communication Magazine, 1993
- Tutorials on Digital Communications Engineering [Optional]
▪ http://complextoreal.com/tutorials/
- The Scientist and Engineer’s Guide to Digital Signal Processing [Optional]
▪ http://www.dspguide.com/
67