(L2) IP Addressing Chapter 19

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 46

01

IP Addressing(CH-19)
02
• IANA (Internet Assigned Numbers Authority) is
responsible for global coordination of the Internet Protocol
addressing systems.
• Currently there are two types of Internet Protocol (IP) addresses in
active use: IP version 4 (IPv4) and IP version 6 (IPv6)
• IPv4 was initially deployed on 1 January 1983 and is still the most
commonly used version
• IPv4 addresses are 32-bit numbers often expressed as 4 octets in
"dotted decimal" notation (for example, 192.0.2.53)

Department of Computer Systems Engineering – MUST – AK – PK


Internet Address
03

An IPv4 address is a 32-bit address.

The IP addresses are unique


and universal.

Department of Computer Systems Engineering – MUST – AK – PK


Internet Address
04
Two common notations

• Binary Notations
• 10000000 00001100 00001111 00001010
• Dotted Decimal Notation
• 128.12.15.10

Department of Computer Systems Engineering – MUST – AK – PK


Example: 01
05
Change the following IP addresses from binary notation to
dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11111001 10011011 11111011 00001111

Solution
We replace each group of 8 bits with its
equivalent decimal number (see Appendix B) and
add dots for separation:
a. 129.11.11.239
b. 249.155.251.15
Department of Computer Systems Engineering – MUST – AK – PK
Example: 02
06
Change the following IP addresses from dotted-decimal notation
to binary notation.
a. 111.56.45.78
b. 75.45.34.78

Solution
We replace each decimal number with its binary equivalent
(see Appendix B):

a. 01101111 00111000 00101101 01001110


b. 01001011 00101101 00100010 01001110
Department of Computer Systems Engineering – MUST – AK – PK
Classful IP Addressing
07
Note:

In classful addressing, the address space is


divided into five classes: A, B, C, D, and E.

Department of Computer Systems Engineering – MUST – AK – PK


Finding the class in binary notation
08

Department of Computer Systems Engineering – MUST – AK – PK


Example:03
09
Find the class of each address:
a. 00000001 00001011 00001011 11101111
b. 11110011 10011011 11111011 00001111

Solution
a. The first bit is 0; this is a class A address.
b. The first 4 bits are 1s; this is a class E address.

Department of Computer Systems Engineering – MUST – AK – PK


Finding the class in decimal notation
10

Department of Computer Systems Engineering – MUST – AK – PK


Example:04
11
Find the class of each address:
a. 227.12.14.87
b. 252.5.15.111
c. 134.11.78.56

Solution
a. The first byte is 227 (between 224 and 239).
The class is D.
b. The first byte is 252 (between 240 and 255).
The class is E.
c. The first byte is 134 (between 128 and 191).
The class is B.
Department of Computer Systems Engineering – MUST – AK – PK
Netid & Hostid
12

Department of Computer Systems Engineering – MUST – AK – PK


Blocks in class A
13

Department of Computer Systems Engineering – MUST – AK – PK


Class A
14

Note:

Millions of class A addresses are wasted.

Department of Computer Systems Engineering – MUST – AK – PK


Blocks in class B
15

Department of Computer Systems Engineering – MUST – AK – PK


Class B
16

Note:

Many class B addresses are wasted.

Department of Computer Systems Engineering – MUST – AK – PK


Blocks in class C
17

Department of Computer Systems Engineering – MUST – AK – PK


Class C
18
Note:

The number of addresses in class C is smaller


than the needs of most organizations.

Department of Computer Systems Engineering – MUST – AK – PK


Network Address
19

Department of Computer Systems Engineering – MUST – AK – PK


Network Address
20
Note:

In classful addressing, the network


address is the one that is assigned to
the organization.

Department of Computer Systems Engineering – MUST – AK – PK


Example:05
21
Given the address 23.56.7.91, find the network address.

Solution
The class is A. Only the first byte defines the netid. We can find
the network address by replacing the hostid bytes (56.7.91) with
0s. Therefore, the network address is 23.0.0.0.

Department of Computer Systems Engineering – MUST – AK – PK


Example:06
22
Given the address 132.6.17.85, find the network address.

Solution
The class is B. The first 2 bytes defines the netid.
We can find the network address by replacing the
hostid bytes (17.85) with 0s. Therefore, the network
address is 132.6.0.0.

Department of Computer Systems Engineering – MUST – AK – PK


Example:07
23
Given the network address 17.0.0.0, find the class.

Solution

The class is A because the netid is only 1 byte.

Department of Computer Systems Engineering – MUST – AK – PK


Network Address
24
Note:

A network address is different from a netid. A


network address has both netid and hostid,
with 0s for the hostid.

Department of Computer Systems Engineering – MUST – AK – PK


Sample Internet
25

Department of Computer Systems Engineering – MUST – AK – PK


Network Address
26
Note:
IP addresses are designed with two levels of hierarchy.

Department of Computer Systems Engineering – MUST – AK – PK


Default Subnet Mask
27
In Dotted- Using
Class In Binary
Decimal Slash

A 11111111 00000000 00000000 00000000 255.0.0.0 /8

B 11111111 11111111 00000000 00000000 255.255.0.0 /16

C 11111111 111111111 11111111 00000000 255.255.255.0 /24

Department of Computer Systems Engineering – MUST – AK – PK


Internet Protocol version6 (IPv6)
28
IPv6 Needs & Applications

With millions of new devices becoming IP aware,


the need for increased addressing and plug & play networking
is only met with the implementation of IPv6

Department of Computer Systems Engineering – MUST – AK – PK


IPv6
29
• Next development version of Internet protocol
• Address size is 128 bits
• IPv6 address representation
• xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx

