Network layer addressing

advertisement
Chap 10 Routing and
Addressing
Andres, Wen-Yuan Liao
Department of Computer Science and Engineering
De Lin Institute of Technology
andres@dlit.edu.tw
http://www.cse.dlit.edu.tw/~andres
Importance of a Network
Layer
Identifiers
Segmentation and autonomous
systems
Communication between separate
networks
Layer 3 network devices
Identifiers
Move data through a set of
networks (internetwork)
Network layer: hierarchical
addressing
 Unique
addresses across network
boundaries
 A method for finding a path
MAC addresses: flat addressing
Segmentation and
autonomous systems
Multiple networks are necessary
 The
growth in size of each network
 The growth in the number of
networks
Network segments (or just
segments)
Communication between
separate networks
Internet is a collection of
network segments
Internet service providers (ISPs)
offering services that tie
together multiple network
segment
Layer 3 network devices
Routers are internetworking
devices which operate at OSI
Layer 3
Tie together, or interconnect,
network segments or entire
networks
Layer 3 network devices
Routers make logical decisions
regarding the best path on an
internetwork and then direct
packets
Routing is sometimes referred
to as Layer 3 switching
Path Determination
Path determination
Network layer addressing
Layer 3 and computer
mobility
Comparing flat and
hierarchical addressing
Path determination
Routing the packet
 The
process that the router uses
to choose the next hop in the
path for the packet to travel to its
destination
Make their decisions based on
the traffic density and the speed
of the link
Network layer addressing
Network address
 The
router uses the network
address to identify the
destination network of a
packet within an internetwork.
Host address
Layer 3 and computer
mobility
A MAC address can be
compared to your name
The network address to your
mailing address
Comparing flat and
hierarchical addressing
A flat addressing scheme
 Assigns
a device the next
available address
The postal system ZIP codes
are a good example of
hierarchical addressing
IP Addresses within the IP
Header
Network layer datagrams
Network layer fields
IP header source and destination
fields
IP address as a 32-bit binary
number
IP address component fields
IP address component
fields
The network number of an IP
address identifies the network
to which a device is attached
The host portion of an IP
address identifies the specific
device on that network
IP Address Classes
IP address classes
IP addresses as decimal
numbers
Class A
The first (leftmost) bit is always 0
First octet of its IP address: 0-126
A Class A IP address can have
assigned up to 224 - 2 or
16,777,214, possible IP
addresses
Class B
The first 2 bits: 10
First octet of its IP address:128
to 191
A Class B IP address can have
assigned up to 216 - 2, or 65,534,
possible IP addresses
Class C
The first 3 bits: 110
First octet of its IP address:192
to 223
A Class C IP address can have
assigned up to 28 - 2, or 254,
possible IP addresses
Reserved Address Space
Purposes for network IDs and
broadcast addresses
Network ID
Network ID analogy
Broadcast address analogy
Hosts for classes of IP
addresses
Purposes for network IDs
and broadcast addresses
An IP address that ends with
binary 0s in all host bits is
reserved for the network
address
 The
wire address
Class A network: 113.0.0.0
 Contain
the host 113.1.2.3
Network & Host ID
A network ID
 Enable
a router to put a packet onto
the appropriate network segment
The host ID
 Help
the router address the Layer 2
frame to the specific host on that
network
Basics of Subnetting
Classical IP Addressing
Subnetwork
Purpose for subnetting
Subnet mask
Boolean operations: AND, OR,
and NOT
Performing the AND function
Classical IP Addressing
Network administrators
sometimes need to divide
networks into smaller networks
Subnetworks
 Provide
addressing flexibility
 Be simply referred to as subnet
Subnetwork
Subnet addresses include
 The
Class A, Class B, or Class C
network portion
 A subnet field
 A host field
To create a subnet address
 Borrows
portion
bits from the original host
Subnetwork
The minimum number of bits
that can be borrowed is 2
The maximum number of bits
that can be borrowed can be
any number that leaves at least
2 bits remaining, for the host
number
Purpose for subnetting
A primary reason for using
subnets is to reduce the
size of a broadcast
domain
Subnet mask
The subnet mask determines
which part of an IP address
is the network field and
which part is the host field
Subnet
Routers determine the
destination network/subnet
address
 Perform
a logical AND using the
destination host's IP address and
the subnet mask
 The result will be the
network/subnet address
Creating a Subnet
Range of bits needed to create subnets
Determining subnet mask size
Computing subnet mask and IP address
Computing hosts per subnetwork
Boolean AND operation
IP configuration on a network diagram
Host/subnet schemes
Private addresses
The subnet field always follows immediately after the network number
Example
Class C address 197.15.22.131
Subnet mask of 255.255.255.224
224:11100000
Been extended by 3 bits: 27 bits
The 131: the third usable host
address in the subnet 197.15.22.128
Example
The routers in the Internet (that
don't know the subnet mask)
will only worry about routing to
the Class C network
197.15.22.0
The routers inside that network,
knowing the subnet mask, will
be looking at 27 bits to make a
routing decision
Example
Class B network:subnet mask
of 255.255.240.0


The number 240 decimal is
11110000
4 bits for the subnet field.
Example
Number - 0000 ~ 1111 (15)
 Sixteen
subnets
 Cannot use subnet 0 (network
address), and subnet 15 (1111)
(broadcast address)
 Fourteen usable subnets (1-14)
Computing hosts per
subnetwork
Borrow 2 bits from the default 8 bit
host field
The total number of possible hosts:
64 (26)
The number of usable host
numbers would be reduced to 62
IP configuration on a
network diagram
When you configure routers,
you must connect each
interface to a different network
segment
Then each of these segments
will become a separate subnet
Private addresses
There are certain addresses in
each class of IP address that
are not assigned
Private addresses might be
used by hosts that use network
address translation (NAT), or a
proxy server, to connect to a
public network
Summary
Network addressing and best
path selection
Flat and hierarchical.
Three classes of IP addresses
Subnetworks or subnets
Subnet masks
Download