Hostname and IP Address Each node is assigned with browser DNS - - PDF document

hostname and ip address
SMART_READER_LITE
LIVE PREVIEW

Hostname and IP Address Each node is assigned with browser DNS - - PDF document

1/19 IP Addressing Surasak Sanguanpong nguan@ku.ac.th http://www.cpe.ku.ac.th/~nguan Last updated: 27 June 2002 Applied Network Research Group Department of Computer Engineering, Kasetsart University 2/19


slide-1
SLIDE 1

Applied Network Research Group Department of Computer Engineering, Kasetsart University

1/19

IP Addressing

Surasak Sanguanpong nguan@ku.ac.th http://www.cpe.ku.ac.th/~nguan

Last updated: 27 June 2002

Applied Network Research Group Department of Computer Engineering, Kasetsart University

2/19

Hostname and IP Address

What is the IP address of

www.isoc.org?

browser DNS

www.isoc.org

is 198.6.250.9

www.isoc.org

(198.6.250.9) Packets for 198.6.250.9

  • Each node is assigned with

a name and address

  • A DNS reponds to the

name-to IP address mapping

  • The IP address is used by

the client to create packets with IP destination address

slide-2
SLIDE 2

Applied Network Research Group Department of Computer Engineering, Kasetsart University

3/19

IP Address

  • A 32 bit address that

uniquely identifies a node

  • Two devices can never

have the same address

  • The dot notation is

easily for reading and writing

198.6.250.9 198.6.250.9

32 bits

written in decimal form with decimal points (Dot-decimal Notation)

10101010 10101010 10101010 10101010 8 bits 8 bits 8 bits 8 bits

Applied Network Research Group Department of Computer Engineering, Kasetsart University

4/19

IP Address with router

  • An IP address is associated with an interface (not a machine)

158.108.15.2 158.108.15.3 158.108.16.2 158.108.16.3 192.150.244.2 192.150.244.3 158.108.15.1 158.108.16.1 192.150.250.1 192.150.250.2 192.150.244.1

slide-3
SLIDE 3

Applied Network Research Group Department of Computer Engineering, Kasetsart University

5/19

Addressing concept

  • Partitions address into 2 fields

Network address (define a network) Node address (specific a device on the network)

1.1.1.2 1.1.1.3 2.2.1.2 2.2.1.3 1.1.1.1 2.2.1.1 3.3.1.1

network 1 network 2 network 3

Applied Network Research Group Department of Computer Engineering, Kasetsart University

6/19

8,16, 24 bits from NIC

IP Addressing

Network

32 bits

Identify a network Identify a host Host

slide-4
SLIDE 4

Applied Network Research Group Department of Computer Engineering, Kasetsart University

7/19

IP Address Class

Class A Class B Class C 1110 Multicast Address Class D 11110 Reserved Class E 8 16 24 32 Network ID 10 Network ID 110 Host ID Host ID Network ID Host ID

Note: No Network ID and Host ID on Class D and Class E

Applied Network Research Group Department of Computer Engineering, Kasetsart University

8/19

IP Address Network

128 to 191 0 to 255 0 to 127 192 to 223 0 to 255 0 to 255 Class A Class B Class C

224. 0. 0.

Class D 0.0.0.0 to 127.0.0.0 128.0.0.0 to 191.255.0.0 192.0.0.0 to 239.255.255.0

240. 0. 0.

Class E

128. 0. 0. 0. 0. 0. 192. 0. 0.

slide-5
SLIDE 5

Applied Network Research Group Department of Computer Engineering, Kasetsart University

9/19

Number of Networks and Hosts

A B C 27-2=126 214-2=16,384 221-2=2,097,152 224-2=16,277,214 216-2=65,534 28-2=254 Class Number of Networks Number of Hosts D E Not applicable Not applicable Not applicable Not applicable

Applied Network Research Group Department of Computer Engineering, Kasetsart University

10/19

Special Addresses

Network Address

All 0s any Purpose HostID NetID

Directed Broadcast Address

All 1s any

Limited Broadcast Address

All 1s All 1s

This host on this network

All 0s All 0s

Loopback Address

any 127

Reserved addresses that are not allowed to be assigned to any node

slide-6
SLIDE 6

