CS716
Advanced Computer Networks
By Dr. Amir Qayyum
1
1
Lecture No. 45
2
Where we are What we understand
• Concepts of networking & network programming
– Elements of networks: nodes and links
– Building a packet abstraction on a link
• Issues related to bits/frames sent on a single link
– How to detect transmission errors in a frame after encoding
and framing it
– How to simulate a reliable channel (sliding window)
– How to arbitrate access to shared media in any network
• Design issues of direct link networks
– Functionality of network adaptors
3
Where we are – What we understand
• How switches may provide indirect connectivity
–
–
–
–
Different ways to move through a network (forwarding)
Bridge approach to extending LAN concept
Example of a real virtual circuit network (ATM)
How switches are built and contention within switches
• How different networks work together
– (Common connecting protocol IP) and its service model
– Routing protocols in simple networks
• Next: large networks working together
4
Internetworking
• Reading: Peterson and Davie, Chapter 4
• Global internets (scale)
• Dealing with global scale
– Virtual geography and addresses
– Hierarchical routing
– Multicast traffic
– MPLS
• Future internetworking: IPv6
5
How Should Hierarchy be Defined ?
• Hierarchy reduces information requirements for
forwarding
6
Internetworking
• Main problems addressed by internetworking
– Heterogeneity
– Scale
• Bridges scale to level of medium organization
• IP addresses most endtoend heterogeneity issues
• Today: issues of global scale
7
Global Internets
• Evolution of Internet structure
• Virtual geographies: networks, domains, and
translations
• Problems of scale
• IP address hierarchy evolution
• Notion of autonomous systems (AS’s)
• Common intradomain routing protocols
• Standard interdomain routing protocol
8
Diameter of the Internet
• Connect all nodes of a network in a big ring
– Network diameter will be half the ring circumference
• Adding more links brings down network diameter
– Diameter can be quarter of the ring with one link …
How many
links should
be added to
bring the
diameter
below some
threshold ?
9
Internet Structure in Recent Past 1990
NSFNET backbone
Stanford
BARRNET
regional
Berkeley
PARC
MidNet
regional
…
Westnet
regional
UNM
NCAR
ISU
UNL
KU
UA
• Tree structure, centered around one backbone
• Interconnection of thousands of “organizations”
– End users and service providers
• Scalability of routing protocols in global Internet
– Network entities are administratively independent
10
Internet Structure Today
• Multiple backbone service providers
• Arbitrary graph structure
• Different QoS in different backbones (commercial)
Large corporation
“Consumer” ISP
Peering
point
Backbone service provider
“ Consumer” ISP
Large corporation
Small
corporation
Peering
point
“Consumer” ISP
Small
corporation
11
Virtual Geographies
• Internet domain names (understood by people)
• IP network numbers (understood by routers)
• Internet domain name hierarchy
– ASCII strings separated by periods; typical formats:
• host.domain.domain_type
– xyz.carepvtltd.com
• host.subdomain.domain.domain_type
– abc.cs.berkeley.edu
• host.domain.domain_type.country
– www.case.edu.pk
12
Virtual Geographies and IP Address
• Routers use IP network numbers
IP
Address Class
Network
Host
• Original intention:
– One network number per physical network
• Closer to real geography (than domain names)
• Some jumps, e.g.,
– Divisions of one company
– Organizations with network research testbeds
13
Virtual Geographies and DNS
• Translation from domain name to IP
address
– Domain to IP: Domain Name Service (DNS)
– IP to domain: relies on host
• Not secure
• Use reverse lookup(domain to IP) for security
• DNS is a hierarchical, (mostly) distributed
application (more detail later)
14
Scaling Problems for the Internet
•
•
•
•
Inefficient address allocation
Too many networks for routing
Can trade off between these two
Questions
– What network(s) should you allocate to a
company with 1000 machines ?
– What about a company with 200 machines ?
– What about a company with 2 machines that
15
plans to grow rapidly ?
Scaling Problems for the Internet
• Pressure primarily on class B networks
– Most companies plan to grow beyond 255 machines
– Renumbering is a hassle and can interrupt service
– Only around 16,000 class B networks available (14 bit)
• Class B networks aren’t very efficient
– Few organizations have O(10,000) machines
– More likely a network uses O(1,000) of 65,000 address
• Scaling problems with alternatives
– Multiple table entries if class C networks used instead
– Protocols do not scale beyond O(10,000) networks
16
IP Address Hierarchy Evolution
• Begin with classbased system
Class A: 0 network (7)
Class B: 1 0
Class C: 1 1 0
host (24 bits)
network (14 bits)
host (16 bits)
network (21 bits)
host (8 bits)
• Subnetting within an organization
–
–
–
–
Network can be broken into smaller networks
Recognized only within the organization
Implemented by packetswitching
Smaller networks called subnets
17
Subnetting
• Another level to address/routing hierarchy: subnet
• Subnet masks define variable partition of host part
• Subnets visible only within site (close to each
other)Class
IP address
Network
Host
Subnetted
IP address
Class
Network
Subnet
Host
Subnet
Mask
11
1111111111111111
11111111
00000000
Non
contiguous
Mask
11
1111111111111111
1111 0000 1111 0000
18
Subnetting Example
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.0
128.96.34.15
All hosts have
address && mask = subnet address
128.96.34.1
H1
R1
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.128
128.96.34.130
128.96.34.139
128.96.34.129
H3
128.96.33.14
R2
128.96.33.1
Subnet mask: 255.255.255.0
Subnet number: 128.96.33.0
H2
Forwarding table at router R1
Subnet Number Subnet Mask Next Hop
128.96.34.0 255.255.255.128 interface 0
128.96.34.128 255.255.255.128 interface 1
128.96.33.0 255.255.255.0 R2
19
Forwarding Algorithm
D = destination IP address
for each entry (SubnetNum, SubnetMask, NextHop)
D1 = SubnetMask & D
if D1 = SubnetNum
if NextHop is an interface
deliver datagram directly to D
else
deliver datagram to NextHop
•
•
•
•
Comparisons in parallel, taking the longest match
Use a default router if nothing matches
Not necessary for 1s in subnet mask to be contiguous
Can put multiple subnets on one physical network 20
Subnetting
• Subnets allow hierarchy within
organizations
• But do not reduce class B address
pressure
21
Supernetting/CIDR
• CIDR: Classless InterDomain Routing
• Compromise in address utilization vs
scalability
• Eliminate class notion; generalize
subnet notion
• All routers must understand CIDR
addressing
– Longest match in the table
22
Supernetting/CIDR
• Assign block of contiguous network
numbers to nearby networks
– Restrict block sizes to powers of 2
– Use bit mask(CIDR mask) to identify
block size
23
CIDR
• Specify network with (network#, mask bits)
– Equivalent to (network#, # of hosts)
• Block of 8 class C networks may be treated as one
• Organizations can still use subnetting internally !
• Routing table entries look like:
subnet #
131.126.141.0
131.126.142.0
131.126.142.128 25
131.126.0.0
default
24
25
16
0
mask length
next hop
Interface 0
Interface 1
R1
R2
R3
24
CIDR Growth
• CIDR/supernetting allows hierarchical
development
• Assign block of addresses to regional
provider (e.g., 128.0.0.0/9 to BARRNET)
• Regional provider subdivides addresses
• Can hand out to subregional providers (e.g.,
128.32.0.0/16 to Berkeley)
• Who in turn hand out to smaller organization
(e.g., 128.32.32.0/21 to Berkeley CS Dept)
25