You are on page 1of 35

CS 382: Network-Centric Computing

Overview of the Internet

Dr. Zafar Ayyub Qazi


Spring 2023

ACK: Slides use some material from Scott Shenker (UC Berkeley)
Administrivia
l Textbooks have been uploaded on LMS

l TA office hours information available on LMS

l Tentative date and time for first tutorial: 24th Jan, 7:30-8:30pm
l On basics of Python

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

l Give you the big picture


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

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

4
Basic Networking Components
l End-systems: they send/receive packets
l We will also sometimes use the term hosts for end-systems

l Switches/routers: they forward packets


l Routing decisions ensure packets reach destination
l Will use terms switch and router interchangeably

l Links: connect end-systems to switches, and switches to each other

5
car navigator

heart pacemaker

smartphone
end-system

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

7
link
phone
lines

end-system switch
fibers
wireless
cable TV links
lines

8
Who runs the network?

link
phone company

end-system switch
university

cable company
9
What’s the purpose of the Internet?

link

end-system switch
path
packet

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

l Network: Routers/switches and links

l Network stack: networking software on end-systems


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

11
What are Packets?

12
Packets
l Packets are bags of bits with:
l Header: meaningful to network (and network stack)
l Can be more than one header!
l Body: meaningful only to application

Header Body

Used By Network Used By App

l Body can be bits in a file, image, etc.


l What information do you think should go in a header?
13
Packets Must Be Sent Along Path

link

end-system switch
path
packet

14
What Must Header Contain For This?

15
What Must Header Contain For This?
l Packet must describe where it should be sent

l Requires an address for the destination host

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

16
Names vs Addresses
l Network address: where host is located

l Network name: which host it is

l When you move server to a new building


l Name doesn’t change
l But address does

l Same thing with your own name and address!

l Let’s get back to packet delivery….

17
Packets Must Be Sent Along Path

link

end-system switch
path
packet

18
Fundamental Challenge #1
l Route packets through the network to destination

l Given destination address, how does each switch/router forward


packets so that packet reaches destination?

l When a packet arrives at a router, the routing table determines


which outgoing link the packet is sent on

l Where do these routing tables come from?

19
Routing Protocols (Conceptually)
l Gather information about the network topology

l Compute paths through that topology

l Store forwarding information in each router:


l If packet is destined for X, send out this link
l If packet is destined for Y, send out that link
l …

l We call this a routing table

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

l Data plane: using those tables to actually forward packets


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

21
Fundamental Challenge #2
l How do you deliver packets reliably?

l Packets can be dropped along the way


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

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


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

l How is it implemented? (engineering)

l We will consider both perspectives….

23
Other Important Challenges
l Congestion control
l Hosts on the Internet independently decide at what rate they will send packets
l How can you make sure that these independent decisions don’t overload
various links?
l Routing with autonomous control
l Internet is comprised of many different Internet Service Providers (ISPs)
l More generally called Autonomous Systems (ASes)
l They each get to make their own decisions about how to do routing
l How can you make sure that these independent decisions result in usable end-
to-end routes?

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

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

l How do you get to the web site?


l URL is user-level name (e.g., cnn.com)
l Network needs address (e.g., where is cnn.com?)

l Must map names to addresses….

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

l Before you can send packets to cnn.com, you must resolve


names into the host’s address

l Done by the Domain Name System (DNS)

27
Finishing Our Story
l We now have the address of the web site
l So we can send packets to host

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

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

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

l Socket: an Operating System (OS) mechanism that connects


processes to the networking stack

l Port number: a number that identifies that particular socket

l The port number is used by the OS to direct incoming packets

29
Implications for Packet Header
l Packer header includes:
l Destination address and port
l Source address and port

l When a packet arrives, the packet is delivered to socket


associated with the destination port

l But why we need source address and port?

30
Separation of Concerns
l Network
l Deliver packets from host to host (based on address)

l Network Stack (OS)


l Deliver packets to appropriate socket (based on port)

l Applications
l Send and receive packets
l Understand content of packet bodies

l Secret of the Internet’s success is getting these and other


abstractions right… 31
Variety of applications
facebook
server world of
warcraft server

instant
messaging
instant messaging

world of warcraft firefox accessing


client facebook 32
Using the network….

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

Talal

Talha

33
Summary
l Network(ed) applications:
l Exchange messages with other end-systems

l Core task of the Internet


l Delivers packets between programs (applications) on different end-systems

l Important problems Internet is solving:


l Routing
l Reliable transfer
l Congestion control
l Mapping names to addresses
l Secure Communication 34

l Routing with autonomous control


Questions?

35

You might also like