IP Addressing and Routing 1 Basic IP Addressing Each host - - PDF document

ip addressing and routing
SMART_READER_LITE
LIVE PREVIEW

IP Addressing and Routing 1 Basic IP Addressing Each host - - PDF document

IP Addressing and Routing 1 Basic IP Addressing Each host connected to the Internet is identified by a unique IP address. An IP address is a 32-bit quantity. Expressed as a dotted-decimal notation W.X.Y.Z. Consists of two


slide-1
SLIDE 1

1

1

IP Addressing and Routing

2

Basic IP Addressing

  • Each host connected to the Internet

is identified by a unique IP address.

  • An IP address is a 32-bit quantity.

Expressed as a dotted-decimal notation W.X.Y.Z. Consists of two logical parts:

A network number A host number

This partition defines the IP address classes.

slide-2
SLIDE 2

2

3

IP Address Classes

  • There are five defined IP address

classes.

Class A UNICAST Class B UNICAST Class C UNICAST Class D MULTICAST Class E RESERVED

  • There are some special-purpose IP

addresses also.

4

1111

240.0.0.0 – 255.255.255.255

E 1110

224.0.0.0 – 239.255.255.255

D 8 21 110

192.0.0.0 – 223.255.255.255

C 16 14 10

128.0.0.0 – 191.255.255.255

B 24 7

0.0.0.0 – 127.255.255.255

A Host bits Network bits High-

  • rder bits

Address Range Class

slide-3
SLIDE 3

3

5

Special-Purpose IP Addresses

Limited broadcast 255.255.255.255 Reserved for private use 192.168.0.0 – 192.168.255.255 Reserved for private use 172.16.0.0 – 172.31.255.255 Reserved for loopback / local address 127.0.0.0 – 127.255.255.255 Reserved for private use 10.0.0.0 – 10.255.255.255 Unknown network, commonly represents default 0.0.0.0

Purpose Address Range

6

  • The class-based addressing is also

known as the classful model.

Different network classes lend themselves to different network configurations. Different network-to-hosts ratio.

slide-4
SLIDE 4

4

7

Some Conventions

  • Within a particular network (Class A, B
  • r C), the first and last addresses

serve special functions.

The first address represents the network number (for example, 118.0.0.0). The last address represents the directed broadcast address of the network (for example, 118.255.255.255).

8

IP Subnetting

slide-5
SLIDE 5

5

9

IP Subnet

  • Basic concept:

A subset of a class A, B or C network.

  • IP addresses that do not use subnets

consists of

a network portion, and a host portion.

Represents a static two-level hierarchical addressing model.

10

IP Subnet (contd.)

  • IP subnets introduces a third level of

hierarchy.

a network portion a subnet portion a host portion

Allow more efficient (and structured) utilization of the addresses. Uses network masks.

slide-6
SLIDE 6

6

11

Natural Masks

  • Network mask 255.0.0.0 is applied to

a class A network 10.0.0.0.

In binary, the mask is a series of contiguous 1’s followed by a series of contiguous 0’s. 11111111 00000000 00000000 00000000 Network portion Host portion

12

Natural Masks (contd.)

  • Provide a mechanism to split the IP

address 10.0.0.20 into

a network portion of 10, and a host portion of 20. Decimal Binary

IP address:10.0.0.20 00001010 00000000 00000000 00010100 Mask: 255.0.0.0 11111111 00000000 00000000 00000000 Network Host

slide-7
SLIDE 7

7

13

Natural Masks (contd.)

  • Class A, B and C addresses

Have fixed division of network and host portions. Can be expressed as masks.

Called natural masks.

  • Natural Masks

Class A :: 255.0.0.0 Class B :: 255.255.0.0 Class C :: 255.255.255.0

14

Creating Subnets using Masks

  • Masks are very flexible.

Using masks, networks can be divided into smaller subnets.

  • How?

By extending the network portion of the address into the host portion.

  • Advantage gained:

We can create a large number of subnets from one network. Can have less number of hosts per network.

slide-8
SLIDE 8

8

15

Example: Subnets

  • Network mask 255.255.0.0 is applied

