Download as pdf or txt
Download as pdf or txt
You are on page 1of 46

CS 456/656

Computer Networks
Lecture 15: Network Layer – Part 6
Mina Tahmasbi Arashloo
Fall 2023
A note on the slides

Adapted from the slides that


accompany this book.
All material copyright 1996-2023
J.F Kurose and K.W. Ross, All Rights Reserved

Computer Networking: A
Top-Down Approach
8th edition
Jim Kurose, Keith Ross
Pearson, 2020
Network layer: roadmap
§ Network layer: overview §Destination-based forwarding
• Routing and forwarding §Software-defined networking
• Service model • SDN overview
§ IP: the Internet Protocol • Generalized forwarding
§ Routing protocols • OpenFlow
• Link state §What should/does go in the
• Distance vector network?
§ Making routing scalable • End-to-end argument
• Intra-ISP routing: OSPF • Middleboxes
• Routing among ISPs: BGP
Where’s the intelligence?

But the creators of the


Internet took a different
approach!

20th century phone net:


• intelligence/computing at
network switches
Architectural Principles of the Internet
RFC 1958
“Many members of the Internet community would argue that there is no architecture, but only a tradition,
which was not written down for the first 25 years (or at least not by the IAB). However, in very general terms,
the community believes that the goal is connectivity, the tool is the Internet
Protocol, and the intelligence is end to end rather than hidden in the
network.”

Three cornerstone beliefs:


§ simple connectivity
§ IP protocol: that narrow waist
§ intelligence, complexity at network edge
Where’s the intelligence?

20th century phone net: Internet (until early 2000s)


• intelligence/computing at • intelligence, computing at edge
network switches
Architectural Principles of the Internet
RFC 1958
“Many members of the Internet community would argue that there is no architecture, but only a tradition,
which was not written down for the first 25 years (or at least not by the IAB). However, in very general terms,
the community believes that the goal is connectivity, the tool is the Internet
Protocol, and the intelligence is end to end rather than hidden in the
network.”

Three cornerstone beliefs:


§ simple connectivity
§ IP protocol: that narrow waist
§ intelligence, complexity at network edge
Architectural Principles of the Internet
RFC 1958
“Many members of the Internet community would argue that there is no architecture, but only a tradition,
which was not written down for the first 25 years (or at least not by the IAB). However, in very general terms,
the community believes that the goal is connectivity, the tool is the Internet
Protocol, and the intelligence is end to end rather than hidden in the
network.”

Three cornerstone beliefs:


§ simple connectivity
§ IP protocol: that narrow waist
§ intelligence, complexity at network edge
The end-to-end argument
§ some network functionality (e.g., reliable data transfer, congestion)
can be implemented in network, or at network edge

application end-end implementation of reliable data transfer application


transport transport
network network
data link data link
physical physical

application
application
transport
transport
network hop-by-hop (in-network) implementation of reliable data transfer network
data link
data link
physical network
physical
network network network network network link
link link link link link physical
physical physical physical physical physical
The end-to-end argument
§ some network functionality (e.g., reliable data transfer, congestion)
can be implemented in network, or at network edge

end-end implementation of reliable data transfer


?
application application
transport transport
network network
data link data link

?
physical physical

?
?
?
? ?
application

?
application
transport
transport
network hop-by-hop (in-network) implementation of reliable data transfer network
data link
data link
physical network
physical
network network network network network link
link link link link link physical
physical physical physical physical physical
The end-to-end argument
§ some network functionality (e.g., reliable data transfer, congestion)
can be implemented in network, or at network edge

“The function in question can completely and correctly be implemented only


with the knowledge and help of the application standing at the end points of the
communication system. Therefore, providing that questioned function as a
feature of the communication system itself is not possible. (Sometimes an
incomplete version of the function provided by the communication system may
be useful as a performance enhancement.)

We call this line of reasoning against low-level function implementation the “end-
to-end argument.”
Saltzer, Reed, Clark 1981
The end-to-end argument
§ some network functionality (e.g., reliable data transfer, congestion)
can be implemented in network, or at network edge

application end-end implementation of reliable data transfer application

👍
transport transport
network network
data link data link
physical physical

application
application
transport

👎
transport
network hop-by-hop (in-network) implementation of reliable data transfer network
data link
data link
physical network
physical
network network network network network link
link link link link link physical
physical physical physical physical physical
The IP hourglass

HTTP SMTP RTP


