Network and Programming Systems

IP Addressing

A short and inaccurate history of the Internet

  1. Prehistory
    • the telegraph
    • processor linking
    • time-sharing terminals
    • telephone exchange
    • dedicated networks
  2. Interface Message Processor (IMP) subnets
  3. packet switching
    • Advanced Research Projects Agency Network (ARPANET), 1967
    • National Physics Laboratory (NPL), 1970
  4. Internetworking, intercompatibility
    • CYCLADES, 1973
  5. Internet Assigned Number Authority (IANA), 1972
  6. Transmission Control Protocol (TCP), 1974, (DARPA)
  7. Dynamic Name Server (DNS), 1984
  8. USENET, 1984
  9. World Wide Web (WWW), 1991

The need for standarization

For each of these three terminals, I had three different sets of user commands. So if I was talking online with someone at S.D.C. and I wanted to talk to someone I knew at Berkeley or M.I.T. about this, I had to get up from the S.D.C. terminal, go over and log into the other terminal and get in touch with them...

I said, oh man, it's obvious what to do: If you have these three terminals, there ought to be one terminal that goes anywhere you want to go where you have interactive computing. That idea is the ARPAnet.

Robert Taylor. An Internet Pioneer Ponders the Next Revolution. The New York Times. 20 XII 1999.

Internet Protocol addressing

What is a protocol?

The problem:

  • How to send data to a device in a network.
  • How to send data to a specific device in a network.

IP address

Dotted decimal representation

The binary notation is unwieldy, so the dotted decimal representation is usually used:

  • 4 single-byte dot-separated segments, and
  • each byte is represented as a single decimal number in the domain.

Counting computers on the Internet

How many computers can be addressed.

Subnetwork addresses

The anatomy of an IP address

Special addresses: network address

A network address is a special IP address whose computer part is zeroed (consists only of zeroes). This is the address that represents the network, without reference to any computers in the network.

Examples:

  • assuming 2B network part, 2B computer part:

    150.254.0.0 → 1001011011111110000000000000000

  • assuming 3B network part, 1B computer part:

    192.168.1.0 → 11000000101010000000000100000000

  • assuming 30b network part, 2b computer part:

    10.0.1.12 → 0000101000000000000000100001100

Special addresses: broadcast address

A broadcast address* is a special IP address whose computer part consists only of ones. This address represents all the computers in the network. For instance, a message sent to a broadcast address will be received by all the computers in the network.

Examples:

  • assuming 2B network part, 2B computer part:

    150.254.255.255 → 10010110111111101111111111111111

  • assuming 3B network part, 1B computer part:

    192.168.1.255 → 11000000101010000000000111111111

  • assuming 30b network part, 2b computer part:

    10.0.1.15 → 0000101000000000000000100001111

IP address masking

The information about where the division lies between the network part and the computer part can be denoted as a mask consisting of some sequence of 1-s followed by some sequence of 0-s. A functional IP address should always contain this information.

  • 150.254.255.255/16
  • 192.168.1.255/24
  • 10.0.1.15/30

In shortened notation /n indicates that the network part is n-bits long.

This represents a mask.

  • 150.254.255.255/1610010110111111101111111111111111 11111111111111110000000000000000150.254.255.255 255.255.0.0

Calculating a network address

The mask can "hide" the computer address in an IP address and derive the network address. This is done by AND-ing the IP address with its mask.

For example:

Computer address: 150.150.10.10/16

Mask (from /16): 255.255.0.0

Binary representation: 10010110100101100000101000001010 11111111111111110000000000000000

Network address: 10010110100101100000101000001010 AND 11111111111111110000000000000000 = 10010110100101100000000000000000

Dotted decimal represenation of the network address: 150.150.0.0/16

Calculating the addressing range

How many computers can there be in a network?

Remember that the broadcast address and the network address are "taken."

Example:

  • Network: 150.150.0.0/16

10010110 10010110 00000000 00000000

150.150.0.0

network address

10010110 10010110 00000000 00000001

150.150.0.1

address of computer no 1

10010110 10010110 00000000 00000010

150.150.0.2

address of computer no 2

...

...

10010110 10010110 11111111 11111110

150.150.255.254

address of last computer in the network

10010110 10010110 11111111 11111111

150.150.255.255

broadcast address

  • address range: 150.150.0.1--150.150.255.254
  • the number of computers that can be addressed in this network: 2^{16} - 2

Public address registration

Addressing in the Internet needs to meet two requirements:

  1. unique network address -- public address registration: regional institutions controlled by IANA regulate assigning IP networks:
  2. unique computer address within network -- job of the network administrator

RIR service regions

Classful allocation

  1. Initially the only mask possible was 16. This was inefficient and dropped fast.
  2. Classful addressing divided address space into classes:
    • A class - big networks, most significant bit 0, min. mask /8
    • B class - medium, most significant bits 10, min.mask /16
    • C class - small, most significant bits 110, min. mask /24
    • D class - multicast, 1110
    • E class - reserved (now given away)

Obolescence

Since its discontinuation, remnants of classful network concepts remain in practice only in limited scope in the default configuration parameters of some network software and hardware components (e.g., default subnet mask).

Reserved addresses:
  • 127.0.0.0/8 – loopback
  • 192.0.2.0/24 – example (TEST-NET)

Private addresses

Motivation:

  • Not all addresses need to be unique
  • Small allocation space of IPv4
  • Network Address Translation (NAT)

Private address: no registration, not routable in the Internet.

  • 10.0.0.0/8 (old class A)
  • 172.16.0.0/12 (old class B)
  • 192.168.0.0/16 (old class C)

Exercises

  1. Display your IP address (Linux ip address, Windows ipconfig).
  2. Calculate number of ones in the mask and the network address.
  3. Give a formula for the number of computers in a network with a known mask length (n).
  4. Calculate computer range and broadcast address for 150.150.64.0 255.255.192.0
  5. Display your computer's IP address and mask (ipconfig``on Windows, ``ip addr on Linux). What is:
    • the address of your computer
    • the network mask
    • the network address of the network the computer is in
    • the broadcast address of the network the computer is in
  6. Is your computer inside a private network?
  7. Let /n be the network mask of some network. Provide a general formula to count the number of computers that can have addresses within that network.
  8. What is the range of addresses and the broadcast address of a network with the address: 150.150.64.0 and mask 255.255.192.0.
  9. How many computers can have addresses within class A, B, and C?

Quality survey

Survey

SpaceForward
Right, Down, Page DownNext slide
Left, Up, Page UpPrevious slide
POpen presenter console
HToggle this help