Top Banner
1.3.2016 1 1 Internet Addressing ? dr Nenad Krajnović E-mail: [email protected] 2 What is an IP Address? 32-bit number, defined by the Internet Protocol (IP) (RFC 791). IP addresses must be unique within the network. One IP address may point to: one and only one destination on the Internet (unicast), or: one and only one group of destinations (multicast). IP addresses are 32-bit integers, oftenly written in 4-octet form: 147.91.8.6 IP address distribution is coordinated in hierarchical manner. End users receive their address space from their ISP! How many IP addresses exists? Since 32-bits are used for IP addresses, maximum number of IP addresses is: 4.294.967.296 Complete address range can not be used for host addressing!
12

Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

Mar 03, 2018

Download

Documents

ngonguyet
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

1

1

Internet Addressing

?dr Nenad Krajnović

E-mail: [email protected]

2

What is an IP Address?

• 32-bit number, defined by the Internet Protocol (IP) (RFC 791).

• IP addresses must be unique within the network.

• One IP address may point to:

– one and only one destination on the Internet (unicast), or:

– one and only one group of destinations (multicast).

• IP addresses are 32-bit integers, oftenly written in 4-octet form:

147.91.8.6• IP address distribution is coordinated in hierarchical manner.

• End users receive their address space from their ISP!

How many IP addresses exists?

• Since 32-bits are used for IP addresses,

maximum number of IP addresses is:

4.294.967.296

• Complete address range can not be used for

host addressing!

Page 2: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

2

4

IP Address Structure

• IP address consists of two parts:

147.91.8.6

10010011 01011011 00001000 00000110

Network prefix

(m bits)

Host id

(32-m bits)

5

Network Address

• Addresses all hosts on a network segment:

147.91.8.0 /24

10010011 01011011 00001000 00000000

Network prefix

(m bits)

Host id

(32-m zeros)

/24 - denotes prefix length (m = 24)

6

Subnet mask

• Subnet mask - a way of keeping information about prefix length.

255.255.255.0

11111111 11111111 11111111 00000000

Network prefix

(m ones)

Host id

(32-m zeros)

Page 3: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

3

7

Broadcast Address

• Used by IP to broadcast data to all hosts on a given subnet.

147.91.8.255 /24

10010011 01011011 00001000 11111111

Network prefix

(m bits - network prefix)

Host id

(32-m ones)

/24 - denotes the prefix length (m = 24)

8

IP Address Structure - a Review (Repetitio mater studiorum est)

• IP adress:

10010011 01011011 00001000 00000110 147.91.8.6

10010011 01011011 00001000 00000000 147.91.8.0 /24

• Network address:

11111111 11111111 11111111 00000000 255.255.255.0

• Subnet mask:

10010011 01011011 00001000 11111111 147.91.8.255 /24

• Broadcast address:

9

Another Example ...

• Prefix length does notdoes not have to be on octet boundaries:

147.91.9.65 /26

10010011 01011011 00001001 01000001

Network prefix

(m=26 bits)

Host id

(6 bits)

/26 - denotes the prefix length (m = 26)

Page 4: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

4

10

Another Example - Review

• IP adress:

10010011 01011011 00001001 01000001 147.91.9.65 /26

10010011 01011011 00001001 01000000 147.91.9.64 /26

• Network address:

11111111 11111111 11111111 11000000 255.255.255.192

• Subnet mask:

10010011 01011011 00001001 01111111 147.91.9.127 /26

• Broadcast address:

Addressing in the LAN

147.91.9.64/26

147.91.9.66

147.91.9.67

147.91.9.68

147.91.9.69

147.91.9.70 147.91.9.71

147.91.9.65

147.91.9.126

147.91.9.72147.91.9.100 147.91.9.101

Addressing in the LAN (VLAN)

VLAN 1

10.10.5.0/24

VLAN 2

147.91.8.0/24

VLAN 8

147.91.9.0/24

VLAN 215

147.91.16.0/23

10.10.5.1

147.91.8.5

147.91.9.1

147.91.16.1

Page 5: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

5

Addressing in the WAN

21.15.4.1

21.15.4.2

18.240.6.1

18.240.6.2

18.240.6.0/30

21.15.4.6

21.15.4.521.15.4.9

21.15.4.10

21.15.4.13

21.15.4.14

Why we are using network addresses?

147.91.9.64/26

147.91.9.66

147.91.9.67

147.91.9.68

147.91.9.69

147.91.9.70 147.91.9.71

147.91.9.65

147.91.9.126

147.91.9.72147.91.9.100 147.91.9.101

eth0

147.91.9.64/26

147.91.9.66

147.91.9.67

147.91.9.68

147.91.9.69

147.91.9.70 147.91.9.71

147.91.9.65

147.91.9.126

147.91.9.72147.91.9.100 147.91.9.101

eth0

Routing table

147.91.9.65 -> eth0

147.91.9.66 -> eth0

147.91.9.67 -> eth0

147.91.9.68 -> eth0

