You are on page 1of 35

CS 382: Network-Centric Computing

Overview of the Internet

Zartash Afzal Uzmi


Spring 2023-24

ACK: Slides use some material from Scott Shenker (UC Berkeley)
Administrivia
 Look for the following items on LMS (by tomorrow):
 Textbooks
 Piazza and TA office hours information
 Schedule (dates for quizzes, assignments, tutorials)

 A survey to determine tutorial timings is out


 First tutorial: within the coming week
 On basics of Python

2
Goal of Today’s Lecture
 Introduce basic networking language

 Give you the big picture


 Help you understand the challenges the Internet is solving
 Without explaining the solutions
 We will study the solutions in subsequent classes

3
Specific questions for today’s lecture
 Defining characteristics of the internet
 What are the basic networking components?
 Who runs different networks on the Internet?
 What is the purpose of the internet?
 What are the fundamental challenges the internet faces?
 How does the internet support so many diverse applications?
 What are packets?
 Why packets?

4
Internet: Defining Characteristics
 The internet is a network of networks – a federated system

 Enormous scale
 Approx. 5B users, 1.2B+ websites, 500+hrs YT video uploaded per min

 Dynamic range
 in latency (few ms to min), bandwidth, packet loss (near 0 to above 60%)

 Diversity
 in technologies (DSL, fiber, etc.), end devices, user roles
5
Internet: Defining Characteristics
 Constantly evolving
 kb/s to Tb/s, Email/FTP to Millions of Apps in app-stores
 Asynchronous in operation
 Lahore-Karachi round trip time at near light speed?
 How many cycles of a 2.8GHz CPU are in that time?
 Failure prone
 Something will fail somewhere; and, often
 Constrained by what’s practical
 Physical interface count, bandwidth, error rate

6
Basic Networking Components
 Packets: chunks of data bits
 More specific names: frame, datagram, segment

 End systems (hosts): they send/receive packets

 Switches/routers: they forward packets


 Correct routing: packets reach their destination

 Links: connect end systems to switches; and switches to each other

7
car navigator

heart pacemaker

smartphone
end-system

iPad
Linux server MAC laptop
Windows PC 8
end-system switch

9
link
phone
lines

end-system switch
fibers
wireless
cable TV links
lines

10
link

phone company
end-system switch

university net
cable company
Internet Service
Provider
11
link

end-system switch
path

packet

Internet Service
Provider 12
A variety of applications
facebook Minecraft
server server

IM
FB
messenger
IM
FB messenger

firefox
minecraft client accessing 13

facebook
Think how are they Coded

while (...) {
while (...) { message = receive( ... );
message = ...; }
send ( message, ... );
}

Bob

Alice

14
The Core Task of Internet
 Delivers packets between programs (applications) on different hosts
 This involves both the network and network stack

 Network: Routers/switches and links

 Network stack: networking software/hardware on end-systems


 Stack replicates some router/switch functionality
 Then adds some additional networking functionality…
 ...before handing the body of a packet to an application

15
What are Packets?

16
Packets
 Packets are chunks of bits with:
 Header: meaningful to the network (and network stack)
 Can be more than one header!
 Body: meaningful only to the application

Header Body

Used By Network Used By App

 The packet's body can be bits in a text or PDF file, image, etc.
 What information do you think should go in a header?
17
What Must The Header Contain?
 Packet must describe where it should be sent

 Requires an address for the destination host

 Only way a router/switch can know what to do with the packet

18
Names vs Addresses
 Network address: where a host is located
 Network name: which host is it
 When you move a server to a new location
 The name doesn’t change
 But address does (mostly!)

 Same as with your name and address!

 Let’s get back to packet delivery….

19
Packets Must Be Sent Along Path

link

end-system switch
path

packet

20
Fundamental Challenge #1
 Route packets through the network to the CORRECT destination

 Given the destination address, how does each switch/router forward


packets so that the packet reaches the destination?

 When a packet arrives at a router, the routing table determines which


