SlideShare uma empresa Scribd logo
1 de 62
Baixar para ler offline
TCP/IP Addressing Demystified
                             - Edited by Alien Coders
                      Team
                 Contributed by Souvik
      Official Website: http://www.aliencoders.com
  Facebook Page: https://www.facebook.com/aliencoders
What you will learn
•   How internet addressing works
•   Internet Addressing
•   Role played by Routing and addressing
•   ARP
•   TCP/UDP
•   IPv6 into the picture
• The Internet Protocol (IP) enables communications across a vast and
  heterogeneous collection of networks.

• The Internet offers two basic communication services that operate on
  top of IP:

• TCP Transmission control protocol i.e reliable stream service.
• UDP User datagram Protocol.
The TCP header contains the port number of the client process and the well
known port 80 for the HTTP server process.


The IP network address are the logical address because they are defined in terms
of logical topology of the routers and the end systems.


Ethernet LAN frames contains physical address that identify the physical
endpoints for the sender and the receiver.
• The network interface layer is particularly concerned with the
  protocols that are used to access the intermediate networks.

• At each gateway the network protocol is used to encapsulate the IP
  packet into a packet or frame of the underlying link.

• The router must determine the next hop in the route to the
  destination and then encapsulate the IP packet or frame of the type of
  the next network or link
IP Packet
• Total Length : With 16 bits , the max packet
  length = 65,535

• Protocol TCP =6 ; UDP =17 ; ICMP = 1

• Options : Security level , Route to be taken by the
  packet

• Padding : To make the header field a multiple of
  32 bit word.
Internet Addressing
              Network                                 Host


An IP address is divided into 2 parts:
a) network part 2) host part .

The part of a public IP address that identifies the network is
internationally controlled by the Network Information Center (NIC)
located in the Stanford Research Institute in California.

The part that identifies the host is controlled locally at a
network level.
Internet Addressing




An Internet address is four octets (i.e. 32 bits) long.

The first few bits in the network part of the address helps interpret the
address.These bits indicate the class of the address.

When a system wants to communicate over the internet they need to have a
public address.

This public address has to be purchased from NIC in Stanford.
Address classes


There are five Internet address classes. They are : Class A / B / C / D / E .

Class A addressing is used for very large networks, that is networks which will
have a large number of hosts attached to them.

For class A the MSB is 0.

Each pure class A network can support (224-2) hosts. One address each being
reserved for network address (all 0 ) and all one for broad cast.
Class A
                      Host ID
                           24 bits



The first bit is 0 and next 7 bits called the Net ID identifies
the network . The next field contains the host ID, which
identifies the particular host within the specified network.

In a class A address it's 24 bits long and therefore allows
 for almost 17 million hosts on a network.

For example 10.200.20.5 is a class A address
Class B




Class B addressing is used for medium-sized networks.

If the first two bits in the address are 10, it's a class B address. 14 bits for network Ids
and 16 bits for host Ids allowing about 16,000 networks and 64,000 hosts for each
network.

The range of first octet of class B address is 128 –191.i.e 128.0.0.0 to 191.255.0.0
Class C

The next address class is class C, probably the most common network class.
If the first 3 bits in the address are 110, the address is a class C address.

The net ID is 21 bits long and the host ID is 8 bits long, allowing about 21
million networks and 254 hosts per network.

The range of class C Network is 192.0.0.0 – 223.255.255.0

The 192.0.0.2555 is the broadcast address and 192.0.0.0 is the network
address.
Class D

Class D addressing is used for multicasting a number of hosts for applications
like audio and video conferencing.

Class D networks have the first 4 bits in the network part = 1110.

The first octet ranges from 224 – 239.

All the addressees from 224.0.0.0 to 239.255.255.255 can be used as multicast
address.
All students in Internet Class!
• A host ID that contains all 1s is meant to broadcast the
  packet to all hosts specified by the network.

• If the network ID also contains all 1s the packet is
  broadcast on the local network.

• A host ID that contains all 0s refers to the network
  specified by the network ID , rather than to a host.

• A source may send all 0s in the source address while
  trying to find out the correct IP address. The machine is
  then identified by its MAC address.
• These are the IP address ranges reserved for private
  networks within organizations.

• These addresses will not be allocated by NIC as public IP
  address for the internet.

• There is no problem of clash because when a packet goes
  outside the organization the local IP address gets translated
  into into the public IP address purchased by the
  organizations.
Private Addressing


– Class A:
   • 10.0.0.0 to 10.255.255.255---- 1 Class A network
– Class B:
   • 172.16.0.0 to 172.31.255.255 ---- 16 contiguous Class B
     networks
– Class C:
   • 192.168.0.0 to 192.168.255.255--- 255 contiguous Class C
     networks
• These are IP address ranges reserved for private networks
  within organizations.

• These addresses will not be allocated by NIC as public IP
  addresses for the Internet.

• There is no problem of clash because when a packet goes
  outside the organization the local IP address gets translated
  into the public IP address purchased by the organization.
Reserved and Available IP
       Addresses
Class Address or Range                Status
A     0.0.0.0                         Reserved
      1.0.0.0 through 126.0.0.0       Available
      127.0.0.0                       Reserved
B     128.0.0.0                       Reserved
      128.1.0.0 through 191.254.0.0   Available
      191.255.0.0                     Reserved
C     192.0.0.0                       Reserved
      192.0.1.0 through 223.255.254   Available
      223.255.255.0                   Reserved
D     224.0.0.0 through               Multicast group
      239.255.255.255                 addresses
E     240.0.0.0 through               Reserved
      255.255.255.254                 Broadcast
      255.255.255.255
• Subnet Addressing : To add another
  hierarchical level called the subnet .

• The beauty of the subnet addressing scheme is
  that it is oblivious to the network outside the
  organization.
How IP address works
•   An organization has many LANs , each consisting of no more than
    100 hosts.

•   7 bits for for host identification in a sub network and other 9 bits are
    used for identifying the subnetwork.

•   Packet with destination IP 150.100. 12.176 arrives

•   The subnet mask used is 11111111 11111111 11111111 10000000 =
    255.255.255.128

•   The router performs the AND between the subnet mask and the IP
    and the subnet number becomes 10010110 01100100 00001100
    10000000 : 150.100.12.128

    This number is used to forward the packet to the correct subnetwork.
IP Address Classes Exercise

 Address         Class   Network   Host

 10.2.1.1

 128.63.2.100

 201.222.5.64

 192.6.141.2

 130.113.64.16

 256.241.201.1
 0
IP Address Classes Exercise
           Answers
Address          Class      Network       Host

10.2.1.1           A        10.0.0.0      0.2.1.1

128.63.2.100       B        128.63.0.0    0.0.2.100

201.222.5.64       C        201.222.5.0   0.0.0.64

192.6.141.2        C        192.6.141.0   0.0.0.2

130.113.64.16      B        130.113.0.0   0.0.64.16

256.241.201.1
              Nonexistent
0
Subnet Mask
              Network                      Host

     IP
Address
          172           16           0            0
              Network                      Host
 Default
 Subnet
  Mask
          255           255          0            0
       11111111      11111111     00000000      00000000
     Also written as “/16” where 16 represents the number
     of 1s in the mask.
               Network             Subnet         Host
    8-bit
  Subnet  255           255        255            0
   Mask
      Also written as “/24” where 24 represents the number
      of 1s in the mask.
Decimal Equivalents of Bit
        Patterns
128 64   32   16   8   4   2   1


