Sesion 1
Sesion 1
Computer networks
Preliminary concepts
The Internet is a network of networks
• Based on packet switching
• Based on the TCP/IP protocol stack
• Based on Ethernet technology
Main aspects to solve:
• How to resolve IP addresses to Ethernet
addresses?
• How to perform dynamic IP address
acquisition for network hosts?
• How to check for network connectivity
between hosts?
• How to connect to a host from its
resource name (i.e., www.google.com)?
• How to reduce the number of public IP
addresses given that it is a scarce
resource?
Xarxes de Telecomunicació 2
Telecommunication networks
Circuit switching
• A call has dedicated end-to-end
resources
• 125 us/sample and 8 bits/sample (64
kbps) within the PDH/SDH/SONET
transport matrix
• A call has three phases
• Establishment, communication and
closure suing the network control plane
• Advantages
• It allows to guarantee congestion and
quality of service
• Disadvantages
• Inefficient resource use, especially for
data networks
Xarxes de Telecomunicació 3
Telecommunication networks
Packet switching
History
• Invented in the early 60's by Paul Baran at the
RAND Corporation for DARPA
• Research in queuing theory in the mid-60s by
Leonard Kleinrock at MIT
• Construction of the first ARPANET prototype in
the early 70s by Lawrence Roberts
Objectives:
• Develop a distributed telecommunications
network that can survive the destruction of any
of its nodes
Basic operation:
• Decentralized network with multiple paths
between two points
• Breaking messages into blocks of data that can
be sent independently
• Message forwarding via store-and-forward
switching
Xarxes de Telecomunicació 4
Telecommunication networks
Packet switching
Two modes of operation:
Datagrams
• No establishment required before transmission
• Addressing is based on the destination address
of each packet
• There is no circuit, each node makes the routing
decision for each packet
• Congestion cannot be controlled and quality of
service ensured due to shared resources
Virtual circuits
• Emulates circuit switching, circuit establishment
and closure required
• Addressing is based on a label that determines
the circuit
• The circuit determines a path through the
network, all packets follow it
• It allows you to manage congestion and offer
quality of service (resource reservation required)
Xarxes de Telecomunicació 5
Telecommunication networks
Datagrams vs virtual-circuits
Xarxes de Telecomunicació 6
Computer Network protocols https://www.cs.princeton.edu/courses/archive/fall06/cos561/papers/cerf74.pdf
IP protocol overview
• IP (Internet Protocol) invented by
Vinton G. Cerf and Robert E. Kahn in
1974
• IETF RFC 760 standard in 1980,
different versions: IPv4, IPv5 and IPv6
• Designed for sharing resources in
circuit switching networks, regardless
of underlying network technology
• Supports the following features:
• Independent of packet size
• Hop-by-hop transmission error checks
• End-to-end error checking
• It does not guarantee the delivery of
datagrams or the order in delivery
Xarxes de Telecomunicació 7
Xarxes de Telecomunicació 8
Computer Network protocols
IPv4 protocol overview
Main characteristics
• Network protocol: Independent of
the link layer
• Datagram mode: Each packet is
forwarded independently
• Best effort: Delivery and order are
not guaranteed
• Addressing: 32-bit addresses with
network mask
Xarxes de Telecomunicació 9
Xarxes de Telecomunicació 10
Computer Network protocols
IPv4 packet forwarding
Xarxes de Telecomunicació 12
Computer Network protocols
IPv4 packet forwarding
Longest Prefix Match algorithm
• Each datagram contains the address of
the destination host to which it is to be
forwarded
• At each jump the router must decide
which interface to forward the datagram
for
• If there is direct connection to the
network, the packet is forwarded to the
host
• If the network is not directly connected,
the forwarding table is checked
• The entry in the forwarding table is
chosen with the network that has the
largest (most specific) prefix
• How is the router forwarding table
constructed? We'll see later
Xarxes de Telecomunicació 13
Xarxes de Telecomunicació 14
Computer Network protocols
IPv4 packet fragmentation
Example
• An IP datagram containing 1400 bytes
of data passes through a PPI link with
an MTU of 540 bytes and a header of
8 bytes
• The original IP datagram is
fragmented into 3 datagrams: 2
datagrams of 512 bytes and 1
datagram of 376 bytes
• Each datagram contains the original
IP header, but the fragmentation bit
(More Fragments) is marked and the
offset of each datagram is included
Xarxes de Telecomunicació 15
Xarxes de Telecomunicació 16
Computer Network protocols
ARP protocol (Request and response)
Xarxes de Telecomunicació 17
Xarxes de Telecomunicació 18
Computer Network protocols
DHCP protocol (DORA)
https://www.netmanias.com/en/post/techdocs/5998/dhcp-
network-protocol/understanding-the-basic-operations-of-dhcp
Xarxes de Telecomunicació 19
Xarxes de Telecomunicació 20
Computer Network protocols
DHCP protocol (Discover packet)
Xarxes de Telecomunicació 21
Xarxes de Telecomunicació 22
Computer Network protocols
DHCP protocol (Request packet)
Xarxes de Telecomunicació 23
Xarxes de Telecomunicació 24
Computer Network protocols
DHCP protocol (Renewal and Release)
Xarxes de Telecomunicació 25
Xarxes de Telecomunicació 26
Computer Network protocols
ICMP protocol
ICMP defines error messages
(type and code) that are sent back
to the source host whenever a
router or host cannot process an
IP datagram
• The IP datagram cannot be
forwarded to the destination host
due to a link
• IP datagram reassembly process
failed (checksum)
• TTL value has reached 0 and IP
datagram is discarded
Xarxes de Telecomunicació 27
Xarxes de Telecomunicació 28