outgoing link the packet is sent on

 Where do these routing tables come from?

21
Routing Protocols (Conceptually)
 Gather information about the network topology
 Compute paths through that topology
 Is there just one path from one host to another?

 Store forwarding information in each router:


 If a packet is destined for destination X, send it out on this link
 If a packet is destined for destination Y, send it out on that link
 …

 We call this a routing table (also a forwarding table!)

22
Control Plane vs Data Plane
 Control plane: mechanisms used to compute routing tables
 Inherently global: must know topology to compute
 Routing algorithm is part of the control plane
 Time scale: per network event

 Data plane: using those tables to actually forward packets


 Inherently local: depends only on arriving packet and local routing table
 Forwarding mechanism is part of data plane
 Time scale: per packet arrival

23
Fundamental Challenge #2
 How do you deliver packets reliably?

 Packets can be dropped along the way


 Buffers in the router can overflow
 Routers can crash while buffering packets
 Links can garble packets

 How do you make sure packets arrive safely on an unreliable network?


 Or at least know if they are not delivered….
 Want no false positives, and a high chance of success
24
Two Questions about Reliability
 Who is responsible for this? (architecture)
 Network?
 Host?

 How is it implemented? (engineering)

 We will consider both perspectives….

25
Other Important Challenges
 Congestion control
 Hosts on the Internet independently decide at what rate they will send packets
 How to ensure that these independent decisions don’t overload various links?

 Routing with autonomous control


 Internet is comprised of many different Internet Service Providers (ISPs)
 More generally called Autonomous Systems (ASes)
 They each get to make their own decisions about how to do routing
 How can you ensure that these independent decisions result in usable end-to-end
routes?

26
Other Important Challenges (Cont’d)
 How do securely communicate over an insecure medium?
 Messages between two hosts may be intercepted by an intruder
 Hosts want to ensure that they are indeed talking to the destination host
 And the sent messages are not altered by other parties

27
What Have We Missed?
 Consider when you access a web page
 Insert URL into a browser (e.g., cnn.com)
 Packets sent to the website (reliably)
 Packets reach the application (web server) on the destination host

 How do you get to the website?


 URL is a user-level name (e.g., cnn.com)
 The network needs an address (e.g., where is cnn.com?)

 Must map names to addresses….

28
Mapping Names to Addresses: Recap
 URLs are based on the name of the host containing the content (i.e.,
cnn.com names a host)

 Before you can send packets to cnn.com, you must resolve names into
the host’s address

 Done by the Domain Name System (DNS)

29
Finishing Our Story
 We now have the address of the website
 We can send packets to host

 When a packet arrives at a host, what does the host do with it?
 To which program (app) should the packet be sent?

 If the packet header only has the destination address, how does the host
know where to deliver the packet?

30
Of Sockets and Ports
 When a process wants access to the network, it opens a socket, which is
associated with a port number

 Socket: an Operating System (OS) mechanism that connects processes to


the networking stack

 Port number: a number identifying a particular program/process

 The OS uses the port number to direct incoming packets to a specific


network application (e.g., port 80 for an HTTP server)

31
Implications for Packet Header
 Packet header includes:
 Destination address and port number
 Source address and port number

 When a packet arrives, the packet is delivered to the socket associated


with the destination port
 Multiple sockets can be associated with the same port!

 But why do we need the source address and port?

32
Separation of Concerns
 Network
 Deliver packets from host to host (based on address)

 Network Stack (OS, and network hardware)


 Deliver packets to the appropriate socket (based on the port)

 Applications
 Send and receive packets
 Understand the content of packet bodies

33
Summary
 Network(ed) applications:
 Exchange messages with other end-systems
 The core task of the Internet
 Delivers packets between programs (applications) on different end-systems
 Important problems the internet is solving:
 Routing
 Reliable transfer
 Congestion control
 Mapping names to addresses
 Secure Communication
 Routing with autonomous control

34
Questions?

35

You might also like