Day14 - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Day14

Description:

Day14. CIDR. Classless Inter-Domain Routing. IP Addresses. Each computer connected directly to internet must have a unique IP address ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 18
Provided by: endasu
Category:
Tags: classless | day14

less

Transcript and Presenter's Notes

Title: Day14


1
Day14
  • CIDR
  • Classless Inter-Domain Routing

2
IP Addresses
  • Each computer connected directly to internet must
    have a unique IP address
  • Address is made up of 2 parts
  • Network Address
  • Host Address
  • E.g. 10.0.0.1 may be host 1 in the network
    10.0.0.0
  • Not all networks are the same size.
  • Because of differing needs, some networks can
    hold 2 hosts, some can hold 16,777,216 hosts.
  • Therefore we need to be able to specify how much
    of the IP defines is the host address, and how
    much defines the network.

3
Format of IP
  • Dotted Decimal
  • Each element is called an octet
  • There are 4 octets
  • Example
  • 10.0.0.1
  • Binary
  • 00001010 00000000 00000000 00000001
  • Hex
  • 0a000001
  • Decimal
  • 167,772,161

4
Subnet Masks (netmask)
  • A netmask defines how much of the IP address
    represents the network, and how much represents
    the host.
  • Example
  • My IP address is 123.123.123.5
  • Everyone in my network has an IP address
    123.123.123.X
  • Network Address is 123.123.123.0
  • My host address is .5

5
Netmasks
  • A netmask is a 32 bit number just like an IP
    address.
  • Valid netmasks have sequential 1s followed by
    0s.
  • Example of a valid netmask
  • 255.255.255.0
  • 11111111.11111111.11111111.00000000
  • Example of an Invalid netmask
  • 11111111.11111111.11111101.00000000

6
The netmask masks the IP address
  • The 1s and 0s in the netmask correspond to the
    network and host portions of the IP address.
  • Example
  • IP address 10.0.0.1
  • 00001010 00000000 0000000 00000001
  • Netmask 255.0.0.0
  • 11111111 00000000 0000000 00000000
  • Thus the network address is
  • 10
  • And the host address is
  • 0.0.1

7
Common Netmasks
  • 255.0.0.0 (Class A).
  • 255.255.0.0 (Class B).
  • 255.255.255.0 (Class C).

8
Example
  • IP 139.131.1.147 / 255.255.255.0
  • What network is this host in?
  • 139.131.1.0
  • What is the host ID?
  • 147

9
Simple netmask example
  • Address
  • 200.200.200.55
  • Netmask
  • 255.255.0.0
  • 11111111 . 11111111 . 00000000 . 00000000
  • This tells us
  • 200 . 200 . 200 . 55

Network Address
Host Address
10
It gets worse!
  • Unfortunately the host address can start at ANY
    of the 32 bits, not just on the 8 bit boundaries.
  • More complex Netmask Example
  • 255.255.255.128
  • 11111111 . 11111111 . 11111111 . 10000000
  • Now our IP address 200.200.200.55 is part of
  • Netmask 255.255.255.128
  • Lowest Address 200.200.200.0
  • Highest Address 200.200.200.127

Network Address
11
255.255.255.128 netmask means
  • When the netmask was 255.255.255.0 we had 256
    addresses in network
  • Once it becomes 255.255.255.128, we now only have
    128 addresses in network.
  • If we took a 255.255.255.0 network, and used a
    255.255.255.128 netmask on it
  • Our 256 address network, is now divided into 2
    networks
  • 200.200.200.0 - 200.200.200.127
  • 200.200.200.128 - 200.200.200.255
  • They BOTH have the netmask 255.255.255.128

12
What are all the valid netmasks?
  • 11111111.11111111.11111111.00000000
    255.255.255.0
  • 11111111.11111111.11111111.10000000
    255.255.255.128
  • 11111111.11111111.11111111.11000000
    255.255.255.192
  • 11111111.11111111.11111111.11100000
    255.255.255.224
  • 11111111.11111111.11111111.11110000
    255.255.255.240
  • 11111111.11111111.11111111.11111000
    255.255.255.248
  • 11111111.11111111.11111111.11111100
    255.255.255.252
  • 11111111.11111111.11111111.11111110
    255.255.255.254
  • 11111111.11111111.11111111.11111111
    255.255.255.255
  • Of course, this is only looking at the class C
    networks

13
What the netmasks mean
  • 255.255.255.0 1 Network 256 addresses
  • 255.255.255.128 2 Networks 128 addresses in each
  • 255.255.255.192 4 Networks 64 addresses in each
  • 255.255.255.224 8 Networks 32 addresses in each
  • 255.255.255.240 16 Networks 16 addresses in each
  • 255.255.255.248 32 Networks 8 addresses in each
  • 255.255.255.252 64 Networks 4 addresses in each
  • 255.255.255.254 ??? ???
  • 255.255.255.255 This is a single machine.

Whats wrong here?
14
Computing a Netmask
  • Given a range of addresses (199.120.197.0 -
    199.120.197.127), you can compute the netmask
  • Subtract the lowest number in the range from the
    highest
  • 199.120.197.127 - 199.120.197.0 0.0.0.127
  • (this means that there are 128 addresses in
    the range -- because 0 counts).
  • Subtract the resulting number from
    255.255.255.255
  • 255.255.255.255 - 0.0.0.127 255.255.255.128

15
Computing the Address Range
  • Given a network (255.255.255.128), you can
    compute the range of addresses
  • Subtract the netmask from 255.255.255.255
  • 255.255.255.255 - 255.255.255.128 0.0.0.127
  • Add 1 to each octet which is gt 0
  • 127 1 128 0.0.0.128
  • Now you see that there are 128 addresses in this
    range.
  • (If your answer were 0.0.128.256, you would know
    that there were 128256 addresses in the range.)

16
Another Example
  • A Network address is 199.120.197.144
  • Its netmask is 255.255.255.240.
  • How many IP addresses are in this network?

17
Answer
  • 199.120.197.144 / 255.255.255.240.
  • How many IP addresses are in this network?
  • 255.255.255.255 - 255.255.255.240
  • 0.0.0.15
  • Therefore, we have 16 IP addresses in this
    network
  • 199.120.197.144 - 199.120.197.159
  • Note That is 16, because 144 is one of them.
Write a Comment
User Comments (0)
About PowerShow.com