1   0    0    0    0   0   0   0   =   128
1   1    0    0    0   0   0   0   =   192
1   1    1    0    0   0   0   0   =   224
1   1    1    1    0   0   0   0   =   240
1   1    1    1    1   0   0   0   =   248
1   1    1    1    1   1   0   0   =   252
1   1    1    1    1   1   1   0   =   254
1   1    1    1    1   1   1   1   =   255
Subnet Mask without Subnets
                 Network               Host

172.16.2.160 10101100 00010000 00000010 10100000

 255.255.0.0 11111111 11111111 00000000 00000000

            10101100 00010000 00000000 00000000

Network        172      16         0          0
Number

          •Subnets not in use—the default
Subnet Mask with Subnets
                 Network        Subnet   Host

172.16.2.160 10101100 00010000 00000010 10100000

255.255.255.011111111 11111111 11111111 00000000

            10101100 00010000 00000010 00000000




                               128
                               192
                               224
                               240
                               248
                               252
                               254
                               255
Subnet
Address        172      16         2        0

   •Network number is extended by eight bits
Subnet Mask with Subnets
            (cont.)
                     Network        Subnet     Host

172.16.2.160     10101100 00010000 00000010 10100000

255.255.255.19211111111 11111111 11111111 11000000

                 10101100 00010000 00000010 10000000




                                   128
                                   192
                                   224
                                   240
                                   248
                                   252
                                   254
                                   255
                                             128
                                             192
                                             224
                                             240
                                             248
                                             252
                                             254
                                             255
   Subnet
   Address         172       16        2       128


      •        Network number extended by ten bits
Subnet Mask Exercise


Address         Subnet       Class   Subnet
                 Mask
172.16.2.10   255.255.255.
              0
10.6.24.20    255.255.240.
              0
10.30.36.12   255.255.255.
              0
Subnet Mask Exercise Answers


    Address      Subnet Mask     Class     Subnet

   172.16.2.10   255.255.255.0    B      172.16.2.0

   10.6.24.20    255.255.240.0    A      10.6.16.0

   10.30.36.12   255.255.255.0    A      10.30.36.0
Broadcast Addresses


                                172.16.3.0


                  172.16.4.0



     172.16.1.0

      172.16.3.255                172.16.2.0
  (Directed broadcast)

     255.255.255.255
 (Local network broadcast)
                            X
       172.16.255.255
  (All subnets broadcast)
Addressing Summary Example
                  172      16        2       160



172.16.2.160   10101100 00010000 00000010 10100000 Host 1

255.255.255.192                                    Mask

                                                   Subnet 4

                                                   Broadcast

                                                   First

                                                   Last
Addressing Summary Example
                  172      16        2       160



172.16.2.160   10101100 00010000 00000010 10100000 Host 1

255.255.255.19211111111 11111111 11111111 11000000 Mask 2

                                                   Subnet

                                                   Broadcast

                                                   First

                                                   Last
Addressing Summary Example
                  172      16        2         160

                                           3

172.16.2.160   10101100 00010000 00000010 10100000 Host 1

255.255.255.19211111111 11111111 11111111 11000000 Mask 2

                                                     Subnet

                                                     Broadcast

                                                     First

                                                     Last    7
Addressing Summary Example

                  172      16        2         160

                                           3

172.16.2.160   10101100 00010000 00000010 10100000 Host 1

255.255.255.19211111111 11111111 11111111 11000000 Mask 2

                                         10000000 Subnet 4

                                                     Broadcast

                                                     First

                                                     Last
Addressing Summary Example

                  172      16        2         160

                                           3

172.16.2.160   10101100 00010000 00000010 10100000 Host 1

255.255.255.19211111111 11111111 11111111 11000000 Mask 2

                                         10000000 Subnet 4

                                         10111111 Broadcast
                                                     5
                                                     First   6

                                                     Last
Addressing Summary Example

                  172      16        2         160

                                           3

172.16.2.160   10101100 00010000 00000010 10100000 Host 1

255.255.255.19211111111 11111111 11111111 11000000 Mask 2

                                         10000000 Subnet 4

                                         10111111 Broadcast
                                                  5
                                         10000001 First     6

                                                     Last
Addressing Summary Example
                  172      16        2         160

                                           3

172.16.2.160   10101100 00010000 00000010 10100000 Host 1

255.255.255.19211111111 11111111 11111111 11000000 Mask 2

                                         10000000 Subnet 4

                                         10111111 Broadcast
                                                  5
                                         10000001 First   6

                                         10111110 Last    7
Addressing Summary Example
                  172       16        2         160

                                            3

172.16.2.160   10101100 00010000 00000010 10100000 Host 1

255.255.255.19211111111 11111111 11111111 11000000 Mask 2
              8
               10101100 00010000 00000010 10000000 Subnet 4

               10101100 00010000 00000010 10111111 Broadcast
                                                   5
               10101100 00010000 00000010 10000001 First   6

               10101100 00010000 00000010 10111110 Last    7
192.168.9
            1.4
                                                                                                     192.1
                                192                                              Laye                      68.89
                                                                                                                 .20
                                    .168.
                                         90.3                                         r2
Rout                                      Rout
     er C                                      er A
                    Rout                               192.1                                     192.1
                         er B                                68.89
    192                                                            .2                                  68.89
                                                                                                             .40
        .168.
             91.3
                        ARP
                           192                        192.168.
                              .168.                           88.2
                                   90.2
                                                                                           192.1
                                                                        Laye                     6
                                                                             r
                                                                                                   8.88.
                                                                                 2                      20
                                                                                      19 2.168
                                                                                              .88   .40
                      Routing Demonstration
Routing done by Host
Network          Netmask         Gateway        Interface
Destination

0.0.0.0          0.0.0.0         192.168.88.2 192.168.88.40

192.168.88.0     255.255.255.0   192.168.88.4 192.168.88.40
                                 0
192.168.88.40 255.255.255.25 127.0.0.1          127.0.0.1
               5
    Let assume IP packet received by network layer of
    host have destination IP 192.168.88.20 and source IP: 192.168.88.40
               192.168.88.20          192.168.88.20
                   AND                     AND
              255.255.255.255          255.255.255.0

               192.168.88.20            192.168.88.0
Routing done by Host
Network          Netmask         Gateway        Interface
Destination

0.0.0.0          0.0.0.0         192.168.88.2 192.168.88.40
192.168.88.0     255.255.255.0   192.168.88.4 192.168.88.40
                                 0
192.168.88.40 255.255.255.25 127.0.0.1          127.0.0.1
               5
    Let assume IP packet received by network layer of
    host have destination IP 192.168.89.4 and source IP: 192.168.88.40
               192.168.89.4            192.168.89.4         192.168.89.4
                   AND                     AND                 AND
              255.255.255.255          255.255.255.0           0.0.0.0

                192.168.89.4            192.168.89.0           0.0.0.0
Routing Done Router A
  Network       Netmask        Gateway       Interface
  Destination
  0.0.0.0       0.0.0.0        192.168.90.3 192.168.90.2
  192.168.88.0 255.255.255. 192.168.88.2 192.168.88.2
               0
  192.168.89.0 255.255.255. 192.168.89.2 192.168.89.2
               0
  192.168.90.0 255.255.255. 192.168.90.2 192.168.90.2
Let assume IP packet received by layer 3
                 0
have destination IP 192.168.89.4 and source IP: 192.168.88.40
  192.168.91.0 255.255.255. 192.168.90.3 192.168.90.2
    192.168.89.40

        AND
    255.255.255.0

     192.168.89.0
