ip address - heng sovannarith · pdf fileip address version 4 (cont.) • class b: this...

30
IP Address Heng Sovannarith [email protected]

Upload: vuongnhan

Post on 06-Mar-2018

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address

Heng Sovannarith

[email protected]

Page 2: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Introduction

• An IP (Internet Protocol) address is a unique identifier for a node or host connection on an IP network.

• Every machine on the Internet has a unique number assigned to it, called an IP address.

• Without a unique IP address on your machine, you will not be able to communicate with other devices, users, and computers on the Internet.

• You can look at your IP address as if it were a telephone number, each one being unique and used to identify a way to reach you and only you.

Page 3: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IPv4 and IPv6 Addresses

• There are two flavors of IP Addresses that can be used on a network. The first, and the version that the Internet and most routers are currently configured for, is IPv4 or Internet Protocol version 4.

• This version uses 32-bit addresses, which limits the amount of addresses to 4,294,967,296 possible unique addresses. Some of these addresses, about 290 million, are also reserved for special purposes.

• Due to the popular growth of the Internet there has been concern that the pool of possible addresses would be exhausted in the near future.

Page 4: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IPv4 and IPv6 Addresses (cont.)

• With this in mind, a new version of IP addresses was developed called IPv6, or Internet Protocol version 6, that would change the address size from 32-bit address to 128-bit addresses.

• This change would allow for generous IP address allocations to networks without any foreseeable problem with the amount of addresses available.

• In order to use IPv6 addresses, though, existing routers and hardware would need to be upgraded or configured to use this new version of IP addresses.

Page 5: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Quick Review of Binary Math

Page 6: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4

• An IP address is a 32 bit binary number usually represented as 4 decimal values, each representing 8 bits, in the range 0 to 255 (known as octets) separated by decimal points.

• This is known as "dotted decimal" notation. • Example: 10.10.20.1 • It is sometimes useful to view the values in their binary

form.

Page 7: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Address Classes

• There are 5 different address classes. You can determine which class any IP address is in by examining the first 4 bits of the IP address.

Class Start address Finish address

A 0.0.0.0 126.255.255.255

B 128.0.0.0 191.255.255.255

C 192.0.0.0 223.255.255.255

D 224.0.0.0 239.255.255.255

E 240.0.0.0 254.255.255.255

Page 8: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

• Default Network: The special network 0.0.0.0 is generally used for routing.

• Class A: From the table above you see that there are 126 class A networks. These networks consist of 16,777,214 possible IP addresses that can be assigned to devices and computers. This type of allocation is generally given to very large networks such as multi-national companies.

• Loopback: This is the special 127.0.0.0 network that is reserved as a loopback to your own computer. These addresses are used for testing and debugging of your programs or hardware.

Page 9: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

Page 10: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

• Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible IP addresses. These blocks are generally allocated to Internet Service Providers and large networks, like a college or major hospital.

• Class C: There is a total of 2,097,152 Class C networks available, with each network consisting of 255 individual IP addresses. This type of class is generally given to small to mid-sized companies.

• Class D: The IP addresses in this class are reserved for a service called Multicast. it will not be discussed in this tutorial.

• Class E: The IP addresses in this class are reserved for experimental use. it will not also be discussed in this tutorial.

• Broadcast: This is the special network of 255.255.255.255, and is used for broadcasting messages to the entire network that your computer resides on..

Page 11: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

• Every IP address consists of two parts, one identifying the network and one identifying the node.

• The Class of the address and the subnet mask determine which part belongs to the network address and which part belongs to the node address.

Page 12: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible
Page 13: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

• Now we can see how the Class determines, by default, which part of the IP address belongs to the network (N, in blue) and which part belongs to the node (n, in red). – Class A --

NNNNNNNN.nnnnnnnn.nnnnnnnn.nnnnnnnn – Class B --

NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn – Class C --

NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn

Page 14: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

Page 15: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

• In the example, 140.179.220.200 is a Class B address so by default the Network part of the address (also known as the Network Address) is defined by the first two octets (140.179.x.x) and the node part is defined by the last 2 octets (x.x.220.200).

• In order to specify the network address for a given IP address, the node section is set to all "0"s.

• In our example, 140.179.0.0 specifies the network address for 140.179.220.200.

• When the node section is set to all "1"s, it specifies a broadcast that is sent to all hosts on the network. 140.179.255.255 specifies the example broadcast address. Note that this is true regardless of the length of the node section.

Page 16: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

• Private Addresses

– There are also blocks of IP addresses that are set aside for internal private use for computers not directly connected to the Internet.

– These IP addresses are not supposed to be routed through the Internet, and most service providers will block the attempt to do so.

