Title: TCOM 509
1TCOM 509 Internet Protocols (TCP/IP)Lecture
06_bSubnetting,Supernetting, CIDRIPv6
- Instructor Dr. Li-Chuan ChenDate 10/06/2003
- Based in part upon slides of Prof. J. Kurose (U
Mass)
2IP Addresses Review
- IP address is 32-bit in IPv4.
- IP address are designed with two levels of
hierarchy, network portion and host portion. - Classful addressing inefficient Class A and
Class B waste many address spaces for each
network. - Solution use another level of hierarchy,
subnetting. Further divide a network into smaller
networks called subnets.
Number of Hosts per subnet 2 hostid2
Number of Subnets 2 subnetid
3Subnet Mask
11111111 00000000 00000000 00000000
8 1s
Class B
11111111 11111111 00000000 00000000
16 1s
Class C
11111111 11111111 11111111 00000000
24 1s
- Class A subnet mask 255.0.0.0
- Class B subnet mask 255.255.0.0
- Class C subnet mask 255.255.255.0
4Subnet Example
- What is the subnetwork address if the destination
address is 128.2.4.12 and the subnet mask is
255.255.240.0? - Apply the AND operation 10000000 00000010
00000100 00001100 11111111 11111111
11110000 00000000--------------------------------
------------------------------- 10000000
00000010 00000000 00000000 - ? 128.2.0.0 subnetwork address
5Subnet Example
- A company has the Class B address 128.3.0.0. The
company needs 1000 subnets. Design the subnets.
(Explain in class.)
6Variable Length Subnet Mask
- Suppose a site with class C address and needs to
have 5 subnets with hosts as follows 40, 40, 30,
30. - The site cannot use subnet mask of 26 bits. Why?
- Solution use variable length subnet mask (vlsm).
- First uses the 26-bit subnet mask
(255.255.255.192) to divide the network into 4
subnets. - Then it applies with 27-bit subnet mask
(255.255.255.224) to one of the subnets to divide
it further into two smaller subnets.
7Supernetting
- Class A and B addresses are almost depleted.
- Class C is available, but most organization needs
more than 256 hosts in the network. - Solution use supernetting.
- Combine several class C networks to create a
supernetwork (less number of 1s than default
mask) - A supernet mask is reverse of a subnet mask.
8Supernet Example
- A company needs to make a supernet out of its 8
Class C address. What is the supernet mask? - A supernet has a first address of 208.64.32.0 and
a supernet mask of 255.255.248.0. How many blocks
are in this supernet? What is the range of
addresses? What is the total number of addresses?
9Classless Addressing
- What if a small home business only wants 8
addresses? - Solution
- Use classless addressing variable-length blocks
that belongs to no class. - The whole address space, 232, is divided into
blocks of different sizes. - Rules
- Number of blocks must be power of 2.
- The beginning address must be divisible by the
number of addresses.
Boundary is flexible
10Classless Example
- Which of the following can be the beginning
address of a block that contains 16 addresses? - 208.64.32.32
- 208.16.44.44
- 18.20.40.60
- 128.29.3.72
- Rememer The beginning address must be divisible
by the number of addresses.
11Classless InterDomain Routing (CIDR)
- CIDR notation
- w.x.y.z/n
- Where n denotes the number of bits that are the
same in every address in the block. - Examples
- A site is given a block with the beginning
address and the prefix length 208.64.32.24/30.
What is the range of the block? - Beginning address 11010000 01000000 00100000
00011000 - Ending address 11010000 01000000 00100000
00011011 - ? Only 4 address in this block
- What is the network address of 208.64.32.82/27?Th
e prefix length is 27 (must keep the first 27
bits the same) and change the remaining bits to
0s.? The network address is 208.64.32.64/27
12Routing in the Internet
- Autonomous Systems (AS) A collection of hosts
and routers that are administered by a single
authority. - The Global Internet consists of AS interconnected
with each other - Stub AS small corporation one connection to
other ASs - Multihomed AS large corporation (no transit)
multiple connections to other ASs - Transit AS provider, hooking many ASs together
- Two-level routing
- Intra-AS administrator responsible for choice of
routing algorithm within network - Inter-AS unique standard for inter-AS routing
BGP
13Subnetting
- Autonomous Systems (AS) A collection of hosts
and routers that are administered by a single
authority. - The Global Internet consists of AS interconnected
with each other - Stub AS small corporation one connection to
other ASs - Multihomed AS large corporation (no transit)
multiple connections to other ASs - Transit AS provider, hooking many ASs together
- Two-level routing
- Intra-AS administrator responsible for choice of
routing algorithm within network - Inter-AS unique standard for inter-AS routing
BGP
14Why different Intra- and Inter-AS routing ?
- Policy
- Inter-AS admin wants control over how its
traffic routed, who routes through its net. - Intra-AS single admin, so no policy decisions
needed - Scale
- hierarchical routing saves table size, reduced
update traffic - Performance
- Intra-AS can focus on performance
- Inter-AS policy may dominate over performance
15IPv6
- Initial motivation 32-bit address space
completely allocated by 2008. - Additional motivation
- Efficiency - header format helps speed
processing/forwarding - QoS - header changes
- new anycast address route to best of several
replicated servers - IPv6 datagram format
- fixed-length 40 byte header
- no fragmentation allowed
16IPv6 Header (Cont)
Priority identify priority among datagrams in
flow Flow Label identify datagrams in same
flow. (concept of flow
not well defined). Next header identify upper
layer protocol for data
17Other Changes from IPv4
- Checksum removed entirely to reduce processing
time at each hop - Options allowed, but outside of header,
indicated by Next Header field - ICMPv6 new version of ICMP
- additional message types, e.g. Packet Too Big
- multicast group management functions
18Transition From IPv4 To IPv6
- Not all routers can be upgraded simultaneous
- How will the network operate with mixed IPv4 and
IPv6 routers? - Two proposed approaches
- Dual Stack some routers with dual stack (v6, v4)
can translate between formats - Tunneling IPv6 carried as payload in IPv4
datagram among IPv4 routers
19Dual Stack Approach
IPv6
IPv6
IPv6
IPv6
IPv4
IPv4
A-to-B IPv6
B-to-C IPv4
B-to-C IPv6
B-to-C IPv4
20Tunneling
tunnel
Logical view
IPv6
IPv6
IPv6
IPv6
Physical view
IPv6
IPv6
IPv6
IPv6
IPv4
IPv4
A-to-B IPv6
E-to-F IPv6
B-to-C IPv6 inside IPv4
B-to-C IPv6 inside IPv4