to a class A network 10.0.0.0.

This divides the IP address 10.5.0.20 into

a network portion of 10, a subnet portion of 5, and a host portion of 20.

The 255.255.0.0 mask borrows a portion

  • f the host space, and applies it to

network space.

16

Subnets (contd.)

  • What happens?

Initially it was a single large Class A network (224 – 2 hosts). We have now split the network into 256 subnets.

From 10.0.0.0 to 10.255.0.0. The hosts pet subnet decreases to 65,534.

slide-9
SLIDE 9

9

17

Subnets (contd.)

Decimal Binary

IP address: 10.5.0.20 00001010 00000101 00000000 00010100 Mask: 255.255.0.0 11111111 11111111 00000000 00000000 Network Subnet Host

18

Default Mask and Subnet mask

AND AND

Default Mask 255.255.0.0 Subnet Mask 255.255.192.0 IP Address 144.16.72.57 IP Address 144.16.72.57 Network Address 144.16.0.0 Network Address 144.16.64.0 192: 1100 0000 72: 0100 1000

slide-10
SLIDE 10

10

19

Subnets vrs Multiple Address Classes

  • Subnets

Management of subnets is done by local network administrator. Single entry in external router tables.

  • Multiple Address Classes

Multiple entries in external router tables. Additional overhead on the backbone (external) routers.

20

Comparison

R R R R R R SUBNETS MULTIPLE ADDRESS CLASSES

slide-11
SLIDE 11

11

21

Variable Length Subnet Mask (VLSM)

22

Variable Length Subnet Masks (VLSM)

  • Basic concept

The same network can be configured with different masks. Can have subnets of different sizes. Allows better utilization of available addresses.

slide-12
SLIDE 12

12

23

Example: VLSM

  • Suppose we are assigned a Class C

network 192.203.17.0.

To be divided into three subnets. Corresponding to three departments. With 110, 45 and 50 hosts respectively. D1 (110) D2 (45) D3 (50)

24

The Example (contd.)

  • Available subnet options

The network mask will be the Class C natural mask 255.255.255.0 Subnet masks of the form 255.255.255.X Can be used to divide the network into more subnets.

slide-13
SLIDE 13

13

25

4 64 1111 1100 252 8 32 1111 1000 248 16 16 1111 0000 240 32 8 1110 0000 224 64 4 1100 0000 192 128 2 1000 0000 128

  • No. of

Hosts

  • No. of

Subnets X (in binary) X

  • Cannot satisfy the requirements.

The Subnet Options

26

The VLSM Option

  • Basic concept:

Use the mask 255.255.255.128 to divide the network address into two subnets with 128 hosts each. 192.203.17.0 (.0 to .127) 192.203.17.0 (.128 to .255)

slide-14
SLIDE 14

14

27

The VLSM Option (contd.)

Next subnet the second .128 subnet using a mask of 255.255.255.192. Creates two subnets, 64 hosts each 192.213.17.128 (.128 to .191) 192.213.17.128 (.192 to .255)

28

The VLSM Option (contd.)

192.203.17.0

192.203.17.0 (.0 to .127) 192.203.17.0 (.128 to .255) 192.213.17.128 (.128 to .191) 192.213.17.128 (.192 to .255) Mask: 255.255.255.128 Mask: 255.255.255.192

slide-15
SLIDE 15

15

29

Interface 1 :: 128 hosts Network number: 192.203.17.0 Network mask: 255.255.255.128 Address: 192.203.17.0 -- .127 Interface 2 :: 64 hosts Network number: 192.203.17.128 Network mask: 255.255.255.192 Address: 192.203.17.128 -- .191 Interface 3 :: 64 hosts Network number: 192.203.17.192 Network mask: 255.255.255.192 Address: 192.203.17.192 -- .255

30 Interface E2 :: 128 hosts Network number: 192.203.17.0 Network mask: 255.255.255.128 Address range: 192.203.17.0 − .127 Interface E3 :: 64 hosts Network number: 192.203.17.128 Network mask: 255.255.255.192 Address range: 192.203.17.128 − .191 Interface E4 :: 64 hosts Network number: 192.203.17.192 Network mask: 255.255.255.192 Address range: 192.203.17.192 − .255

