18/08/2021
IP address                                                            Cont’d…
                                                       • The identifier used in the IP layer of the TCP/IP                         • No two connections on the Internet can have
                                                         protocol suite to identify the connection                                   the same IP address at the same time
                                                       • of each device to the Internet is called the Internet                     • An IPv4 address is a 32-bit address that
                  Chapter 7                              address or IP address
                                                                                                                                     uniquely and universally defines the connection
                                                       • IP address is method or protocol by which data is sent
                                                         from one computer to another on the internet                                of a host or a router to the Internet.
                                                       • Is the address of connection                                              • unique in the sense that each address defines
        Introduction to IP addressing and
                                                       • Each computer (known as host) on the internet has at
                   Subnetting                            least one IP address that uniquely identifies it from all                   one, and only one, connection to the Internet
                                                         other computers on internet                                               • universal in the sense that the addressing
                                                       • If device is two connection to the internet network it                      system must be accepted by any host that
                                                         has two IP addresses
                                                                                                                                     wants to be connected to the Internet
               Address space                                                    Notation
• A protocol like IPv4 that defines addresses has an      • The common notations to show an IPv4 address:
                                                                                                                                 • A 32-bit IPv4 address is also hierarchical, but
                                                              – binary notation (base 2)
  address space.                                              – dotted-decimal notation (base 256)                                 divided only into two parts.
• is the total number of addresses used by the                – hexadecimal notation (base 16).
  protocol. If a protocol uses b bits to define an        • In binary notation, an IPv4 address is displayed as 32 bits          • The first part of the address, called the prefix,
                                                          • To make the address more readable, one or more spaces are
• address, the address space is 2 ^b because each           usually inserted between each octet (8 bits)                           defines the network;
  bit can have two different values (0 or 1).             • Each octet is often referred to as a byte                            • the second part of the address, called the
• IPv4 uses 32-bit addresses, which means that the        • To make the IPv4 address more compact and easier to read, it is
  address space is 2^32 or 4,294,967,296                    usually written in decimal form with a decimal point (dot)             suffix, defines the node (connection of a
                                                            separating the bytes.
• If there were no restrictions, more than 4 billion      • This format is referred to as dotted-decimal notation.                 device to the Internet)
  devices could be connected to the Internet.             • Note that because each byte (octet) is only 8 bits, each number in
                                                            the dotted-decimal notation is between 0 and 255.
                                                                                                                                                                                           1
                                                                                                                           18/08/2021
                                                                               Classful addressing
          • A prefix can be fixed length or variable               • When the Internet started, an IPv4 address was
            length.                                                  designed with a fixed-length prefix
          • The network identifier in the IPv4 was first           • But to accommodate both small and large
            designed as a fixed-length prefix                        networks, three fixed-length prefixes were
          • This scheme, which is now obsolete, is                   designed instead of one (n = 8, n = 16, and n =
            referred to as classful addressing.                      24).
          • The new scheme, which is referred to as                • The whole address space was divided into five
            classless addressing, uses a variable-length             classes (class A, B, C, D, and E),
            network prefix                                         • This scheme is referred to as classful addressing.
Cont’d…   Problems with Classful IP Addresses                        Problems with Classful IP Addresses
           • The original classful address scheme had a number       Problem 3. Inflexible. Assume a company requires
             of problems
                                                                        2,000 addresses
                                                                        – Class A and B addresses are overkill
           Problem 1. Too few network addresses for large
             networks                                                   – Class C address is insufficient (requires 8 Class C
              – Class A and Class B addresses are gone                    addresses)
                                                                        – Fix #2: Classless Interdomain Routing (CIDR)
           Problem 2. Two-layer hierarchy is not appropriate for
             large networks with Class A and Class B addresses.
              – Fix #1: Subnetting
                                                                                                                                   2
                                                                                                                                                                            18/08/2021
    Problems with Classful IP Addresses                     Problems with Classful IP Addresses                                 Class A Addresses
     Problem 4: Exploding Routing Tables: Routing on         Problem 5. The Internet is going to outgrow the 32-
       the backbone Internet needs to have an                  bit addresses
                                                                                                                       Class A IP addresses use the 1st 8 bits
       entry for each network address. In 1993, the
                                                                                                                      (1st Octet) to designate the Network address.
       size of the routing tables started to outgrow            – Fix #3: IP Version 6
       the capacity of routers.                                                                                        The 1st bit which is always a 0, is used to ind
                                                                                                                        icate the address as a Class A address & the r
                                                                                                                        emaining 7 bits are used to designate the
       – Fix #2: Classless Interdomain Routing (CIDR)
                                                                                                                      Network.
                                                                                                                       The other 3 octets contain the Host address.
Class A Addresses (Cont.)                                Class A Addresses (Cont.)                                     Class A Addresses (Cont.)
                                                                                                                      • For a Class A network, there are:
                                                         There are 16,777,214 Host addresses available in a Cla
 There are 128 Class A Network Addresses,                                                                                            224 – 2 or 16,777,214 hosts.
                                                          ss A address.
but because addresses with all zeros aren’t used         Rather than remembering this number exactly, you
                                                                                                                      • Half of all IP addresses are Class A addresses.
& address 127 is a special purpose address, 126                                                                       • You can use the same formula to determine the
                                                        can use the following formula to compute the number of
Class A Networks are available.                                                                                         number of Networks in an address class.
                                                        hosts available in any of the class addresses, where “n” re
                                                                                                                      • Eg., a Class A address uses 7 bits to designate the
                                                        presents the number of bits in the host portion:
                                                                                                                        network, so (27 – 2) = 126 or there can be 126 Class A
                                                                  (2n – 2) = Number of available hosts                  Networks.
                                                                                                                                                                                    3
                                                                                                                                                          18/08/2021
Class B IP Addresses                               Class B IP Addresses (Cont.)                         Class C IP Addresses
                                                   • So how many Class B Networks can there be?         • Class C addresses use the 1st 24 bits (three
• Class B addresses use the 1st 16 bits (two                                                              octets) for the Network address & only the
  octets) for the Network address.                 • Using our formula, (214 – 2), there can be
                                                                                                          last octet for Host addresses.
• The last 2 octets are used for the Host            16,382 Class B Networks & each Network can
                                                     have (216 – 2) Hosts, or 65,534 Hosts.             • the 1st 3 bits of all class C addresses are set to
  address.                                                                                                110, leaving 21 bits for the Network address,
• The 1st 2 bit, which are always 10, designate                                                           which means there can be 2,097,150 (221 – 2)
  the address as a Class B address & 14 bits are                                                          Class C Networks, but only 254 (28 – 2) Hosts
  used to designate the Network. This leaves                                                              per Network.
  16 bits (two octets) to designate the Hosts.
Class C IP Addresses (Cont.)                       Special Addresses                                    Special Addresses (Cont.)
                                                   • A few addresses are set aside for specific
                                                     purposes.
                                                   • Network addresses that are all binary zeros, all
                                                     binary ones & Network addresses beginning
                                                     with 127 are special Network addresses.
                                                                                                                                                                  4
                                                                                                  18/08/2021
Special Addresses (Cont.)                           Special Addresses (Cont.)
• Within each address class is a set of addresses
  that are set aside for use in local networks          • A list of these addresses for each IP
  sitting behind a firewall or NAT (Network               address class:
  Address Translation) device or Networks not
  connected to the Internet.