0% found this document useful (0 votes)
9 views

Lecture 6 Logical Addressing

Logical Addressing provides concise summaries of key concepts: 1. IP addresses uniquely identify devices on the Internet and use either IPv4 with 32-bit addresses or IPv6 with 128-bit addresses. 2. IPv4 addresses are represented in dotted decimal notation with four blocks of one byte each, while IPv6 uses 128-bit addresses in hexadecimal colon notation. 3. Network Address Translation (NAT) allows organizations to use private IP addresses internally and map them to public IP addresses for Internet communication, conserving the limited number of public IPv4 addresses.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lecture 6 Logical Addressing

Logical Addressing provides concise summaries of key concepts: 1. IP addresses uniquely identify devices on the Internet and use either IPv4 with 32-bit addresses or IPv6 with 128-bit addresses. 2. IPv4 addresses are represented in dotted decimal notation with four blocks of one byte each, while IPv6 uses 128-bit addresses in hexadecimal colon notation. 3. Network Address Translation (NAT) allows organizations to use private IP addresses internally and map them to public IP addresses for Internet communication, conserving the limited number of public IPv4 addresses.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Logical Addressing

IP Address
• An Internet address or IP address
uniquely identifies a device connected to
the Internet at the network layer
• IP = Internet Protocol
• IP is the base protocol at network layer
in the Internet model or the TCP/IP
protocol suit
IPv4 Address
• An IPv4 address is a 32-bit address
• The address space of IPv4 is 232 or
4,294,967,296.
• Represented in 4 blocks of 1 byte each
Example:
Convert the following IPv4 address from binary to
dotted decimal

a) 11001011 00110011 10011001 11101011


b) 10110100 10010101 10101010 01010101

Answer:

c) 203.51. 153.235
d) 180.149.170.85
Classful Addressing
A
B Unicast communication
C
D Multicast communication
E Reserved for special use
Network ID and Host ID
Mask
• Although the length of the netid and
hostid (in bits) is predetermined in
classful addressing, we can also use a
mask
• The mask can help us to find the netid
and the hostid
Finding the Class in binary notation
Finding the class in dotted-decimal notation
Network and Broadcast Address
• If all host bits are set to 0, it’s called a Network address
If all host bits are set to 1, it’s called a Broadcast address

Consider an example of Class C address


192.168.1.0 Network address
192.168.1.1 First Host
192.168.1.2 Second Host

Number of
Hosts = 2n- 2

192.168.1.254
192.168.1.255 Broadcast Address
Subnetwork
• Division of a large network in to smaller groups
is called Subnetting
• Each group is referred to as a Subnet
Example 1
Consider a class C network
IP Address: 192.168.1.0
Mask: 255.255.255.0
11111111 . 11111111 . 11111111 . 00000000
Take the first bit from the host portion (Fourth Octet) to create a subnet
Fourth Octet becomes 10000000
New subnet mask = 255.255.255.128
Number of subnets = 2n = 21 = 2
Block Size = 256 – 128= 128
Number of valid hosts per subnet = 27 – 2 = 126

Subnet1 Subnet2
192.168.1.0 Network address 192.168.1.128 Network address
192.168.1.1 --- 192.168.1.126 192.168.1.129 --- 192.168.1.254
192.168.1.127 Broadcast Address 192.168.1.255 Broadcast address
Classless Addressing (VLSM)
• Problem with classful addresses
wastage due to fixed blocks of addresses
• Solution: Classless addressing
Variable length address blocks
No classes
CIDR = Classless Inter-Domain Routing
• Classful addressing is almost obsolete and
replaced with classless addressing.
Example:
A block of addresses is granted to a small organization. We know that one of the
addresses is 205.16.37.39/28.
a) What is the first valid host address in the block
b) What is the Network and broadcast address of the subnet

Solution:

Subnet Mask is /28 which means 255.255.255.0 0 0 0 0 0 0 0


Block size = 16

First subnet will be 0-15


Second subnet will be 16-31
Third Subnet will be 32-47 (39 lies in this subnet)

205.16.37.32 Network address


205.16.37.33 First valid host address
205.16.37.47 Broadcast address
VLSM Example
Distribute a block of Class C IP address 192.168.1.0 as follows:

Subnet 1: 2 hosts
Subnet 2 : 30 hosts
Subnet 3: 64 hosts

Solution:

Subnet 1
192.168.1.0 /30
Subnet 2
192.168.1.0 /27
Subnet 3
192.168.1.0 /26
Private Addresses
• Private IP addresses are used to assign
computers within the private space without
letting them directly expose to the Internet
• Private IP addresses are non-routable
Public/Global IP Address
• A public IP address is an IP address that can be
accessed over the Internet. It’s a routable
address

• Your public IP address can be found at


What is my IP Address page
Network Address Translation (NAT)
• IP addresses are scarce.
• The long-term solution is for the
whole Internet to migrate to IPv6
128-bit addresses
• The quick fix is NAT (Network
Address Translation)
described in RFC 3022
NAT – basic idea
• Assign each company a single IP address
(or at most, a small number of them) for
Internet traffic.
• Within the company, every computer
gets a unique IP address (private)
• When a packet exits the company and
goes to the Internet, an address
translation takes place.
(private -> global)
Address Translation
• Translation between global and private addresses
• Private network uses private addresses
• The private network is transparent to the rest of the
Internet
Static NAT
• It is designed to allow one-to-one mapping between local and global
addresses.
• Need at-least one registered IP address for each host in a private
network

e.g. 192.168.1.1 205.6.10.5


192.168.1.2 205.6.10.6

Dynamic NAT

• It allows you to map an unregistered IP address to a registered IP


address from out of a pool of registered IP addresses
• No need to configure Router for any static one-to-one mapping
• Still need to have enough global IP addresses for everyone who is
sending packets to and receiving them from the Internet

e.g. 192.168.1.1 205.6.10.5


192.168.1.2 205.6.10.6
Port Address Translation (PAT)
• Multiple unregistered IP addresses are mapped to single
registered (global) IP address

e.g. 192.168.1.1 205.6.10.5


192.168.1.2

• Same IP address but different port numbers to identify


different traffic flows
S. Addr. Trans. Addr. S. Port # Trans. D. Addr. D. Port #
Port #

10.1.1.1 200.1.1.1 12000 23456 145.10.1.1 25000

10.1.1.2 200.1.1.1 12000 12345 145.10.1.1 25000

… … … … … …
Common Ports

80 HTTP
443 HTTPS
20 & 21 FTP
23 Telnet
22 SSH
25 SMTP
IPv6 Addresses
IPv6 address structure
• An IPv6 address is 128 bits long
• It is usually presented in hexadecimal
colon notation

Dr. Manzoor Hashmani 25


Abbreviated IPv6 addresses

Dr. Manzoor Hashmani 26

You might also like