Routing Done by Router B
Network           Netmask       Gateway        Interface
Destination
0.0.0.0           0.0.0.0       192.168.91.4   192.168.91.3
192.168.88.0      255.255.255.0 192.168.90.2   192.168.90.3
192.168.89.0      255.255.255.0 192.168.90.2   192.168.90.3
192.168.90.0      255.255.255.0 192.168.90.3   192.168.90.3
192.168.91.0 255.255.255.0 192.168.91.3        192.168.91.3
  Let assume IP packet received by Router A
  have destination IP 192.168.92.5 and source IP: 192.168.88.40
          192.168.92.5      192.168.92.5
              AND               AND
      255.255.255.0            0.0.0.0

          192.168.92.0          0.0.0.0
Dynamic Routing

                                 Routing Protocol



         Interior Gateway Protocol             Exterior Gateway Protocol



Open Shortest Path First   Routing Information Protocol

                                                          Border Gateway Protocol

Dijkstra Algorithm          Bellman Ford Algorithm

Link State Protocol        Distance Vector Protocol
Address Resolution Protocol
• The address resolution protocol (ARP) is used when
  one host wants to get the physical address of
  another host on the same network.
Address Resolution Protocol


                              Ignored




                   Ignored
Address Resolution Protocol
Address Resolution
Fragmentation and Reassembly
IPv6
How IP address works
How IP address works
How IP address works
How IP address works
How IP address works
How IP address works
How IP address works
USER DATAGRAM PROTOCOL
How IP address works

Mais conteúdo relacionado

Mais procurados

Chap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmpChap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmp東原 李
 
IP Configuration
IP ConfigurationIP Configuration
IP ConfigurationStephen Raj
 
Subnetting
SubnettingSubnetting
Subnettingswascher
 
Basics of IP Addressing
Basics of IP AddressingBasics of IP Addressing
Basics of IP AddressingKushal Sheth
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting PresentationTouhidul Fahim
 
Arp (address resolution protocol)
Arp (address resolution protocol)Arp (address resolution protocol)
Arp (address resolution protocol)tigerbt
 
IP Address
IP AddressIP Address
IP AddressRahul P
 
IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)cuetcse
 
IP NETWORKING AND IP SUBNET MASKING
IP NETWORKING AND IP SUBNET MASKING IP NETWORKING AND IP SUBNET MASKING
IP NETWORKING AND IP SUBNET MASKING AYESHA JAVED
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6Adeel Rasheed
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategyMustafa Salam
 
IP Addressing and Subnetting
IP Addressing and SubnettingIP Addressing and Subnetting
IP Addressing and SubnettingAtakan ATAK
 

Mais procurados (20)

Chap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmpChap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmp
 
IP Configuration
IP ConfigurationIP Configuration
IP Configuration
 
Subnetting
SubnettingSubnetting
Subnetting
 
Basics of IP Addressing
Basics of IP AddressingBasics of IP Addressing
Basics of IP Addressing
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting Presentation
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
 
Arp (address resolution protocol)
Arp (address resolution protocol)Arp (address resolution protocol)
Arp (address resolution protocol)
 
About ip address
About ip addressAbout ip address
About ip address
 
IP Address
IP AddressIP Address
IP Address
 
Ip address
Ip addressIp address
Ip address
 
IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)
 
IP NETWORKING AND IP SUBNET MASKING
IP NETWORKING AND IP SUBNET MASKING IP NETWORKING AND IP SUBNET MASKING
IP NETWORKING AND IP SUBNET MASKING
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6
 
Internet Protocol
Internet ProtocolInternet Protocol
Internet Protocol
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategy
 
Logical addressing
Logical  addressingLogical  addressing
Logical addressing
 
Subnet Mask
Subnet MaskSubnet Mask
Subnet Mask
 
IPV4 vs IPV6
IPV4 vs IPV6IPV4 vs IPV6
IPV4 vs IPV6
 
IP Addressing and Subnetting
IP Addressing and SubnettingIP Addressing and Subnetting
IP Addressing and Subnetting
 
IPv6 address
IPv6 addressIPv6 address
IPv6 address
 

Destaque

Baking day pre nursery 2012
Baking day pre nursery 2012Baking day pre nursery 2012
Baking day pre nursery 2012mariogomezprieto
 
Twitter to evernote
Twitter to evernoteTwitter to evernote
Twitter to evernoteDai Barnes
 
Technology for National Document Preservation
Technology for National Document PreservationTechnology for National Document Preservation
Technology for National Document PreservationRachabodin Suwannakanthi
 
8. Social 2.0 Would U Like To Add Me Rudi Leung
8. Social 2.0    Would U Like To Add Me   Rudi Leung8. Social 2.0    Would U Like To Add Me   Rudi Leung
8. Social 2.0 Would U Like To Add Me Rudi LeungHKAIM
 
Om Max Power Of Having A Spritual Friend 1
Om Max   Power Of Having A Spritual Friend 1Om Max   Power Of Having A Spritual Friend 1
Om Max Power Of Having A Spritual Friend 1Bryan Sumendap
 
12. Social 2.0 Mobile Social Networking Jason Chiu
12. Social 2.0   Mobile Social Networking   Jason Chiu12. Social 2.0   Mobile Social Networking   Jason Chiu
12. Social 2.0 Mobile Social Networking Jason ChiuHKAIM
 
Social Business Conference 2013 - Social Media: Become a large platform or ju...
Social Business Conference 2013 - Social Media: Become a large platform or ju...Social Business Conference 2013 - Social Media: Become a large platform or ju...
Social Business Conference 2013 - Social Media: Become a large platform or ju...HKAIM
 
Making Philosophical Discussions Meaningful
Making Philosophical Discussions MeaningfulMaking Philosophical Discussions Meaningful
Making Philosophical Discussions MeaningfulSteve Kashdan
 
VietRees_Newsletter_60_Tuan1_Thang12
VietRees_Newsletter_60_Tuan1_Thang12VietRees_Newsletter_60_Tuan1_Thang12
VietRees_Newsletter_60_Tuan1_Thang12internationalvr
 
Glenview Values Presentation - Digital Citizens
Glenview Values Presentation - Digital CitizensGlenview Values Presentation - Digital Citizens
Glenview Values Presentation - Digital CitizensAndrew Kohl
 
Tweet to diigo
Tweet to diigoTweet to diigo
Tweet to diigoDai Barnes
 
2. Social 2.0 Baby Kingdom Rainer Sip
2. Social 2.0   Baby Kingdom   Rainer Sip2. Social 2.0   Baby Kingdom   Rainer Sip
2. Social 2.0 Baby Kingdom Rainer SipHKAIM
 
District 30 - 2011 ISAT
District 30 - 2011 ISATDistrict 30 - 2011 ISAT
District 30 - 2011 ISATAndrew Kohl
 
Vietnam Real Estate Newsletter - No. 71, Week 4 Feb, 2009
Vietnam Real Estate Newsletter - No. 71, Week 4 Feb, 2009Vietnam Real Estate Newsletter - No. 71, Week 4 Feb, 2009
Vietnam Real Estate Newsletter - No. 71, Week 4 Feb, 2009internationalvr
 
“From AE, AIG, DHL to PCCW… A walk down my Sales & Marketing management journey”
“From AE, AIG, DHL to PCCW… A walk down my Sales & Marketing management journey”“From AE, AIG, DHL to PCCW… A walk down my Sales & Marketing management journey”
“From AE, AIG, DHL to PCCW… A walk down my Sales & Marketing management journey”HKAIM
 

Destaque (20)

Baking day pre nursery 2012
Baking day pre nursery 2012Baking day pre nursery 2012
Baking day pre nursery 2012
 
