119 IP Addressing Surasak Sanguanpong nguanku ac th

  • Slides: 19
Download presentation
1/19 IP Addressing Surasak Sanguanpong nguan@ku. ac. th http: //www. cpe. ku. ac. th/~nguan

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 browser What is the IP address of DNS www.

2/19 Hostname and IP Address browser What is the IP address of DNS www. isoc. org? l l www. isoc. org is 198. 6. 250. 9 l 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 www. isoc. org (198. 6. 250. 9) Applied Network Research Group Department of Computer Engineering, Kasetsart University

3/19 IP Address 32 bits 10101010 8 bits l 198. 6. 250. 9 written

3/19 IP Address 32 bits 10101010 8 bits l 198. 6. 250. 9 written in decimal form with decimal points (Dot-decimal Notation) Applied Network Research Group l 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 Department of Computer Engineering, Kasetsart University

4/19 IP Address with router l An IP address is associated with an interface

4/19 IP Address with router l 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. 244. 2 192. 150. 244. 3 192. 150. 244. 1 Applied Network Research Group Department of Computer Engineering, Kasetsart University

5/19 Addressing concept l Partitions address into 2 fields l Network address (define a

5/19 Addressing concept l Partitions address into 2 fields l Network address (define a network) l Node address (specific a device on the network) network 1 1. 1. 1. 2 network 2 1. 1. 1. 3 2. 2. 1. 2 1. 1 2. 2. 1. 3 2. 2. 1. 1 3. 3. 1. 1 network 3 Applied Network Research Group Department of Computer Engineering, Kasetsart University

6/19 IP Addressing 8, 16, 24 bits from NIC Network 32 bits Host Identify

6/19 IP Addressing 8, 16, 24 bits from NIC Network 32 bits Host Identify a host Identify a network Applied Network Research Group Department of Computer Engineering, Kasetsart University

7/19 IP Address Class 8 Class A 0 Network ID Class B 10 Class

7/19 IP Address Class 8 Class A 0 Network ID Class B 10 Class C 110 Class D 1110 Class E 11110 16 24 32 Host ID Network ID Host ID Multicast Address 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 Class A 0. 0. 0 0. 0 to 127. 0.

8/19 IP Address Network Class A 0. 0. 0 0. 0 to 127. 0. 0. 0 0. 0 128. 0. 0. 0 to 191. 255. 0. 0 0 192. 0. 0. 0 to 239. 255. 0 0 to 127 Class B 128 to 191 0 to 255 Class C 192. 0. 192 to 223 0 to 255 Class D 224. 0. 0 Class E 240. 0. 0 Applied Network Research Group Department of Computer Engineering, Kasetsart University

9/19 Number of Networks and Hosts Class Number of Networks A 27 -2=126 B

9/19 Number of Networks and Hosts Class Number of Networks A 27 -2=126 B 214 -2=16, 384 C 221 -2=2, 097, 152 D E Not applicable Applied Network Research Group Number of Hosts 224 -2=16, 277, 214 216 -2=65, 534 28 -2=254 Not applicable Department of Computer Engineering, Kasetsart University

10/19 Special Addresses Reserved addresses that are not allowed to be assigned to any

10/19 Special Addresses Reserved addresses that are not allowed to be assigned to any node Net. ID Host. ID Purpose any All 0 s Network Address any All 1 s Directed Broadcast Address All 1 s Limited Broadcast Address All 0 s 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 63. 0. 0. 1 Class B 158.

11/19 Network Address : Example Class A 63. 0. 0. 1 Class B 158. 108. 2. 71 63. 0. 0. 2 Network 158. 108. 0. 0 Broadcast : 158. 108. 255 Network 63. 0. 0. 0 Broadcast 63. 255 Class C 158. 108. 2. 72 203. 15. 5. 3 203. 15. 5. 4 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 203. 15. 5. 3 203. 15. 5. 4 Directed Broadcast

12/19 Directed Broadcast Address 203. 15. 5. 3 203. 15. 5. 4 Directed Broadcast Address n Broadcast to a specific subnet n 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 203. 15. 5. 3 n

13/19 Limited Broadcast Address : Example Limited Broadcast Address 203. 15. 5. 3 n 203. 15. 5. 4 n Broadcast to all hosts on my network Router blocks limited broadcast address to the subnet 203. 15. 5. 1 255 203. 15. 5. 5 Applied Network Research Group Note : An class E address Department of Computer Engineering, Kasetsart University

14/19 This host on this network Address Bootstrap Server A diskless client uses 0.

14/19 This host on this network Address Bootstrap Server A diskless client uses 0. 0 as a source address for requesting a service from a bootstrap server class A address Source : 0. 0 Destination : 255 class E address 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 TCP/UDP IP Process B Loopback driver Datalink Physical n

15/19 Loopback Address Process A TCP/UDP IP Process B Loopback driver Datalink Physical n Pseudo interface that allows a host to use IP to talk to its own services n Most system assign the IP address of 127. 0. 0. 1 and assign it the name localhost Applied Network Research Group A packet that has been sent to loopback address never leaves the machine Department of Computer Engineering, Kasetsart University

16/19 Private Address Space Class A B C l l l Networks 10. 0

16/19 Private Address Space Class A B C l l l Networks 10. 0 172. 16. 0. 0 to 172. 31. 0. 0 192. 168. 0. 0 to 192. 168. 255. 0 Number 1 16 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 : l l l Experiment or isolated network Internal Security Applied Network Research Group Department of Computer Engineering, Kasetsart University

17/19 ifconfig l See your IP address and subnet mask with Unix’s interface configuration

17/19 ifconfig l 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 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 eth 0 Link encap: Ethernet HWaddr 00: 10: 4 B: 13: 0 A: BC inet addr: 172. 16. 32. 6 Bcast: 172. 16. 32. 63 Mask: 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: 0 xb 800 Applied Network Research Group Department of Computer Engineering, Kasetsart University

18/19 Problems with Class assignment l l Class A takes 50% range, class B

18/19 Problems with Class assignment l l Class A takes 50% range, class B 25%, class C 12. 5% These lead to : l l B A C address wasteful (specially in class A) running out of IP address E Applied Network Research Group D Department of Computer Engineering, Kasetsart University

19/19 HOW IR assigns IP address (RFC 1466) l l Class A : no

19/19 HOW IR assigns IP address (RFC 1466) l l Class A : no allocations will be made at this time Class B : allocations will be restricted. To apply: l l l 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 Europe Others North America Central/South America Pacific Rim Others IANA reserved Applied Network Research Group 192. 0. 0. 0 - 193. 255 194. 0. 0. 0 - 195. 255 196. 0. 0. 0 - 197. 255 198. 0. 0. 0 - 199. 255 200. 0 - 201. 255 202. 0. 0. 0 - 203. 255 204. 0. 0. 0 - 205. 255 206. 0. 0. 0 - 207. 255 208. 0. 0. 0 - 223. 255 Department of Computer Engineering, Kasetsart University