CS4500CS4500 Dr. ClincyLecture1 Lecture #6 Chapter 5: Addressing (part 1 of 3) Address Structure Classful Addressing Number Systems (Appendix B) Mask –

Slides:



Advertisements
Similar presentations
Chapter 5 IPv4 Addresses TCP/IP Protocol Suite
Advertisements

19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 19 Network Layer: Logical Addressing Stephen Kim.
1 Computer Communication & Networks Lecture 17 & 18 Network Layer: Logical Addressing Waleed Ejaz.
Logical addressing Engr.Jawad Ali.
Network Layer: Logical Addressing. 4-1 IPv4 ADDRESSES An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device.
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
1 IP Addressing (IPv4 ADDRESSES). 2 Universal Service Concept Any computer can communicate with any other computer in the world. Multiple independently.
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
7/3/2015 Unit-3 : Network Layer 1 CS 1302 Computer Networks — Unit - 3 — — Network Layer — Text Book Behrouz.A. Forouzan, “Data communication and Networking”,
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 4 IP Addresses: Classful Addressing.
IP Addresses: Classful Addressing An IP address is a 32-bit address.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 19 Network Layer Logical Addressing © 2012 by McGraw-Hill Education. This is proprietary material.
21-IP addressing Dr. John P. Abraham Professor UTPA.
IP-adresses and subnet masks. Figure 19.9 Dotted-decimal notation.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 4 IP Addressing.
LECTURE # 20 IP ADDRESSING 1. Binary 2  All digital electronics use a binary method for communication.  Binary can be expressed using only two values:
IP Addressing and Network Software. IP Addressing  A computer somewhere in the world needs to communicate with another computer somewhere else in the.
InternetSecurityInternetSecurity Dr. ClincyLecture1 CONNECTING DEVICES.
IP Addresses & Classes Presented By: M.Usman Khan Ghauri Nauman Aslam.
1 Kyung Hee University Prof. Choong Seon HONG IP Addressing : Classful Addressing.
 An Internet address is made of four bytes (32 bits) that define the host connection to a network.  It is uniquely and universally defines the connection.
TCP/IPTCP/IP Dr. ClincyLecture1 Chapter 5: Addressing (Part 2 of 3) Agenda Special Addresses Classful - Subnetting Classful - Supernetting.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 IP Addresses: Classful Addressing Teeratorn Saneeyeng, KMUTNB.
21-IP addressing Dr. John P. Abraham Professor UTPA.
CS4500CS4500 Dr. ClincyLecture1 Lecture #2 Chapter 5: Addressing (Part 2 of 3)
Chapter 4 IP Addressing : Classful Addressing
Chapter 4 Objectives Upon completion you will be able to: Classful Internet Addressing Understand IPv4 addresses and classes Identify the class of an.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 IPv4 Addresses.
Chapter 5 IPv4 Address.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Network Layer PART IV.
IP Addresses: Classful Addressing IP Addresses. INTRODUCTION 4.1.
IP ADDRESSING Lecture 2: IP addressing Networks and Communication Department 1.
CS4500CS4500 Dr. ClincyLecture1 Lecture #1 Chapter 5: Addressing (part 1 of 3)
21-IP addressing Dr. John P. Abraham Professor UTPA.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 IPv4 Addresses.
IP ADDRESSES Lecture 6: Network Architectures. IP address  address (IP address) is a numerical label assigned to each device (e.g., computer, printer)
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
TCP/IP Protocol Suite 1 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes Identify.
Network Layer/IP Protocols 1. Outline IP Datagram (IPv4) NAT Connection less and connection oriented service 2.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 IP Addresses: Classful Addressing.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
UNIT 4 NETWORK LAYER. Position of network layer 7/8/2016 UNIT-3 : NETWORK LAYER 2.
Dr. Clincy Slide 1 CS Chapter 2 (Part 1 of 3) Dr. Clincy Professor of CS Ch 2 Appendix pages will not be on the exam – already covered this.
Internet Architecture
IP Addresses: Classful Addressing
IP Addresses: Classful Addressing IP Addresses. CONTENTS INTRODUCTION CLASSFUL ADDRESSING Different Network Classes Subnetting Classless Addressing Supernetting.
Network Layer, and Logical Addresses
Chapter 5 IPv4 Addresses TCP/IP Protocol Suite
Chapters 4 & 5 Addressing Will go over Exam 1
Dr. Clincy Professor of CS
Chapter-5 TCP/IP Suite.
PART IV Network Layer.
IP Addresses: Classful Addressing
An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet.
CS 1302 Computer Networks — Unit - 3 — — Network Layer —
IP Addresses: Classful Addressing
Chapters 4 & 5 Addressing Will go over Exam 2
Dr. Clincy Professor of CS
Ch 3: Underlying Technologies (remainder)
Data Communications and Networking
Dr. John P. Abraham Professor UTRGV
Chapters 4 & 5 Addressing Will go over Exam 1
Chapters 4 & 5 Addressing Will go over Exam 1
Part IV Network layer 10. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapters 4 & 5 Addressing Will go over Exam 1
Dr. John P. Abraham Professor UTPA
Presentation transcript:

