Logical Addressing PDF
Document Details
Uploaded by DiplomaticRubellite9769
University of Technology, Jamaica
Tags
Summary
This document is a handout on logical addressing from the University of Technology, Jamaica. It explains the concepts of IP addresses and MAC addresses, their importance in data communication, and different types of IP addresses (IPv4 and IPv6). It also discusses why IP addresses are logical and MAC addresses are physical.
Full Transcript
**University of Technology, Jamaica** **School of Computing and Information Technology** **Logical Addressing** **Handout \#5** **Logical Addressing** IP addresses and MAC addresses are essential for data communication. Assume there are two networks. The first network has three devices: A, B, C...
**University of Technology, Jamaica** **School of Computing and Information Technology** **Logical Addressing** **Handout \#5** **Logical Addressing** IP addresses and MAC addresses are essential for data communication. Assume there are two networks. The first network has three devices: A, B, C and the second network has three devices: X, Y, Z. If a device A from the first network wishes to send data to a device Y in the second network, it must first determine where Y is located in the second network, which requires learning the IP address/ logical address, because the connection is subject to change and is not permanent due to the nature of the Packet Switched Network (Logical). However, in order to send data to that device, it must pass the data across physical communication links, for which a MAC Address/Physical address is utilized. **IP Address:** An Internet Protocol address is an IP address. It is a unique address that identifies the device on the network. The Internet Service Provider (ISP) assigns IP addresses to all devices on its network. IP addresses are not generated at random. The Internet Assigned Numbers Authority (IANA), a part of the Internet Corporation for Assigned Names and Numbers (ICANN), generates and assigns them mathematically. IP addresses are used at the network layer. IP Addresses are routable in nature. **IP Version Types:** There are 2 different versions of IP as follows. 1. IPv4 (IP version 4) -- IPv4 employs a 32-bit address. It is composed of four numbers separated by a 'dot' i.e., periods called an octet (byte). Each number in the octet can range from 0 to 255. Example -- 172.166.3.28 2. IPv6 (IP version 6) -- IPv6 is the next generation of Internet Protocol addresses. In comparison to IPV4, IPv6 has a larger address space. IPv6 has a length of 128 bits and is written in hexadecimal. It is composed of eight fields, each of which contains two octets. As a result, IPv6 has 16 octets in total. Example -- 3221:1cd7:74b6:6da7:0000:0000:7349:6472 **MAC Address:** A MAC address is a one-of-a-kind identification assigned to a NIC (Network Interface Controller/Card). The full form of MAC address is Media Access Control address. MAC addresses are 48 bits long and these addresses could not be routed between networks. MAC Address is a 12 digit hexadecimal numeral which is most typically expressed with a colon or hyphen separating every two digits (an octet), making reading easier. MAC Addresses are used at the Data Link Layer. **Example** -- A MAC address of 2c549188c9e3 is represented as 2C:54:91:88:C9:E3 or 2c-54-91-88-c9-e3. **Reason for IP address called a "logical" address, and the MAC address is called a "physical" address:** - An IP address is also known as a logical address and it can change over time as well as from one network to another. The Internet Service Provider will be in charge of assigning it. When a device connects to a different network, it receives a different IP address as a result of a change in Internet Service Provider. - With the help of Dynamic Host Configuration Protocol (DHCP), even in the same network, when a device wants to connect to the internet, it will acquire different addresses from the pool. There is no assurance that the device always has the same IP address. The IP address is not directly linked to any devices. As a result, it is referred to as a logical address. - However, there is a MAC address provided by the hardware interface vendor. It never changes when a device is attached to any network. As a result, it is referred to as a physical address. - IP address is, for example, like school register no, university register no and corporate employee id. When a person transfers from school to college and then to the workplace, he or she is assigned a new Identification Number, which is used to uniquely identify the individual inside that organization. At different periods, the same individual was recognized with a different identification number. Similarly, when one machine connects to a different network, it receives a new IP address each time. Thus it is called a logical address. - However, that address is unique inside that network. But MAC address is like an Aadhaar number, it never changes to any business. It's like an original identity. - In the same way, the MAC address will be the same for the device's (NIC), for any network on which the device is associated. Thus it is called a physical address. A MAC address is also a unique address. There won't be the same address for two devices. **IP Address Structure** IP addresses are displayed as a set of four digits- the default address may be 192.158.1.38. Each number on the set may range from 0 to 255. Therefore, the total IP address range ranges from 0.0.0.0 to 255.255.255.255. 1. **Network ID:** It is the part of the left-hand IP address that identifies the specific network where the device is located. In the normal home network, where the device has an IP address 192.168.1.32, the 192.168.1 part of the address will be the network ID. It is customary to fill in the last part that is not zero, so we can say that the device's network ID is 192.168.1.0. 2. **Hosting ID:** The host ID is part of the IP address that was not taken by the network ID. Identifies a specific device (in the TCP / IP world, we call devices "host") in that network. Continuing with our example of the IP address 192.168.1.32, the host ID will be 32- the unique host ID on the 192.168.1.0 network. **IP Address Types** There are 4 types of IP Addresses- Public, Private, Fixed, and Dynamic. Among them, public and private addresses are derived from their local network location, which should be used within the network while public IP is used offline. 1. **Public IP address:** A public IP address is an Internet Protocol address, encrypted by various servers/devices. That's when you connect these devices with your internet connection. This is the same IP address we show on our homepage. So why the second page? Well, not all people speak the IP language. We want to make it as easy as possible for everyone to get the information they need. Some even call this their external IP address. A public Internet Protocol address is an Internet Protocol address accessed over the Internet. Like the postal address used to deliver mail to your home, the public Internet Protocol address is a different international Internet Protocol address assigned to a computer device. The web server, email server, and any server device that has direct access to the Internet are those who will enter the public Internet Protocol address. Internet Address Protocol is unique worldwide and is only supplied with a unique device. 2. **Private IP address:** Everything that connects to your Internet network has a private IP address. This includes computers, smartphones, and tablets but also any Bluetooth-enabled devices such as speakers, printers, or smart TVs. With the growing internet of things, the number of private IP addresses you have at home is likely to increase. Your router needs a way to identify these things separately, and most things need a way to get to know each other. Therefore, your router generates private IP addresses that are unique identifiers for each device that separates the network. 3. **Static IP Address:** A static IP address is an invalid IP address. Conversely, a dynamic IP address will be provided by the Dynamic Host Configuration Protocol (DHCP) server, which can change. The Static IP address does not change but can be changed as part of normal network management. Static IP addresses are incompatible, given once, remain the same over the years. This type of IP also helps you get more information about the device. 4. **Dynamic IP address:** It means constant change. A dynamic IP address changes from time to time and is not always the same. If you have a live cable or DSL service, you may have a strong IP address. Internet Service Providers provide customers with dynamic IP addresses because they are too expensive. Instead of one permanent IP address, your IP address is taken out of the address pool and assigned to you. After a few days, weeks, or sometimes even months, that number is returned to the lake and given a new number. Most ISPs will not provide a static IP address to customers who live there and when they do, they are usually more expensive. Dynamic IP addresses are annoying, but with the right software, you can navigate easily and for free. **Types of Website IP Address** Website IP address is of two types- Dedicated IP Address and Shared IP Address. 1. **Dedicated IP address:** A dedicated IP address is one that is unique for each website. This address is not used by any other domain. A dedicated IP address is beneficial in many ways. It provides increased speed when the traffic load is high and brings in increased security. But dedicated IPs are costly as compared to shared IPs. 2. **Shared IP address:** A shared IP address is one that is not unique. It is shared between multiple domains. A shared IP address is enough for most users because common configurations don't require a dedicated IP. **IP Address Classification Based on Operational Characteristics** According to operational characteristics, IP address is classified as follows: 1. **Broadcast addressing:** The term 'Broadcast' means to transmit audio or video over a network. A broadcast packet is sent to all users of a local network at once. They do not have to be explicitly named as recipients. The users of a network can open the data packets and then interpret the information, carry out the instructions or discard it. This service is available in IPv4. The IP address commonly used for broadcasting is 255.255.255.255 2. **Unicast addressing:** This address identifies a unique node on the network. Unicast is nothing but one-to-one data transmission from one point in the network to another. It is the most common form of IP addressing. This method can be used for both sending and receiving data. It is available in IPv4 and IPv6. 3. **Multicast IP addresses:** These IP addresses mainly help to establish one-to-many communication. Multicast IP routing protocols are used to distribute data to multiple recipients. The class D addresses (224.0.0.0 to 239.255.255.255) define the multicast group. 4. **Anycast addressing:** In anycast addressing the data, a packet is not transmitted to all the receivers on the network. When a data packet is allocated to an anycast address, it is delivered to the closest interface that has this anycast address. **IP Address Classes** In the IPv4 IP address space, there are five classes: A, B, C, D and E. Each class has a specific range of IP addresses (and ultimately dictates the number of devices you can have on your network). Primarily, class A, B, and C are used by the majority of devices on the Internet. Class D and class E are for special uses. The list below shows the five available IP classes, along with the number of networks each can support and the maximum number of hosts (devices) that can be on each of those networks. The four octets that make up an IP address are conventionally represented by a.b.c.d - such as 127.10.20.30. **Class A Public & Private IP Address Range** Class A addresses are for networks with large number of total hosts. Class A allows for 126 networks by using the first octet for the network ID. The first bit in this octet, is always zero. The remaining seven bits in this octet complete the network ID. The 24 bits in the remaining three octets represent the hosts ID and allows for approximately 17 million hosts per network. Class A network number values begin at 1 and end at 127. - Public IP Range: 1.0.0.0 to 127.0.0.0 - First octet value range from 1 to 127 - Private IP Range: 10.0.0.0 to 10.255.255.255 - Subnet Mask: 255.0.0.0 (8 bits) - Number of Networks: 126 - Number of Hosts per Network: 16,777,214 **Class B Public & Private IP Address Range** Class B addresses are for medium to large sized networks. Class B allows for 16,384 networks by using the first two octets for the network ID. The first two bits in the first octet are always 1 0. The remaining six bits, together with the second octet, complete the network ID. The 16 bits in the third and fourth octet represent host ID and allows for approximately 65,000 hosts per network. Class B network number values begin at 128 and end at 191. - Public IP Range: 128.0.0.0 to 191.255.0.0 - First octet value range from 128 to 191 - Private IP Range: 172.16.0.0 to 172.31.255.255 - Subnet Mask: 255.255.0.0 (16 bits) - Number of Networks: 16,382 - Number of Hosts per Network: 65,534 **Class C Public & Private IP Address Range** Class C addresses are used in small local area networks (LANs). Class C allows for approximately 2 million networks by using the first three octets for the network ID. In a class C IP address, the first three bits of the first octet are always 1 1 0. And the remaining 21 bits of first three octets complete the network ID. The last octet (8 bits) represent the host ID and allows for 254 hosts per network. Class C network number values begins at 192 and end at 223. - Public IP Range: 192.0.0.0 to 223.255.255.0 - First octet value range from 192 to 223 - Private IP Range: 192.168.0.0 to 192.168.255.255 - Special IP Range: 127.0.0.1 to 127.255.255.255 - Subnet Mask: 255.255.255.0 (24 bits) - Number of Networks: 2,097,150 - Number of Hosts per Network: 254 **Class D IP Address Range** Class D IP addresses are not allocated to hosts and are used for multicasting. Multicasting allows a single host to send a single stream of data to thousands of hosts across the Internet at the same time. It is often used for audio and video streaming, such as IP-based cable TV networks. Another example is the delivery of real-time stock market data from one source to many brokerage companies. - Range: 224.0.0.0 to 239.255.255.255 - First octet value range from 224 to 239 - Number of Networks: N/A - Number of Hosts per Network: Multicasting **Class E IP Address Class** Class E IP addresses are not allocated to hosts and are not available for general use. These are reserved for research purposes. - Range: 240.0.0.0 to 255.255.255.255 - First octet value range from 240 to 255 - Number of Networks: N/A - Number of Hosts per Network: Research/Reserved/Experimental **Subnetting** Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. If you do not subnet, you are only able to use one network from your Class A, B, or C network, which is unrealistic. Each data link on a network must have a unique network ID, and every node on that link is a member of the same network. If you break a major network (Class A, B, or C) into smaller subnetworks, it allows you to create a network of interconnecting subnetworks. Each data link on this network would then have a unique network/subnetwork ID. Any device, or gateway, that connects n networks/subnetworks has n distinct IP addresses, one for each network / subnetwork that it interconnects. In order to subnet a network, extend the natural mask with some of the bits from the host ID portion of the address in order to create a subnetwork ID. For example, given a Class C network of 192.168.5.0 which has a natural mask of 255.255.255.0, you can create subnets in this manner: 192.168.5.0 - 11000000.10101000.00000101.00000000 255.255.255.224 - 11111111.11111111.11111111.11100000 By extending the mask to be 255.255.255.224, you have taken three bits (indicated by \"sub\") from the original host portion of the address and used them to make subnets. With these three bits, it is possible to create eight subnets. With the other five host ID bits, each subnet can have up to 32 host addresses, 30 of which can actually be assigned to a device since host ids of all zeros or all ones are not allowed (it is very important to remember this). So, with this in mind, these subnets have been created. 192.168.5.0 255.255.255.224 host address range 1 to 30 192.168.5.32 255.255.255.224 host address range 33 to 62 192.168.5.64 255.255.255.224 host address range 65 to 94 192.168.5.96 255.255.255.224 host address range 97 to 126 192.168.5.128 255.255.255.224 host address range 129 to 158 192.168.5.160 255.255.255.224 host address range 161 to 190 192.168.5.192 255.255.255.224 host address range 193 to 222 192.168.5.224 255.255.255.224 host address range 225 to 254