Beruflich Dokumente
Kultur Dokumente
Subnetting
Slide #1
Topics
1. 2. 3. 4. 5. IP Addresses Classful and classless addressing Subnet Masks and Prefixes Subnet Math Subnet Problems
Slide #2
IP Addresses
32-bit integers
One for each network interface. Dotted decimal notation: ii.jj.kk.ll
172 . 16 .
10101100 1 byte 00010000
254 .
11111110
1
00000001
32 bits = 4 bytes
CIT 384: Network Administration Slide #3
Grouping IP Addresses
Groups of consecutive IP addrs are called networks. Routing table would only need 3 entries below.
Slide #4
Address Classes
Class A: 0.0.0.0-127.255.255.255
8-bit net ID, 24-bit host ID 224 2 hosts per network; 126 networks
Class B: 128.0.0.0-191.255.255.255
16-bit net ID, 16-bit host ID 216 2 hosts per network; 16,384 networks
Class C: 192.0.0.0-223.255.255.255
24-bit net ID, 8-bit host ID (28 2) = 254 hosts per network; 2,097,152 networks
Class D: 224.0.0.0-239.255.255.255
28-bit multicast group ID
Class E: 240.0.0.0-255.255.255.255
Reserved for future use
CIT 384: Network Administration Slide #6
CIDR
Classless Inter-Domain Routing
Classful routing wastes most IP addresses. Allocate addresses on bit boundaries instead of byte boundaries. Allow ISPs/users to decide on boundaries instead of basing on IP addresses.
Prefix notation
/x indicates that first x bits are shared. 192.168.0.0/16 = 192.168.0.0 192.168.255.255
CIT 384: Network Administration Slide #7
Public IP Addresses
ICANN assigns network numbers.
Internet Corporation for Assigned Network Numbers. ICANN gives authority to regional orgs, e.g. ARIN (American Registry for Internet Numbers) Typically to ISPs, universities, corporations.
Slide #8
A B
C
1 16
256
Slide #9
32 bits 10.1.1.1
127.0.0.1
128 bits 0000:0000:0000: 0000:FFFF:FFFF :0A01:0101 ::FFFF:FFFF:0A 01:0101 ::1/128 2128 (~3.4 x 1038)
Slide #10
Network Mask
How do we list subnets in routing table?
Ex: addresses 150.150.4.0 150.150.4.255 Table: 155.155.4.0 netmask 255.255.255.0
Prefix notation
Humanly readable form of subnet mask. Just counts the number of binary 1s in mask.
CIT 384: Network Administration Slide #11
Class B
NNNNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
Class C
NNNNNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
Class A B C D E Leading Bits 0 10 110 1110 1111 Start 0.0.0.0 End 126.255.255.255 Subnet Mask 255.0.0.0 255.255.0.0 255.255.255.0 N/A N/A CIDR /8 /16 /24 N/A N/A
Slide #12
Example
IP Address: 137.201.18.42 Address Class: B since 128 < 137 < 191 Default Netmask: 255.255.0.0 Network Address Part: 137.201.0.0 Host Address Part: 0.0.18.42 Broadcast Address: 137.201.255.255 Host Address Range for Network:
137.201.18.1 through 137.201.255.254
CIT 384: Network Administration Slide #13
Why Subnet?
Allows admin to create more networks for:
1. 2. 3. 4. 5. Address conservation. Organization of hosts. Different physical media. Security. Performance (smaller broadcast domains.)
Slide #14
Slide #15
Subnet Math
Binary <-> Decimal Conversion
Convert each byte of dotted quad into binary. Convert binary byte into 4 decimal values.
Subnet zero
Classful routing reserves 2 subnets so only have 2s 2.
Lowest and highest subnet numbers.
Slide #18
Subnet masks
/22 255.255.252.0 (6 subnet bits, 10 host bits, 1022 hosts/sub) /23 255.255.254.0 (7 subnet bits, 9 host bits, 510 hosts/sub) /24 255.255.255.0 (8 subnet bits, 8 host bits, 254 hosts/sub)
References
1. James Boney, Cisco IOS in a Nutshell, 2nd edition, OReilly, 2005. 2. Cisco, Cisco Connection Documentation, http://www.cisco.com/univercd/home/home.htm 3. Cisco, Internetworking Basics, http://www.cisco.com/univercd/cc/td/doc/cisintw k/ito_doc/introint.htm 4. Matthew Gast, 802.11 Wireless Networks: The Definitive Guide, OReilly, 2005. 5. Wendell Odom, CCNA Official Exam Certification Library, 3rd edition, Cisco Press, 2007.
CIT 384: Network Administration Slide #21