Download presentation
Presentation is loading. Please wait.
1
Institute of Technology Sligo - Dept of Computing Chapter 10 IP Addressing and Subnetting Paul Flynn
2
Institute of Technology Sligo - Dept of Computing 2 IP ADDRESSING 32 Bit Address 2 32 = 4.2 billion possible addresses Decimal192.5.5.0 Network.Network.Network.Host (N.N.N.H) (Class C Address) Binary11000000.00000101.00000101.00000000 HexC0 Government broken addressing system down into classes A, B, C, D, E A – very large organisations(1 - 127, 00000001 - 01111111) Network.Host.Host.Host (N.H.H.H) The first bit of the Network address is reserved for ease of recognition i.e. 0 by routers 2 7 Networks (128) with 2 24 Nodes (16777214)
3
Institute of Technology Sligo - Dept of Computing 3 IP ADDRESSING Government broken addressing system down into classes B – large organisations (128 - 191, 10000000 - 10111111) Network.Network.Host.Host (N.N.H.H) The two bits of the Network address are reserved for ease of recognition i.e. 10 by routers 2 14 Networks (16384) with 2 16 Nodes (65534) C – small organisations(192 - 223, 11000000 - 110111111) Network.Network.Network.Host (N.N.N.H) The three bits of the Network address are reserved for ease of recognition i.e. 110 by routers 2 21 Networks (2097150) with 2 8 Nodes (256)
4
Institute of Technology Sligo - Dept of Computing 4 IP ADDRESSING NOTE: Cisco state that you cannot use the first and last of any of the network or node ranges as they are reserved for network or node addresses and broadcasts Therefore: A = 2 7 – 2 = 126 Networks 2 24 – 2 = 16777212 Nodes B = 2 14 – 2 = 16382 Networks 2 16 – 2 = 65534 Nodes C = 2 21 – 2 = 2097148 Networks2 8 – 2 = 254 Nodes
5
Institute of Technology Sligo - Dept of Computing 5 IP ADDRESSING Internet addresses Assigned to us by the Network Information Centre upon application A = 1 - 127 * Binary Chart - all binary no.s beginning with 0 B = 128 - 191Binary Chart - all binary no.s beginning with 10 C = 192 - 223Binary Chart - all binary no.s beginning with 110 Ref: Binary – Decimal Conversion Chart Appendix D P528 - 530
6
Institute of Technology Sligo - Dept of Computing 6 IP ADDRESSING AND SUBNETTING Class C addressN.N.N.H DecimalBinary DecimalBinary IP 192. 5. 5. 0 11000000.00000101.00000101.00000000 Subnet Mask255.255.255. 0 11111111.11111111.11111111.00000000 Host range 192.5.5.0 – 192.5.5.255 Cannot use 0 (0) Network address or 255 (11111111) Broadcast addresses Usable Hosts 192.5.5.1 – 192.5.5.254
7
Institute of Technology Sligo - Dept of Computing 7 Subnetting a Class C addressN.N.N.H Subnet 192.5.5.0 into 2 subnets Borrow 2 bits from the Host part of the IP address (N.N.N.H 11000000.00000101.00000101.00000000) This now gives you a network address that is now 26 bits long and leaves 6 bits to assign to node addresses. You can borrow a minimum of 2 bits and a maximum of 6 bits from a class C IP address IP ADDRESSING AND SUBNETTING 192.5.5.0
8
Institute of Technology Sligo - Dept of Computing 8 IP ADDRESSING AND SUBNETTING Borrow 2 bits (subnetting into 2 subnetworks) (remember that you cannot use the first or last as they refer to the network address and the broadcast address) 2 2 – 2 = 2 There are in fact 4 subnet address, but only 2 of them are usable BINARY to DECIMAL 00cannot use 0164 10128 11cannot use New Network address are 192.5.5.64 and 192.5.5.128 The Subnet Mask also changes To do this you must add the binary value of two bits borrowed (11000000 = 192) The new Subnet Mask is 255.255.255.192 IP Address Subnet Mask Range of HostsNo. of Hosts 192.5.5.64255.255.255.192 65 – 127 62 192.5.5.128255.255.255.192129 – 191 62
9
Institute of Technology Sligo - Dept of Computing 9 IP ADDRESSING AND SUBNETTING Borrow 3 bits (subnetting into 4 subnetworks) 2 3 – 2 = 6 There are in fact 8 subnet address, but only 6 of them are usable BINARY to DECIMAL 000Cannot use 00132 01064 01196 100128 101160 110192 111Cannot use New address 192.5.5.32, 192.5.5.64, 192.5.5.96, 192.5.5.128, 192.5.5.160, 192.5.5192. The Subnet Mask also changes To do this you must add the binary value of two bits borrowed (11100000 = 224) The new Subnet Mask is 255.255.255.224
10
Institute of Technology Sligo - Dept of Computing 10 IP ADDRESSING AND SUBNETTING IP Address Subnet Mask Range of HostsNo. of Hosts 192.5.5.32255.255.255.224 33 - 63 30 192.5.5.64255.255.255. 224 65 – 95 30 192.5.5.96255.255.255. 224 97 - 127 30 192.5.5.128255.255.255. 224 129 – 159 30 192.5.5.160255.255.255. 224 161 - 191 30 192.5.5.192255.255.255. 224 193 – 223 30
11
Institute of Technology Sligo - Dept of Computing 11 SUBNET MASKS Why do you need a subnet mask? Hosts and routers use the ANDing process to determine if a destination host is on the same network or not. The ANDing operation happens any time a host wants to send a packet to another host on an IP network. The result of the 1st AND is to identify the network where the source host resides. It will then compare the destination IP address to its own subnet mask (2nd AND) to determine the network address of the destination host.
12
Institute of Technology Sligo - Dept of Computing 12 SUBNET MASKS Host x (Source) on network 200.1.1.0 (Class C Network) has an IP address of 200.1.1.5 and wants to send a packet to Host Z (Destination) on network 200.1.2.0 and has an IP address of 200.1.2.8. All hosts on each network are connected to hubs or switches and then to a router (Remember that with a class C network, ARIN assigns the first 3 octets (24 bits) as the network address, so these are two different networks. Source Net200.1.1.0Dest. Net 200.1.2.0 Subnet Mask255.255.255.0Subnet Mask 255.255.255.0 Host IP200.1.1.5Host 200.1.2.8
13
Institute of Technology Sligo - Dept of Computing 13 SUBNET MASKS Host X compares it’s own IP address to its own subnet mask using the ANDing process Host X IP200.1.1.5 11001000.00000001.00000001.00000101 Subnet Mask255.255.255.0 11111111.11111111.11111111.00000000 ANDing result 11001000.00000001.00000001.00000000 The result of the 3rd step gives the network address 200.1.1.0 Next Host X compares the IP address of the Host Z dest. to its own subnet mask using the ANDing process Host Z IP200.1.2.8 11001000.00000001.00000010.00001000 Subnet Mask255.255.255.0 11111111.11111111.11111111.00000000 ANDing result 11001000.00000001.00000010.00000000 The result of the 3rd step gives the network address 200.1.2.0
14
Institute of Technology Sligo - Dept of Computing 14 SUBNET MASKS Host X now knows that host Z is not in its Local Area Network (LAN) and it must send the packet to its “Default Gateway” which is the IP address of the router interface of 200.1.1.1 on network 200.1.1.0. The router will then repeat the ANDing process to determine which router interface to send the packet out. Host X Router Hub Host Z Source Net 200.1.1.0 Dest Net 200.1.2.0 Subnet Mask 255.255.255.0 Host IP 200.1.1.5 Host IP 200.1.2.8 Router Interface IP 200.1.1.1 Router Interface IP 200.1.2.1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.