IP Address

27
1 IP Address Computer Network System Sirak Kaewjamnong

description

IP Address. Computer Network System Sirak Kaewjamnong. Three Level of Address. Host name ratree.psu.ac.th Internet IP address 192.168.100.3 (32 bits address with “ dot-decimal ” notation) - PowerPoint PPT Presentation

Transcript of IP Address

Page 1: IP Address

1

IP Address

Computer Network SystemSirak Kaewjamnong

Page 2: IP Address

2

Three Level of Address

• Host name– ratree.psu.ac.th

• Internet IP address– 192.168.100.3

- (32 bits address with “dot decimal” notation)

• Station address : Hardware address assi gned to network interface card, refer to

MAC address or Ethernet Address 48(bi t s)–00503004

Page 3: IP Address

3

Converting Host Name to MAC Address

cs05.cs.psu.ac.th

172.28.80.96

00:50:ba:49:9d:b9

Resolve IP address by Domain Name System(DNS)

Resolve MAC address by Address Resolution Protocol(ARP)

Page 4: IP Address

4

IP Address with Router

IP address associated with interface (not machine)

• Each interface has its own IP address

• Machine with more than one interface called multi-home

• Router is multi-homed machine

• Multi-homed not to be router

172.28.80.15172.28.80.16172.28.85.116172.28.85.120

172.28.85.1172.28.80.1

192.168.100.3192.168.100.4

192.168.100.1

192.168.99.39

192.168.98.11

Internet

Page 5: IP Address

5

Addressing Concept

• Partitions address into 2 fields* network address* node address

Page 6: IP Address

6

IP Address

Network Host

32 bits

8,16,24 bits

8 bits 8 bits 8 bits 8 bits

32 bits

172 28 80 96. . .10101100000111000101000001100000

Page 7: IP Address

7

IP Address Class

32 bits address length, contain 2 parts

• Network identifier• Host identifier

Class A8 16 24 32

Host IDNetwork ID0

Multicast Address1110

Unused11110

Host IDNetwork ID110

Host IDNetwork ID10Class B

Class C

Class DClass E

Page 8: IP Address

8

IP Address Class

A 0 7 24 0.0.0.0 -127.255.255.255 224 16,677,214

B 10 14 16 128.0.0.0 -191.255.255.255 216 65,534

C 110 21 8 192.0.0.0 -223.255.255.255 28 254

D 1110 28 - 224.0.0.0-239.255.255.255

E 11110 27 - 240.0.0.0-247.255.255.255

ClassInitial bits

Bit net

Bithost range address

spacesusable

Page 9: IP Address

9

Special Address• Host ID 0“all s” is reserved to refer to network

number– 1921681000 15810800. . . , . . . ,18000. . .

• Host ID “ 1 ”all s is reserved to bbbbbbbbb bb bbb b osts on a specific network

– 192168100255 1581082. . . , . . 55255 18255255255. , . . .

• Address 0.0.0.0 means “defaultroute”• mmmmm 127000 “this node” (local loopb

ack). Message sent to this address will never lea ve the local host

• 255255255255Address . . . is reser ve t o broadcast to every host on the local n

etwork (limited broadcast)

Page 10: IP Address

10

Problem with Class Assignment

• Class A takes 50 % range

• Class B takes 25 % range

• Class C take 12.5 % range

These leads to:• address wasteful

(specially in class A)• running out of IP address

Class AClass B

CD

E

Page 11: IP Address

11

How to assigns IP Address (RFC 1466)

• Class A : no allocations will be made at this time

• Class B: allocations will be restricted. To apply:– organization presents a subnetting more

than32 subnets– organization more than 4096 hosts

• class C: divided into allocated block to distributed reginal

Page 12: IP Address

12

Class C Assignment • Assignment is based on the subscriber ‘s 24 month

projection according to the criteria:1. Requires fewer than 256 addresses : 1 class C

network2. Requires fewer than 512 addresses : 2 contiguous

class C networks3. Requires fewer than 1024 addresses : 4 contiguous

class C networks4. Requires fewer than 2048 addresses : 8 contiguous

class C networks5. Requires fewer than 4096 addresses : 16 contiguous

class C networks6. Requires fewer than 8192 addresses : 32 contiguous

class C networks7. Requires fewer than 16384 addresses : 64 contiguous

class C networks

Page 13: IP Address

13

Problem with Large Network

•Class B “Flat Network” more than 60,000 hosts–How to manage?–Performance?...150.0.0.1150.0.0.2 150.0.255.254

Page 14: IP Address

14

Problem with Large Network

•Class B “subdivided network” to smaller group with router

150.0.10.1150.0.10.2