• Each x is a 4bit hexadecimal digit

• IPv6 addresses range from


0000:0000:0000:0000:0000:0000:0000:0000 to
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff.

Department of Computer Systems Engineering – MUST – AK – PK


IPv6
30
Two other formats
Omit leading zeros
Specify IPv6 addresses by omitting leading zeros
E.g. : 1050:0000:0000:0000:0005:0600:300c:326b can be written as
1050:0:0:0:5:600:300c:326b

Double colon
Specify IPv6 addresses by using double colons (::) in place of a series
of zeros
E.g. : ff06:0:0:0:0:0:0:c3 may be written as ff06::c3
Double colons can be used only once in one IP address

Department of Computer Systems Engineering – MUST – AK – PK


What’s Good about IPv6
31
Bigger address space
128 bits for addressing
No NATs are needed
Allows full IP connectivity
For Computers, Mobile devices

Mobility
Facility for mobile devices

Department of Computer Systems Engineering – MUST – AK – PK


IPv6 address notation
32
• Two possible notation types
• Depends on content of address you need represent

1.Standard notation

- Represent the address as eight 16-bit hexadecimal words separated by ``:'' (colons)
- E.g : FEDC:BA98:0332:0000:CF8A:000C:2154:7313 or
FEDC:BA98:332:0:CF8A:C:2154:7313
2.Compressed notation

- Multiple fields of zeros


- Represent a single contiguous group of zero fields within an IPv6 address
- Uses a double colon``::‘’
- E.g.: 1762:0:0:0:0:B03:1:AF18
can be represented as 1762::B03:1:AF18

Department of Computer Systems Engineering – MUST – AK – PK


Types of Communication
33
 unicast
 communicate specified 1 computer
 multicast
 communicate group of computers
 anycast
 send group address that can receive multiple computers,but receive
1 computer
g a
s d s g s a

g a

unicast multicast anycast


Department of Computer Systems Engineering – MUST – AK – PK
IPv6 Unicast
34
• To transmit data from one point to another.
• Multiple users might request
• Same data
• From the same server
• At the same time
• Scope may be Global or Local
• Global for worldwide communication
• Local for communication within a site

Department of Computer Systems Engineering – MUST – AK – PK


How Unicast Works
35
Server

Router

Etherne
t
Switch

Department of Computer Systems Engineering – MUST – AK – PK


IPv6 Multicast
36
• Ability to send a single packet to multiple destinations
• No broadcast
• Ability to send a packet to all hosts on the attached link
• same effect can be achieved by sending a packet to the link-local all hosts
multicast group

• Applications
• Telephony and video conference
• Database simultaneous update
• Parallel computing
• Real time news

Department of Computer Systems Engineering – MUST – AK – PK


How Multicast Works
37
Server

Router

Ethern
et
Switch

Department of Computer Systems Engineering – MUST – AK – PK


IPv6 Anycast
38
• Uses Anycast address
• Identifies a set of nodes
• Packet will reach only one out of many (usually, topologically closest one)
• Anycast address can be assigned to routers only
• Anycast address cannot be used as a source

Department of Computer Systems Engineering – MUST – AK – PK


Type of address
39
• Link local scope address:
FE80::/10 (1111 1110 10)
• Unique/Site local scope address:
FEC0::/10 (1111 1110 11 )
• Global scope address:
2000::/3 (001)

Department of Computer Systems Engineering – MUST – AK – PK


Network Address Translation (NAT)
40

• Private Addresses
• Public Addresses

Department of Computer Systems Engineering – MUST – AK – PK


Private Addresses
41
• 10.0.0.0 /8 10.0.0.0 to 10.255.255.255 subnet mask 255.0.0.0
• 172.16.0.0 /12 172.16.0.0 to 172.31.255.255 subnet mask 255.240.0.0
• 192.168.0.0 /16 192.168.0.0 to 192.168.255.255 subnet mask 255.255.0.0
• Private address ranges were reserved from the IPv4 addressing space to
extend the life of IPv4
• Private addresses can be used inside home or business networks over and
over again but they must be translated into a public IP address when connecting to the
Internet
• Private addresses are illegal on the internet and ISPs receiving a packet with a private source
IP address will drop the packet
• Private addresses are used on the inside network of the router
• Private addresses are translated into public addresses (Class A, Class B and Class C
addresses excluding reserved addresses) by a technique called NAT Network Address
Translation

Department of Computer Systems Engineering – MUST – AK – PK


Private Addresses
42

Department of Computer Systems Engineering – MUST – AK – PK


NAT (Network Address Translation)
43
• NAT is a method that enables hosts on private networks to
communicate with hosts on the Internet
• NAT typically translates private IP addresses on inside networks to
public IP addresses on outside networks
• NAT can be used to translate any network IP addresses to any other
network range and is used in this way when 2 networks are connected
and there is an addressing conflict - both networks are using the same
IPs.

Department of Computer Systems Engineering – MUST – AK – PK


NAT (Network Address Translation)
44

Department of Computer Systems Engineering – MUST – AK – PK


PAT (Port Address Translation)
45
• The IP address of the outside interface is used as the global IP address
• Because another host on the inside network may make a connection
using the a duplicated port number, the source port number is also
rewritten by the wireless router so that it can match the translation to
the sending host and port number
• PAT allows many computers using private addressing to share the
same ONE outside address
• PAT is the method typically used for small home and business
networks
• PAT supports up to 4096 simultaneous translations (more in theory)
• When the connection completes the entry is deleted PAT is also
called overloading

Department of Computer Systems Engineering – MUST – AK – PK


NAT & PAT
46

Department of Computer Systems Engineering – MUST – AK – PK

You might also like