Applied Network Research Group Department of Computer Engineering, Kasetsart University

11/19

Network Address : Example

63.0.0.1 63.0.0.2 158.108.2.71 158.108.2.72

Network 63.0.0.0 Broadcast 63.255.255.255 Network 158.108.0.0 Broadcast : 158.108.255.255

203.15.5.3 203.15.5.4

Network 203.15.5.0 Broadcast : 203.15.5.255 Class A Class B Class C

Applied Network Research Group Department of Computer Engineering, Kasetsart University

12/19

Directed Broadcast Address

203.15.5.3 203.15.5.4 203.15.5.5 203.15.5.1 203.15.5.255

Broadcast to a specific

subnet

Router forwards directed

broadcast address to the subnet Directed Broadcast Address

slide-7
SLIDE 7

Applied Network Research Group Department of Computer Engineering, Kasetsart University

13/19

Limited Broadcast Address : Example

Broadcast to all hosts on

my network

Router blocks limited

broadcast address to the subnet Limited Broadcast Address

203.15.5.3 203.15.5.4 203.15.5.5 203.15.5.1 255.255.255.255

Note : An class E address

Applied Network Research Group Department of Computer Engineering, Kasetsart University

14/19

This host on this network Address

A diskless client uses 0.0.0.0 as a source address for requesting a service from a bootstrap server

Bootstrap Server Source : 0.0.0.0 Destination : 255.255.255.255

class E address class A address

0.0.0.0 is also used by routers to advertise the default route

slide-8
SLIDE 8

Applied Network Research Group Department of Computer Engineering, Kasetsart University

15/19

Loopback Address

Pseudo interface that allows a host

to use IP to talk to its own services

Most system assign the IP address

  • f 127.0.0.1 and assign it the name

localhost

Process A Process B TCP/UDP IP Datalink

Loopback driver

Physical

A packet that has been sent to loopback address never leaves the machine

Applied Network Research Group Department of Computer Engineering, Kasetsart University

16/19

Private Address Space

A B C 10.0.0.0 172.16.0.0 to 172.31.0.0 192.168.0.0 to 192.168.255.0 Class Networks 1 16 256 Number

  • RFC 1918 defines special IP address blocks of Class A, B and C that

will be isolated from the Internet

  • Any organization can use any address from this set without any

permission.

  • Purposes :
  • Experiment or isolated network
  • Internal
  • Security
slide-9
SLIDE 9

Applied Network Research Group Department of Computer Engineering, Kasetsart University

17/19

ifconfig

  • See your IP address and subnet mask with Unix’s interface

configuration command :

$ ifconfig -a lo Link encap:Local Loopback inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0 UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1 RX packets:4849 errors:0 dropped:0 overruns:0 frame:0 TX packets:4849 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 eth0 Link encap:Ethernet HWaddr 00:10:4B:13:0A:BC inet addr:172.16.32.6 Bcast:172.16.32.63 Mask:255.255.255.192 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1131930 errors:0 dropped:0 overruns:0 frame:0 TX packets:1305924 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 Interrupt:10 Base address:0xb800

Applied Network Research Group Department of Computer Engineering, Kasetsart University

18/19

Problems with Class assignment

  • Class A takes 50% range, class B

25%, class C 12.5%

  • These lead to :
  • address wasteful (specially in class A)
  • running out of IP address

A B C D E

slide-10
SLIDE 10

Applied Network Research Group Department of Computer Engineering, Kasetsart University

19/19

HOW IR assigns IP address (RFC1466)

  • Class A : no allocations will be made at this time
  • Class B : allocations will be restricted. To apply:
  • rganization presents a subnetting more than 32 subnets
  • rganization has more than 4096 hosts
  • Class C : divided into allocated

blocks to distributed regional

Multi-regional Europe Others North America Central/South America Pacific Rim Others Others IANA reserved 192.0.0.0 - 193.255.255.255 194.0.0.0 - 195.255.255.255 196.0.0.0 - 197.255.255.255 198.0.0.0 - 199.255.255.255 200.0.0.0 - 201.255.255.255 202.0.0.0 - 203.255.255.255 204.0.0.0 - 205.255.255.255 206.0.0.0 - 207.255.255.255 208.0.0.0 - 223.255.255.255