Twitter to evernote
Twitter to evernoteTwitter to evernote
Twitter to evernote
 
Technology for National Document Preservation
Technology for National Document PreservationTechnology for National Document Preservation
Technology for National Document Preservation
 
Mixbook
MixbookMixbook
Mixbook
 
8. Social 2.0 Would U Like To Add Me Rudi Leung
8. Social 2.0    Would U Like To Add Me   Rudi Leung8. Social 2.0    Would U Like To Add Me   Rudi Leung
8. Social 2.0 Would U Like To Add Me Rudi Leung
 
Om Max Power Of Having A Spritual Friend 1
Om Max   Power Of Having A Spritual Friend 1Om Max   Power Of Having A Spritual Friend 1
Om Max Power Of Having A Spritual Friend 1
 
12. Social 2.0 Mobile Social Networking Jason Chiu
12. Social 2.0   Mobile Social Networking   Jason Chiu12. Social 2.0   Mobile Social Networking   Jason Chiu
12. Social 2.0 Mobile Social Networking Jason Chiu
 
Presentación lazytech
Presentación lazytechPresentación lazytech
Presentación lazytech
 
Energy multiutility v3
Energy  multiutility v3Energy  multiutility v3
Energy multiutility v3
 
Social Business Conference 2013 - Social Media: Become a large platform or ju...
Social Business Conference 2013 - Social Media: Become a large platform or ju...Social Business Conference 2013 - Social Media: Become a large platform or ju...
Social Business Conference 2013 - Social Media: Become a large platform or ju...
 
Making Philosophical Discussions Meaningful
Making Philosophical Discussions MeaningfulMaking Philosophical Discussions Meaningful
Making Philosophical Discussions Meaningful
 
VietRees_Newsletter_60_Tuan1_Thang12
VietRees_Newsletter_60_Tuan1_Thang12VietRees_Newsletter_60_Tuan1_Thang12
VietRees_Newsletter_60_Tuan1_Thang12
 
Digital Technology for Museum
Digital Technology for MuseumDigital Technology for Museum
Digital Technology for Museum
 
Glenview Values Presentation - Digital Citizens
Glenview Values Presentation - Digital CitizensGlenview Values Presentation - Digital Citizens
Glenview Values Presentation - Digital Citizens
 
Tweet to diigo
Tweet to diigoTweet to diigo
Tweet to diigo
 
2. Social 2.0 Baby Kingdom Rainer Sip
2. Social 2.0   Baby Kingdom   Rainer Sip2. Social 2.0   Baby Kingdom   Rainer Sip
2. Social 2.0 Baby Kingdom Rainer Sip
 
District 30 - 2011 ISAT
District 30 - 2011 ISATDistrict 30 - 2011 ISAT
District 30 - 2011 ISAT
 
Beekman5 std ppt_16
Beekman5 std ppt_16Beekman5 std ppt_16
Beekman5 std ppt_16
 
Vietnam Real Estate Newsletter - No. 71, Week 4 Feb, 2009
Vietnam Real Estate Newsletter - No. 71, Week 4 Feb, 2009Vietnam Real Estate Newsletter - No. 71, Week 4 Feb, 2009
Vietnam Real Estate Newsletter - No. 71, Week 4 Feb, 2009
 
“From AE, AIG, DHL to PCCW… A walk down my Sales & Marketing management journey”
“From AE, AIG, DHL to PCCW… A walk down my Sales & Marketing management journey”“From AE, AIG, DHL to PCCW… A walk down my Sales & Marketing management journey”
“From AE, AIG, DHL to PCCW… A walk down my Sales & Marketing management journey”
 

Semelhante a How IP address works

Wipro telecom training i pv4 concepts
Wipro telecom training   i pv4 conceptsWipro telecom training   i pv4 concepts
Wipro telecom training i pv4 conceptsJAIGANESH SEKAR
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basicstmavroidis
 
Ip Addressing
Ip AddressingIp Addressing
Ip Addressingvssnsarma
 
NAT and Subnetting
NAT and Subnetting NAT and Subnetting
NAT and Subnetting Saad Tanvir
 
Expl net fund_chapter_06_i_pv4_part_2
Expl net fund_chapter_06_i_pv4_part_2Expl net fund_chapter_06_i_pv4_part_2
Expl net fund_chapter_06_i_pv4_part_2kurtmctaggart
 
IP addressing by Mamun Sir
IP addressing by Mamun SirIP addressing by Mamun Sir
IP addressing by Mamun Sirsharifbdp
 
Lesson1: Introduction To Networking Concepts
Lesson1: Introduction To Networking ConceptsLesson1: Introduction To Networking Concepts
Lesson1: Introduction To Networking ConceptsMahmmoud Mahdi
 
Ip addresses
Ip addressesIp addresses
Ip addressesAsif
 
ip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.pptip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.pptFaysalAhamed32
 
Subnetting and routing
Subnetting and routingSubnetting and routing
Subnetting and routingGaurav Juneja
 
Ipaddress presentationdemoclass
Ipaddress presentationdemoclassIpaddress presentationdemoclass
Ipaddress presentationdemoclassaskme
 
Lesson 2: Subnetting basics
Lesson 2: Subnetting basicsLesson 2: Subnetting basics
Lesson 2: Subnetting basicsMahmmoud Mahdi
 
Ip address and subnet masking final
Ip address and subnet masking finalIp address and subnet masking final
Ip address and subnet masking finalNeerajBhardwaj57
 
CSS L16 - IP ADDRESSING
CSS L16 - IP ADDRESSINGCSS L16 - IP ADDRESSING
CSS L16 - IP ADDRESSINGMarvin Bronoso
 

Semelhante a How IP address works (20)

Wipro telecom training i pv4 concepts
Wipro telecom training   i pv4 conceptsWipro telecom training   i pv4 concepts
Wipro telecom training i pv4 concepts
 
chapter 4.pptx
chapter 4.pptxchapter 4.pptx
chapter 4.pptx
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basics
 
Ip Addressing
Ip AddressingIp Addressing
Ip Addressing
 
lecture 6.pptx
lecture 6.pptxlecture 6.pptx
lecture 6.pptx
 
NAT and Subnetting
NAT and Subnetting NAT and Subnetting
NAT and Subnetting
 
Expl net fund_chapter_06_i_pv4_part_2
Expl net fund_chapter_06_i_pv4_part_2Expl net fund_chapter_06_i_pv4_part_2
Expl net fund_chapter_06_i_pv4_part_2
 
IP addressing by Mamun Sir
IP addressing by Mamun SirIP addressing by Mamun Sir
IP addressing by Mamun Sir
 
Lesson1: Introduction To Networking Concepts
Lesson1: Introduction To Networking ConceptsLesson1: Introduction To Networking Concepts
Lesson1: Introduction To Networking Concepts
 
Lecture 06
Lecture 06Lecture 06
Lecture 06
 
Ip addresses
Ip addressesIp addresses
Ip addresses
 
ip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.pptip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.ppt
 
Subnetting and routing
Subnetting and routingSubnetting and routing
Subnetting and routing
 
Week10 lec1
Week10 lec1Week10 lec1
Week10 lec1
 
Mod6
Mod6Mod6
Mod6
 
Ipaddress presentationdemoclass
Ipaddress presentationdemoclassIpaddress presentationdemoclass
Ipaddress presentationdemoclass
 
Lesson 2: Subnetting basics
Lesson 2: Subnetting basicsLesson 2: Subnetting basics
Lesson 2: Subnetting basics
 
Ip address and subnet masking final
Ip address and subnet masking finalIp address and subnet masking final
Ip address and subnet masking final
 
