Download presentation
Presentation is loading. Please wait.
Published byStanslaus Mwongela Modified over 6 years ago
1
| Classful vs Classless Addressing IPV4, IPV6 Subnetting Network Addressing Lecturer: Stanslaus Mwongela
2
Introduction Network Addressing DBIT 1305 : Computer Neworks November 2018 For devices in different networks to communicate, they require a logical address IP is one of the network layer protocols used to provide logical addressing. An IP address serves two principal functions: host or network interface identification – it is a numeric identifier assigned to each machine on an IP network location addressing - It designates the specific location of a device on the network.
3
Introduction Network Addressing DBIT 1305 : Computer Neworks November 2018 There are two versions of IP currently in use: IPv4 - uses 32 bits (binary digits) to address hosts E.g. 192.168.1.1 IPv6 – uses hexadecimal digits to address hosts. These digits = 128 bits E.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334
4
Classful and Classless IP Addressing Network Addressing DBIT 1305 : Computer Neworks November 2018 Classful IP addressing : is a historic method assigning IP version 4 addresses based on address classes: Class A - for large multinationals Class B - for medium sized companies Class C - for small companies Class D and E are reserved address classes Classless IP addressing is a method assigning IP version 4 addresses without regard for address classes -A network prefix is assigned together with the IP address as it determines how many IPs are available in the given address space Classless IP addressing is the one in use today.
5
Classful Addressing: Network Addressing DBIT 1305 : Computer Neworks November 2018 Classful Addressing: The method divides the IP address space for Internet Protocol version 4 (IPv4) into five address classes by address range - A,B,C,D,E. Classes A, B, C are networks of three different network sizes, i.e. number of unicast addresses for hosts. Class D is for multicast. The class E address range is reserved for future or experimental purposes. NB: Classful addressing has been in used from 1981 until the introduction of Classless Inter-Domain Routing (CIDR pronounced “cider”) in 1993.
6
Network bits and Host bits Network Addressing DBIT 1305 : Computer Neworks November 2018 ABCDEABCDE Class
7
Class A Address Network Addressing DBIT 1305 : Computer Neworks November 2018 Class A IP Addresses start from :1-126 Default CIDR Value :/8 Default Subnet Mask: 255.0.0.0 11111111 0000 0 0 00 0000 0 0 0 0 0000 0 0 0 0 Example IP Address: 10.0.0.1 Network Bits =8 8 bits are reserved for network 24 Bits are reserved for host Host Bits =24
8
Class B Address Network Addressing DBIT 1305 : Computer Neworks November 2018 Class B IP Addresses start from :128-191 Default CIDR Value :/16 Default Subnet Mask: 255.255.0.0 11111111 1111 1 1 11 0000 0 0 0 0 0000 0 0 0 0 Example IP Address: 190.10.10.1 Network Bits =16 16 bits are reserved for network 24 its are reserved for host Host Bits =16
9
Class C Address Network Addressing DBIT 1305 : Computer Neworks November 2018 Class B IP Addresses start from :192-223 Default CIDR Value :/24 Default Subnet Mask: 255.255.255.0 11111111 1111 1 1 11 1111 1 1 1 1 0000 0 0 0 0 Example IP Address: 192.168.10.0 Network Bits =24 24 bits are reserved for network 8 Bits are reserved for host Host Bits= 8
10
IPv4 Address Classes Network Addressing DBIT 1305 : Computer Neworks November 2018 Class Size of network number bit field (N) Size of rest bit field (H) Number of networks Addresses per network (-2 for hosts) Total addresses in class Start addre ss End address Default subnet mask CIDR notation A 0-127 8 N.H.H.H 24 N.H.H.H 128 (2 7 ) 16,777,216 (2 24 ) H*3=24 2,147,483,64 8 (2 31 ) 32-1 L.bit=31 0.0.0. 0 127.255.255.2 55 255.0.0.0/8 B 128- 191 16 N.N.H.H 16 N.N.H.H 16,384 (2 14 ) 65,536 (2 16 ) H*2=16 1,073,741,82 4 (2 30 ) 32-2 L.bit=30 128.0. 0.0 191.255.255.2 55 255.255.0. 0 /16 C 192- 223 24 N.N.N.H 8 N.N.N.H 2,097,152 (2 21 ) 256 (2 8 ) H*1=8 536,870,912 (2 29 ) 32-3 L.bit=29 192.0. 0.0 223.255.255.2 55 255.255.25 5.0 /24 D 224- 239 undefined 268,435,456 (2 28 ) 224.0. 0.0 239.255.255.2 55 undefined E 240- 254 undefined 268,435,456 (2 28 ) 240.0. 0.0 255.255.255.2 55 undefined IP addresses are described as consisting of two groups of bits in the address: the most significant bits (MSB) are the network prefix, which identifies a whole network or subnet (N), and the least significant set forms the host identifier (H), which specifies a particular interface of a host on that network. This division is used as the basis of traffic routing between IP networks and for address allocation policies.bitsmost significant bitsnetwork prefixsubnetleast significant
11
Private and Public Addresses Network Addressing DBIT 1305 : Computer Neworks November 2018 Private IP Addresses –Are used for local communications within a private network Address blockAddress range Number of addresses 10.0.0.0/810.0.0.0–10.255.255.25516,777,216 (2 24 ) 172.16.0.0/12172.16.0.0–172.31.255.2551,048,576 192.168.0.0/16192.168.0.0–192.168.255.25565,536 (2 16 ) Public addresses -routed over the internet and issued by an ISP and will have number ranges from 1 to 191 in the first octet, with the exception of the private address ranges above.
12
Other IPv4 Addresses Network Addressing DBIT 1305 : Computer Neworks November 2018 The following addresses are not assigned to hosts on a network: Address blockAddress range Number of addresses ScopeDescription 0.0.0.0/8 0.0.0.0– 0.255.255.255 16,777,216 (2 24 ) Software Default Routing Current network (only valid as source address). 127.0.0.0/8 127.0.0.0– 127.255.255.255 16,777,216 (2 24 ) Host Used for loopback addresses to the local host. 192.0.0.0/24 192.0.0.0– 192.0.0.255 256Private networkIETF Protocol Assignments. 192.0.2.0/24 192.0.2.0– 192.0.2.255 256Documentation Assigned as TEST-NET-1, documentation and examples. 192.88.99.0/24 192.88.99.0– 192.88.99.255 256Internet Reserved. Formerly used for IPv6 to IPv4 relay. (Included IPv6 address block 2002::/16). 198.51.100.0/24 198.51.100.0– 198.51.100.255 256Documentation Assigned as TEST-NET-2, documentation and examples. 203.0.113.0/24 203.0.113.0– 203.0.113.255 256Documentation Assigned as TEST-NET-3, documentation and examples. 224.0.0.0/4 224.0.0.0– 239.255.255.255 268435456Internet In use for IP multicast. (Former Class D network). 240.0.0.0/4 240.0.0.0– 255.255.255.254 268435456Internet Reserved for future use. (Former Class E network). 255.255.255.255/ 32 255.255.255.2551SubnetReserved for the "limited broadcast" destination address.
13
Public and Private Addresses Network Addressing DBIT 1305 : Computer Neworks November 2018 Private addresses –used within private networks, not routed over the internet.
14
Types of Addresses found on a Network Network Addressing DBIT 1305 : Computer Neworks November 2018 Network address– uniquely identifies or groups together hosts on the same network or subnet Host address – uniquely identifies a device/host on a network Broadcast address – used to send a message to all devices on the same network segment/ subnet
15
Broadcast Address Network Addressing DBIT 1305 : Computer Neworks November 2018 A broadcast address is an address used to indicate that information being sent out should be delivered to every client on the local area network. These addresses are always the highest number possible in a particular network address or subnet.
16
CIDR Notation Network Addressing DBIT 1305 : Computer Neworks November 2018 CIDR notation is a compact way to represent an IP address along with its associated subnet mask and routing prefix. Because CIDR notation is expressed as an IP address with a slash character and a decimal number appended to the end of the IP address, it is sometimes referred to as slash notation. e.g. 192.168.12.0/24. CIDR is useful in subnetting because it is like shorthand: it provides a clean and easy way to express how a network IP ranges are partitioned. CIDR notation makes it possible to specify in the IP address itself the number of significant bits that make up the network ID portion of the address. For example, CIDR notation might look like this: 192.168.12.0/24. The /24 tells you that the first 24 bits of the IP address are used for network routing, and also that of the subnet mask contains 24 binary bits set to 1 (255.255.255.0) i.e This also holds true for each IP address on the same subnet. 11111111.11111111.11111111.00000000
17
Why Classless IP Addressing? Network Addressing DBIT 1305 : Computer Neworks November 2018 Using a classful IP addressing format worked well when the Internet was relatively small. But as the number of networks on the Internet grew, the limitations of classful addresses became apparent. The Class A address space contains only 125 usable networks in the range 0–127 because networks 0 and 127 are reserved, and network 10 is used for private addressing. Each of these 125 Class A networks could theoretically contain 224 – 2 or 16,777,214 hosts, but it's not realistic to have more than 16 million hosts on the same network. Therefore, in the early 1990s, the Internet moved away from a classful address space to a classless address space. In other words, the number of bits used for the network portion of an IP address became variable instead of fixed. Thus CIDR is based on the variable-length subnet masking (VLSM) technique which allows a network to be divided into variously sized subnets, providing the opportunity to size a network more appropriately for local needs
18
Network Addressing DBIT 1305 : Computer Neworks November 2018 SUBNETTING
19
What is Subnetting? Subnetting DBIT 1305 : Computer Neworks November 2018 Subnetting is the process of sub-dividing a given host address space into logical groupings called sub-networks (subnets). This is achieved through borrowing bits from the host portion of an address and assigning them to the network portion, so that the network bits increase.
20
Why Subnetting? Subnetting DBIT 1305 : Computer Neworks November 2018 Security - easier to manage the network’s security when subnets are used. E.g. access to certain parts or resources on the network can be restricted based on subnets. Address Management – a network can easily scale up or down, based on subnets and the assignable IP addresses available easily established. Improve network performance – with subnets management of network traffic is made easier e.g. network broadcasts can easily be confined to a given subnet or even a virtual LAN (V-LAN). Fault isolation – It is easier to isolate network faults within subnets as opposed to one large network
21
Basic Rules for Subnetting Subnetting DBIT 1305 : Computer Neworks November 2018 o Always borrow bits from the host portion only (if using a classful address) o Always borrow bits from the leftmost host bit progressing toward the right hand side o Never borrow all bits in the last octet (you can only borrow up to the 30th bit, i.e. at least 2 bits must remain) o The least number of bits you can borrow is 2 (if not using VLSM) o Whenever subnets are created the subnet mask changes, that is, the length of the mask increases, since the number of network bits is increased to create the subnets.
22
Formula Subnetting DBIT 1305 : Computer Neworks November 2018 To determine how many subnets an address can have 2 n - Number of usable subnets Where n=number of borrowed bits To determine number of hosts an address can have per subnet 2 h - Total number of hosts per subnet 2 h - 2- Number of usable hosts per subnet Where h=number of remaining bits (unborrowed bits)
23
Subnet chart / Prefix Notations Subnetting DBIT 1305 : Computer Neworks November 2018 Examples Convert the prefix notation values to decimal notation (subnet mask) Class C: /24 -255.255.255.0 Class B: /18 - 255.255.192.0, /22 – 255.255.252.0, /19 -? 2. What is the prefix notation for the subnet mask 255.240.0.0? -/12
24
Subnet Masks Subnetting DBIT 1305 : Computer Neworks November 2018 Mask (Last octet in decimal format) Mask (Last octet in binary format) Host bits (h)Number of useable Hosts (2 h -2) 255.255.255.0255.255.255.000000008 254 ( 2 8 -2 ) 255.255.255.128 255.255.255.1 0000000 7 126 (2 7 -2) 255.255.255.192 255.255.255.11 000000 6 62 (2 6 -2) 255.255.255.224 255.255.255.111 00000 5 30 (2 5 -2) 255.255.255.240 255.255.255.1111 0000 4 14 (2 4 -2) 255.255.255.248255.255.255.111110003 6 (2 3 -2) 255.255.255.252 255.255.255. 11111100 2 2 (2 2 -2)
25
Example 1 Subnetting DBIT 1305 : Computer Neworks November 2018 The network 209.168.19.0 has default subnet mask 255.255.255.0 a)Determine number of bits to borrow to create 5 networks(subnets) and define the custom subnet mask. a)Determine number of subnets and useable hosts. a)List the first and last subnet in the series, as well as the first and last host on each subnet. (Answer in next slide)
26
Addressing table Subnetting DBIT 1305 : Computer Neworks November 2018 Let’s make the same question more interesting as we answer c: Anne, a network administrator in Strathmore has been instructed to set up 5 labs with fixed length subnets for a maximum of 30 computers in each and reserve 3 subnets for future labs. She decides to use the network 209.168.19.0 with the default subnet mask 255.255.255.0. She requests you to set up the addressing table. SubnetFirst IP addressLast IP addressBroadcast Address Kiambere209.168.19.0209.168.19.1209.168.19.30209.168.19.31 Menengai209.168.19.32209.168.19.33209.168.19.62209.168.19.63 Aberdare209.168.19.64 Telecom209.168.19.96 Longonot209.168.19.128 Reserved209.168.19.160 Reserved209.168.19.192 Reserved209.168.19.224209.168.19.225209.168.19.254209.168.19.255
27
Subnet Zero and the All-Ones Subnet* Subnetting DBIT 1305 : Computer Neworks November 2018 Subnet zero is the first subnet: Using subnet zero for addressing was once discouraged because of the confusion inherent in having a network address and a subnet address with are identical. All-ones subnet is the last subnet: Use of the all-ones subnet for addressing as also discouraged in the past because of the confusion of having a network and a subnet with identical broadcast addresses. SubnetFirst IP addressLast IP addressBroadcast Address 209.168.19.0209.168.19.1209.168.19.30209.168.19.31 : 209.168.19.224209.168.19.225209.168.19.254209.168.19.255 Subnet zero All-ones subnet Read more on subnet zero and the all-ones subnet here
28
Example 2 Subnetting DBIT 1305 : Computer Neworks November 2018 a)You work for Global Inc, Currently it has 500 subnets and wants to add 200 more subnets as part of its future expansion plan. Which subnet mask should you choose assuming you are currently assigned to Class B address. (5 Marks) b)Express the subnet mask in question A in prefix notation (2 Marks)
29
Example 3 Subnetting DBIT 1305 : Computer Neworks November 2018 A network has the following Network ID : 192.168.10.0 /28. Assuming you have an Ethernet Interface E1, what will be its IP address if you are using the 14 th Subnet. Note: 1: You need to use the last valid available IP address Note 2: Do not consider zero subnet. (5 Marks)
30
Example 4 Subnetting DBIT 1305 : Computer Neworks November 2018 A network has the following setup: Department Router Last host A 192.168.1.33 192.168.1.46 B 192.168.1.49 192.168.1.62 Assume that you are the administrator, and you have chosen the 192.168.1.0 for network addressing: a)Sketch a basic topology showing how your departments would appear: use one router for each network. Show the assigned IPs on your sketch b)What is the prefix notation for the network?. What is the subnet mask?
31
Logical AND (&&) -a.k.a ANDing Subnetting DBIT 1305 : Computer Neworks November 2018 Rules for ANDing 1 AND 1 = 1 1 AND 0 = 0 0 AND 1 = 0 0 AND 0 = 0 To determine the network/ subnetwork to which an address belongs, devices such routers perform a bitwise AND process between the IP address and it’s corresponding subnet mask. Logical AND operator: A or B is false if A is false, or if B is false, or if both A and B are false.
32
Logical AND (finding network of a host) Subnetting DBIT 1305 : Computer Neworks November 2018 Example: A host has the IP 192.168.64.3 and a subnet mask of 255.255.255.224. What subnet/network does this host address belong to? IP Address 11000000.0101000.01000000.00000011 Subnet Mask11111111.11111111.11111111.11100000 AND result11000000.10101000.01000000.00000000 192. 168.64. 0 The address 192.168.64.3 belongs to the subnet 192.168.64.0
33
Logical OR (||) Subnetting DBIT 1305 : Computer Neworks November 2018 Rules for OR operator 1 OR 1 = 1 1 OR 0 = 1 0 OR 1 = 1 0 OR 0 = 0 To find the broadcast address of a subnetted network, you need an IP address, and the subnet mask. The process: 1) find the inverse of the subnet mask. 2)then take the result, and logically OR it with the IP address to get the broadcast address. Logical OR operator: A or B is true if A is true, or if B is true, or if both A and B are true.
34
Logical OR (||) (finding broadcast address) Subnetting DBIT 1305 : Computer Neworks November 2018 Example: A host has the IP 192.168.16.1 and a subnet mask of 255.255.255.224. What is the broadcast address of the network? 1.Invert the Subnet Mask Subnet Mask in Binary 11111111.11111111.11111111.11100000 Inverted: 00000000. 00000000. 00000000. 00011111 2.Logically OR IP address with the Inverted Subnet Mask IP Address in Binary 11000000.10101000.00010000.00000001 OR with Inverted Subnet Mask IP Address11000000.10101000.00010000.00000001 Inv. Subnet Mask00000000. 00000000. 00000000. 00011111 11000000.10101000.00010000. 00011111 The broadcast address is 192. 168. 16. 31
35
Host Address Allocation Subnetting DBIT 1305 : Computer Neworks November 2018 Once subnets have been determined together with the host address ranges the actual configuration on the hosts can be done either: a)Statically i.e. manually configuring the IP addresses b)Dynamically using protocols such as DHCP NB: You can only configure/use addresses in the usable range of your subnet chart.
36
Host Address Allocation Subnetting DBIT 1305 : Computer Neworks November 2018 At minimum, a network interface should be configured with: a)An IP Address (only usable host addressees are assignable) b)A subnet mask c)Default gateways (only where the device requires one e.g. on a PC a default gateway may be necessary
37
Assignment: Question 1 Subnetting DBIT 1305 : Computer Neworks November 2018 A network has the following requirements: Department No of hosts per subnet A 20 B 30 C 12 D42 E77 Assume that you are the administrator, and you have chosen the 192.168.1.0 for network addressing: a)Sketch a basic topology showing how your departments would appear: use one router, one switch or hub and one PC. Show the assigned IPs on your sketch. 3MKS b)Write an addressing table to depict the above scenario (7 MKS)
38
Assignment: Question 2 Subnetting DBIT 1305 : Computer Neworks November 2018 a)A company has 900 subnets and wants to add 200 more subnets as part of its future expansion plan. Which subnet mask should it choose assuming you are currently assigned to Class A address. (5 Marks)
39
Assignment: Question 3 Subnetting DBIT 1305 : Computer Neworks November 2018 A host has the IP 192.168.7.26 and a subnet mask of 255.255.0.192 What network does this host address belong to?
40
Assignment: Question 4 Subnetting DBIT 1305 : Computer Neworks November 2018 A host has the IP 10.12.16.8 and a subnet mask of 255.255.255.64. What is the broadcast address of the network?
41
Reading Assignment Subnetting DBIT 1305 : Computer Neworks November 2018 IPV6 Addressing and subnetting
42
Ole Sangale Road, Madaraka Estate. PO Box 59857-00200, Nairobi, Kenya Tel: (+254) (0)703 034000/200/300 Fax : +254 (0)20 607498 Email: info@strathmore.edu Website: www.strathmore.edu
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.