Top Banner

of 30

IP Internet Protocol Address_doc

Jun 04, 2018

Download

Documents

Raafat Younis
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/13/2019 IP Internet Protocol Address_doc

    1/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    1

    Contents1 IP Address 3 1.1 IP Address Format 3 1.2 Class Subdivision 4 1.3 IP Private Adresses 10 2 Subnetting 11 2.1 The Mask 11 2.2 Subnetting example on Class A 12 2.3 Subnetting example on Class C 17 3 IPCONFIG 18

    4

    IP and Internetworking devices 19

    4.1 IP and Bridge 19 4.2 IP and Router 21 5 Ipv4 and Ipv6 24 6 Exercise 25 7 Solution 29

    IP Internet Protocol Address

  • 8/13/2019 IP Internet Protocol Address_doc

    2/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks2

  • 8/13/2019 IP Internet Protocol Address_doc

    3/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    3

    1 IP Address

    1.1 IP Address FormatThe IP address format is a decimal number composed by 32 bits (4 bytes)

    Fig. 1 IP Address Format

  • 8/13/2019 IP Internet Protocol Address_doc

    4/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks4

    1.2 Class Subdivision

    The most used addresses are subdivided in 3 main classes. Class A small number of networks and many hosts for each network.

    Class B a medium number of networks and hosts inside each network.

    Class C very high number of networks and a small number of hosts in eachnetwork.

    Class D reserved for Multicast addresses

    Class E future useWith the name "host" is possible to identify a PC or a general network element.

    Other classes are in development.

    Fig. 2 Main three IP Class subdivision

  • 8/13/2019 IP Internet Protocol Address_doc

    5/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    5

    1.2.1 Class A

    Class indication depend on the first bit of the first byte The network number is identifiable by the first byte

    On the first byte:Minimum binary digit 00000001 = 1 in decimal

    Maximum binary digit 01111110 = 126 in decimal

    all 0 and all 1 is not possible

    Network ranges from 1 .0.0.0 to 126 .0.0.0

    Network 127.0.0.0 ( all 1 in binary, cannot be used) Total number of network 126

    Number of addressable hosts in 24 bits is 2 24 = 16777216

    Fig. 3 Class A

  • 8/13/2019 IP Internet Protocol Address_doc

    6/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks6

    1.2.2 Class B

    Class indication depend on the first two bits of the first byte The network number is identifiable by the first byte

    Minimum binary digit 10 000000 = 128 in decimal

    Maximum binary digit 10 111111 = 191 in decimal

    All 0 and all 1 no possible

    Network ranges from 128 .1.0.0 to 191 .254.0.0

    Total number of networks = 2 14 = 16384 -2 = 16382

    Number of addressable hosts in 16 bits is 2 16 = 65536 -2 = 65534

    Fig. 4 Class B

  • 8/13/2019 IP Internet Protocol Address_doc

    7/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    7

    1.2.3 Class C

    Class indication depend on the first three bits of the first byte The network number is identifiable by the first byte

    Minimum binary digit 110 00000 = 192 in decimal

    Maximum binary digit 110 11111 = 223 in decimal

    All 0 and all 1 no possible

    Network ranges from 192 .0.1.0 to 223 .255.254.0

    Total number of networks = 2 21 = 2097152 -2 = 2097150

    Number of addressable hosts in 8 bits is 2 8= 256 -2 = 254

    Fig. 5 Class C

  • 8/13/2019 IP Internet Protocol Address_doc

    8/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks8

    1.2.4 Class Address Summary

    The high order bits of the first octets, are used to determine how many bytes ofthe IP address identify the Network and how many identify the Host.

    1110 224-239 D

    E240-2551111

    Fig. 6 First Byte and Address Class

  • 8/13/2019 IP Internet Protocol Address_doc

    9/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    9

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    Fig. 7 Main Class address Summary

  • 8/13/2019 IP Internet Protocol Address_doc

    10/30

  • 8/13/2019 IP Internet Protocol Address_doc

    11/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    11

    2 SubnettingThe problem is not totally solved with the private network addresses. Due to thenature of the router and the protocols it is necessary a continuous change of network(normally one network for each router port), so in large organizations a lot of networkare necessary, and the private addressing fails to satisfy. In order to optimize betterthe network, the concept of subnetting (subnet-work) has to be introduced.

    2.1 The MaskIn the three address classes (A, B, C) previously mentioned, there are only two field:Network and Host. How is it possible and where to introduce the Sub network field?For such purpose it is necessary to introduce the concept of Sub-net mask .

    Class A default mask: one byte for network three bytes for hosts

    Class B default mask: two bytes for network two bytes for hosts

    Class C default mask: three bites for the network one byte for the host

    Fig. 9 Default Masks

  • 8/13/2019 IP Internet Protocol Address_doc

    12/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks12

    2.2 Subnetting example on Class A

    The modification of the default mask means the insertion of a new parameter called subnetwork .

    Class A default mask: define one byte for network and three bytes for hosts

    Adding a default mask class B on a class A the result is: one byte for networkidentification, one byte for subnetwork, two bytes for the host area.

    Fig. 10 Subnetting example on a Class A with a Class B mask

  • 8/13/2019 IP Internet Protocol Address_doc

    13/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    13

    The result is the following:

    Subnet bit map n = network s = subnetwork h = host

    0nnnnnnn ssssssss hhhhhhhh hhhhhhhh

    Mask bit 16

    Subnet bits 8

    Max number of subnetworks 254 (28 - 2)

    Max hosts per subnetwork 65534 (216 - 2)

    Subnet hosts address range from 10.10.0.1 to 10.10.255.254

    Subnet ID10.10.0.0

    In case more subnetworks are necessary:Adding a default mask class C on a class A one byte for network, two bytes forsubnetwork, one byte for host.

    Fig. 11 Subnetting example on a Class A with a Class C Mask

  • 8/13/2019 IP Internet Protocol Address_doc

    14/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks14

    The result is the following:

    Subnet bit map n = network s = subnetwork h = host

    10nnnnnn ssssssss ssssssss hhhhhhhh

    Mask bit 24

    Subnet bits 16

    Max number of subnet 65534 (2 16 - 2)

    Max hosts per subnetwork 254 (2 8 - 2)

    Subnet hosts address range from 10.10.10.1 to 10.10.10.254

    Subnet ID10.10.10.0.

  • 8/13/2019 IP Internet Protocol Address_doc

    15/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    15

    The need of more subnetting can over cross the three bytes for the mask.

    Fig. 12 Subnetting example on a Class A with exceeding the default format

    Subnet bit map n = network s = subnetwork h = host

    10nnnnnn ssssssss ssssssss sssshhhh

    Mask bit 28

    Subnet bits 20

    Max number of subnet 1048574 (2 20 - 2)

    Max hosts per subnetwork 14 (2 4 - 2)

    Subnet hosts address range from 10.10.10.1 to 10.10.10.14

    Subnet ID 10.10.10.0

  • 8/13/2019 IP Internet Protocol Address_doc

    16/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks16

    In the previous case how to distinguish the subnetwork from the host ?For example the following 3 IP addresses and their subnet mask:

    10.134.76. 114 net.mask:255.255.255 .240 10.134.76. 116 net.mask:255.255.255. 240

    10.134.76. 118 net.mask:255.255.255. 240

    Which subnetwork are they part of?The basic rule is to take the last byte of the IP addresses and make an AND (logic) function with the last byte of their netmask.

    114 ->01110010 AND with 240 ->11110000 = 01110000 -> 112

    116->01110100 AND with 240 -> 11110000 = 01110000 -> 112

    118->01110110 AND with 240 -> 11110000 = 01110000 -> 112The legacy among the three addresses and their mask is 112 so the subnetworkID is: 10.134.76.112

    TIPremember that in AND Function the 0 wins over 1

  • 8/13/2019 IP Internet Protocol Address_doc

    17/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    17

    2.3 Subnetting example on Class C

    The IP address is 192.168.1.32 /27.The notation /27 is an abbreviation of the mask 255.255.255.224 because in themask number there are 27 bits set at 1.Which is the subnetwork ID?

    NE IP 11000000. 10101000. 00000001. 00100000

    Mask 11111111. 11111111. 11111111. 11100000.

    11000000. 10101000. 00000001 00100000 > ANDfunction

    result

    192 168 1 32 > decimalconversion

    WARNING

    In this particular example the AND function result shows that the subnetwork isthe same of the IP address . So it is not possible to use this IP as a hostidentification

  • 8/13/2019 IP Internet Protocol Address_doc

    18/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks18

    3 IPCONFIGA simple command on PC to obtain the full information according the IP address:

    Fig. 13 IPCONFIG Command in a DOS environment

  • 8/13/2019 IP Internet Protocol Address_doc

    19/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    19

    4 IP and Internetworking devices

    4.1 IP and BridgeHere an example of IP addressing in a LAN segment followed by a bridge extension.A collision domain (or Ethernet segment) is the set of LAN interfaces whose framescould collide with each other in the same collision domain. Only one host could senda frame at a time, so the hosts share the total LAN bandwidthAs the number of hosts increases, the probability of collisions increases.The bridge reduces the number of collisions. If you have only one Ethernet segmentor your complete network is bridged, all the devices are within a network area, withina subnet. The hosts don't know that there is a bridge. Transparent bridging.

    Fig. 14 IP addressing example with Bridge

  • 8/13/2019 IP Internet Protocol Address_doc

    20/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks20

    4.1.1 Bridge Routing Table

    The next example with the same LAN shows the routing table at MAC levelstored in the Bridge.This routing table is dynamically created during the traffic activity after that each hosthas sent at least one frame. In case one host is moving from one segment toanother, just sending a frame the bridge learns which part of the segment isconnected. This happens without change the IP address because the two segment ofthe bridge are part of the same network. In case of remote connection (two bridges)the routing table are stored in both bridges and contain exactly the same information.

    Fig. 15 Bridge routing Table example

  • 8/13/2019 IP Internet Protocol Address_doc

    21/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    21

    4.2 IP and Router

    In case of router connection, each router port is a new IP network or subnetwork.

    Fig. 16 IP Addressing example with Router

  • 8/13/2019 IP Internet Protocol Address_doc

    22/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks22

    When a router receives a packet, it reads the destination IP address. Router looks forthe correspondent entry (comparing the destination IP address to network column) inthe routing table. After that, the router forwards the packet out, through the right

    interface. Source and destination addresses inside the data frame are the basicinformation to build up the routing table.

    Fig. 17 IP Routing Basic concept

  • 8/13/2019 IP Internet Protocol Address_doc

    23/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    23

    4.2.1 Routing Table in a Router

    Simple network example with routing tables.

    Fig. 18 Example of RoutingTables in Routers

  • 8/13/2019 IP Internet Protocol Address_doc

    24/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks24

    5 Ipv4 and Ipv6IPv4 is the Internet Protocol version now in use. The description is on ETF RFC 791published the first time in 1981. It is what explained in the previous chapters.

    IPv6 is the Internet Protocol version designed to overcome the limitation of IPv4. It'smain characteristic is a wider area of addressing, up to 128 bits in 32 hexadecimalnumbers instead of the 32 decimal used on IPv4.

    The official recommendations are RFC 2373 and RFC 2374

  • 8/13/2019 IP Internet Protocol Address_doc

    25/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    25

    6 Exercise

    1. The first decimal numbers of a Class A Address are from 1 to 126, Class B from128 to191, Class C from 192 to 223. Why ?

    2. According to the following subnet address and mask12.10.10.10/255.255.255224 Which number is associated to the Subnetwork?

  • 8/13/2019 IP Internet Protocol Address_doc

    26/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks26

    3. The following IP Address: 12.10.10.96/ 255.255.255.224 It is a host or asubnetwork ?

    4. In most documents the IP address and its mask are written in the following way:12.10.10.75/21 What does it mean ?

  • 8/13/2019 IP Internet Protocol Address_doc

    27/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    27

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5. How many Networks (Subnetworks ) are present in the following networkexample?

    bridge bridge

    bridge bridgerouter

    hub

    Fig. 19

  • 8/13/2019 IP Internet Protocol Address_doc

    28/30

    IP Internet Protocol Address

    FT41224EN02GLA1

    2011 Nokia Siemens Networks28

  • 8/13/2019 IP Internet Protocol Address_doc

    29/30

    IP Internet Protocol Address

    FT41224EN02GLA1 2011 Nokia Siemens Networks

    29

    7 Solution1. The first decimal numbers of a Class A Address are from 1 to 126, Class B from

    128 to191, Class C from 192 to 223. Why ?

    Is the first bit of the first byte in the binary count of the IP address.

    With class A the first bit is always fix to 0, so the possibility decimal numbers arefrom 1 -> 0 0 0 0 0 0 0 1 to 127 -> 0 1 1 1 1 1 1 1 ( 127 is for special purpose andcannot be used so the last network in class a is 126

    Wit class B the first two bits of the first byte are fixed to 1 0 so, the excursion isfrom 128 -> 1 0 0 0 0 0 0 0 to 191 1 0 1 1 1 1 1 1

    with Class C the first three bits of the first byte are fix to 1 1 0, so the excursion isfrom 192 -> 1 1 0 0 0 0 0 0 to 223 -> 1 1 0 1 1 1 1 1

    2. According to the following subnet address and mask12.10.10.10/255.255.255224 Which is the Subnetwork number ?

    a) 12.10.10.0 /24

    3. The following IP Address: 12.10.10.96/ 255.255.255.224 It is a host or asubnetwork ?

    It is a subnetwork

    4. In most documents the IP address and its mask are written in the following way:12.10.10.75/21 What does it mean ?

    It is the sequential numbers of "1" in the subnetwork mask field starting from thefirst bit

    5. How many Networks (Subnetworks ) are present in the following networkexample

    6

  • 8/13/2019 IP Internet Protocol Address_doc

    30/30

    IP Internet Protocol Address