CS4500CS4500 Dr. ClincyLecture1 Lecture #6 Chapter 5: Addressing (part 1 of 3) Address Structure Classful Addressing Number Systems (Appendix B) Mask – Network Address

CS4500CS4500 Dr. ClincyLecture2 IP Addresses Internetworking Protocol (IP) of the Network Layer is responsible for uniquely identifying all devices and connections on the Internet The unique identifier is called an IP address IP address consist of 32 bits (for version 4) Keep in mind that, if a single device had multiple connections to the Internet, you would need an IP address for each connection Address space is 2 32 = 4,294,967, bit addresses In theoretical terms, 4,294,967,296 connections can be made to the Internet (not really true in real life)

CS4500CS4500 Dr. ClincyLecture3 The IP Address has 3 notations: Binary, Dotted-decimal and HexadecimalThe IP Address has 3 notations: Binary, Dotted-decimal and Hexadecimal Binary: 4 Octets:Binary: 4 Octets: Dotted-Decimal (or dot notation): IP Addresses For Dotted-Decimal, each number can range from 0 to 255 Hexadecimal: D EA

CS4500CS4500 Dr. ClincyLecture4 Change the following IP address from binary notation to dotted-decimal notation: Solution EXAMPLES Change the following IP address from dotted-decimal notation to binary notation: Solution Find the error, if any, in the following IP address: Solution There are no leading zeroes in dotted-decimal notation (045). Change the following IP addresses from binary notation to hexadecimal notation: Solution 810B0BEF 16

CS4500CS4500 Dr. ClincyLecture5 IP Addresses: Classful Addressing When IP addressing was first started, it used a concept called “classful addressing”. A newer concept called “classless addressing” is slowly replacing it though. Regarding “classful addressing”, the address space is divided into five classes: A, B, C, D and E. Class# of addressesPercent of the Space A2 31 = % B2 30 = % C2 29 = % D2 28 = % E2 28 = %

CS4500CS4500 Dr. ClincyLecture6 Finding the class in binary notation Finding the class in decimal notation

CS4500CS4500 Dr. ClincyLecture7 Find the class of the address: Solution The first bit is 0. This is a class A address. Find the class of the address: Solution The first 2 bits are 1; the third bit is 0. This is a class C address. Find the class of the address: Solution The first byte is 227 (between 224 and 239); the class is D. EXAMPLES

CS4500CS4500 Dr. ClincyLecture8 Netid and hostid A, B and C class-addresses are divided into network id and host id For Class A, Netid=1 byte, Hostid = 3 bytes For Class B, Netid=2 bytes, Hostid = 2 bytes For Class C, Netid=3 bytes, Hostid = 1 byte