147.91.9.69 -> eth0

147.91.9.70 -> eth0

147.91.9.71 -> eth0

147.91.9.72 -> eth0

147.91.9.73 -> eth0

147.91.9.74 -> eth0

Routing table

147.91.9.64/26 -> eth0

15

IP Address Classification

• Total available address space: 0.0.0.0 0.0.0.0 -- 255.255.255.255255.255.255.255.

• We can classify addresses according to the following criteria:

–– Classes:Classes:

– A, B, C, D, E class networks. Classes are now obsoleted!

–– Usage:Usage:

– Public IP addresses (globally routeable, unique and non-reusable).

– Private IP addresses (routeable in private networks only).

– Special IP addresses (reserved, broadcast, multicast etc. networks).

–– Validity:Validity:

– Provider aggregatable (valid until the ISP-User agreement is valid).

– Provider independent (valid until initial criteria for their assignment

are met).

Page 6: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

6

16

Network Prefix Length - m

• Prefix length may be determined:– Automatically, depending on the address class - A, B, C, D, E (classful).

– Arbitary, depending on the ISP and customer network topology (CIDR).

• It defines the maximum number of addresses available to the user:

6553665536 //1616 65536 addresses

256256 //2424 256 addresses

6464 /26/26 64 addresses

16 bits

24 bits

26 bits

• Assigned network prefix length may be expanded (subnetting)

17

Classful Addressing

• Today mostly obsoleted, used only by some routing protocols.

• Classful addressing was created in the past to ease allocations.

• IP adress space is divided to 5 IP adress classes - A, B, C, D i E:

0 remaining 31 bits 0.0.0.0 - 127.255.255.255A

10 remaining 30 bits 128.0.0.0 - 191.255.255.255B

110 remaining 29 bits 192.0.0.0 - 223.255.255.255C

1110 remaining 28 bits 224.0.0.0 - 239.255.255.255D

1111 remaining 28 bits 240.0.0.0 - 255.255.255.255E

18

Prefix Length and Classes

Class IP range Start IP address m Subnet mask

A 0/1 0.0.0.0 8 255.0.0.0

B 128/2 128.0.0.0 16 255.255.0.0

C 192/3 192.0.0.0 24 255.255.255.0

D 224/4 224.0.0.0 - -

E 240/4 240.0.0.0 - -

• Older routing protocols determined prefix length (m) by the class.

• Newer routing protocols explicitly transmit prefix length.

Page 7: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

7

19

Classless Addressing(CIDR)

• Basis for classless inter-domain routing (CIDR).

• A customer is assigned an IP network on arbitary boundaries, e.g.:

1319 195195..9191..160160..00 //1919 (81928192 hosts)

• The customer might expand the network prefix length, e.g.:

819 /24/245 3232 subnets, 254254 hosts/subnet

• Subnet number of all 0’s and all 1’s is allowed by default.

• At the time of introduction of classless routing, it was necessary to additionally configure routers to support it.

20

Example Network Topology

Ethernet

Ethernet

Ethernet

Repeater

Access

server

Embedded

router

Router Router

Dial-in x 10

Total of 200

hosts

100

hosts

50 PCs

50 PCs

40 PCs

35 PCs

30 PCs

20 PCs

PPP (unnumbered)

1

2

3

4

5

6

7

8

9

21

Fixed-length Subnet Masks

Ethernet

Ethernet

Ethernet

Repeater

Access

server

Embedded

router

Router Router

10.0.0.3 10.0.0.12

10.0.0.50 10.0.0.0/24

10.0.0.0/24

Dial-in x 10

10.0.9.0 /24

10.0.0.77

10.0.1.77 10.0.1.2110.0.1.0/24

10.0.1.78 10.0.1.7950 PCs - 10.0.2.0/24

50 PCs - 10.0.3.0/24

40 PCs - 10.0.4.0/24

35 PCs - 10.0.5.0/24

30 PCs - 10.0.6.0/24

20 PCs - 10.0.7.0/24

PPP (unnumbered)

Page 8: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

8

22

Addressing Plan - FLSM

i hosts Max addr Start address Prefix Subnet mask Broadcast

1 200 254 10.0.0.0 /24 255.255.255.0 10.0.0.255

2 100 254 10.0.1.0 /24 255.255.255.0 10.0.1.255

3 50 254 10.0.2.0 /24 255.255.255.0 10.0.2.255

4 50 254 10.0.3.0 /24 255.255.255.0 10.0.3.255

5 40 254 10.0.4.0 /24 255.255.255.0 10.0.4.255

6 35 254 10.0.5.0 /24 255.255.255.0 10.0.5.255

7 30 254 10.0.6.0 /24 255.255.255.0 10.0.6.255

8 20 254 10.0.7.0 /24 255.255.255.0 10.0.7.255

9 10 254 10.0.8.0 /24 255.255.255.0 10.0.8.255

Network address and broadcast address can Network address and broadcast address can NOTNOT be used for host be used for host

addressing!addressing!

23

