Internet architecture & addressing
6CCS3INS Internet Systems
2014-15 Toktam Mahmoodi, Department of Informatics, KCL
Questions
How can we divide up the administration of the internet
to make it manageable?
When one part is changes, how can we avoid replacing
all the software which runs the internet (maintenance)?
How can a host identify another host to send data to,
when they are not directly connected?
How can our addressing schemes handle varying
numbers of hosts in organisations?
Outline
Internet architecture
Addressing hosts on the internet
IPv4 addressing
IPv6 addressing
Routing Protocols
Internet Architecture
The main goal of the Internet Architecture was to:
connect existing networks
be robust in case of different link failures or whole sub-networks
routing functionality that can adapt to this phenomena
support multiple types of services
allow distributed management
allow host attachment with a low level of effort
be cost effective
In terms of header overhead, retransmissions and routers
capabilities needed
Internet Architecture: Layers
Many Internet communication issues, including
Routing, Reliability, Flow control, Data format
Internet as stack of layers each dealing with one or a few issues
Different ways to solve each issue, so different implementations of each layer
Combine the best solutions for any one problem
Protocol Stack:
Physical layer provides the actual connectivity (copper, fiber, radio)
Access layer defines how to deliver data between
Application
two devices on the same network
Network layer defines how to route messages
Transport
across networks
Network
Transport defines how to provide reliable communication,
so that data will not be lost or corrupted (TCP, UDP)
Access/Link
Application layer defines how programs request messages
to be sent across the internet, using encryption, compression etc. Physical
The Internet Protocol
IP is the network layer, a packet delivery service (host-to-
host), that is
Connectionless: each datagram is independent of all others.
Unreliable: there is no guaranteed delivery
Responsible for:
Fragmentation / Reassembly (based on MTU).
Routing.
Internet Control Message Protocol (ICMP)
Part of and supports IP
Used to report errors and other info back to sender of IP message
Itself sent over IP
Internet Architecture: edge-oriented
The success of the Internet is due to the edge-oriented
approach of the architecture.
A connectionless, packet-forwarding infrastructure (“dumb network”)
that positioned higher-level functionality at the edge of the network for
robustness.
The end-to-end argument, intelligent edges and dump
network or in other words keep the infrastructure as simple as
possible.
To reduced complexity of the core network.
New applications can be added without changing the core (look for
example in p2p!)
This is known as the hour glass model (with IP at the waist).
With addresses that are
fixed-size numerical quantities, with a simple (net, host) hierarchy
applied to physical network interfaces, which can therefore be used for
both naming a node and for routing to it.
Packet Transmission
HTTP
MESSAGE
A B
HTTP
User A runs HTTP application TCP
IP
Link Layer
Copper
Packet Transmission
TCP HTTP
Header MESSAGE
A B
HTTP
TCP adds header including packet TCP
number, and the time out
IP
Link Layer
Copper
Packet Transmission
IP TCP HTTP
Header Header MESSAGE
A B
HTTP
IP adds header including host A and B TCP
addresses
IP
Link Layer
Copper
IP Fragmentation
Different link layer technologies can carry packets of different size.
The maximum amount of data that the a link layer packet can carry is called
Maximum Transfer Unit (MTU).
Because the IP is encapsulated within the link layer this MTU puts a limit in
the maximum size of the IP packet.
If the outbound link has smaller MTU than the IP packet that the
router want to sent, the solution is Fragmentation
IP Header
IHL: header length only in 32-bit words (5 <= HLen <= 15)
Type of Service, split in:
Differentiated Service Field (6 bits)
remaining two bits used by ECN (Early Congestion Notification)
Length: the length of the entire datagram/segment; header + data
Flags: Don’t Fragment (DF) and More Fragments (MF)
Fragment offset: all fragments excepting last one contain multiples of 8 bytes
The Internet Engineering Task Force (IETF)
produce technical documents that influence the way people design, use,
and manage the Internet – RFCs (Request for Comments)
Outline
Internet architecture
Addressing hosts on the internet
IPv4 addressing
IPv6 addressing
Routing Protocols
Hierarchical addressing
Internet
A
Q
D 1
Address of Host
A- D - Q- 1
IP addresses
IP includes a structure for addressing hosts
In the global Internet every host and router must have one globally unique
address
IP address technically are associated with an interface and NOT with a host
Currently, the internet primarily uses version 4 (IPv4)
IPv6 compatibility is being deployed slowly.
Why IPv6 is needed (short/long term advantages)
Increased Address Space
We are running out of Internet addressing.
Lack of Security at the Network layer
Quality of Service for end-to-end networking.
supporting new features for applications
Outline
Internet architecture
Addressing hosts on the internet
IPv4 addressing
IPv6 addressing
Routing Protocols
IPv4 Addressing
IPv4 addresses are 32bits long.
With N bits, we can allocate 2N different addresses
32 bits = 4,294,967,296 different addresses
In order to provide the flexibility required to support different size
networks, the designers decided to divide the IP address space into
three different address classes:
Class A, Class B, and Class C - “classful” addressing.
Two additional classes later added:
Class D addresses used to support IP Multicasting.
Class E addresses are reserved for experimental use.
Every IP address consists of two parts, one identifying the network and
one identifying the Host.
The Class of the address and the subnet mask determine which part belongs to
the network address and which part belongs to the node address.
IPv4 addresses by class
IP addresses were split into
Class ID
Network prefix
Network ID
Host ID
Class A 0
Class B 10
Class C 110
Class A addressing (or /8s networks)
Class A is for very large networks
8-bit network-prefix with the highest order bit set to 0
24-bit host-number
A maximum of 126 (2^ 7 -2) /8 networks can be defined.
the /8 network 0.0.0.0 is reserved for use as the default route and the /8 network 127.0.0.0
(also written 127/8 or 127.0.0.0/8) has been reserved for the "loopback" function.
Each /8 supports a maximum of 16,777,214 (2^24 -2) hosts per network.
all-0s ("this network") and all-1s ("broadcast") host-numbers may not be assigned to
individual hosts.
Since the /8 address block contains 2^31 individual addresses and theIPv4
address space contains a maximum of 2^32 (4,294,967,296) addresses,
the /8 address space is 50% of the total IPv4 unicast address space.
range: from 1 to 126
Class B addressing (or /16s networks)
Class B is for much smaller networks
16-bit network-prefix with the two higher order bits set to “10”
16-bit host-number
10
A maximum of 16,384 (2^ 14 ) /16 networks can be defined
Each /16s supports 65,534 (2^16 -2) hosts per network.
Since the entire /16 address block contains 2^30 (1,073,741,824)
addresses,
it represents 25% of the total IPv4 unicast address space.
Range from 128 to 191
Class C addressing (or /24s networks)
Class C is for much smaller networks
24-bit network-prefix with the three higher order bits set to “110”
8-bit host-number
110
A maximum of 2,097,152 (2^ 21 ) /24 networks can be defined.
Each /24s supports 254 (2 ^8 -2) hosts per network.
Since the entire /24 address block contains 2^ 29 addresses,
it represents 12.5% (or 1/8th) of the total IPv4 unicast address space.
Range from192 to 223
Classful addressing
Limitations with the classful addressing:
A /24, which supports 254 hosts, is too small while a /16, which supports 65,534 hosts, is too large.
For example an organization with 2000 hosts will go for /16!.
1993 IETF standardised the Classless Interdomain Routing (CIDR)
In CIDRised networks the Network part of the IP address can be ANY number of bits long (rather
than being constrained to 8,16 or 24)
For the example of organisation with 2000 hosts,
IP addresses of the form a.b.c.d/21 can be allocated (2046 hosts).
the first 21 bits specify the organisation’s network address and are common for all the hosts inside
the network,
The remaining 11 bits can specify a specific host inside this network.
In a real case scenario the 2000 hosts will be further divided using the last 11 bits in subnets to
create different networks inside the organisation
Today, address classes are ignored.
Instead, routers are explicitly told the length of prefix to look for
Example IP addresses
1.22.11.12 Class A
137.22.11.12 Class B
201.22.11.12 Class C
193.92.96.255 /24 Broadcast address
All “1”s at the host part represent the broadcast address.
The broadcast address is the address used to send a message
to all hosts on the network
193.92.96.0 /20 Network address
All “0”s at the host part represent the network address
The network address is an IP address for the network as a
whole, as used by routers to know where to send the messages
Subnets
RFC 950 defined a standard procedure to support subnetting
of a single Class A,B or C network into smaller pieces.
Internet Routing Tables were beginning to grow
Local administrators had to request another network number from
the Internet before a new network installed into the organization.
These problems were attacked by introducing another level of
hierarchy to the IP addressing structure
Network Mask
In a Binary format the 1’s represent the portion of the IP
address that is Network number and the 0’s represent
the portion of the IP that is the Host number
Default Subnet Masks
Class A:
11111111.00000000.00000000.00000000 255.0.0.0
Class B:
11111111.11111111. 00000000. 00000000 255.255.0.0
Class C:
11111111.11111111.11111111.00000000 255.255.255.0
Example 1 – part 1
Organisation has assigned the network number 193.1.1.0/24
and wants to have 6 subnets, where the largest one need to
support up to 25 hosts.
The first step is to determine the number of bits required
to define the six subnets.
Example 1 – part 2
Organisation has assigned the network number 193.1.1.0/24
and wants to have 6 subnets, where the largest one need to
support up to 25 hosts.
We have two unused subnets that can be reserved for future
growth.
A 27-bit ENP leaves 5 bits to define host addresses on each
subnet.
each subnetwork with a 27-bit prefix represents 32 individual IP
addresses.
since the all-0s and all-1s host addresses cannot be allocated, there
are 30 assignable host addresses on each subnet.
Example 1 – part 3
Organisation has assigned the network number 193.1.1.0/24
and wants to have 6 subnets, where the largest one need to
support up to 25 hosts.
The eight subnets then will be:
Base Net: 11000001.00000001.00000001 .00000000 = 193.1.1.0/24
Subnet #0: 11000001.00000001.00000001. 00000000 = 193.1.1.0/27
Subnet #1: 11000001.00000001.00000001. 00100000 = 193.1.1.32/27
Subnet #2: 11000001.00000001.00000001. 01000000 = 193.1.1.64/27
Subnet #3: 11000001.00000001.00000001. 01100000 = 193.1.1.96/27
Subnet #4: 11000001.00000001.00000001. 10000000 = 193.1.1.128/27
Subnet #5: 11000001.00000001.00000001. 10100000 = 193.1.1.160/27
Subnet #6: 11000001.00000001.00000001. 11000000 = 193.1.1.192/27
Subnet #7: 11000001.00000001.00000001. 11100000 = 193.1.1.224/27
Example 1 – part 4
Organisation has assigned the network number 193.1.1.0/24
and wants to have 6 subnets, where the largest one need to
support up to 25 hosts.
For the host addresses we are using all the 5 bits except all 0
(subnet) and 1’s (broadcast)
Subnet #2: 11000001.00000001.00000001.01000000 = 193.1.1.64/27
Host #1: 11000001.00000001.00000001.01000001 = 193.1.1.65/27
Host #2: 11000001.00000001.00000001.01000010 = 193.1.1.66/27
Host #3: 11000001.00000001.00000001.01000011 = 193.1.1.67/27
Host #4: 11000001.00000001.00000001.01000100 = 193.1.1.68/27
Host #5: 11000001.00000001.00000001.01000101 = 193.1.1.69/27
……………………………….……………………………………………….
Host #29: 11000001.00000001.00000001.01011101 = 193.1.1.93/27
Host #30: 11000001.00000001.00000001.010 11110 = 193.1.1.94/27
Example 1 – part 5
Organisation has assigned the network number 193.1.1.0/24
and wants to have 6 subnets, where the largest one need to
support up to 25 hosts.
Defining the Broadcast Address for Each Subnet
The broadcast address for Subnet #2 is the all 1's host address, or
11000001.00000001.00000001.01011111 = 193.1.1.95
Note that the broadcast address for Subnet #2 is exactly one
less than the base address for Subnet #3 (193.1.1.96).
This is always the case – the broadcast address for Subnet#n is one
less than the base address for Subnet #(n+1).
Example 2 – part 1
Organisation has assigned the network number
140.25.0.16/16 and it needs to create a set of subnets
that supports up to 60 hosts on each subnet.
Step one: number of bits required to define 60 hosts on
each subnet is 6 bits
6 bits define 64-2=62 host address
in order to take into account future growth we select 7 bits which
define 126 addresses per subnet.
Determine the subnet mask/extended-prefix length:
Example 2 – part 2
Organisation has assigned the network number
140.25.0.16/16 and it needs to create a set of subnets
that supports up to 60 hosts on each subnet.
Step two: determine the subnet mask/extended-prefix
length
Example 2 – part 3
Organisation has assigned the network number
140.25.0.16/16 and it needs to create a set of subnets that
supports up to 60 hosts on each subnet.
Defining Each of the Subnet Numbers: the 9 bits allocated in
the subnet portion of the IP address allows 512 different
subnetworks.
Base Net: 10001100.00011001.00000000.00000000 = 140.25.0.0/16
Subnet 0: 10001100.00011001.00000000.00000000 = 140.25.0.0/25
Subnet 1: 10001100.00011001.00000000.10000000 = 140.25.0.128/25
Subnet 2: 10001100.00011001.00000001.00000000 = 140.25.1.0/25
Subnet 3: 10001100.00011001.00000001.10000000 = 140.25.1.128/25
Subnet 4: 10001100.00011001.00000010.00000000 = 140.25.2.0/25
…………………………………………………………………………………………..
Subnet 511: 10001100.00011001.11111111.10000000 = 140.25.255.128/25
Example 2 – part 4
Organisation has assigned the network number 140.25.0.16/16 and it
needs to create a set of subnets that supports up to 60 hosts on each
subnet.
Defining Hosts Addresses for Each Subnet: The 7 allocated bits will
give 126 different host ID.
For subnet 3 for example we have:
Subnet #3: 10001100.00011001.00000001.10000000 = 140.25.1.128/25
Host 1: 10001100.00011001.00000001.10000001 = 140.25.1.129/25
Host 2: 10001100.00011001.00000001.10000010 = 140.25.1.130/25
Host 3: 10001100.00011001.00000001.10000011 = 140.25.1.131/25
…………………………………………………………………………………………
Host 126: 10001100.00011001.00000001.11111110 = 140.25.1.254/25
Example 2 – part 4
Organisation has assigned the network number
140.25.0.16/16 and it needs to create a set of subnets that
supports up to 60 hosts on each subnet.
Defining the Broadcast Address for Each Subnet:
For subnet 3 again this address will be the following:
10001100.00011001.00000001.11111111 = 140.25.1.255
Subnets and route aggregation
KCL’s IP addresses could be divided by departments
KCL network: 137.73.0.0 /16
Informatics network: 137.73.8.0 /23
Informatics subnet ID is 0000100 (binary) or 4 (decimal)
A host in informatics: 137.73.9.232 /23
10001001.01001001.00001001.11101000
The global/UK router needs to look at the first 16 bits to determine it
is a KCL address
The KCL router needs to look at the first 23 bits to determine it is an
Informatics address
The Informatics router needs to look at the last 9 bits (after the first 23 bits)
to determine which host the message is for
Problems with fixed length subnetting
Different subnets can have different numbers of hosts,
e.g. Department of Informatics may have a lot more
computers than Department of English
As the subnet ID gets longer, the number of bits left for
addressing hosts reduces
For example:
to distinguish 300 subnets, you need a subnet ID of 9 bits (as 28
= 256 and 29 = 512)
If you have a /16 network and a subnet ID of 9 bits, this leaves 7
bits for host IDs, at most 126 hosts (27 – 2)
What if a department needs 200 hosts?
Example subnetting problem
A /24 network needs the following five subnets
Subnets P, Q, R require 12 hosts each
Subnet S requires 36 hosts
Subnet T requires 90 hosts
8 bits network prefix (32 – 24 = 8)
254 available addresses in the network (28 – 2 = 254)
The subnets need 172 addresses including network and broadcast
If we use a 3 bit subnet ID
We can accommodate all subnets, as 23 = 8 and we have 5 subnets
But each has only 30 hosts, as 8 – 3 = 5 host ID bits, so 25 – 2 = 30 hosts
If we use a 1 bit subnet ID
Enough hosts per subnet, as 27 – 2 = 126 hosts
But only 2 subnets, as 21 = 2
Variable length subnetting
To solve this problem, we use variable length subnets
Using variable subnet ID lengths, we iteratively divide up
the host ID space, first into large blocks, then into
smaller ones
First, to accommodate the largest subnet, T, we use 1 bit to split
the T subnet from the rest
We then accommodate the second largest subnet, S, by splitting
the remainder: S needs 6 bits for host IDs, so use 1 more bit to
split S from the rest
Finally, we need 2 bits to split subnets P, Q and R
Variable length subnet masks
As the number of bits used for the subnet prefix vary, so
the subnet masks vary for each variable length subnet
Subnet T has addresses X.X.X.X /25
24 bits for network prefix + 1 for subnet ID
Subnet S has addresses X.X.X.X /26
Subnets P, Q, R have addresses X.X.X.X /28
Variable length subnets example
/24 network
Subnets P, Q, R require 12 hosts each
Subnet S requires 36 hosts
Subnet T requires 90 hosts
Network
T : /25
S : /26
PQR: /28
Variable length subnets example
T: 10001001 01001001 00001001 0 . . . . . . .
137.73.9.0 /25
S: 10001001 01001001 00001001 10 . . . . . .
137.73.9.128 /26
P: 10001001 01001001 00001001 1100 . . . .
Q: 10001001 01001001 00001001 1101 . . . .
R: 10001001 01001001 00001001 1110 . . . .
137.73.9.192 /28
137.73.9.208 /28
137.73.9.224 /28
Outline
Internet architecture
Addressing hosts on the internet
IPv4 addressing
IPv6 addressing
Routing Protocols
IPv6 header
Although IPv6 Addresses are 4 times bigger (16 Bytes) than
IPv4 its Header is only twice the size of the IPv4 Header.
IPv6 addresses
An IPv6 address uses 16 bytes / 128 bits
All IPv6 local networks are /64, removing the need for variable
length subnetting at the local level
Expressed in hexadecimal 16-bit words with :s
21DA:D3:0:2F3B:2AA:FF:FE28:9C5A
Uses the same prefix length notation as IPv4:
21DA:D3:0:2F3B:2AA:FF:FE28:9C5A /64
An IPv6 address identifies one or more interfaces rather than
hosts
One network node may have many interfaces
Each interface may be used to identify the node for a different
purpose or application
IPv6 address types
IPv6 divides addresses into three types
Unicast: Address for a single interface
Anycast: Address for a group of hosts
When a message is sent to an anycast address, it is delivered to
one of the hosts with that address
Multicast: Address for a group of hosts
When a message is sent to an multicast address, it is delivered
to all of the hosts with that address
Multicast and link-local
Unlike IPv4, IPv6 does not restrict structure of addresses
(there are no address classes)
However, there are two prefixes which have special
meanings:
Multicast: 11111111
Link-Local Unicast: 1111111010
Multicast addresses are used for addressing a group of hosts
There are no broadcast addresses for networks as in IPv4
Link-local addresses are for use on a single link (i.e. in a
single local network), e.g. for automatic address configuration
Unspecified and loopback addresses
Two special addresses may never be assigned to
interfaces
Unspecified Address 0:0:0:0:0:0:0:0
Indicates absence or no knowledge of an address
Loopback Address 0:0:0:0:0:0:0:1
Used by a host to send messages back to itself
Outline
Internet architecture
Addressing hosts on the internet
IPv4 addressing
IPv6 addressing
Routing Protocols
Shortest path routing
Routing in the Internet
Routing and addresses
Generally, one host wants to communicate data with
another host that is not directly connected
To allow this to happen, data is routed:
A path is found along a series of connected nodes
Data is sent from one to the next along the path until reaching its
destination
The best possible path for routing data to the destination
is found by the routing algorithm.
Routing
Complex, crucial aspect of packet switched networks
Characteristics required
Correctness
Simplicity
Robustness
Stability
Fairness
Optimality
Efficiency
Performance Criteria
Minimum hops
Minimum cost
Each link has a cost that reflects
The length of the link
Delay on the link
Congestion
Cost
Cost may change with time
Examples:
Bellman-Ford
Dijkstra’s algorithm
Many others
Decision Time and Place
Routes must be chosen for various source destination
pairs (S/D pairs) or for various sessions
Decision Time
Datagram routing: route chosen on a packet by packet basis
Using datagram routing is an easy way to split paths
Virtual circuit routing: route chosen a session by session basis
Static routing: route chosen in a prearranged way based on S/D
pairs
Decision place
Centralised
Distributed
Routing Strategy - Fixed
Fixed Routing
Single permanent route for each source, destination pair
Determine routes using a least cost algorithm
Dijkstra Algorithm
Bellman-Ford Algorithm
Route fixed, at least until a change in network topology
Routing Strategy - Flooding
Flooding
No network info required
Packet sent by node to every neighbour
Incoming packets retransmitted on every link except incoming link
Eventually a number of copies will arrive at destination
Each packet is uniquely numbered so duplicates can be discarded
Can include a hop count in packets
Properties:
All possible routes are tried
Very robust
At least one packet will have taken minimum hop count route
All nodes are visited
Useful to distribute information (e.g. routing)
Routing Strategy - Random
Random
Node selects one outgoing path for the retransmission of
incoming packets
Selection can be random or round robin
Outgoing path can be selected based on probability calculation
No network info needed
Route is typically not least cost nor minimum hop
Routing Strategy - Adaptive
Adaptive
Used by almost all packet switching networks
Routing decisions change as conditions on the network change
Failure
Congestion
Requires info about network
Decisions are more complex
Trade-off between quality of network info and overhead
Reacting too quickly can cause oscillation
Reacting too slowly, information may not be relevant
Outline – Next week
Internet architecture
Addressing hosts on the internet
IPv4 addressing
IPv6 addressing
Routing Protocols
Shortest path routing
The Internet Protocol