Subnet Design and IP Addressing Asst Prof Chaiporn
Subnet Design and IP Addressing Asst. Prof. Chaiporn Jaikaeo, Ph. D. chaiporn. j@ku. ac. th http: //www. cpe. ku. ac. th/~cpj Computer Engineering Department Kasetsart University, Bangkok, Thailand Adapted from the notes by Lami Kaya and lecture slides from Anan Phonphoem © 2009 Pearson Education Inc. , Upper Saddle River, NJ. All rights reserved. © The Mc. Graw-Hill Companies, Inc.
Outline n n IP Address CIDR 2
Internet Addresses n n Internet protocol must hide physical network details Application doesn’t care about physical Need address to communicate without knowing underlying network of each other Address should be n n n Unique Uniform addressing scheme Independent to physical networks 3
Internet Model Revisited router sender router receiver Application Transport Network Data Link D. L. Data Link Physical P. L. Physical Transmission medium 4
Network Layer Revisited Data 1. 1 5. 7 1. 1, 1. 2, 6. 1, 5. 7, . . . are logical addresses 1. 2 Network 1 R 1 6. 6 Network 6 6. 3 R 2 Router 5. 2 3. 3 5. 7 3. 8 Network 3 Network 5
IP Addressing Scheme n n Unique 32 -bit binary number (4 bytes) Assigned to each network interface Used for identify host and communicate Two-level hierarchical address n n n prefix (network ID) – assigned globally suffix (Node/host ID) – assigned locally Address must be coordinated globally Network ID Host ID Prefix Suffix 6
Internet Classes n Traditional addressing scheme Classful Addressing 7
IP Address Classes B 25% A 50% C 12. 5% D E 9
No. of Networks / Hosts 10
IP address in decimal notation 0 x 27 2 6 0 0 1 1 x x x 25 24 23 22 2 1 20 8+ x 2 + 1 = 11 11
Class ranges of Internet Address 13
IP address in decimal notation www. ku. ac. th 14
Class A example 15
Class C example 16
Network Address 17
Internet Example Network and Host addresses 18
A Network with Two Levels of Hierarchy n Network -> Host 19
A Network with Three Levels of Hierarchy n Network -> Subnet -> Host 20
Addresses with and without Subnetting 21
Classful Subnet Masks Class Binary Dotted-Decimal CIDR Notation A 1111 00000000 255. 0. 0. 0 /8 B 11111111 00000000 255. 0. 0 /16 C 11111111 0000 255. 0 /24 22
Subnet Masks 23
Example: Subnet Mask n Find the network ID of each of the following hosts with specified subnet masks: n n IP: IP: 192. 168. 5. 3 172. 130. 10. 20 192. 168. 10. 5 158. 108. 228. 178 Mask: 255. 0 Mask: 255. 128 Mask: 255. 240. 0 24
Outline n n IP Address CIDR 25
Classless Inter-Domain Routing n n CIDR - Classless Inter-Domain Routing Introduced in 1993 to replace classful network design in the Internet n n n To slow the growth of routing tables on routers To help slow the rapid exhaustion of IPv 4 addresses No longer restrict network addresses as one or more 8 -bit groups 26
CIDR Notation n Specifies mask with prefix size n n More convenient than binary representation Example: n n Net. ID: 158. 108. 0. 0 Subnet Mask: 255. 0. 0 CIDR notation: 158. 108. 0. 0/16 27
CIDR Host Address 28
Example: CIDR Notation n Convert mask to corresponding prefix size n n 255. 0. 0. 0 255. 192. 0. 0 255. 252 Convert prefix size to corresponding mask n n n /8 /12 /16 /20 /28 29
Example: CIDR Notation n Find the network ID of each of the following hosts with specified prefix size: n n IP: 192. 168. 5. 3/24 IP: 172. 130. 10. 20/18 30
Special IP Addresses n Network Address n n Directed Broadcast Address n n Broadcast to local network all 1; e. g. 255 This computer Address n n Broadcast to a specified network all hosts = 1; e. g. 158. 108. 255/16 Limited Broadcast Address n n all hosts = 0; e. g. 158. 108. 0. 0/16 all 0; e. g. 0. 0 Loopback Address n 127. 0. 0. 0/8 127. x. x. x 31
Loopback Addresses n Allow programmers to test the program logic quickly n n During loopback testing no packets ever leave a computer n n without needing two computers and without sending packets across a network the IP software forwards packets from one application to another The loopback address never appears in a packet traveling across a network 32
Loopback Addresses โปรเซส A Process A A TCP/UDP / Process B Outgoing packet from Loopback to Process 127. 0. 0. 1 IP Loopback Interface Data Link Incoming packet to Loopback Interface Physical Other Addresses 33
Directed Broadcast Address n n Use for sending to all nodes in class range Class A broadcast example: n n Class B broadcast example: n n 10. 255 158. 108. 255 Class C broadcast example: n 202. 100. 15. 255 34
Special IP Address 35
Example: Subnet Design n You are given an IP address block n n You want to divide this block into subnets n n 12. 6. 8. 0/24 Subnet A to serve 28 hosts Subnet B to serve 40 hosts Subnet C to serve 70 hosts List the designed subnets with the following information n (1) subnet ID, (2) mask, (3) first usable address, (4) last usable address, (5) directed broadcast address 36
Example: Subnet Design n Design subnetting scheme Original /24 block (256 addrs) Subnet C (70 hosts) /25 block (128 addrs) Subnet A (28 hosts) /26 block (64 addrs) Subnet B (40 hosts) /26 block (64 addrs) 37
Example: Subnet Design n Create summary table Subnet Sub. Net ID Subnet Mask First Host IP Last Host IP Broadcast Addr C 12. 6. 8. 0 255. 128 12. 6. 8. 126 12. 6. 8. 127 A 12. 6. 8. 128 255. 192 12. 6. 8. 129 12. 6. 8. 190 12. 6. 8. 191 B 12. 6. 8. 192 255. 192 12. 6. 8. 193 12. 6. 8. 254 12. 6. 8. 255 38
- Slides: 36