Variable-length Subnet Masks

(VLSM)

Ethernet

Ethernet

Ethernet

Repeater

Access

server

Embedded

router

Router Router

10.0.0.3 10.0.0.12

10.0.0.50 10.0.0.0/24

10.0.0.0/24

Dial-in x 10

10.0.2.192/28

10.0.0.77

10.0.1.77 10.0.1.2110.0.1.0/25

10.0.1.78 10.0.1.7950 PCs - 10.0.1.128/26

50 PCs - 10.0.1.192/26

40 PCs - 10.0.2.0/26

35 PCs - 10.0.2.64/26

30 PCs - 10.0.2.128/27

20 PCs - 10.0.2.160/27

PPP (unnumbered)

24

Addressing Plan - VLSM

i hosts Max addr Start address Prefix Subnet mask Broadcast

1 200 254 10.0.0.0 /24 255.255.255.0 10.0.0.255

2 100 126 10.0.1.0 /25 255.255.255.128 10.0.1.127

3 50 62 10.0.1.128 /26 255.255.255.192 10.0.1.191

4 50 62 10.0.1.192 /26 255.255.255.192 10.0.1.255

5 40 62 10.0.2.0 /26 255.255.255.192 10.0.2.63

6 35 62 10.0.2.64 /26 255.255.255.192 10.0.2.127

7 30 30 10.0.2.128 /27 255.255.255.224 10.0.2.159

8 20 30 10.0.2.160 /27 255.255.255.224 10.0.2.191

9 10 14 10.0.2.192 /28 255.255.255.240 10.0.2.207

Network address and broadcast address can Network address and broadcast address can NOTNOT be used for host be used for host

addressing!addressing!

Page 9: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

9

25

IP Address Distribution

ISP ISP

ISP ISPISP ISP ISPISP

IANA

Assignments

Allocations

RIPE NCC ARIN APNIC LACNIC AfriNIC

Internet Registries

27

Address Distribution - Example

ISP

ISP

RIPE NCC

IANA

ISP

193193//88

193.1.32.0 /19193.1.32.0 /19

193193..22..00..0 0 //1616

193.1.128.0 /18193.1.128.0 /18

193.2.20.32 /27193.2.20.32 /27 193.2.20.0 /24193.2.20.0 /24

193.2.8.0 /21193.2.8.0 /21

Page 10: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

10

Information about address

distribution?

• Every Internet Registry is maintaining

public database about address assignment

• www.ripe.net - RIPE

• www.arin.net - ARIN

• www.lacnic.net - LACNIC

• www.apnic.net - APNIC

• www.afrinic.net - AfriNIC

Page 11: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

11

31

Address Categories

Public IP numbers:

• Globally unique - one IP address points to one and only one destination.

• Non-reusable - once used, the same IP address must not be used elsewhere!

• Routable - theoretically “visible” from anywhere in the Internet.

• Need global coordinated allocation/assignment process (IANA, RIRs, ISPs …).

• Agreggatable - routes to 6262..22..1616//2121 and i 6262..22..2424//2121 give 6262..22..1616//2020!

• Limited resource, like a radio-frequency spectrum! They need careful planning!

Private IP numbers:

• Defined by the RFC 1918 (networks 10/810/8, 172.16/12172.16/12 and 192.168/16192.168/16).

• Basic application - intranets, networks behind firewalls or NATs or networks

which won’t connect to the Internet at all!

• They must not be routed on the public networks!

• Need coordination withing the private network where they are used.

32

Special IP Addresses

• Used internally by various networking protocols.

• They must notmust not be used for host/network addressing.

IP network m Abbreviated IP network usage

0.0.0.0 /0 0/0 Default gateway

127.0.0.0 /8 127/8 Loopback network

224.0.0.0 /4 224/2 Multicast addresses (class D)

240.0.0.0 /4 240/4 Class E (reserved by IANA)

• Special addresses are also: network address, subnet mask, broadcast address.

33

Address Validity(RFC 2050)

Provider aggregatable (PA) address space:

• Assigned by the ISPs, for the need of their end users.

• Valid until the agreement between the ISP and the customer is valid.

• Upon provider change, the user must renumbermust renumber their network!

• Provider guarantees global uniqueness and visibility of the assigned addresses.

• Most of assignments, being done today, are provider aggregatable.

Provider independent (PI) address space:

• Address space, formerly assigned directly by InterNIC, RIPE NCC, APNIC.

• InterNIC, RIPE NCC, APNIC do notdo not assign addresses to end users any more!

• The ISP reserves the right to refuse to route them, or to extra charge the cost for

their routing.

• Necessary for multihomed networks!

Page 12: Internet Addressing - University of Belgradetelekomunikacije.etf.bg.ac.rs/predmeti/ot4ai/Internet-adresiranje... · Internet Addressing ... Addressing in the LAN (VLAN) VLAN 1 10.10.5.0/24

1.3.2016

12

34

Internet Addressing

?dr Nenad Krajnović

E-mail: [email protected]