QUIC DASH …
Internet’s “thin waist”: many protocols
§ one network layer TCP UDP in physical, link,
protocol: IP
§ must be implemented IP transport, and
by every (billions) of application
Ethernet PPP …
Internet-connected PDCP WiFi Bluetooth layers
devices
copper radio fiber
Side note: end-to-end argument is not set in stone

§ This was a design decision made by the designers of the Internet


protocol stack to meet their requirements for the Internet
§ Other networks with different requirements can make different
choices
§ For example, the InfiniBand protocol stack offers reliable data
transfer at the network layer
§ No packets will be lost!
§ More limited in scale
§ Can’t easily inter-operate with the Internet
Make sure you know
§ What the end-to-end argument is
• With an example
§ How it affected the design of the Internet and its protocol stack

Network Layer: 4-15


Network layer: roadmap
§ Network layer: overview §Destination-based forwarding
• Routing and forwarding §Software-defined networking
• Service model • SDN overview
§ IP: the Internet Protocol • Generalized forwarding
§ Routing protocols • OpenFlow
• Link state §What should/does go in the
• Distance vector network?
§ Making routing scalable • End-to-end argument
• Intra-ISP routing: OSPF • Middleboxes
• Routing among ISPs: BGP
Where’s the intelligence?

Turned out the network


still may need to have
some intelligence…

20th century phone net: Internet (until early 2000s)


• intelligence/computing at • intelligence, computing at edge
network switches
Middleboxes
Middlebox (RFC 3234)

“any intermediary box performing functions apart


from normal, standard functions of an IP router on
the data path between a source host and
destination host”
Middleboxes everywhere!
Firewalls, Intrusion
Detection System (IDS):
national or global ISP
drop suspicious traffic
NAT: modifies IP
addresses and
ports

Caches: keep copies of


popular data
Load balancers: datacenter
pick the server packets network

should go to
enterprise
network
Middleboxes (or Network Functions)
§ initially: proprietary (closed) hardware solutions
§ move towards “whitebox” hardware
§ Hardware providing an open API (programming interface)
§ Sometimes, SDN-like APIs are enough
§ e.g., simple firewalls
§ Sometimes, more specialized hardware, still programmable
§ Sometimes, high-speed implementation in software
§ network functions virtualization (NFV): specialized packet
processing in a VM.
The (more realistic) IP hourglass

HTTP SMTP RTP


QUIC DASH …
TCP UDP
Internet’s new waist? caching N Do middleboxes break the
§ middleboxes, NAT IP FV end-to-end argument?
Firewalls
operating inside the
Ethernet PPP …
network PDCP WiFi Bluetooth

copper radio fiber


Where’s the intelligence?

20th century phone net: Internet (until early 2000s) Internet (now)
• intelligence/computing at • intelligence, computing at edge • Middleboxes/NFV
network switches • programmable network devices
Make sure you know
§ What a middleboxes is
§ Know some example middleboxes and what they do
§ How the functionality inside the network has changed since its early
days.

Network Layer: 4-23


Network layer: roadmap
§ Network layer: overview §Destination-based forwarding
• Routing and forwarding §Software-defined networking
• Service model • SDN overview
§ IP: the Internet Protocol • Generalized forwarding
§ Routing protocols • OpenFlow
• Link state §What should/does go in the
• Distance vector network?
§ Making routing scalable • End-to-end argument
• Intra-ISP routing: OSPF • Middleboxes
• Routing among ISPs: BGP §ICMP
ICMP: internet control message protocol
§ used by hosts and routers to
communicate network-level Type Code description
0 0 echo reply (ping)
information 3 0 dest. network unreachable
• error reporting: unreachable host, 3 1 dest host unreachable
network, port, protocol 3 2 dest protocol unreachable
• echo request/reply (used by ping) 3 3 dest port unreachable
3 6 dest network unknown
§ ICMP messages carried in IP 3 7 dest host unknown
datagrams 4 0 source quench (congestion
control - not used)
• Still considered part of the network- 8 0 echo request (ping)
layer, not transport 9 0 route advertisement
§ ICMP message: type, code plus 10 0 router discovery
11 0 TTL expired
first 8 bytes of IP datagram causing 12 0 bad IP header
error
Network Layer: 4-25
Traceroute and ICMP
3 probes 3 probes

3 probes

§ source sends sets of UDP segments to