Subnetting
SubnettingSubnetting
Subnetting
 
CSS L16 - IP ADDRESSING
CSS L16 - IP ADDRESSINGCSS L16 - IP ADDRESSING
CSS L16 - IP ADDRESSING
 

Último

AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 

Último (20)

AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 

How IP address works

  • 1. TCP/IP Addressing Demystified - Edited by Alien Coders Team Contributed by Souvik Official Website: http://www.aliencoders.com Facebook Page: https://www.facebook.com/aliencoders
  • 2. What you will learn • How internet addressing works • Internet Addressing • Role played by Routing and addressing • ARP • TCP/UDP • IPv6 into the picture
  • 3. • The Internet Protocol (IP) enables communications across a vast and heterogeneous collection of networks. • The Internet offers two basic communication services that operate on top of IP: • TCP Transmission control protocol i.e reliable stream service. • UDP User datagram Protocol.
  • 4. The TCP header contains the port number of the client process and the well known port 80 for the HTTP server process. The IP network address are the logical address because they are defined in terms of logical topology of the routers and the end systems. Ethernet LAN frames contains physical address that identify the physical endpoints for the sender and the receiver.
  • 5. • The network interface layer is particularly concerned with the protocols that are used to access the intermediate networks. • At each gateway the network protocol is used to encapsulate the IP packet into a packet or frame of the underlying link. • The router must determine the next hop in the route to the destination and then encapsulate the IP packet or frame of the type of the next network or link
  • 7. • Total Length : With 16 bits , the max packet length = 65,535 • Protocol TCP =6 ; UDP =17 ; ICMP = 1 • Options : Security level , Route to be taken by the packet • Padding : To make the header field a multiple of 32 bit word.
  • 8. Internet Addressing Network Host An IP address is divided into 2 parts: a) network part 2) host part . The part of a public IP address that identifies the network is internationally controlled by the Network Information Center (NIC) located in the Stanford Research Institute in California. The part that identifies the host is controlled locally at a network level.
  • 9. Internet Addressing An Internet address is four octets (i.e. 32 bits) long. The first few bits in the network part of the address helps interpret the address.These bits indicate the class of the address. When a system wants to communicate over the internet they need to have a public address. This public address has to be purchased from NIC in Stanford.
  • 10. Address classes There are five Internet address classes. They are : Class A / B / C / D / E . Class A addressing is used for very large networks, that is networks which will have a large number of hosts attached to them. For class A the MSB is 0. Each pure class A network can support (224-2) hosts. One address each being reserved for network address (all 0 ) and all one for broad cast.
  • 11. Class A Host ID 24 bits The first bit is 0 and next 7 bits called the Net ID identifies the network . The next field contains the host ID, which identifies the particular host within the specified network. In a class A address it's 24 bits long and therefore allows for almost 17 million hosts on a network. For example 10.200.20.5 is a class A address
  • 12. Class B Class B addressing is used for medium-sized networks. If the first two bits in the address are 10, it's a class B address. 14 bits for network Ids and 16 bits for host Ids allowing about 16,000 networks and 64,000 hosts for each network. The range of first octet of class B address is 128 –191.i.e 128.0.0.0 to 191.255.0.0
  • 13. Class C The next address class is class C, probably the most common network class. If the first 3 bits in the address are 110, the address is a class C address. The net ID is 21 bits long and the host ID is 8 bits long, allowing about 21 million networks and 254 hosts per network. The range of class C Network is 192.0.0.0 – 223.255.255.0 The 192.0.0.2555 is the broadcast address and 192.0.0.0 is the network address.
  • 14. Class D Class D addressing is used for multicasting a number of hosts for applications like audio and video conferencing. Class D networks have the first 4 bits in the network part = 1110. The first octet ranges from 224 – 239. All the addressees from 224.0.0.0 to 239.255.255.255 can be used as multicast address.
  • 15. All students in Internet Class!
  • 16. • A host ID that contains all 1s is meant to broadcast the packet to all hosts specified by the network. • If the network ID also contains all 1s the packet is broadcast on the local network. • A host ID that contains all 0s refers to the network specified by the network ID , rather than to a host. • A source may send all 0s in the source address while trying to find out the correct IP address. The machine is then identified by its MAC address.
  • 17. • These are the IP address ranges reserved for private networks within organizations. • These addresses will not be allocated by NIC as public IP address for the internet. • There is no problem of clash because when a packet goes outside the organization the local IP address gets translated into into the public IP address purchased by the organizations.
  • 18. Private Addressing – Class A: • 10.0.0.0 to 10.255.255.255---- 1 Class A network – Class B: • 172.16.0.0 to 172.31.255.255 ---- 16 contiguous Class B networks – Class C: • 192.168.0.0 to 192.168.255.255--- 255 contiguous Class C networks
  • 19. • These are IP address ranges reserved for private networks within organizations. • These addresses will not be allocated by NIC as public IP addresses for the Internet. • There is no problem of clash because when a packet goes outside the organization the local IP address gets translated into the public IP address purchased by the organization.
  • 20. Reserved and Available IP Addresses Class Address or Range Status A 0.0.0.0 Reserved 1.0.0.0 through 126.0.0.0 Available 127.0.0.0 Reserved B 128.0.0.0 Reserved 128.1.0.0 through 191.254.0.0 Available 191.255.0.0 Reserved C 192.0.0.0 Reserved 192.0.1.0 through 223.255.254 Available 223.255.255.0 Reserved D 224.0.0.0 through Multicast group 239.255.255.255 addresses E 240.0.0.0 through Reserved 255.255.255.254 Broadcast 255.255.255.255
  • 21. • Subnet Addressing : To add another hierarchical level called the subnet . • The beauty of the subnet addressing scheme is that it is oblivious to the network outside the organization.
  • 23. An organization has many LANs , each consisting of no more than 100 hosts. • 7 bits for for host identification in a sub network and other 9 bits are used for identifying the subnetwork. • Packet with destination IP 150.100. 12.176 arrives • The subnet mask used is 11111111 11111111 11111111 10000000 = 255.255.255.128 • The router performs the AND between the subnet mask and the IP and the subnet number becomes 10010110 01100100 00001100 10000000 : 150.100.12.128 This number is used to forward the packet to the correct subnetwork.
  • 24. IP Address Classes Exercise Address Class Network Host 10.2.1.1 128.63.2.100 201.222.5.64 192.6.141.2 130.113.64.16 256.241.201.1 0
  • 25. IP Address Classes Exercise Answers Address Class Network Host 10.2.1.1 A 10.0.0.0 0.2.1.1 128.63.2.100 B 128.63.0.0 0.0.2.100 201.222.5.64 C 201.222.5.0 0.0.0.64 192.6.141.2 C 192.6.141.0 0.0.0.2 130.113.64.16 B 130.113.0.0 0.0.64.16 256.241.201.1 Nonexistent 0
  • 26. Subnet Mask Network Host IP Address 172 16 0 0 Network Host Default Subnet Mask 255 255 0 0 11111111 11111111 00000000 00000000 Also written as “/16” where 16 represents the number of 1s in the mask. Network Subnet Host 8-bit Subnet 255 255 255 0 Mask Also written as “/24” where 24 represents the number of 1s in the mask.
  • 27. Decimal Equivalents of Bit Patterns 128 64 32 16 8 4 2 1 1 0 0 0 0 0 0 0 = 128 1 1 0 0 0 0 0 0 = 192 1 1 1 0 0 0 0 0 = 224 1 1 1 1 0 0 0 0 = 240 1 1 1 1 1 0 0 0 = 248 1 1 1 1 1 1 0 0 = 252 1 1 1 1 1 1 1 0 = 254 1 1 1 1 1 1 1 1 = 255
  • 28. Subnet Mask without Subnets Network Host 172.16.2.160 10101100 00010000 00000010 10100000 255.255.0.0 11111111 11111111 00000000 00000000 10101100 00010000 00000000 00000000 Network 172 16 0 0 Number •Subnets not in use—the default
  • 29. Subnet Mask with Subnets Network Subnet Host 172.16.2.160 10101100 00010000 00000010 10100000 255.255.255.011111111 11111111 11111111 00000000 10101100 00010000 00000010 00000000 128 192 224 240 248 252 254 255 Subnet Address 172 16 2 0 •Network number is extended by eight bits
  • 30. Subnet Mask with Subnets (cont.) Network Subnet Host 172.16.2.160 10101100 00010000 00000010 10100000 255.255.255.19211111111 11111111 11111111 11000000 10101100 00010000 00000010 10000000 128 192 224 240 248 252 254 255 128 192 224 240 248 252 254 255 Subnet Address 172 16 2 128 • Network number extended by ten bits
  • 31. Subnet Mask Exercise Address Subnet Class Subnet Mask 172.16.2.10 255.255.255. 0 10.6.24.20 255.255.240. 0 10.30.36.12 255.255.255. 0
  • 32. Subnet Mask Exercise Answers Address Subnet Mask Class Subnet 172.16.2.10 255.255.255.0 B 172.16.2.0 10.6.24.20 255.255.240.0 A 10.6.16.0 10.30.36.12 255.255.255.0 A 10.30.36.0
  • 33. Broadcast Addresses 172.16.3.0 172.16.4.0 172.16.1.0 172.16.3.255 172.16.2.0 (Directed broadcast) 255.255.255.255 (Local network broadcast) X 172.16.255.255 (All subnets broadcast)
  • 34. Addressing Summary Example 172 16 2 160 172.16.2.160 10101100 00010000 00000010 10100000 Host 1 255.255.255.192 Mask Subnet 4 Broadcast First Last
  • 35. Addressing Summary Example 172 16 2 160 172.16.2.160 10101100 00010000 00000010 10100000 Host 1 255.255.255.19211111111 11111111 11111111 11000000 Mask 2 Subnet Broadcast First Last
  • 36. Addressing Summary Example 172 16 2 160 3 172.16.2.160 10101100 00010000 00000010 10100000 Host 1 255.255.255.19211111111 11111111 11111111 11000000 Mask 2 Subnet Broadcast First Last 7
  • 37. Addressing Summary Example 172 16 2 160 3 172.16.2.160 10101100 00010000 00000010 10100000 Host 1 255.255.255.19211111111 11111111 11111111 11000000 Mask 2 10000000 Subnet 4 Broadcast First Last
  • 38. Addressing Summary Example 172 16 2 160 3 172.16.2.160 10101100 00010000 00000010 10100000 Host 1 255.255.255.19211111111 11111111 11111111 11000000 Mask 2 10000000 Subnet 4 10111111 Broadcast 5 First 6 Last
  • 39. Addressing Summary Example 172 16 2 160 3 172.16.2.160 10101100 00010000 00000010 10100000 Host 1 255.255.255.19211111111 11111111 11111111 11000000 Mask 2 10000000 Subnet 4 10111111 Broadcast 5 10000001 First 6 Last
  • 40. Addressing Summary Example 172 16 2 160 3 172.16.2.160 10101100 00010000 00000010 10100000 Host 1 255.255.255.19211111111 11111111 11111111 11000000 Mask 2 10000000 Subnet 4 10111111 Broadcast 5 10000001 First 6 10111110 Last 7
  • 41. Addressing Summary Example 172 16 2 160 3 172.16.2.160 10101100 00010000 00000010 10100000 Host 1 255.255.255.19211111111 11111111 11111111 11000000 Mask 2 8 10101100 00010000 00000010 10000000 Subnet 4 10101100 00010000 00000010 10111111 Broadcast 5 10101100 00010000 00000010 10000001 First 6 10101100 00010000 00000010 10111110 Last 7
  • 42. 192.168.9 1.4 192.1 192 Laye 68.89 .20 .168. 90.3 r2 Rout Rout er C er A Rout 192.1 192.1 er B 68.89 192 .2 68.89 .40 .168. 91.3 ARP 192 192.168. .168. 88.2 90.2 192.1 Laye 6 r 8.88. 2 20 19 2.168 .88 .40 Routing Demonstration
  • 43. Routing done by Host Network Netmask Gateway Interface Destination 0.0.0.0 0.0.0.0 192.168.88.2 192.168.88.40 192.168.88.0 255.255.255.0 192.168.88.4 192.168.88.40 0 192.168.88.40 255.255.255.25 127.0.0.1 127.0.0.1 5 Let assume IP packet received by network layer of host have destination IP 192.168.88.20 and source IP: 192.168.88.40 192.168.88.20 192.168.88.20 AND AND 255.255.255.255 255.255.255.0 192.168.88.20 192.168.88.0
  • 44. Routing done by Host Network Netmask Gateway Interface Destination 0.0.0.0 0.0.0.0 192.168.88.2 192.168.88.40 192.168.88.0 255.255.255.0 192.168.88.4 192.168.88.40 0 192.168.88.40 255.255.255.25 127.0.0.1 127.0.0.1 5 Let assume IP packet received by network layer of host have destination IP 192.168.89.4 and source IP: 192.168.88.40 192.168.89.4 192.168.89.4 192.168.89.4 AND AND AND 255.255.255.255 255.255.255.0 0.0.0.0 192.168.89.4 192.168.89.0 0.0.0.0
  • 45. Routing Done Router A Network Netmask Gateway Interface Destination 0.0.0.0 0.0.0.0 192.168.90.3 192.168.90.2 192.168.88.0 255.255.255. 192.168.88.2 192.168.88.2 0 192.168.89.0 255.255.255. 192.168.89.2 192.168.89.2 0 192.168.90.0 255.255.255. 192.168.90.2 192.168.90.2 Let assume IP packet received by layer 3 0 have destination IP 192.168.89.4 and source IP: 192.168.88.40 192.168.91.0 255.255.255. 192.168.90.3 192.168.90.2 192.168.89.40 AND 255.255.255.0 192.168.89.0
  • 46. Routing Done by Router B Network Netmask Gateway Interface Destination 0.0.0.0 0.0.0.0 192.168.91.4 192.168.91.3 192.168.88.0 255.255.255.0 192.168.90.2 192.168.90.3 192.168.89.0 255.255.255.0 192.168.90.2 192.168.90.3 192.168.90.0 255.255.255.0 192.168.90.3 192.168.90.3 192.168.91.0 255.255.255.0 192.168.91.3 192.168.91.3 Let assume IP packet received by Router A have destination IP 192.168.92.5 and source IP: 192.168.88.40 192.168.92.5 192.168.92.5 AND AND 255.255.255.0 0.0.0.0 192.168.92.0 0.0.0.0
  • 47. Dynamic Routing Routing Protocol Interior Gateway Protocol Exterior Gateway Protocol Open Shortest Path First Routing Information Protocol Border Gateway Protocol Dijkstra Algorithm Bellman Ford Algorithm Link State Protocol Distance Vector Protocol
  • 48. Address Resolution Protocol • The address resolution protocol (ARP) is used when one host wants to get the physical address of another host on the same network.
  • 49. Address Resolution Protocol Ignored Ignored
  • 53. IPv6

