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 Each node is assigned with � browser DNS What is the IP address of a name and address www.isoc.org? A DNS reponds to the � name-to IP address www.isoc.org mapping is 198.6.250.9 The IP address is used by � the client to create packets Packets for 198.6.250.9 with IP destination address www.isoc.org (198.6.250.9) Applied Network Research Group Department of Computer Engineering, Kasetsart University
3/19 IP Address 32 bits A 32 bit address that � 10101010 10101010 10101010 10101010 uniquely identifies a node 8 bits 8 bits 8 bits 8 bits Two devices can never � have the same address 198.6.250.9 198.6.250.9 The dot notation is � easily for reading and written in decimal form writing with decimal points (Dot-decimal Notation) 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 158.108.16.1 158.108.15.1 192.150.250.1 192.150.250.2 192.150.244.2 192.150.244.3 192.150.244.1 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) network 1 network 2 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 3 Applied Network Research Group Department of Computer Engineering, Kasetsart University 6/19 IP Addressing 32 bits 8,16, 24 bits from NIC Network Host Identify a host Identify a network Applied Network Research Group Department of Computer Engineering, Kasetsart University
7/19 IP Address Class 8 16 24 32 Class A 0 Network ID Host ID Class B 10 Network ID Host ID Class C 110 Network ID Host ID Class D 1110 Multicast Address Class E 11110 Reserved 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 0. 0. 0. 0 Class A 0.0.0.0 to 127.0.0.0 0 to 127 128. 0. 0. 0 Class B 128.0.0.0 to 191.255.0.0 128 to 191 0 to 255 192. 0. 0. 0 Class C 192.0.0.0 to 239.255.255.0 192 to 223 0 to 255 0 to 255 224. 0. 0. 0 Class D 240. 0. 0. 0 Class E Applied Network Research Group Department of Computer Engineering, Kasetsart University
9/19 Number of Networks and Hosts Class Number of Networks Number of Hosts A 2 7 -2=126 2 24 -2=16,277,214 B 2 14 -2=16,384 2 16 -2=65,534 C 2 21 -2=2,097,152 2 8 -2=254 D Not applicable Not applicable E Not applicable Not applicable Applied Network Research Group Department of Computer Engineering, Kasetsart University 10/19 Special Addresses Reserved addresses that are not allowed to be assigned to any node NetID HostID Purpose any All 0s Network Address any All 1s Directed Broadcast Address All 1s All 1s Limited Broadcast Address All 0s All 0s This host on this network 127 any Loopback Address Applied Network Research Group Department of Computer Engineering, Kasetsart University
11/19 Network Address : Example Class A Class B 63.0.0.1 63.0.0.2 158.108.2.71 158.108.2.72 Network 63.0.0.0 Network 158.108.0.0 Broadcast 63.255.255.255 Broadcast : 158.108.255.255 203.15.5.3 203.15.5.4 Class C Network 203.15.5.0 Broadcast : 203.15.5.255 Applied Network Research Group Department of Computer Engineering, Kasetsart University 12/19 Directed Broadcast Address Directed Broadcast Address � Broadcast to a specific 203.15.5.3 203.15.5.4 subnet � Router forwards directed broadcast address to the subnet 203.15.5.1 203.15.5.255 203.15.5.5 Applied Network Research Group Department of Computer Engineering, Kasetsart University
13/19 Limited Broadcast Address : Example Limited Broadcast Address � Broadcast to all hosts on 203.15.5.3 203.15.5.4 my network � Router blocks limited broadcast address to the subnet 203.15.5.1 255.255.255.255 203.15.5.5 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 Bootstrap Server as a source address for requesting a service from a bootstrap server class A address Source : 0.0.0.0 Destination : 255.255.255.255 class E address 0.0.0.0 is also used by routers to advertise the default route Applied Network Research Group Department of Computer Engineering, Kasetsart University
15/19 Loopback Address Process A Process B TCP/UDP Loopback driver IP Datalink Physical � Pseudo interface that allows a host A packet that has been sent to use IP to talk to its own services to loopback address � Most system assign the IP address never leaves the machine of 127.0.0.1 and assign it the name localhost Applied Network Research Group Department of Computer Engineering, Kasetsart University 16/19 Private Address Space Class Networks Number A 10.0.0.0 1 B 172.16.0.0 to 172.31.0.0 16 C 192.168.0.0 to 192.168.255.0 256 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 � 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 � B 25%, class C 12.5% A These lead to : � C address wasteful (specially in class A) � running out of IP address � D E 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: � � organization presents a subnetting more than 32 subnets � organization has more than 4096 hosts Class C : divided into allocated � blocks to distributed regional Multi-regional 192.0.0.0 - 193.255.255.255 Europe 194.0.0.0 - 195.255.255.255 Others 196.0.0.0 - 197.255.255.255 North America 198.0.0.0 - 199.255.255.255 Central/South America 200.0.0.0 - 201.255.255.255 Pacific Rim 202.0.0.0 - 203.255.255.255 Others 204.0.0.0 - 205.255.255.255 Others 206.0.0.0 - 207.255.255.255 IANA reserved 208.0.0.0 - 223.255.255.255 Applied Network Research Group Department of Computer Engineering, Kasetsart University
Recommend
More recommend