stopping criteria:
destination
§ UDP segment eventually
• 1st set has TTL =1, 2nd set has TTL=2, etc. arrives at destination host
§ datagram in nth set arrives to nth router: § destination returns ICMP
• router discards datagram and sends source “port unreachable”
ICMP message (type 11, code 0) message (type 3, code 3)
• ICMP message possibly includes name of § source stops
router & IP address
§ when ICMP message arrives at source: record RTTs
Network Layer: 4-26
Make sure you know
§ The purpose of the ICMP protocol
§ How traceroute works

Network Layer: 4-27


Network layer: roadmap
§ Network layer: overview §Destination-based forwarding
• Routing and forwarding §Software-defined networking
• Service model • SDN overview
§ IP: the Internet Protocol • Generalized forwarding
§ Routing protocols • OpenFlow
• Link state §What should/does go in the
• Distance vector network?
§ Making routing scalable • End-to-end argument
• Intra-ISP routing: OSPF • Middleboxes
• Routing among ISPs: BGP §ICMP
§Network management
What is network management?
§ autonomous systems (aka “network”): 1000s of interacting
hardware/software components
§ other complex systems requiring monitoring, configuration,
control:
• jet airplane, power grid, others?

"Network management includes the deployment, integration


and coordination of the hardware, software, and human
elements to monitor, test, poll, configure, analyze, evaluate,
and control the network and element resources to meet the
real-time, operational performance, and Quality of Service
requirements at a reasonable cost."

Network Layer: 5-29


Components of network management
Managed device:
Managing server: agent data equipment with manageable,
application, typically managing configurable hardware,
with network server/controller
software components
managers (humans) in data managed device
the loop Data: device “state”
agent data configuration data,
Network agent data
operational data,
management managed device device statistics
protocol: used by managed device
managing server to query,
agent data
configure, manage device;
used by devices to inform agent data

managing server of data, managed device


events. managed device

Network Layer: 5-30


Network operator approaches to management
CLI (Command Line Interface)
• operator issues (types, scripts) direct to agent data
individual devices (e.g., vis ssh) managing
server/controller
SNMP/MIB data managed device

• operator queries/sets devices data


(MIB) using Simple Network agent data
Management Protocol (SNMP)
agent data
managed device
SDN-based…
managed device
• E.g., OpenFlow (or other protocols) to
communicate with network devices in a agent data

customized manner. agent data

managed device
managed device

Network Layer: 5-31


SNMP protocol
Two ways to convey MIB info, commands:

managing data managing data


server/controller server/controller

request

response trap message

agent data agent data

managed device managed device

request/response mode trap mode


Network Layer: 5-32
SNMP protocol: message types

Message type Function


GetRequest manager-to-agent: “get me data”
GetNextRequest (data instance, next data in list,
GetBulkRequest block of data).

SetRequest manager-to-agent: set MIB value

Response Agent-to-manager: value, response


to Request
Trap Agent-to-manager: inform manager
of exceptional event

Network Layer: 5-33


SNMP: Management Information Base (MIB)
§ managed device’s operational (and some configuration) data agent data

§ gathered into device MIB module


• 400 MIB modules defined in RFC’s; many more vendor-specific MIBs
§ example MIB variables for UDP protocol:

Object ID Name Type Comments


1.3.6.1.2.1.7.1 UDPInDatagrams 32-bit counter total # datagrams delivered
1.3.6.1.2.1.7.2 UDPNoPorts 32-bit counter # undeliverable datagrams (no application at port)
1.3.6.1.2.1.7.3 UDInErrors 32-bit counter # undeliverable datagrams (all other reasons)
1.3.6.1.2.1.7.4 UDPOutDatagrams 32-bit counter total # datagrams sent
1.3.6.1.2.1.7.5 udpTable SEQUENCE one entry for each port currently in use

Network Layer: 5-34


Make sure you know
§ For exam purposes, not much J
§ Otherwise,
• The purpose of network management
• General approaches to network management
• That SNMP is a traditional and common protocol for network management

Network Layer: 4-35


Network layer: roadmap
§ Network layer: overview §Destination-based forwarding
• Routing and forwarding §Software-defined networking
• Service model • SDN overview
§ IP: the Internet Protocol • Generalized forwarding
We are
§ Routing protocols
done with the• network
OpenFlow
layer!
Next Up: Link Layer§What
• Link state and Local Area go in the
should/does
• Distance vector Networks (LANs)
network?
§ Making routing scalable • End-to-end argument
• Intra-ISP routing: OSPF • Middleboxes
• Routing among ISPs: BGP §ICMP
§Network management
But before that…