– These IP addresses are used for internal use by company or home networks that need to use TCP/IP but do not want to be directly visible on the Internet.

Page 17: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

Class Private Start Address Private End Address

A 10.0.0.0 10.255.255.255

B 172.16.0.0 172.31.255.255

C 192.168.0.0 192.168.255.255

• If you are on a home/office private network and want to use TCP/IP, you should assign your computers/devices IP addresses from one of these three ranges.

These Private Address ranges are:

Page 18: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

• Private addresses may be used by any organization, without any requirement for registration.

• Because private addresses are ambiguous - can’t tell where they’re coming from or going to because anyone can use them – private addresses are not permitted to be routed across the Internet.

• ISPs block private addresses from being routed across their infrastructure.

Page 19: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Public Address

Page 20: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

IP Address Version 4 (cont.)

• Common Problems and Resolutions – The most common problem people have is by accident assigning an IP address

to a device on your network that is already assigned to another device. When this happens, the other computers will not know which device should get the information, and you can experience erratic behavior. On most operating systems and devices, if there are two devices on the local network that have the same IP address, it will generally give you a "IP Conflict" warning. If you see this warning, that means that the device giving the warning, detected another device on the network using the same address.

– The best solution to avoid a problem like this is to use a service called DHCP that almost all home routers provide. DHCP, or Dynamic Host Configuration Protocol, is a service that assigns addresses to devices and computers. You tell the DHCP server what range of IP addresses you would like it to assign, and then the DHCP server takes the responsibility of assigning those IP addresses to the various devices and keeping track so those IP addresses are assigned only once.

Page 21: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Subnetting

• Subnetting an IP Network can be done for a variety of reasons, including organization, use of different physical media (such as Ethernet, WAN, etc.), preservation of address space, and security.

• Subnetting is a technique used to break down (or partition) networks into subnets. The subnets are created through the use of subnet masks.

• The most common reason is to control network traffic. In an Ethernet network, all nodes on a segment see all the packets transmitted by all the other nodes on that segment. Performance can be adversely affected under heavy traffic loads, due to collisions and the resulting retransmissions.

Page 22: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Subnetting (cont.)

• A router is used to connect IP networks to minimize the amount of traffic each segment must receive.

• A Subnet mask used to determine what network address an IP address belongs to.

Network Address = IP Address AND Subnet Mask . • Subnets are created by borrowing bits from the

host portion of the IP address. • The network portion of the IP address and the

new subnet bits are used to define the new subnet.

Page 23: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible
Page 24: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Example

• An organization has been assigned the network number 193.1.1.0/24 and it needs to define six subnets. The largest subnet is required to support 25 hosts.

• The first step is to determine the number of bits required to define the six subnets. Since a network address can only be subnetted along binary boundaries, subnets must be created in blocks of powers of two [ 2 (21), 4 (22), 8 (23), 16 (24), etc. ].

• Thus, it is impossible to define an IP address block such that it contains exactly six subnets. For this example, the network administrator must define a block of 8 (2^3) and have two unused subnets that can be reserved for future growth.

Page 25: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Example (cont.)

• Since 8 = 23, three bits are required to enumerate the eight subnets in the block. In this example, the organization is subnetting a /24 so it will need three more bits, or a /27, as the extended-network-prefix. A 27-bit extended-network-prefix can be expressed in dotted-decimal notation as 255.255.255.224.

Page 26: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Example (cont.)

Page 27: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Example (cont.)

• Network Address : 193.1.1.0

• Class : C

• Default Subnet Mask: 255.255.255.0

• Total number of subnets: 2^3 = 8

• Number of bits borrowed: 3

• Custom subnet mask: 255.255.255.224

• Number of usable addresses: (2^5)-2=30

Page 28: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Example (cont.)

Page 29: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

Subnetting (cont.)

• There are several pros and cons of the subnetting. By organizing hosts into logical groups, subnetting can improve network security and performance.

• But while improving network performance, subnetting increases routing complexity, since each locally connected subnet is typically represented by one row in the routing tables in each connected router.

• However, subnetting allows the network to be logically divided regardless of the physical layout of a network, since it is possible to divide a physical network into several subnets by configuring different host computers to use different routers.

Page 30: IP Address - Heng Sovannarith · PDF fileIP Address Version 4 (cont.) • Class B: This class consists of 16,384 individual networks, each allocation consisting of 65,534 possible

More Exercises on Subnetting

Network Address Number of Subnets

118.0.0.0 126

178.100.0.0 2048

200.175.14.0 4

128.77.0.0 62

198.100.10.0 4

101.0.0.0 256

218.35.50.0 8

172.56.0.0 16

172.59.0.0 1024

23.0.0.0 524288

192.10.10.0 16

165.100.0.0 1024