CS4500CS4500 Dr. ClincyLecture9 Blocks in class A Class A has 128 blocks or network ids First byte is the same (netid), the remaining 3 bytes can change (hostids) Network id 0 (first), Net id 127 (last) and Net id 10 are reserved – leaving 125 ids to be assigned to organizations/companies Each block contains 16,777,216 addresses – this block should be used by large organizations. How many Host can be addressed ???? The first address in the block is called the “network address” – defines the network of the organization Example Netid 73 is assigned Last address is reserved Recall: routers have addressees

CS4500CS4500 Dr. ClincyLecture10 Blocks in class B Class B is divided into 16,384 blocks (65,536 addresses each) 16 blocks are reserved First 2 bytes are the same (netid), the remaining 2 bytes can change (hostids) For example, Network id covers addresses to Network id is the last netid for this block Example Netid is assigned Last address is reserved Recall: routers have addresses

CS4500CS4500 Dr. ClincyLecture11 Blocks in class C Class C is divided into 2,097,152 blocks (256 addresses each) 256 blocks are reserved First 3 bytes are the same (netid), the remaining 1 byte can change (hostids) For example, Network id covers addresses to

CS4500CS4500 Dr. ClincyLecture12 Class D addresses are used for multicasting; there is only one block in this class. Class E addresses are reserved for special purposes; most of the block is wasted.

CS4500CS4500 Dr. ClincyLecture13 Network Addresses The network address is the first address. The network address defines the network to the rest of the Internet. Given the network address, we can find the class of the address, the block, and the range of the addresses in the block Given the network address , find the class, the block, and the range of the addresses. Solution The class is A because the first byte is between 0 and 127. The block has a netid of 17. The addresses range from to Given the network address , find the class, the block, and the range of the addresses. Solution The class is B because the first byte is between 128 and 191. The block has a netid of The addresses range from to Given the network address , find the class, the block, and the range of the addresses. The class is C because the first byte is between 192 and 223. The block has a netid of The addresses range from to Solution

CS4500CS4500 Dr. ClincyLecture14 REMINDER: Go Over Converting Binary to Decimal and Vice Versa

CS4500CS4500 Dr. ClincyLecture15 Converting Number Systems - Review Base-10 The decimal number system is based on power of the base 10. For example, for the number 1259, the 9 is in the 10^0 column - 1s column the 5 is in the 10^1 column - 10s column the 2 is in the 10^2 column - 100s column the 1 is in the 10^3 column s column 1259 is 9 X 1 = X 10 = X 100 = X 1000 = Base-2 (Binary) The Binary number system uses the same mechanism and concept however, the base is 2 versus 10 The place values for binary are based on powers of the base 2: … 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^

CS4500CS4500 Dr. ClincyLecture16 Converting Number Systems - Review So, the binary number can be converted to a decimal number 1 X 1 = 1 (right most bit or position) 1 X 2 = 2 0 X 4 = 0 0 X 8 = 0 1 X 16 = 16 1 X 32 = 32 0 X 64 = 0 1 X 128 = 128 (left most bit or position) in decimal To convert from decimal to binary requires a different method called the division/remainder method. The idea is to repeatedly divide the decimal number and resulting quotients by 2. The answer will be the remainders. Example: convert 155 to binary (Start from the top and work down) 155/2 Q = 77, R = 1 (Start) 77/2 Q = 38, R = 1 38/2 Q = 19, R = 0 19/2 Q = 9, R = 1 9/2 Q = 4, R = 1 4/2 Q = 2, R = 0 2/2 Q = 1, R = 0 1/2 Q = 0, R = 1 (Stop) Answer is Be careful to place the digits in the correct order.

CS4500CS4500 Dr. ClincyLecture17 Converting Number Systems - Review Check the answer ( ) : 1 X 1 = 1 1 X 2 = 2 0 X 4 = 0 1 X 8 = 8 1 X 16 = 16 0 X 32 = 0 0 X 64 = 0 1 X 128 = Base-16 (Hex) The hexadecimal number system is based 16, and uses the same mechanisms and conversion routines we have already examined. The place values for hexadecimal are based on powers of the base 16 The digits for are the letters A - F (A is 10, …….., F is 15) …….. 16^3 16^2 16^1 16^ The binary number can be converted to hexadecimal by grouping bits into groups of 4 bits: B 3