ROUTER E2 E3 E4

128 Hosts 64 Hosts 64 Hosts

slide-16
SLIDE 16

16

31

VLSM :: Current Status

  • All routing protocols do not support VLSM.

Routing Information Protocol version 1 (RIP-1) do not carry network masks in routing updates. RIP-1 cannot implement VLSM.

  • The following protocols support VLSM:

Open Shortest Path First (OSPF) RIP-2 Enhanced IGRP (EIGRP)

32

Classless Internet Domain Routing (Supernetting)

slide-17
SLIDE 17

17

33

Classless Inter-Domain Routing (CIDR)

  • The size of the global routing tables

have grown very fast in recent years.

Caused routers to become saturated. Limits to processing power and available memory. Size of the tables have doubled every 10 months or so, between 1991 and 1995.

34

  • Without any remedial measure, the

routing tables would have grown to about 80,000 routes in 1995.

  • But early 2000 data shows that the

size was around 76,000.

  • Why this reduction?

Planned IP address allocation. CIDR.

slide-18
SLIDE 18

18

35

Growth of Internet Routing Tables

10000 20000 30000 40000 50000 60000 70000 80000 '88 '94 '96 '98 '00 Year Routing Table Size

36

CIDR: Introduction

  • CIDR is a new concept to manage IP

networks.

Classless Inter Domain Routing. No concept of class A, B, C networks. Reduces sizes of routing tables.

slide-19
SLIDE 19

19

37

CIDR: Basic Idea

  • An IP address is represented by a

prefix, which is the IP address of the network.

  • It is followed by a slash, followed by

a number M.

M: number of leftmost contiguous bits to be used for the network mask. Example: 144.16.192.57 / 18

38

CIDR: An Important Rule

  • The number of addresses in each block

must be a power of 2.

  • The beginning address in each block

must be divisible by the number of addresses in the block.

A block that contains 16 addresses cannot have beginning address as 144.16.223.36. But the address 144.16.192.64 is possible.

slide-20
SLIDE 20

20

39

Example: CIDR

  • An organization is allotted a block with

beginning address:

144.16.192.24 / 29

What is the range of the block?

Start addr: 10010000 00011000 11000000 00011000 End addr: 10010000 00011000 11000000 00011111 There are 8 addresses in the block.

40

Example

  • Suppose Company A needs IP

addresses for 1000 machines

  • Assign 4 contiguous Class C address

blocks

192.60.128.0 192.60.129.0 192.60.130.0 192.60.131.0

(last 8 bits 0)

slide-21
SLIDE 21

21

41

  • Supernet:

Address : 192.60.128.0 Netmask: 255.255.252.0 (last 10 bits 0)

  • Also written as:

192.60.128.0/22 22 denotes size of network portion. Also called prefix. Routing done by prefix

42

Advantages

  • Routing table at higher levels will have
  • nly one entry for the 4 networks.
  • In classful addressing (that did not

recognize masks), would have required 4 entries for the 4 networks.

  • Possible only due to contiguous

allocation.

Higher level routers can just send it to lower level routers (in this case company A’s router) using one entry only. Lower level router will distinguish.

slide-22
SLIDE 22

22

43

  • Routing table at all higher level routers:

192.60.128.0/22 - send to host X (next hop on way to Company A’s router RA)

  • Routing table at RA:

192.60.128.0/24 – send to router of first net 192.60.129.0/24 – send to router of second net 192.60.130.0/24 – send to router of third net 192.60.131.0/24 – send to router of fourth net

RA

44

  • Routers always do longest prefix
  • match. If two entries match, longest

match is taken.

Example:

two entries in table: one for 192.65.0.0/16 and one for 192.65.128.0/24. If address is 192.65.128.4, second entry will be used even though it matches both.

slide-23
SLIDE 23

23

45

Recent Trend

  • Move on to CIDR addressing.

Existing classful networks can also be represented using this notation.

Class A: W.X.Y.Z / 8 Class B: W.X.Y.Z / 16 Class C: W.X.Y.Z / 24

  • Recent routers support CIDR.