L5 - Naming, addressing, forwarding Flashcards
How was IP addressing done before 1994?
“Classful Addressing” - the 32 bit addresses were divided into a network id portion and a host ID portion.
What were class A addresses?
An IP address starting with a 0 to indicate a class A address, followed by 7 bits for the network and 24 bits for the host.
What were class B addresses?
An IP address starting with a 10 to indicate a class B address, followed by 14 bits for the network and then 16 bits for the host
What were class C addresses?
An IP address starting with a 110 to indicate a class C address, followed by 21 bits for the network and then 8 bits for the host (meaning each class C network could only have 255 hosts!)
By 1994 growth rates were exceeding hardware and software capabilities, and we were running out of class C networks. What was the solution?
CIDR - classless interdomain routing
Who assigns IP address space?
IANA (internet assigned numbers authority) allocates regional routing registries to AFRINIC, APNIC, ARIN (North America), LACNIC, and RIPE (Europe). IANA just finished allocating all remaining /8 blocks, hence “we are out of IPv4 addresses”
What is CIDR?
Classless Interdomain Routing. Instead of having a fixed network ID and host ID portions, we have an IP address and a network ‘mask’ indicated by a slash. This allows assigners to allocate a range appropriate to the size of the assignee.
How does CIDR deal with overlapping network prefixes in IP addresses?
Routers must use “longest prefix match” for when an IP address has a prefix that matches two or more entries in a routing table .
What are the benefits of longest prefix match (LPM) in CIDR?
1 - Efficiency - prefix blocks can be allocated on a much finer granularity than with classical routing
2 - Aggregation - this can happen if two downstream networks with more specific prefixes are treated in the same way by an upstream network, which can just combine two prefixes into one entry in a routing table.
What is ‘multi-homing’?
Multi-homing is the ability for an AS to be reachable through two or more ISPs. It was a significant contributor to the fast growth of routing tables around 2000.
What is a problem of multi-homing combined with LPM matching?
If an AS is reachable from two ISPs, each ISP cannot aggregate the prefix. This is the AS will always receive traffic from the ISP which did not aggregate (because it advertises a longer prefix). This resulted in a lot of /24 addresses.
How can you load balance your traffic with LPM?
In addition to advertising a shorter prefix on multiple links, you would also split your prefix into multiple parts and advertise one on each link. The ‘split’ prefix is more specific.
How are IP addresses looked up in routing tables?
It depends on the protocol - Ethernet uses exact match lookup (using binary tree, hash lookup, whatever). IPv4 and IPv6 use LPM most often as a trie
What are the advantages and disadvantages of exact match lookup in Ethernet?
Advantages of exact match is that it is simple and has O(1) time. However, it is an inefficient use of memory.
What are the main forms of trie used for LPM?
- Single bit tries (efficient use of memory, easy insertion, but could require 32 lookups in worst case)
- Direct tries (more bits used at each lookup, fewer lookups, but inefficient use of memory)
- Multi-ary trie (this combines the memory efficiency of single bit and fast lookup of direct)