§ Let’s see an example of how things fit together so far.


§ A day in the life of a web request.

Network Layer: 4-37


A day in the life: scenario
scenario:
browser DNS server § arriving mobile
Comcast network client attaches
68.80.0.0/13 to network …
§ requests web
school network page:
68.80.2.0/24 www.google.com
web page

Sounds
web server
simple!
Google’s network
64.233.169.105 64.233.160.0/19

Link Layer: 6-38


A day in the life: connecting to the Internet
DHCP
DHCP
DHCP
UDP
§ connecting laptop needs to get its own IP
DHCP IP address, addr of first-hop router, addr of
arriving mobile:
DHCP Eth
Phy DHCP client DNS server: use DHCP
DHCP

§ DHCP request encapsulated in UDP,


DHCP DHCP encapsulated in IP, encapsulated in a link
DHCP
DHCP
UDP
IP
layer frame
DHCP Eth
Phy
router has
§ The frame is broadcast on LAN, received
DHCP server at router running DHCP server

§ Link layer frame de-muxed to IP de-


muxed, UDP de-muxed to DHCP
Link Layer: 6-39
A day in the life: connecting to the Internet
DHCP
DHCP UDP § DHCP server formulates DHCP ACK
DHCP IP
Eth arriving mobile: containing client’s IP address, IP address
of first-hop router for client, name & IP
DHCP

DHCP Phy DHCP client


address of DNS server
DHCP
DHCP § encapsulation at DHCP server, frame
forwarded through LAN, demultiplexing at
DHCP
UDP
DHCP
IP
DHCP
Eth client
DHCP Phy
router has
DHCP server § DHCP client receives DHCP ACK reply

Client now has IP address, knows name & addr of DNS


server, IP address of its first-hop router
Link Layer: 6-40
A day in the life… DNS
DNS DNS § before sending HTTP request, need IP address
UDP
of www.google.com: DNS
DNS
DNS IP
Eth arriving mobile:
Phy ARP client § DNS query created, encapsulated in UDP,
encapsulated in IP, encapsulated in a link-
layer protocol.

router has
ARP server

Link Layer: 6-41


A day in the life… using DNS
DNS
DNS
§ de-muxed to DNS
DNS
DNS UDP
DNS DNS
DNS UDP
DNS IP
DNS IP § DNS replies to client
Eth DNS
DNS Phy
DNS Eth
server
with IP address of
Phy
DNS
www.google.com

Comcast network
68.80.0.0/13

§ IP datagram
§ IP datagram forwarded from campus
containing DNS query
forwarded via LAN network into Comcast network, routed
(tables populated by RIP, OSPF, IS-IS
switch from client to
and/or BGP routing protocols, or SDN
1st hop router
controller) to DNS server
Link Layer: 6-42
A day in the life…TCP connection carrying HTTP
HTTP
HTTP § to send HTTP request,
SYNACK
SYN TCP
SYNACK
SYN IP client first opens TCP
SYNACK
SYN Eth
Phy Comcast network
socket to web server
68.80.0.0/13
§ TCP SYN segment (step 1 in
TCP 3-way handshake) inter-
domain routed to web server
§ web server responds with
SYNACK
SYN
SYNACK
SYN
TCP
IP
TCP SYNACK (step 2 in TCP 3-
SYNACK
SYN Eth way handshake)
Phy

Google web server


§ TCP connection established!
64.233.169.105

Link Layer: 6-43


A day in the life… HTTP request/reply
HTTP
HTTP
HTTP
HTTP
TCP
§ HTTP request sent into
TCP socket
HTTP
HTTP
HTTP IP § web page finally (!!!)
HTTP
HTTP Eth displayed
Phy Comcast network § IP datagram containing
68.80.0.0/13
HTTP request routed to
www.google.com
§ web server responds with
HTTP
HTTP
HTTP HTTP reply (containing web
TCP
HTTP
IP page)
HTTP Eth
Phy § IP datagram containing
Google web server HTTP reply routed back to
64.233.169.105
client
Link Layer: 6-44
A day in the life of a web request

§ We will revisit this after we learn about the link layer.

Network Layer: 4-45


What you need to know about this example
§ This example brings together a lot of what we have talked about in
this course
§ Make sure you are comfortable with the individual steps that are
happening, and their order.
§ E.g., given a similar scenario, you should be able to work out what
happens under the hood from when a client arrives in a network and
starts using some of the network applications we have talked about.

Network Layer: 4-46

You might also like