150.0.40.1150.0.40.2

150.0.200.1150.0.200.2

150.0.1.1150.0.1.2

Router

Page 15: IP Address

15

Subnetwork Benefits

• Increase the network manager’s control the address space

• Easy to allocate the address space• Better network performance• Hide routing structure from remote routers,

thus reducing routes in their routing tables• Subdivide on IP network number is an

important initial task of network managers

Page 16: IP Address

16

How to assign subnet• Divide host ID into 2 pieces

• Class B address such as 150.0 might use its third byte to identify subnet– subnet1 150.0.1.X X = host address

range from 1-254– subnet2 150.0.200.X

Network IDSubnet addressHost address

host ID

Choose

appropriate size

Page 17: IP Address

17

Subnet Mask

• 32 bit number, tell router to recognize the subnet field, call subnet mask

• subnet rule: The bit covering the network and subnet part of address are set to 1

• Example class B with 24 bits mask1111 1111 1111 1111 1111

1111 0000 0000 subnet mask = 255.255.255.0

* zero bit are used to mask out the host number resulting the network address

Page 18: IP Address

18

Subnet Mask 2552552550Subnet mask . . . for cl

m mmmmmm:• 254network has been partition to subnets

150101 15010254. . .X to . . .X• mmmmmmm mm mmmmmmm mmmm mmmm mmmmmm mmmmmmm “”

mmmmmmm15010155. . . 15010240243

mmm mmm2552552550. . .2552552550. . .1501000. . . 1501000. . .

same network address

Page 19: IP Address

19

Subnet Mask Bits

Use contiguous subnet mask 128 64 32 16 8 4 2 1 1 0 0 0 0 0 0 0 =

128 1 1 0 0 0 0 0 0 =

192 1 1 1 0 0 0 0 0 = 224 1 1 1 1 0 0 0 0 = 240 1 1 1 1 1 0 0 0 = 248 1 1 1 1 1 1 0 0 = 252 1 1 1 1 1 1 1 0 = 254 1 1 1 1 1 1 1 1 = 255

Page 20: IP Address

20

Subnet Class B Example• 255.255.0.0 (0000 0000 0000 0000)

0 subnet with 65534 hosts (default subnet)

• 255.255.192.0 (1100 0000 0000 0000)2 subnets with 16382 hosts

• 255.255.252.0 (1111 1100 0000 0000)62 subnets with 1022 hosts

• 255.255.255.0 (1111 1111 0000 0000)254 subnets with 254 hosts

• 255.255.255.252 (1111 1111 1111 11000)16382 subnets with 2 hosts

Page 21: IP Address

21

Subnet Class C Example

• 255.255.255.0 ( 0000 0000)0 subnets with 254 hosts (default subnet)

• 255.255.255.192 (1100 0000)2 subnets with 62 hosts

• 255.255.255.224 (1110 0000)6 subnets with 30 hosts

• 255.255.255.240 (1111 0000)14 subnets with 14 hosts

Page 22: IP Address

22

Subnet Interpretation

IP Address Subnet mask Interpretation158.108.2.71 255.255.255.0 host 71 on subnet

158.108.2.0150.10.25.3 255.255.255.192 host 3 on subnet

150.10.25.0130.122.34.132 255.255255.192 host 4 on

subnet 130.122.34.128200.190.155.66 255.255.255.192 host 2 on

subnet 200.190.155.6418.20.15.2 255.255.0.0 host 15.2 on subnet

18.20.0.0

Page 23: IP Address

23

Class B Subnet with Router Router is used to separate

network

Picture from Kasetsart University

Page 24: IP Address

24

Subnet Routing

Traffic is route to a host by looking “bit wise AND” results

if dest IP addr & subnet mask = = my IP addr & subnet mask

send packet on local network { dest IP addr is on the sa me subnet}

else

send packet to router {dest IP address is on difference subnet}

Page 25: IP Address

25

Type of Subnet

• Static subnet: all subnets in the subnetted network use the same subnet mask– pros: simply to implement, easy to maintain– cons: wasted address space (consider a

network of 4 hosts with 255.255.255.0 wastes 250 IPs)

• Variable Length Subnet : the subnets may use difference subnet masks– pros: utilize address space– cons: required well managment

Page 26: IP Address

26

Variable Length Subnet Mask• General idea of VLSM

– A small subnet with only a few host s needs a subnet mask that accom

modate only few hosts– A subnet with many hosts need a s

ubnet mask to accomdate the larg e number of hosts

• Network Manager’s responsibility to design and appropriate VLSM

Page 27: IP Address

27

VLSM Sample Case

Picture from Kasetsart university