Data communication Network DAY 2 PDF
Document Details
Uploaded by LovelyArtNouveau2312
null
null
Mrs.Akshita.S.Chanchlani
Tags
Summary
This document is a presentation about data communication networks. It describes various addressing schemes, including physical (MAC) and logical (IP) addresses. It also covers topics such as classful addressing, subnet masks, and special addresses. The document is suitable for undergraduate-level computer science students or professionals in networking.
Full Transcript
Data Communication Network DAY – 2 Mrs.Akshita.S.Chanchlani [email protected] Sunbeam Infotech www.sunbeaminfo.com Addressing Sunbeam Infotech www.sunbeaminfo.com Addressing Physical Address/ Link Address...
Data Communication Network DAY – 2 Mrs.Akshita.S.Chanchlani [email protected] Sunbeam Infotech www.sunbeaminfo.com Addressing Sunbeam Infotech www.sunbeaminfo.com Addressing Physical Address/ Link Address For example, Ethernet uses a 6-byte (48-bit) physical address that is imprinted on the network interface card (NIC). Logical Address logical address in the Internet is currently a 32-bit address that can uniquely define a host connected to the Internet. Port Address computer A can communicate with computer C by using TELNET. At the same time, computer A communicates with computer B by using the File Transfer Protocol (FTP). Specific Addresses Examples include the e-mail address and any Universal Resource Locator (URL) Sunbeam Infotech www.sunbeaminfo.com MAC Address / Physical Address/ Ethernet Address used on data link layer used to identify every NIC uniquely is burnt into the ROM part of NIC once written the MAC address can not be changed also known as read only address to find the MAC address of NIC windows: ipconfig /all linux/macOS: ifconfig e.g. 78 : 4f : 43 : 90 : 13 : d0 size: 6 bytes = 8 x 6 = 48 bits Group of first three bytes(78 : 4f : 43) represent’s manufacturer ID and last 3 bytes (90 : 13 : d0 ) represents NIC’s unique address. to find the manufacturer, please visit https://hwaddress.com/ Sunbeam Infotech www.sunbeaminfo.com IP Address / Logical Address IP address to mean a logical address in the network layer of the TCP/IP protocol suite. Identify a machine / device uniquely. Size = 4 bytes = 32 bits to find the IP address of Machine windows: ipconfig linux/macOS: ifconfig IP Versions: IPV4 (32 bits address length) IPV6 (128 bits address length) IP addresses are made up of four sets of numbers called “Octets”. Types Private : used to identify a machine on the LAN and can not be used to connect to internet Public : used to connect to the internet e.g. decimal: 192.168.1.6 binary : 11000000.10101000.00000001.00000110 Sunbeam Infotech www.sunbeaminfo.com IP Addressing Types Classful : IP Address is split into 5 classes Classless IPv4 uses 32-bit addresses, which means that the address space is 232 or4,294,967,296 (more than 4 billion) There are two prevalent notations to show an IPv4 address: binary notation dotted decimal notation Sunbeam Infotech www.sunbeaminfo.com Example Find the error, if any, in the following IPv4 addresses. Sunbeam Infotech www.sunbeaminfo.com Example Find the error, if any, in the following IPv4 addresses. Solution a. There must be no leading zero (045). b. There can be no more than four numbers. c. Each number needs to be less than or equal to 255. d. A mixture of binary notation and dotted-decimal notation is not allowed. Sunbeam Infotech www.sunbeaminfo.com Classful Addressing IP is 32 bit means 232 IP Addresses. (more than 4 billion , so many IP Addresses) We need to distribute those that's why we have classes. In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Sunbeam Infotech www.sunbeaminfo.com How range of IP Address is defined 27 26 25 24 23 22 21 20 128 64 32 16 8 4 2 1 Range 0 x x x x x x x Class A 0-127 1 0 x x x x x x Class B 128-191 1 1 0 x x x x x Class C 192-223 1 1 1 0 x x x x Class D 224-239 1 1 1 1 x x x x Class E 240-255 Sunbeam Infotech www.sunbeaminfo.com IP Classful Addressing Sunbeam Infotech www.sunbeaminfo.com Example Find the class of each address. 1. 00000001 00001011 00001011 11101111 2. 11000001 10000011 00011011 11111111 3. 14.23.120.8 4. 252.5.15.111 Sunbeam Infotech www.sunbeaminfo.com Example Find the class of each address. 1. 00000001 00001011 00001011 11101111 2. 11000001 10000011 00011011 11111111 3. 14.23.120.8 4. 252.5.15.111 Solution 1. The first bit is O. This is a class A address. 2. The first 2 bits are 1; the third bit is O. This is a class C address. 3. The first byte is 14 (between 0 and 127); the class is A. 4. The first byte is 252 (between 240 and 255); the class is E. Sunbeam Infotech www.sunbeaminfo.com Points to be noted Any IP Address start with 127, That is : 127.x.x.x means its a loop back series that is used for self testing. E.g. Ping 127.0.0.1 (ping to yourself) That is 127.0.0.1 is Universal IP , We can not configure universal IP. Its by default configured. PING ( Packet Internet Groper ) is a tool used to troubleshoot networking issues. IANA(Inter Associated Number Association) manages private IP’s. Regular Private IP Addresses Address Class Reserved Private IP Addresses Private network will have private IP’s Class A 10.0.0.0 - 10.255.255.255 means devices that we connect to our router will get private IP addresses Class B 172.16.0.0 - 172.31.255.255 provided by IANA. Class C 192.168.0.0 - 192.168.255.255 Sunbeam Infotech www.sunbeaminfo.com Netid and hostid of A, B, and C Classes Class Network bits Networks Host bits Hosts Per Network Suitable for Class A 8 28=256 24 224 - 2* =16,777,214 For large organizations like maximum hosts Apple/Google/MS/Amazon Class B 16 216=65536 16 216 - 2* = 65,534 maximum for medium scaled organizations like hosts Sunbeam Class C 24 224=16million 8 28 - 2* = 254 maximum for small organizations/home hosts network * Subtracting the network and broadcast address Sunbeam Infotech www.sunbeaminfo.com Example: What is the type of the given IP address 1. 11.34.56.66 2. 10.46.34.67 3. 156.46.36.46 4. 172.20.34.56 5. 172.45.66.77 6. 192.168.2.5 7. 192.169.34.6 Sunbeam Infotech www.sunbeaminfo.com Example (Solution ): What is the type of the given IP address 1. 11.34.56.66 : public 2. 10.46.34.67 : private 3. 156.46.36.46 : public 4. 172.20.34.56 : private 5. 172.45.66.77 : public 6. 192.168.2.5 : private 7. 192.169.34.6 : public Sunbeam Infotech www.sunbeaminfo.com Example : which class needs to be used for following number of Devices? 1. 200 devices 2. 3000 devices 3. 50000 devices 4. 200000 devices Sunbeam Infotech www.sunbeaminfo.com Example (Solution ) : which class needs to be used for following number of Devices? 1. 200 devices : class C 2. 3000 devices : class B 3. 50000 devices : class B 4. 200000 devices : class A Sunbeam Infotech www.sunbeaminfo.com Blocks in Class A Only 1 byte in class A defines the netid The leftmost bit should be ‘0’ (out of 8 bits one bit leftmost is 0(zero) so remaining bits are 7) Class A is divided into 27 = 128 blocks Each block in class A contains 224-2=16,777,214 addresses Sunbeam Infotech www.sunbeaminfo.com Blocks in Class B 2 bytes in class B define the net id The two leftmost bits should be ‘10’ (out of 16bits two leftmost bits are 1 and 0 so remaining bits are 14) Class B is divided into 214 = 16,384 blocks Each block in class B contains 216= 65,536 addresses Sunbeam Infotech www.sunbeaminfo.com Blocks in Class C 3 bytes in class C define the net id. The three leftmost bits should be ‘110’ (out of 24 bits three leftmost bits are 110 so remaining bits are 21) Class C is divided into 221 = 2,097,152 blocks Each block in class C contains 28= 256 addresses The Single Block in Class D and E Class D Class D is designed for multicasting Class E Used to define one group of hosts on the Internet Reserved for future purposes Sunbeam Infotech www.sunbeaminfo.com Information Extraction in Classful Addressing Sunbeam Infotech www.sunbeaminfo.com Information Extraction in Classful Addressing The number of addresses The first address The last address netid 000... 0 First address Sunbeam Infotech www.sunbeaminfo.com Example An address in a block is given as 73.22.17.25. Find the number of addresses in the block, the first address, and the last address If we observe the given address it is of Class A (class A : n=8) 1. The number of addresses in this block is N = 232-n = 224 = 16,777,216 2. To find the first address, we keep the left most 8 bits and set the rightmost 24 bits all to 0s. The first address is 73.0.0.0/8 in which 8 is the value of n. 3. To find the last address, we keep the leftmost 8 bits and set the rightmost 24 bits all to 1s. The last address is 73.255.255.255 Sunbeam Infotech www.sunbeaminfo.com Finding Network Address Sunbeam Infotech www.sunbeaminfo.com Finding Network Address: Network Mask/ Default Mask/ Subnet Mask IP Address never comes alone , it comes with subnet mask. Mask : 32-bit number of contiguous 1’s followed by contiguous 0’s. Mask Distinguishes which portion of the address identifies the network and which portion of the address identifies the node(host). Network Mask is used to extract the network address from the destination address of a packet Called a default mask Sunbeam Infotech www.sunbeaminfo.com Example : Find Network Address A router receives a packet with the destination address 132.24.67.32. Show how the router finds the network address of the packet. Solution Since the class of the address is B (128 to 191) , we assume that the router applies the default mask for class B, 255.255.0.0 to find the network address. Destination address -> 132. 24. 67. 32 Default mask -> 255. 255. 0. 0 Network address -> 132. 24. 0. 0 Sunbeam Infotech www.sunbeaminfo.com Example: Find Network Address If IP is given as 192.168.1.10 , Find: 1) Class of IP 2) Subnet Mask 3) Network Address 4) Maximum Last Address Sunbeam Infotech www.sunbeaminfo.com Example: Find Network Address Solution Class C IP 192 168 1 10 IP in binary 1100 0000 1010 1000 0000 0001 0000 1010 Subnet Mask 255 255 255 0 Subnet Mask in 1111 1111 1111 1111 1111 1111 0000 0000 binary Network Address 192 168 1 0 Maximum (Last 192 168 1 255 Address) Sunbeam Infotech www.sunbeaminfo.com Some Special Addresses In classful addressing some addresses were reserved for special purposes. Special block All-Zero Address (0.0.0.0) When a host needs to send an IPv4 packet but it does not know its own address All-One Address (255.255.255.255) A host that wants to send a message to every other host can use Loopback Address(127.x.y.z) Used to test the software on a machine Private Address Used either in isolation or in connection with network address translation technique Special address in each block Network Address Direct broadcast address Sunbeam Infotech www.sunbeaminfo.com Classless Address Sunbeam Infotech www.sunbeaminfo.com Classless Address & CIDR In classless addressing, the last address in the block does not necessarily end in 255. Also known as variable length subnet mask (vlsm) It uses scheme as CIDR (Classless Inter Domain Routing) notation, the block granted is defined by the first address and the prefix length. Prefix and Suffix Prefix : play the same role as the netid Suffix : play the same role as the hostid The prefix length in classless addressing can be 1 to 32 Sunbeam Infotech www.sunbeaminfo.com Slash Notation Notation of address including length of prefix In classless addressing, we need to know one of the addresses in the block and the prefix length to define the block e.g. 255.0.0.0 : 11111111.00000000.00000000.00000000 -> /8 255.255.0.0 : 11111111.11111111.00000000.00000000 -> /16 255.255.255.0 : 11111111.11111111.11111111.00000000 -> /24 e.g. /25 : 11111111.11111111.11111111.10000000 -> 255.255.255.128 /29 : 11111111.11111111.11111111.11111000 -> 255.255.255.248 Sunbeam Infotech www.sunbeaminfo.com Subnetting / Sub-Networks Sunbeam Infotech www.sunbeaminfo.com Subnetworks To create a subnet address, a network administrator borrows bits from the original host portion and designates them as the subnet field. A subnetwork or subnet is a logical subdivision of an IP network. Logical division of an IP address into two fields: the network number or routing prefix and the rest field or host identifier. When an organization is granted a block of addresses, it can create subnets to meet its needs. The prefix length increases to define the subnet prefix length. In fixed-length subnetting, the number of subnets is a power of 2. Sunbeam Infotech www.sunbeaminfo.com Subnetting Sunbeam Infotech www.sunbeaminfo.com Subnets Number of Subnets = 2n n indicates number of bits Number of Hosts=2n -2 (these number of bits are left for host side) n indicates number of bits -2 means ,2 addresses reserved, one is network id and other is broadcast id Consider the scenario : How many bits will be borrowed from host side , If we want to create 6 subnets in a single network as shown in the diagram: 1 2 3 20=1 Subnet 21=2 Subnets 22=4 Subnets 6 23=8 Subnets 4 5 It means 3 bits will be borrowed from host side to create 6 sub networks. Sunbeam Infotech www.sunbeaminfo.com Decimal Equivalents of 8-Bit Patterns Sunbeam Infotech www.sunbeaminfo.com What subnet mask can be used in scenario? 1. 100 devices 2. 50 devices 3. 1000 devices 4. 2000 devices Sunbeam Infotech www.sunbeaminfo.com What subnet mask can be used in scenario? (Solution) 1. 100 devices 3. 1000 devices 2^4=16 2^7 = 128 2^5 :32 2^8 = 256 2^6 : 64 2^9 = 512 2^7 : 128 2^10 = 1024 1111 1111. 1111 1111. 1111 1111. 1000 0000 11111111.11111111.11111100.00000000 255.255. 255. 128 255.255.252.0 2. 50 devices : 255.255.255.192 4. 2000 devices : 2^4=16 2^11 = 2048 2^5 :32 11111111.11111111.11111000.00000000 2^6 : 64 255.255.248.0 1111 1111. 1111 1111. 1111 1111. 1100 0000 255.255. 255. 192 Sunbeam Infotech www.sunbeaminfo.com Thank You Sunbeam Infotech www.sunbeaminfo.com