Number Systems 1 Network Math www thinkgeek com
Number Systems 1
Network Math www. thinkgeek. com 2
Binary presentation of data n The American Standard Code for Information Interchange (ASCII) is the most commonly used code for representing alpha-numeric data in a computer. 3
Bits and bytes 4
Base 10 number system – The Math n n The decimal number system: based on powers of 10. Each column position of a value, from right to left, is multiplied by the number 10, which is the base number, raised to a power, which is the exponent. The power that 10 is raised to depends on its position to the left of the decimal point. 2134 = (2 x 103) + (1 x 102) + (3 x 101) + (4 x 100) 5
Base 10 (Decimal) Number System Digits (10): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Number of: 104 103 10, 000’s 102 100’s 101 10’s 100 1’s 6
Rick’s Number System Rules n n All digits start with 0 A Base-n number system has n number of digits: n n n Decimal: Base-10 has 10 digits Binary: Base-2 has 2 digits Hexadecimal: Base-16 has 16 digits The first column is always the number of 1’s Each of the following columns is n times the previous column (n = Base-n) n n n Base 10: Base 2: Base 16: 10, 000 16 65, 536 1, 000 8 4, 096 100 4 256 10 2 16 1 1 1 7
Base 2 number system – The Math n 101102 = (1 x 24 = 16) + (0 x 23 = 0) + (1 x 22 = 4) + (1 x 21 = 2) + (0 x 20 = 0) = 22 (16 + 0 + 4 + 2 + 0) 8
Base 2 (Binary) Number System Digits (10): 0, 1 Number of: 27 26 25 128’s 64’s 32’s Dec. 2 10 17 70 130 255 24 16’s 23 8’s 1 22 4’s 21 2’s 20 1’s 0 1 1 0 0 9
Converting between Decimal and Binary Digits (10): 0, 1 Number of: 27 26 25 128’s 64’s 32’s Dec. 1 0 0 0 172 192 24 16’s 23 8’s 22 4’s 21 2’s 20 1’s 0 0 0 1 0 0 0 0 10
Computers do Binary 0 n n Bits have two values: OFF and ON The Binary number system (Base-2) can represent OFF and ON very well since it has two values, 0 and 1 n n 1 0 = OFF 1 = ON Understanding Binary to Decimal conversion is critical in networking. Although we use decimal numbers in networking to display information such as IP addresses (LATER), they are transmitted as OFF’s and ON’s that we represent in binary. 11
Rick’s Program 12
Rick’s Program 13
Rick’s Program 14
IP Addressing Scheme Where the network part ends ant the host part begins depends on the subnet mask or classful address (coming). Divide into four 8 bit sections (octets). Convert from binary to decimal. 15
IP Addresses Dotted-Decimal Notation 10 01 01 11 0 1 1 0 The 32 bits 0 of 0 an IP 1 address 0 are grouped into 4 bytes: 0 1 1 1 0 1 16
IP Addresses We use dotted notation (or dotted decimal notation) to represent the value of each byte (octet) of the IP address in decimal. 10101001 11000111 01000101 10001001 169 199 69 137 17
IP Addresses An IP address has two parts: n n network number host number A third part will be added shortly: Subnet Part 18
IP Addresses Which bits refer to the network number? Which bits refer to the host number? Answer: n Classful IP Addressing n n n Value of first octet determines the network portion and the host portion. Used with classful routing protocols like RIPv 1. Classless IP Addressing (Next week) n n Value of first octet does NOT matter. The subnet mask determines the network portion and the host portion. Hosts and Classless Inter-Domain Routing (CIDR). Classless IP Addressing is what is used within the Internet and in most internal networks. 19
Classful IP Addressing n n This chapter discusses Classful IP Addressing and Classful Subnetting. Next week we will discuss Classless IP Addressing and Classless Subnetting which is very similar to Classful. 20
Classful IP Addressing n There are 5 classes of IP addresses: n Class A n Class B n Class C n Class D n Class E 21
Address Classes Class A Used for Internet hosts Class B Class C Class D Class E Used for Internet hosts Used for Internet multicasts Unused (used “experimentally”) Computers on the Internet can only be addressed using Class A, Class B, or Class C addresses. 22
Determining Address Class A First octet is between 0 - 127 Class B Class C Class D Class E First octet is between 128 - 191 First octet is between 192 - 223 First octet is between 224 - 239 First octet is between 240 - 255 Computers on the Internet can only be addressed using Class A, Class B, or Class C addresses. 23
Address Classes 1 st octet 2 nd octet 3 rd octet 4 th octet Class A Network Host Class B Network Host Class C Network Host N = Network number assigned by ARIN (American Registry for Internet Numbers) H = Host number assigned by administrator 24
Address Classes Class A 85 45 31 158 Class B 168 65 114 201 Class C 210 144 235 56 Network Host 25
Looking at Classful IP Addresses Which part is network, what is the network address, and what is the class? 1) 2) 3) 4) 5) 6) 7) 199. 46. 36. 5 111. 211. 1 7. 141. 30. 89 222. 8. 56. 107 192. 168. 16. 2 63. 100. 5. 1 192. 0. 0. 2 26
Looking at Classful IP Addresses 1) 2) 3) 4) 5) 6) 7) IP Address Network Address 199. 46. 36. 5 192. 46. 36. 0 111. 211. 1 111. 0. 0. 0 7. 141. 30. 89 7. 0. 0. 0 222. 8. 56. 107 222. 8. 56. 0 192. 168. 16. 2 192. 168. 16. 0 163. 100. 5. 1 163. 100. 0. 0 192. 0. 0. 2 192. 0. 0. 0 Class C Class A Class C Class B Class C What are the range of hosts for each of these networks? n n All zeroes in the host portion is the network address All ones in the host portion is the broadcast address (coming). 27
Looking at Classful IP Addresses 1) IP Address 199. 46. 36. 5 Class C 199 46 36 HOST 11000111 00101110 00100100 0000 11000111 11000111 00101110 00101110 00100100 00100100 000000010 00000011 Etc. 11111110 11000111 00101110 00100100 1111 Network: 199. 46. 36. 0 Hosts: 199. 46. 36. 1 through 199. 46. 36. 254 Broadcast: 199. 46. 36. 255 1 Network Address 254 Host Addresses 28 - 2 1 Broadcast Address 28
Looking at Classful IP Addresses 1) IP Address 199. 46. 36. 5 Class C Network: 199. 46. 36. 0 Hosts: 199. 46. 36. 1 through 199. 46. 36. 254 Broadcast: 199. 46. 36. 255 2) 111. 211. 1 Class A Network: 111. 0. 0. 0 Hosts: 111. 0. 0. 1 through 111. 255. 254 Broadcast: 111. 255 3) 7. 141. 30. 89 Class A Network: 7. 0. 0. 0 Hosts: 7. 0. 0. 1 through 7. 255. 254 Broadcast: 7. 255 29
Looking at Classful IP Addresses Your Turn! 4) IP Address 222. 8. 56. 107 Class C 5) 192. 168. 16. 2 Class C 6) 163. 100. 5. 1 Class B 7) 192. 0. 0. 2 Class B 30
Looking at Classful IP Addresses 4) 5) n n IP Address 222. 8. 56. 107 Class C Network: 222. 8. 56. 0 Hosts: 222. 8. 56. 1 through 222. 8. 56. 254 Broadcast: 222. 8. 56. 255 192. 168. 16. 2 Class C Network: 192. 168. 16. 0 Hosts: 192. 168. 16. 1 through 192. 168. 16. 254 Broadcast: 192. 168. 16. 255 All zeroes in the host portion is the network address All ones in the host portion is the broadcast address (coming). 31
Looking at Classful IP Addresses 6) 7) n n IP Address 163. 100. 5. 1 Class B Network: 163. 100. 0. 0 Hosts: 163. 100. 0. 1 through 163. 100. 255. 254 Broadcast: 163. 100. 255 192. 0. 0. 2 Class B Network: 192. 0. 0. 0 Hosts: 192. 0. 0. 1 through 192. 0. 0. 254 Broadcast: 192. 0. 0. 255 All zeroes in the host portion is the network address All ones in the host portion is the broadcast address (coming). 32
IP Address Classes N = Network number assigned by ARIN (American Registry for Internet Numbers) H = Host number assigned by administrator 33
IP Addressing n Network ID or Network Portion n n Host on a network can only communicate directly with devices if they have the same network ID All zeros in the host portion of the address Routers use the network ID when it forwards data on the Internet n This is only partially true. The router uses the subnet mask to determine the network ID, which is then used to forward data. Network IDs cannot be used as an address for any device that is attached to the network, such as hosts, router interfaces, etc. 34
Addressing: Network & Host 192. 168. 1. 0 10. 0 222. 0. 0. 0 192. 168. 2. 0 Routers are required when two hosts with IP addresses on different networks need to communicate. • What are some example Host IP addresses? 35
IP Addressing 192. 168. 1. 0 10. 0 n 222. 0. 0. 0 192. 168. 2. 0 Broadcast Address n n n Used to send data to all devices on the network All ones in the host portion of the address All devices pay attention to a broadcast Broadcast addresses cannot be used as an address for any device that is attached to the network. What are the broadcast addresses for these networks? 36
Network IDs and ZIP Codes Your Name 123 Main Street Anytown, ST 12345 Valencia Community College 1800 S Kirkman Rd Orlando, FL, 32811 ZIP codes direct your mail to your local post office and your neighborhood. The street address then directs the carrier to your home. 37
Subnets and Subnet Masks Formalized in 1985, the subnet mask breaks a single class A, B or C network in to smaller pieces. n n A “ 1” bit in the subnet mask means that the corresponding bit in the IP address should be read as a network number A “ 0” bit in the subnet mask means that the corresponding bit in the IP address should be read as a host bit. 38
IPv 4 Address Classes 1 st octet 2 nd octet 3 rd octet 4 th octet Class A Network Host Class B Network Host Class C Network Host 39
Class A addresses First octet is between 0 - 127 Network Number between 0 - 127 n n n Host 8 bits With 24 bits available for hosts, there a 224 possible addresses. That’s 16, 777, 216 nodes! There are 126 class A addresses. n 0 and 127 have special meaning and are not used. 16, 777, 214 host addresses, one for network address and one for broadcast address. Only large organizations such as the military, government agencies, universities, and large corporations have class A addresses. Cable Modem ISPs have 24. 0. 0. 0 and Pacbell DSL users have 63. 0. 0. 0 Class A addresses account for 2, 147, 483, 648 of the possible IPv 4 addresses. That’s 50 % of the total unicast address space, if classful was still used in the Internet! 40
Class B addresses First octet is between 128 - 191 Network Number between 128 - 191 n n Host 8 bits With 16 bits available for hosts, there a 216 possible addresses. That’s 65, 536 nodes! There are 16, 384 (214) class B networks. 65, 534 host addresses, one for network address and one for broadcast address. Class B addresses represent 25% of the total IPv 4 unicast address space. Class B addresses are assigned to large organizations including corporations (such as Cisco, government agencies, and school districts). 41
Class C addresses First octet is between 192 - 223 Network Host 8 bits Number between 192 - 223 n n n With 8 bits available for hosts, there a 28 possible addresses. That’s 256 nodes! There are 2, 097, 152 possible class C networks. 254 host addresses, one for network address and one for broadcast address. Class C addresses represent 12. 5% of the total IPv 4 unicast address space. 42
Problems with IPv 4 Addressing n n Address Depletion Internet Routing Table Explosion 43
IP address shortage n n In the early days of the Internet, IP addresses were allocated to organizations based on request rather than actual need. No medium size - Hosts: n Class A: 16 million (approx. ) n Class B: 65, 536 n Class C: 256 Subnet Mask n The solution to the IP address shortage was thought to be the subnet mask. n Formalized in 1985 (RFC 950), the subnet mask breaks a single class A, B or C network in to smaller pieces. Solutions to IP Address shortage n Classless Inter-Domain Routing (CIDR) n VLSM and Route Aggregation (supernetting, route summarization) n NAT/PAT n IPv 6 44
The Subnet Mask n n n The Subnet Mask corresponds to the IP address. A “ 1” bit in the subnet mask means that the corresponding bit in the IP address should be read as a network number A “ 0” bit in the subnet mask means that the corresponding bit in the IP address should be read as a host bit. The Subnet Mask is a 32 -bit number. Its job is to tell routers (and humans) which bits are network number and which bits are used to represent hosts. 45
The Default Subnet Masks (no subnets) 1 st octet 2 nd octet 3 rd octet 4 th octet Class A Network Host Class B Network Host Class C Network Host Class A or /8 1111 00000000 Class B or /16 11111111 00000000 Class C or /24 11111111 0000 A “ 1” bit in the subnet mask means that the corresponding bit in the IP address should be read as a network number n A “ 0” bit in the subnet mask means that the corresponding bit in the IP address should be read as a host bit. n /n “slash” tells us how many “ 1” bits are in the subnet mask. n 46
The Default Subnet Masks (no subnets) 1 st octet 2 nd octet 3 rd octet 4 th octet Class A Network Host Class B Network Host Class C Network Host Class A or /8 255 0 0 0 Class B or /16 255 0 0 Class C or /24 255 255 0 A “ 1” bit in the subnet mask means that the corresponding bit in the IP address should be read as a network number n A “ 0” bit in the subnet mask means that the corresponding bit in the IP address should be read as a host bit. n 47
What is subnetting? Network 172 16 Network n n n Host 0 0 Subnet Host Subnetting is the process of borrowing bits from the HOST bits, in order to divide the larger network into small subnets. Subnetting does NOT give you more hosts, but actually costs you hosts. You lose two host IP Addresses for each subnet, one for the subnet IP address and one for the subnet broadcast IP address. You lose the last subnet and all of it’s hosts’ IP addresses as the broadcast for that subnet is the same as the broadcast for the network. In older networks, you would have lost the first subnet, as the subnet IP address is the same as the network IP address. (This subnet can be used in most networks. ) 48
Analogy 100 apples = 98 Usable Apples Before subnetting: n In any network (or subnet) we can not use all the IP addresses for host addresses. n We lose two addresses for every network or subnet. 1. Network Address - One address is reserved to that of the network. For Example: 207. 21. 54. 0 /16 2. Broadcast Address – One address is reserved to address all hosts in that network or subnet. For Example: 207. 21. 54. 255 This gives us a total of 254 usable hosts 49
Analogy 98 Apples (100 – 2) n 10 barrels x 10 apples = 100 apples 10 10 10 It is the same as taking a barrel of 100 apples and dividing it into 10 barrels of 10 apples each. 10 50
2 = 1 network address + 1 broadcast address 9 barrels x 8 apples = 72 apples 98 Apples (100 – 2) 8 8 (less 2) 8 n n 8 (less 2) n (less 2) 8 8 (less 2) However, in subnetting we will see that we lose two apples per subnet, one for the address and one for the broadcast. We also lose the last basket of apples, subnet, as it contains the broadcast address for the entire network. In older networks, we also lost the first basket, subnet, as it contained the address of the entire network, but this is usually no longer the case. (less 2) X 10 X 51
Subnetting a Class C Address Class C address 207. 21. 54. 0 Address Default Mask Network 207 Network 21 Network 54 Host 0 255 11111111 255 1111 0 0000 Network Host 8 bits Number between 192 - 223 With 8 bits available for hosts, there a 28 possible addresses. That’s 256 nodes! 52
Subnetting a Class C Address Class C address 207. 21. 54. 0 Address Default Mask n n Network 207 Network 21 Network 54 Host 0 255 11111111 255 1111 0 0000 Network Address: 207. 21. 54. 0 (note this address) Default Mask: 255. 0 (/24) Broadcast Address: 207. 21. 54. 255 (note this address) Hosts: 207. 21. 54. 1 through 207. 21. 54. 254 53
Class C: 4 -bit Mask (/28) Address Subnet Mask n n Network 207 Network 21 Network Subnet Host 54 0 11001111 00010101 00110110 0000 11111111 11110000 255 255 240 Network Address: 207. 21. 54. 0 (note this address) Broadcast Address: 207. 21. 54. 255 (note this address) Default Mask: Subnet Mask: 255. 0 255. 240 54
207. 21. 54. 0/28 (Subnet mask 255. 240) Subnets What are the hosts for each subnet? 11001111 00010101 00110110 0000 207. 21. 54. 0/28 11001111 00010101 00110110 00010000 207. 21. 54. 16/28 11001111 00010101 00110110 00100000 207. 21. 54. 32/28 11001111 00010101 00110110 00110000 207. 21. 54. 48/28 11001111 00010101 00110110 01000000 207. 21. 54. 64/28 11001111 00010101 00110110 01010000 207. 21. 54. 80/28 11001111 00010101 001101100000 207. 21. 54. 96/28 11001111 00010101 00110110 01110000 207. 21. 54. 112/28 11001111 00010101 00110110 10000000 207. 21. 54. 128/28 11001111 00010101 00110110 10010000 207. 21. 54. 144/28 11001111 00010101 00110110 10100000 207. 21. 54. 160/28 11001111 00010101 00110110000 207. 21. 54. 176/28 11001111 00010101 00110110 11000000 207. 21. 54. 192/28 11001111 00010101 00110110 11010000 207. 21. 54. 208/28 11001111 00010101 00110110 11100000 207. 21. 54. 224/28 11001111 00010101 00110110 11110000 207. 21. 54. 240/28 55
207. 21. 54. 0/28 (Subnet mask 255. 240) 11001111 00010101 001101100000 Network Address 207. 21. 54. 96/28 11001111 00010101 001101100001 207. 21. 54. 97/28 11001111 00010101 001101100010 207. 21. 54. 98/28 11001111 00010101 001101100011 207. 21. 54. 99/28 11001111 00010101 001101100100 207. 21. 54. 100/28 11001111 00010101 001101100101 207. 21. 54. 101/28 11001111 00010101 00110110 207. 21. 54. 102/28 14 Usable Hosts 00010101 001101100111 207. 21. 54. 103/28 01101000 207. 21. 54. 104/28 11001111 00010101 00110110 01101001 207. 21. 54. 105/28 11001111 00010101 001101101010 207. 21. 54. 106/28 11001111 00010101 001101101011 207. 21. 54. 107/28 11001111 00010101 001101100 207. 21. 54. 108/28 11001111 00010101 001101101 207. 21. 54. 109/28 11001111 00010101 001101101110 11001111 00010101 001101101111 207. 21. 54. 110/28 Broadcast Address 207. 21. 54. 111/28 56
207. 21. 54. 0/28 (Subnet mask 255. 240) 0000 Subnets 207. 21. 54. 0/28 00010000 207. 21. 54. 16/28 00100000 207. 21. 54. 32/28 00110000 207. 21. 54. 48/28 00110110 01000000 207. 21. 54. 64/28 00010101 00110110 15 usable subnets with 14 11001111 hosts 00010101 00110110 per subnet = 210 hosts. (Lose 00110110 2 11001111 usable 00010101 hosts 00010101 per subnet, subnet 11001111 00110110 and broadcast. ) 01010000 207. 21. 54. 80/28 01100000 207. 21. 54. 96/28 01110000 207. 21. 54. 112/28 10000000 207. 21. 54. 128/28 10010000 207. 21. 54. 144/28 10100000 207. 21. 54. 160/28 11001111 00010101 00110110 Can’t use last subnet, because the 00110110 broadcast 11001111 00010101 address for that subnet is 207. 21. 54. 255, the 11001111 00010101 same as the broadcast address for 00110110 the entire network. You lose all those hosts. 00110110 11001111 00010101 10110000 207. 21. 54. 176/28 11000000 207. 21. 54. 192/28 11010000 207. 21. 54. 208/28 11100000 207. 21. 54. 224/28 110011110000 207. 21. 54. 240/28 57 11001111 00010101 00110110 even Can use the first subnet on newer networks, though the subnet 00010101 address 207. 21. 54. 0 is the 11001111 00110110 same as the address for the entire network. 11001111 00010101 00110110 11001111 00010101 11001111 00010101 00110110 (25400010101 without subnetting) 00110110 00010101 00110110
Other subnetting options… Address Subnet Mask Network 207 Network 21 Network Subnet Host 54 0 11001111 00010101 00110110 0000 11111111 11110000 255 255 240 What Subnet Mask to use? : n More subnets, but fewer hosts per subnet. n Fewer subnets, but more hosts per subnet. n Choose mask that gives you enough hosts for your largest subnet, but also gives you enough subnets, including future expansion. Better Solutions: n RFC 1918 – Priviate Address Space (next week) n VLSM (Variable Length Subnet Masks) – Semester 2 58
Class C: 2 -bit Mask (/26) 3 usable subnets, 62 usable hosts per subnet Address Mask Network 207 Network 21 Network Sub Host 54 0 11001111 00010101 1111 00110110 1111 0000 11000000 255 255 192 59
Class C: 3 -bit Mask (/27) 7 usable subnets, 30 usable hosts per subnet Address Mask Network 207 Network 21 Network 54 Sub Host 0 11001111 00010101 1111 00110110 1111 0000 11100000 255 255 224 60
Class C: 4 -bit Mask (/28) 15 usable subnets, 14 usable hosts per subnet Address Mask Network 207 Network 21 Network 54 Sub Host 0 11001111 00010101 1111 00110110 1111 0000 11110000 255 255 240 61
Class C: 5 -bit Mask (/29) 31 usable subnets, 6 usable hosts per subnet Address Mask Network 207 Network 21 Network 54 Sub Host 11001111 00010101 1111 00110110 1111 0000 11111000 255 255 248 0 62
Class C: 6 -bit Mask (/30) 63 usable subnets, 2 usable hosts per subnet Address Mask Network 207 Network 21 Network 54 Sub Host 11001111 00010101 1111 00110110 1111 0000 11111100 255 255 252 0 63
Logical And – Why n Why: The logical AND function is used to extract the subnet ID from a host IP address and its subnet Mask n Question: With out using the table from the previous group exercise, can you tell to which subnet the host 200. 133. 175. 199 belongs? ? ? 64
Logical And – How Host IP Address (in binary format) AND Subnet Mask (in binary format) = Subnet ID 1 And 1 = 1 1 And 0 = 0 0 and 1 = 0 Short cut: X And 255 = X X And 0 = 0 65
Logical AND Exercise n Given the IP Address: 199. 10. 110/248 n n n What is the subnet mask? How many bits were borrowed? How many subnets were created What is the number of theoretical hosts per subnet? Using the Logical And function, find the subnet ID where the host resides What is the broadcast address for this subnet? 66
Example n n n Say company XYZ was assigned a Class C network number of 200. 100. 50. 0/24 (apologies to anyone who may actually own this domain address: ). You want to utilize this network between two departments within the company. You can do this by subnetting that network. Break this network into 4 subnets of 32 IP addresses each. Connect the subnets Using layer three devices (Routers). 67
Building the Topology n n Now, we will use real Cisco routers and switches to connect two LANs (Let’s say, the HR department LAN and the IT department LAN) During this lab make sure that you take the time to do the following: n n Check the different types of interfaces that a router can have Know what each type of an interface is used for Know what type of cable is used with each interface Ask Questions 68
Default Gateway n n The role of Routers in connecting subnets What is a Gateway? n Combination of software and hardware that enable two different network segments to exchange data n Examples: Cisco Routers, Linksys routes, Linux servers with multiple NICs and routing services installed, windows 2000 server with multiple NICs and RRAS installed. n The IP address of a router’s port through which a network is connected to the router n Every device has to have a default gateway to communicate with other devices outside its network
70
Building The Topology with Packet Tracer n n n Interconnect Devices Simulate how a Packet traverses a simple WAN How would it be if we added a third network to the diagram, Let’s say Admin LAN? 71
Subnetting Class B 72
Subnet Example Class B address 172. 16. 0. 0 Using Subnets: subnet mask 255. 252. 0 or /22 Network Subnet Host Default Subnet Mask: 255. 0. 0 or /16 11111111 00000000 New Subnet Mask: 255. 252. 0 or /22 1111111100 0000 n n n Applying a mask which is larger than the default subnet mask, will divide your network into subnets. Class B default subnet mask is 255. 0. 0 or /16 Subnet mask used here is 255. 252. 0 or /22 73
Subnet Example Class B address 172. 16. 0. 0 Using Subnets: subnet mask 255. 252. 0 or /22 Network Subnet Host 172 16 0 Host 172 172 172 16 16 16 4 8 12 Etc. 248 Host Host 172 16 252 Host Subnets 63 Subnets 26 - 1 Cannot use last subnet as it contains broadcast address 74
Putting it all together! 75
Putting it all together! B n Given the following Host IP Address and Subnet mask fill in the blanks including: n Subnet Address n Range of Host Addresses n Broadcast Address 76
Putting it all together! Step 1: Translate Host IP Address and Subnet Mask into binary notation 77
Putting it all together! B Step 2: Determine the Network (or Subnet) where this Host address lives: 1. Draw a line under the mask 2. Perform a bit-wise AND operation on the IP Address and the Subnet Mask n 1 AND 1 results in a 1 n 0 AND anything results in a 0 3. Express the result in Dotted Decimal Notation 4. The result is the Subnet Address of this Subnet or “Wire” which is 138. 101. 114. 192 78
Putting it all together! B More on the bit-wise AND operation to determine Subnet Address Performed on the IP Address and the Subnet Mask n 1 AND 1 results in a 1 n 0 AND anything results in a 0 End result is to get the Subnet (or Network) address: n Copy all bits in IP address that is above the 1’s in the subnet mask n The rest of the bits to the right are 0’s 79
Putting it all together! B Step 3: Determine which bits in the address contain Network information and which contain Host information: n Divide the Classful address (Great Divide) from the rest of the address. n Divide the subnet from the hosts (Small Divide) between the last “ 1” and the first “ 0” in the subnet mask. 80
B Host Portion n First Host: all 0’s and a 1 n Last Host: all 1’s and a 0 n Broadcast: all 1’s 81
All in one page! B 82
B Number of Subnet bits n Number of bits in the subnet mask which are greater than the default mask. Maximum number of Subnet n The number of subnets to the second power. n 102 = 1, 024 n Subtract the last one which is the broadcast subnet = 1, 023 n Some documentation says subtract two, first and last = 1, 022 83
B Ordinal Number of this Subnet n This will tell you which number is this subnet in the list. n Use the number of subnet bits, 10. 00000 = subnet 0 0000000101 = subnet 5 000001 = subnet 1 Etc. 000010 = subnet 2 0111001011 = subnet 459 000011 = subnet 3 Etc. 0000000100 = subnet 4 11111 = subnet 1, 023 84
Case 1 1. i. iii. Suppose you are given the IP address 195. 5. 5. 0 and wish to connect Springfield and Bedrock to Southpark. Create an IP addressing scheme that will meet the following requirements: n A: Each subnet must support between 25 and 30 devices. n B: You must have enough subnets to address each network. What is the subnet mask for this network? What is the broadcast address of the 3 rd subnet? On the diagram, assign a subnet address to each network and give each router interface an appropriate IP address for that network. 85
Case 1 Answer 86
Case 2 n a. b. c. d. e. Given the IP address 199. 172 with a subnet mask of 255. 192. Answer the following: How many bits were borrowed? How many subnets have been created? How many host address per subnet? What is the subnet address of the network containing the given IP address? What is the broadcast address of the network containing the given IP address? 87
Case 2 Answer A: 2 B: 4 C: 64 D: 199. 128 E: 199. 1299. 191 88
- Slides: 88