CS4500CS4500 Dr. ClincyLecture18

CS4500CS4500 Dr. ClincyLecture19 Binary Arithmetic Refresher Number Converter Tool (your PC calculator) Can go from decimal to binary Can go from binary to decimal

CS4500CS4500 Dr. ClincyLecture20Mask A mask is a 32-bit binary number that gives the first address in the block (the network address) when bitwise ANDed with an address in the block. Given the network address, we can easily determine the block and range of addresses Suppose given the IP address, can we determine the network address (beginning of the block) ? To route packets to the correct network, a router must extract the network address from the destination IP address For example, given , we know this is a class B, therefore is the netid and is the network address (starting address of the block) How would we EXTRACT the network address from the IP address? We would use a MASK.

CS4500CS4500 Dr. ClincyLecture21 AND operation If bit is ANDed with 1, it’s preserved If bit is ANDed with 0, it’s changed to a 0. There are 3 default masks: one for each class. The default masks preserve the netid when ANDed with the addresses Class A Default Mask: Class B Default Mask: Class C Default Mask: A simple way to determine the netid for un-subnetted cases: (1) if mask byte is 255, retain corresponding byte of the address, (2) if mask byte is 0, set corresponding address byte to 0.

CS4500CS4500 Dr. ClincyLecture22 Examples Given the address and the default class A mask, find the beginning address (network address). Solution The default mask is , which means that only the first byte is preserved and the other 3 bytes are set to 0s. The network address is Given the address and the default class B mask, find the beginning address (network address). The default mask is , which means that the first 2 bytes are preserved and the other 2 bytes are set to 0s. The network address is Solution Given the address and the class C default mask, find the beginning address (network address). The default mask is , which means that the first 3 bytes are preserved and the last byte is set to 0. The network address is Solution

CS4500CS4500 Dr. ClincyLecture23 Recall IP Addresses: Classful Addressing Class# of addressesPercent of the Space A2 31 = % B2 30 = % C2 29 = % D2 28 = % E2 28 = %

CS4500CS4500 Dr. ClincyLecture24 5-bit Address Space Illustration No Netid case 32 addresses/block Number of blocks: 1 Address range per block: 0 to 31 Netids: N/A Network Addresses : Broadcast Addresses: 11111

CS4500CS4500 Dr. ClincyLecture25 1-bit Netid case 16 addresses/block Number of blocks: 2 Address range per block: 0 to 15 Netids: 0, 1 Network Addresses : 00000, Broadcast Addresses: 01111, bit Address Space Illustration

CS4500CS4500 Dr. ClincyLecture26 2-bit Netid Case 8 addresses/block Number of blocks: 4 Address range per block: 0 to 7 Netids: 00, 01, 10, 11 Network Addresses : 00000, 01000, 10000, Broadcast Addresses: 00111, 01111, 10111, bit Address Space Illustration

CS4500CS4500 Dr. ClincyLecture27 3-bit Netid Case 4 addresses/block Number of blocks: 8 Address range per block: 0 to 3 Netids: 000, 001, 010, 011, 100, 101, 110, 111 Network Addresses : 00000, 00100, 01000, , 10100, 11000, Broadcast Addresses: 00011, 00111, 01011, , 10111, 11011, bit Address Space Illustration

CS4500CS4500 Dr. ClincyLecture28 4 addresses/block and 8 addresses/block Number of blocks: 6 Address range per block: 0 to 3 and 0 to 7 Netids: 000, 001, 010, 011, 10, 11 Network Addresses : 00000, 00100, 01000, , Broadcast Addresses: 00011, 00111, 01011, , Mixing 3-bit & 2-bit Cases (think of the 32-bit case)