Notas do Editor

  1. An IPv4 or IP Version 4 address consists of 4 bytes or 32 bits. The IP address is divided into the network part and the host part. The number of bits occupied by the network part and the host part depends on the class of the network. Networks are broadly divided into 3 classes: Class A Class B Class C When sytems want to communicate over the internet they need to have a public IP address. This public IP address is unique for each system on the Internet. This public address has to be purchased from the Network Information Center (NIC) in Stanford. Systems inside a coorporation or cahbmpus can use private IP addresses to communicate to each other. These need not be purchased from NIC.
  2. We can identify the class of the network from the IPv4 address by examining the first bits of the IP address. For Class A first or Most Significant Bit(MSB) is 0. For Class B the first bit is 1 and second bit is 0 ie first two bits = 10 For Class C the first and second bits are 1 and the third bit 0 , first three bits =110 Each byte of the IP address is represented as a decimal integer and the 4 bytes of the IP address are separated by dots( . ) for human ease of readability. For example 10.200.20.5 is a Class A IP address because the first byte “10“ has a bit pattern 00001010. So 1 st bit is 0 making it a Class A address. Similarly 129.4.4.5 is a Class B address as 129 has bit pattern 1000 0001 So 1 st 2 bits are 10 making it Class B. Class C is similar Anything in the range 192 to 239 in the first byte is a Class C Address as the first 3 bits would be: 110
  3. In a Class A network the network part consists of the 1 st 8 bits, the remaining 24 bits are for the host part. So each pure Class A network can support (2 24 - 2) hosts . The reduction by 2 is due to one address each being reserved for the network address(all 0s in the host part) and broadcast address for the network(all 1’s in the host part) A pure Class A network cannot be used in practice. If at all it is used the number of hosts in the Class A network would be very much less than the maximum possible. Typically 30 – 254 is the optimum number of hosts possible on any network for transmission and reception to take place without collisions. So a Class A network would have to be divided into smaller networks called subnets. This is achieved by using the first bits in the host part to represent the address of the subnet. Each subnet now can operate independently of the others. Depending on the number of bits used for subnetting or dividing the original Class A network the number of hosts per subnet would correspondingly reduce.
  4. The first octet or digit in a Class A Network representation can vary from 0 to 127. 0 is reserved for representation of default route(0.0.0.0) 127 is reserved for loopback ( 127.0.0.1) Loopback address is the address used to loop back a packet within the ip stack without going out of the network card. Loopback is used for testing and for accessing applications locally through the ip layer. So the available addresses in Class A range from 1 to 126. Of these 10 is reserved as a private IP network prefix address to be used in organizations. For example Wipro uses 10.0.0.0 to 10.255.255.255 as the range of its local IP network, host and broadcast addresses in this range. So too do other organizations.
  5. The range of the 1 st octet or byte of a Class B address is therefore: 128 to 191 Class B network part has 16 bits. So Class B network addresses range from: 128.0.0.0 128.1.0.0 … .. 128.255.0.0 129.0.0.0 … .. 129.255.0.0 … . 191.0.0.0 … . 191.255.0.0 Remember 0.0 in the last 2 bytes corresponds to a network address.
  6. Since the 1 st 3 bits in the network part of a Class C address is 110, The range of Class C network adddresses is: 192.0.0.0 192.0.1.0 .. 192.255.255.0 … .. 223.255.255.0 Remember that Class C has 24 bits in the network part and 8 bits in the host part. The broadcast address for the 192.0.0.0 network is 192.0.0.255 Here all the last 8 bits, the host part, are 1s. Class C networks and Class B networks just like Class A networks can be subnetted or divided into smaller subnets. The maximum number of hosts in a Class C network is 256 -2 = 254. The Class C network 192.0.0.0 has host addresses in the range: 192.0.0.1 to 192.0.0.254 . Note 192.0.0.25 is broadcast address and 192.0.0.0 is the network address.
  7. Class D networks are used for multicasting or group addressing for applications like audio and video conferencing over IP networks. Class D networks have the 1 st 4 bits in the network part = 1110 So the first octet or byte ranges from 224 to 239. There is no other interpretation of the remaining part. All the addresses from 224.0.0.0 to 239.255.255.255 can be used as multicast addresses. Some of the addresses in the 224 range are reserved for special purposes like OSPF multicast messages amongst routers. The process of multicasting involves registration of a client to a multicast server for joining a multicast group. The multicast server allocates a multicast group address to which the client now belongs. This multicast address can be used for communication amongst the group. Any ip packet with the multicast ip address will be delivered to al members of the group.
  8. Multicasting can also be enabled on routers so that multicast groups can span different networks or subnetworks(subnets). The multicast IP address determines the multicast MAC address. The last 23 bits of the multicast ip address of a group a client belongs to is appended to a fixed value in the 1 st 25 bits of the MAC address. 1 st 24 bits in MAC address for multicasting is: 01:00:5e followed by the 25 th bit as 0. After this the last 23 bits of IP address is added to form the MAC multicast address. For example if Multicast IP address is : 224.9.10.11 the last 23 bits are 09:0a:0b with a 0 bit added in front( Note 10 is “0a” in hex and 11 is “0b” in hex.) The fixed part being 01:00:5e the MAC address corresponding to 224.9.10.11 multicast IP address is: 01:00:5e:09:0a:0b Suppose the multicast IP address is 224.1.2.3 the corresponding Multicast MAC address is 01:00:5e:01:02:03
  9. These are the IP address ranges reserved for private networks within organizations. These addresses will not be allocated by NIC as public IP addresses for the Internet. The Class A private addresses are in range 10.0.0.0 to 10.255.255.255 Which means there are 2 24 addresses approximately available. Of course due to subnetting some ip addresses will be lost for subnet ip addresses and subnet broadcast addresses. All organizations be it Wipro, TCS . IBM or Microsoft use this range of addresses. There is no problem of clash because when a packet goes outside the organization the local ip adress gets translated into the public IP address purchased by the organization. In Class B a lesser number of addresses in range 172.16.0.0 to 172.3.255.255 is available. In Class C anything starting with 192.168 is a private IP address. Private IP address allocation is a good example of reusability. Service providers allocate private ip addresses to connected Home or Small Office subscribers( SOHO..SmallOffices and Homes)
  10. This is the complete range of Reserved and Available IP addresses As mentioned 0.0.0.0 is reserved for default routing address. Anything starting with 127 is reserved for loopback. Some other addresses like 128.0.0.0, 191.255.0.0, 192.0.0.0 and 223.255.255.0 are reserved by NIC for its own use. Of course addresses stating with 10, 172.16 to 172.31 and 192.168 are reserved for private addressing. 255.255.255.255 is used for broadcasting to local subnet.
  11. Find the Class, Network Address and the host part of each of these addresses.
  12. 172.16.0.0 is a pure Class B network address. For this network all hosts will have the same common 1 st 16 bits corresponding to 172.16 This is also represented as a subnet mask. The subnet mask for a pure Class B network also called the default subnet mask for a Class B network is 255.255.0.0. This means that the 1 st 16 bits of all hosts on the same network will be the same ie if a host in the Class B network 172.16.0.0 with IP address say 172.16.1.1 has its IP address anded bitwise with the subnet mask 255.255.0.0 ( 1 st 16 bits 1 and remaining 16 bits 0) then the result of the anding operation will be the network address 172.16.0.0 All hosts on the network 172.16.0.0 will have network part same 172.16, the host part will be different. The subnet mask is giving the information as to how many bits in the ip address is common for the hosts on a network or subnet. In other words all hosts on a pure Class A.B or C network or its subnets will have the same value in the bits corresponding to 1s in the subnet mask for the network or subnet This also logically implies that every network or subnet will have its own subnet mask which is characteristic of that network or subnet. Subnets are derived from pure ClasA, Class B or Class C networks.
  13. This figure explains how subnet masks are converted to decimal addresses. It sometimes is useful to remember them. One possible view of logical AND is as follows: We will need to be able to perform a logical AND on the binary numbers. Just take two binary numbers and place one above the other. The ones in the bottom are like a pipe—the number above it just drops through. The zeros are like a clogged pipe, so nothing comes out in the answer.
  14. Here default subnet mask is used for pure Class B network without subnetting
  15. This example makes a Class B address space look like a collection of Class C address spaces. This is because we are subnetting a Class B Network 172.16.0.0 using 8 more bits for subnetting. So the subnet mask becomes 255.255.255.0 which is the same as the default subnet mask for a pure Class C network. Now the logical AND allows us to extract the subnet number as well as the assigned network number. The subnet number is from bits 17-24 counting the most significant bit as bit 1. The subnet address however will be 172.16.2.0 which includes the pure Class B network part 172.16 and the subnet number 2
  16. Here we are splitting up the Class B network 172.16.0.0 into 1024 subnets ( 2 10 = 1024) So the subnet mask is 255.255.255.192 ( Totally 26 1s followed by 6 0s. No of 1s 10 more than in default subnet mask for Class B , which is 16 1s followed by 16 0s)
  17. A range of addresses is needed to allocate address space. A valid range of addresses is between subnet zero and the directed broadcast. These RFCs provide more information about broadcasts: RFC 919, Broadcasting Internet Datagrams RFC 922, Broadcasting IP Datagrams in the Presence of Subnets Cisco’s support for broadcasts generally complies with these two RFCs. It does not support multisubnet broadcasts that are defined in RFC 922. Typically routers nowadays will not support broadcast to mu;tiple subnetsto prevent unnecessary wastage of bandwidth. In fact in IPv6 (Version 6) there is no broadcast at all, only multicasts and unicasts
  18. Convert the given address address to a binary host address.
  19. Write the subnet mask in binary.
  20. Draw a line at the end of the ones in the subnet mask.
  21. Fill in zeros beyond the vertical line for getting the subnet address of the subnet the given IP address is a part of.
  22. Fill in ones beyond the vertical line for the broadcast address for this subnet.
  23. Fill in 0s beyond the vertical line except for the last bit. Make that bit a 1. This is the first usable host address in the given subnet.
  24. Fill in 1s beyond the vertical line except for the last bit. Make that bit a 0. This is the last usable host address in the subnet.
  25. Alternative Method: Step 1: Take the subnet mask Here it is 255.255.255.192 Step 2: Find the first octet in subnet mask which is not 255 Here it is the last octet, 192 Step 3: Subtract this value from 256 Here 256 -192 = 64. Now 64 is the difference between successive subnet addresses in this octet. Step 4: Find between which subnet addresses the given IP address falls. then take the lower subnet address of the two as the subnet address of the subnet the IP address belongs to Here the subnet addresses in 4 th octet are: 172.16.2.0 172.16.2.64 172.16.2.128 172.16.2.192 2 bits used in 4 th octet , so 4 subnets will lie in 4 th octet.
  26. The Network layer is concerned with getting packets from the source to the destination. That is it is in charge of routing the packets along the best possible path. The process of routing takes place at each intermediate router along the path. In this typical network topology, Subnet 192.168.88.0 has 2 hosts shown in figure connected to the Layer 2 switch. These are hosts 192.168.88.40 and 192.168.88.20. Moreover the bottom most interface of Router A is also connected to the same switch and is also on the same subnet with an IP address of 192.168.88.2 as shown in diagram. Similarly the 192.168.89.0 subnet connected through another Layer 2 switch has 2 hosts( 192.168.89.40 and 192.168.89.20) and the router A’s top interface 192.168.89.2. Router A has a 3 rd interface with IP address 192.168.90.2 on the 192.168.90.0 subnet. So Router A is the junction of 3 subnets: 192.168.88.0, 192.168.89.0 and 12.168.90.0 Similarly router B connects 2 subnets 192.168.90.0 and 192.168.91.0. Router C is connected to 192.168.91.0 subnet and another subnet on its other interface which is not specified in the diagram. As can be seen Routers are connected to each other through a common subnet.
  27. This is the route table on the host with IP address 192.168.88.20 If you want to see the route table on a Windows machine, At the command prompt type: C:>route –print The route table will be displayed similar to shat is shown above. IF you see the botommost entry in the table this corresponds to the ip address of the same machine. So the subnet mask is all 1s ie 255.255.255.255. So first when the ip layer receives a packet from the higher layer it tries to find a match with this subnet mask. Basically matching occurs in the order of the length of 1s in the subnet mask, the longest 1s order subnet mask being processed first and so on. Note that the entry for this bottom row has Outgoing interface entry as 127.0.0.1 which coresponds to loopback interface.
  28. This example shows how packets to other networks will be routed through the gateway Router A for host 192.168.88.40
  29. This is the Routing Table for Router A. Router A has 3 directly connected subnets: 192.168.88.0 192.168.89.0 192.168.90.0 So there are 3 entries or rows corresponding to these 3 subnets. For these directly connected subnets, ie rows 2,3 & 4, the Gateway IP column and the Interface column will be the same, ie the ip address of the interface of Router A directly connected to the subnet. Those 3 interfaces are respectively: 192.168.88.2 on 192.168.88.0 subnet 2. 192.168.89.2 on 192.168.89.0 subnet 192.168.90.2 on 192.168.90.0 subnet
  30. Router B has 2 subnets directly connected, 192.168.90.0 and 192.168.91.0 There are same number of rows 5 as in router A. 4 correspond to the 4 different subnets shown in the topology and 1 is for default route. Typically in the simplest scenario the number of rows or entries in the routing table of each router will be the same as the number of subnets in the whole network excluding the default route entry. In this toplolgy there will be 5 rows in each of the routers A,B & C.
  31. Routing Protocols are used by Routers to exchange their routes with each other. There are 2 types of Routing Protocols: Interior Gateway Protocols Exterior Gateway Protocols Interior Gateway Protocols are used within the private intranet of an organization. Exterior Gateay protocols are used by one organization to communicate and find out routes to other organizations. For example Exterior Gateway protocol would be necessary for Wipro Mail Server to talk to Infosys or TCS mail server and vice versa. For communication within Wipro only Interior Gateway Protocols between the Routers in Wipro intranet is used. Interior Gateway Protocols can be of different types.
  32. As a packet is sent down through the network layers, routing determines the protocol address of the next hop for the packet and on which piece of hardware it expects to find the station with the immediate target protocol address. In the case of the Ethernet, address resolution is needed and lower layer must consult the Address Resolution module to convert the <protocol type, target protocol address> pair to a 48.bit Ethernet address. The Address Resolution module tries to find this pair in a table. If it finds the pair, it gives the corresponding 48.bit Ethernet address back to the caller (hardware driver) which then transmits the packet.
  33. An ARP message, which contains the Internet address of the host you want the physical address of, is broadcast to all the hosts on the network. Only the host which recognizes its own IP address will respond by sending its physical address back to the transmitting host. All the other hosts will ignore the ARP broadcast. The transmitting host can now store this information for later use.
  34. In order to deliver a datagram to another host on the same network, the transmitting host maps the Internet address onto the physical address. Therefore, if the transmitting host only knows the Internet address of the receiving host, it must have some means of getting its physical address.