5. 5
UTAMURouting
• Routing table
indicates next router
to which datagram is
sent
• Can be static or
dynamic
ES / routers
maintain routing
tables
• Source specifies
route to be followed
• Can be useful for
security and priority
Source routing
• Each router appends
its internet address to
a list of addresses in
the datagram
• Useful for testing and
debugging purposes
Route recording
6. 6
UTAMUDatagram Lifetime
If dynamic or alternate routing is used the
potential exists for a datagram to loop
indefinitely
Consumes resources
Transport protocol may need upper bound on
lifetime of a datagram
Can mark datagram with lifetime
When lifetime expires, datagram is discarded
7. 7
UTAMUFragmentation and Re-assembly
Lower-level protocols may need to break data up
into smaller blocks, called fragmentation
Reasons for fragmentation:
Network only accepts blocks of a certain size
More efficient error control and smaller retransmission units
Fairer access to shared facilities
Smaller buffers
Disadvantages:
Smaller buffers
More interrupts and processing time
8. 8
UTAMUFragmentation and
Re-assembly
Issue of when to
re-assemble
At destination
Packets get
smaller as data
traverses internet
Intermediate
re-assembly
Need large buffers
at routers
Buffers may fill
with fragments
All fragments must
go through same
router
9. 9
UTAMUIP fragmentation, reassembly
network links have MTU
(max.transfer size) -
largest possible link-
level frame
different link types,
different MTUs
large IP datagram
divided (“fragmented”)
within net
one datagram becomes
several datagrams
“reassembled” only at final
destination
IP header bits used to
identify, order related
fragments
Network Layer 4-9
fragmentation:
in: one large datagram
out: 3 smaller datagrams
reassembly
…
…
10. 10
UTAMUIP fragmentation, reassembly
Network Layer 4-10
ID
=x
offset
=0
fragflag
=0
length
=4000
ID
=x
offset
=0
fragflag
=1
length
=1500
ID
=x
offset
=185
fragflag
=1
length
=1500
ID
=x
offset
=370
fragflag
=0
length
=1040
one large datagram becomes
several smaller datagrams
example:
4000 byte datagram
MTU = 1500 bytes
1480 bytes in
data field
offset =
1480/8
11. 11
UTAMUError and Flow Control
Error control
Discarded datagram
identification is needed
Reasons for discarded
datagrams include:
Lifetime expiration
Congestion
FCS error
Flow control
Allows routers to limit
the rate they receive
data
Send flow control
packets requesting
reduced data flow
12. 12
UTAMU
Network Layer 4-12
IP datagram format
IP protocol version
number
header length
(bytes)
upper layer protocol
to deliver payload to
total datagram
length (bytes)
“type” of data
for
fragmentation/
reassembly
max number
remaining hops
(decremented at
each router)
e.g. timestamp, record
route taken, specify list
of routers to visit.
how much overhead?
20 bytes of TCP
20 bytes of IP
= 40 bytes + app
layer overhead
13. 13
UTAMUIPv4 addresses
32-bit binary number
How many unique addresses in total?
Conventionally represented as four dotted decimal octets
10000000110111111001110100010011
128 . 223 . 157 . 19
Can you convert 00010011 = 19 in decimal?
14. 14
UTAMUPrefixes
A range of IP addresses is given as a prefix, e.g.
192.0.2.128/27
In this example:
How many addresses are available?
What are the lowest and highest addresses?
32 bits
27 bits 5 bits
Prefix /27 Host
16. 16
UTAMUIPv4 “Golden Rules”
All hosts on the same Layer 2 (LAN) network must share
the same prefix
All hosts with the same prefix have different host part
Host part of all-zeros and all-ones are reserved
Host part of all-zeros – subnet address
Host part of all-ones – broadcast Address
32 bits
27 bits 5 bits
Prefix /27 Host
17. 17
UTAMUGolden Rules for 192.0.2.128/27
Lowest 192.0.2.128 = network address
Highest 192.0.2.159 = broadcast address
Usable: 192.0.2.129 to 192.0.2.158
Number of usable addresses: 32 - 2 = 30
20. 20
UTAMUExercises
Network 10.10.10.0/25
How many addresses in total?
How many usable addresses?
What are the lowest and highest usable addresses?
Network 10.10.20.0/22
How many addresses in total?
How many usable addresses?
What the the lowest and highest usable addresses?
21. 21
UTAMUAn edge case
How many usable addresses in a /30 prefix?
What is this used for?
(Note: modern routers support /31 for this purpose to reduce IP address
wastage)
22. 22
UTAMUNetmask
Netmask is just an alternative (old) way of writing the prefix
length
A '1' for a prefix bit and '0' for a host bit
Hence N x 1's followed by (32-N) x 0's
11111111111111111111111111100000
255 . 255 . 255 . 224
/27 =
23. 23
UTAMUSubnetting
Since each L2 network needs its own prefix, then if you route
more than one network you need to divide your allocation
Ensure each prefix has enough IPs for the number of hosts on
that network
End User
Allocation
Subnets
24. 24
UTAMUSubnetting Example
You have been given 192.0.2.128/27
However you want to build two Layer 2 networks and route
between them
The Golden Rules demand a different prefix for each network
Let's split this address space into two equal-sized pieces
25. 25
UTAMUSubnetting /27
192 . 0 . 2 . 128
11000000000000000000001010000000
11000000000000000000001010010000
192 . 0 . 2 . 128
192 . 0 . 2 . 144
Move one bit from host part to prefix
We now have two /28 prefixes
Second prefix:
11000000000000000000001010000000
26. 26
UTAMUCheck correctness
Expand each new prefix into lowest and highest
Ranges should not overlap
192.0.2.128/28
Lowest (network) = 192.0.2.128
Highest (broadcast) = 192.0.2.143
192.0.2.144/28
Lowest (network) = 192.0.2.144
Highest (broadcast) = 192.0.2.159
How many usable addresses now?
28. 30
UTAMUThe Internet Is Growing …
In 2009, only 21% of the world population were connected.
This adoption rate will increase as underdeveloped countries get
connected.
29. 31
UTAMUExplosion of New IP-Enabled Devices
More and more IP-enabled devices are connecting.
Devices include cell phones, consumer products (blue ray
players, TVs), etc.
30. 32
UTAMUIP Address Depletion
All of this growth
is causing the
Internet to run
out of public IPv4
address.
In January 2010,
only 10% of the
public IPv4
addresses
remained
unallocated.
It is estimated that
this pool will have
exhausted by the
late 2011.
31. 33
UTAMUOther IPv4 Issues
Internet routing table expansion
The Internet routing tables continue to grow which
means Internet core routers require more
processing power, memory, and overhead.
Lack of true end-to-end model
IPv4 networks typically use NAT as the solution to
address depletion.
However, NAT hides the true source address of
traffic, which can cause other issues.
32. 34
UTAMUFeatures of IPv6
Larger address space
IPv6 addresses are 128 bits, compared to IPv4’s 32 bits.
There are enough IPv6 addresses to allocate more than
the entire IPv4 Internet address space to everyone on
the planet.
Elimination of public-to-private NAT
End-to-end communication traceability is possible.
Elimination of broadcast addresses
IPv6 now includes unicast, multicast, and anycast addresses.
Support for mobility and security
Helps ensure compliance with mobile IP and IPsec
standards.
33. 35
UTAMUIPv4 Header vs. IPv6 Header
• The IPv4 header has 20 octets containing
12 basic header fields.
• The IPv6 header has 40 octets containing
8 fields.
• Three of these fields are identical in nature.
• Other fields serve similar functions as in IPv4.
• The remaining IPv4 fields no longer exist in IPv6.
34. 36
UTAMUIPv6 Address Specifics
The 128-bit IPv6 address is written using
hexadecimal numbers.
Specifically, it consists of 8, 16-bit segments separated with
colons between each set of four hex digits (16 bits).
The format is x:x:x:x:x:x:x:x, where x is a 16-bit hexadecimal
field therefore each x is representing four hexadecimal
digits.
An example address is as follows:
2035:0001:2BC5:0000:0000:087C:0000:000A
35. 37
UTAMUAbbreviating IPv6 Addresses
Leading 0s within each set of four hexadecimal digits
can be omitted.
09C0 = 9C0
0000 = 0
A pair of colons (“::”) can be used, once within an
address, to represent any number (“a bunch”) of
successive 0s.
38. 40
UTAMUIPv6 Addressing in an Enterprise Network
An IPv6 address consists of two parts:
A subnet prefix representing the network to which the
interface is connected.
Usually 64-bits in length.
An interface ID, sometimes called a local identifier or a
token.
Usually 64-bits in length.
IPv6 = 128 bits
11111111.11111111.11111111.11111111 11111111.11111111.11111111.11111111 11111111.11111111.11111111.11111111 11111111.11111111.11111111.11111111
Subnet prefix Interface ID
39. 41
UTAMUSubnet Prefix
IPv6 uses the “/prefix-length” CIDR notation to
denote how many bits in the IPv6 address represent
the subnet.
For example:
fec0:0:0:1::1234/64
is really
fec0:0000:0000:0001:0000:0000:0000:1234/64
The first 64-bits (fec0:0000:0000:0001) forms the address
prefix.
The last 64-bits (0000:0000:0000:1234) forms the Interface
ID.
40. 42
UTAMUIs IPv4 Obsolete?
IPv4 is in no danger of disappearing overnight.
It will coexist with IPv6 and then gradually be replaced.
IPv6 provides many transition options including:
Dual stack:
Both IPv4 and IPv6 are configured and run
simultaneously on the interface.
IPv6-to-IPv4 (6to4) tunneling and IPv4-compatible
tunneling.
NAT protocol translation (NAT-PT) between IPv6 and IPv4.
41. 43
UTAMUTransition from IPv4 to IPv6
tunneling: IPv6 datagram carried as payload in IPv4
datagram among IPv4 routers
Network Layer 4-43
IPv4 source, dest addr
IPv4 header fields
IPv4 datagram
IPv6 datagram
IPv4 payload
UDP/TCP payload
IPv6 source dest addr
IPv6 header fields
42. 44
UTAMUTunneling
Network Layer 4-44
flow: X
src: A
dest: F
data
A-to-B:
IPv6
Flow: X
Src: A
Dest: F
data
src:B
dest: E
B-to-C:
IPv6 inside
IPv4
E-to-F:
IPv6
flow: X
src: A
dest: F
data
B-to-C:
IPv6 inside
IPv4
Flow: X
Src: A
Dest: F
data
src:B
dest: E
physical view:
A B
IPv6 IPv6
E
IPv6 IPv6
FC D
logical view:
IPv4 tunnel
connecting IPv6 routers
E
IPv6 IPv6
FA B
IPv6 IPv6
IPv4 IPv4