192.168.32.112-119

Download Report

Transcript 192.168.32.112-119

Network Layer Fundamentals
3rd Tutorial Session for CEG3180B
February 1st, 2005
Stejarel Veres <[email protected]>
The ISO OSI Model
 A conceptual, layered model for designing
networked systems (i.e., both the hardware
and software components that relate to
networking a certain system)
 7 Layers (from top to bottom): Application,
Presentation, Session, Transport, Network,
Data Link, Physical
 The higher the layer, the more abstract its
functions are with respect to the actual
physical transmission
Stejarel Veres <[email protected]>
2
The ISO OSI Model
 A conceptual, layered model for designing
networked systems (i.e., both the hardware
and software components that relate to
networking a certain system)
 7 Layers (from top to bottom): Application,
Presentation, Session, Transport, Network,
Data Link, Physical
 The higher the layer, the more abstract its
functions are with respect to the actual
physical transmission
Stejarel Veres <[email protected]>
3
The ISO OSI Model (cont’d)
 Allows for transparent peer-to-peer
communication between same layers
of two networked systems
 Top four layers: “network layers”; the
other three layers: “host layers”
 Beginning with the upmost half of the
Data Link Layer (the LLC Sub-Layer),
operations are media-independent
Stejarel Veres <[email protected]>
4
The Network Layer
 Two fundamental functions:
 Logical network topology and Addressing
 Path determination (i.e., Datagram
routing)
 The rest of this discussion focuses on
the IP (Internet Protocol), version 4
(IPv4) of the TCP/IP Protocol Stack
Stejarel Veres <[email protected]>
5
Original IPv4 Addressing
 32-bit addresses (010010111…)
 Most of the times written in the
“dotted-decimal” format: 4 numbers
between 0 and 255, separated by
dots
 E.g., 137.122.14.100
 Theoretically to yield 232 ~ 4.3 billion
addresses
Stejarel Veres <[email protected]>
6
Original IPv4 Addressing (cont’d)
 Address space divided into “classes of
addresses” based on the size of the
networks it was supposed to be
allocated to:





Class
Class
Class
Class
Class
A – large size networks
B – medium size networks
C – small size networks
D – special (multicast)
E – special (reserved)
Stejarel Veres <[email protected]>
7
Original IPv4 Addressing (cont’d)
 Address space divided into “classes of
addresses” based on the size of the
networks it was supposed to be
allocated to:





Class
Class
Class
Class
Class
A – large size networks
B – medium size networks
C – small size networks
D – special (multicast)
E – special (reserved)
Stejarel Veres <[email protected]>
8
Path Determination
 I.e., datagram (packet) routing
 The “hop-by-hop” routing paradigm:
packet passes from router to router,
each step bringing it closer to the
destination
 If a packet travels too many hops, it
is discarded (in order to prevent
routing loops)
Stejarel Veres <[email protected]>
9
Path Determination
 I.e., datagram (packet) routing
 The “hop-by-hop” routing paradigm:
packet passes from router to router,
each step bringing it closer to the
destination
 If a packet travels too many hops, it
is discarded (in order to prevent
routing loops)
Stejarel Veres <[email protected]>
10
Path Determination (cont’d)
 Routers maintain “routing tables”
containing, for each known
destination network address:
 The output interface for that destination
 The next hop address for that destination
 Routing tables updated statically (“by
hand”) or dynamically (by using
dynamic routing protocols)
Stejarel Veres <[email protected]>
11
Static vs. Dynamic Routing
 Static is:
 Simpler to configure, yet more difficult to maintain
 Very low CPU time-consuming and memoryconsuming
 Not at all suited for large networks and only
marginally suited for redundant topologies
 Dynamic is:
 More difficult to configure, but need not be manually
maintained up to date
 Usually more CPU time-consuming and memoryconsuming
 Virtually a must for redundant topologies and larger
networks
Stejarel Veres <[email protected]>
12
Simple Routing Algorithm
1. Examine destination address to determine
if class A, B or C
2. Extract the network part from the address
3. Search for the destination network in the
routing table
4. If found, and next hop is reachable: route
out the specified interface to the next hop
5. Otherwise, discard the packet and send
ICMP Destination Host/Network
Unreachable message to the sender
Stejarel Veres <[email protected]>
13
Original IPv4 Addressing Issues
1. Inefficient address space allocation a large part of the address space is
being wasted
2. Inefficient routing – large routing
tables, routing processes very CPU
intensive
Stejarel Veres <[email protected]>
14
Solutions Devised
1. Subnetting
2. Default routing; Classless InterDomain Routing (CIDR), also known
as “Supernetting”
Stejarel Veres <[email protected]>
15
Subnetting
 “Borrowing” bits from the host
portion for the network portion of the
address
 Network addresses expressed as pairs
of “address” and “subnet mask”
 The concept of “classes” becomes
obsolete, yet designs have sometimes
to accommodate older equipment
with no knowledge of subnetting
Stejarel Veres <[email protected]>
16
Subnetting
 “Borrowing” bits from the host
portion for the network portion of the
address
 Network addresses expressed as pairs
of “address” and “subnet mask”
 The concept of “classes” becomes
obsolete, yet designs have sometimes
to accommodate older equipment
with no knowledge of subnetting
Stejarel Veres <[email protected]>
17
Subnet Masks
 32-bit strings with a contiguous left
side of 1’s and a contiguous right side
of 0’s
 The number of 1’s (the “length” of the
subnet mask): how many bits of the
address corresponds to the network
part
Stejarel Veres <[email protected]>
18
Subnet Masks (cont’d)
 Written either in dotted-decimal
format, or as /number_of_1’s
(/length)
 Original classes of addresses:
 A – 255.0.0.0 (/8)
 B – 255.255.0.0 (/16)
 C – 255.255.255.0 (/24)
Stejarel Veres <[email protected]>
19
Default Routing
 Specifies a way to handle packets for
which no specific entry exists in the
routing table
 “Fall-back”: the packed is routed via a
“default gateway” that is supposed to
know better what to do with it
 Especially useful for “stub networks”
 Helps keeping routing tables small
 Default route entry: 0.0.0.0/0
Stejarel Veres <[email protected]>
20
Classless Inter-Domain Routing
 Grouping a number of contiguous
network addresses into a larger
routing table entry
 E.g., 192.168.8.0/24 through
192.168.15.0/24 can be written as
192.168.8.0/21
 Helps keeping routing tables small
Stejarel Veres <[email protected]>
21
Modified Routing Algorithm
1. For each routing table entry: perform AND
between destination address and entry
subnet mask; if result equals the entry
network address and entry more specific
(i.e., longer subnet mask) than the
previous one, keep it and discard the other
2. If matched, and next hop is reachable:
route out the specified interface to the
next hop
3. Otherwise, discard the packet and send
ICMP Destination Host/Network
Unreachable message to the sender
Stejarel Veres <[email protected]>
22
Subnetting Examples
 Given the following two address/mask
pairs, how can we tell whether they are on
the same subnet or not?
 192.168.0.5/28 and 192.168.0.18/28
1. AND 192.168.0.5 and 255.255.255.240
(/28) = 192.168.0.0
2. AND 192.168.0.18 and 255.255.255.240 =
192.168.0.16
 NO (192.168.0.0 != 192.168.0.16)
Stejarel Veres <[email protected]>
23
Subnetting Examples (cont’d)
 Given the following two address/mask
pairs, how can we tell whether they are on
the same subnet or not?
 192.168.0.66/26 and 192.168.0.90/26
1. AND 192.168.0.66 and 255.255.255.192
(/26) = 192.168.0.64
2. AND 192.168.0.90 and 255.255.255.192 =
192.168.0.64
 YES (192.168.0.64 == 192.168.0.64)
Stejarel Veres <[email protected]>
24
Subnetting Examples (cont’d)
 Given the following address/mask pair, can
you determine the subnet address and the
address range for that subnet?
 192.168.32.115/29
1. AND 192.168.32.115 and 255.255.255.248
(/29) = 192.168.32.112 (subnet address)
2. OR 192.168.32.112 and NOT
255.255.255.248 = 192.168.32.119
(broadcast address)
 Address range: 192.168.32.112-119 (6
usable addresses, 113-118)
Stejarel Veres <[email protected]>
25
Routing Table Example
 Given the following routing table:
192.168.1.0
192.168.1.0
0.0.0.0
255.255.255.0
255.255.255.240
0.0.0.0
Serial0
Serial1
Serial2
 Address 192.168.1.20 will route by entry 1
 Address 192.168.1.5 will route by entry 2
 Address 192.168.3.35 will route by entry 3
(via the default gateway)
Stejarel Veres <[email protected]>
26
Dynamic Routing Protocols
 Can be classified from multiple points of view
 By the algorithm they use for building routing tables:
 Distance Vector: use “distance” metrics
 Link State: use “cost” metrics and SPF algorithms
 Hybrid
 By the way they use and advertise subnet
information:
 Classless: they accept and advertise subnets
 Classful: they ignore and don’t advertise subnets
 By their intended use:
 Exterior Gateway Protocols (EGP): inter-AS
 Interior Gateway Protocols (IGP): intra-AS
Stejarel Veres <[email protected]>
27
Examples of Routing Protocols
 RIPv1: IGP, distance vector, classful
 RIPv2: IGP, distance vector, classless
 IGRP (Cisco): IGP, distance vector,
classful
 EIGRP (Cisco): IGP, advanced
distance vector (sometimes called
“hybrid”), classless
 OSPF, IS-IS: IGP, link state, classless
 BGP-4: EGP, hybrid, classless
Stejarel Veres <[email protected]>
28
Distance Vector vs. Link State
 Distance Vector are:
 Simpler
 Less CPU time-consuming and often less memoryconsuming
 Slower-converging
 More bandwidth-consuming
 Less scalable
 Link State are:
 More complicated
 CPU and memory intensive
 Faster-converging
 Less bandwidth-consuming
 Very scalable
Stejarel Veres <[email protected]>
29
So, Which One To Choose?
 Distance vector: in small and simple
networks, or in networks with slowerCPU and small-sized memory routers
 Link state: in large networks, and in
networks requiring Shortest Path Tree
calculation for the purpose of Traffic
Engineering (i.e., MPLS-TE)
Stejarel Veres <[email protected]>
30
Our Labs
 Will consist of configuring Cisco
routers for Static Routing (Lab 2), for
OSPF routing within a single area
(Lab 3), and for OSPF routing within a
multi-area topology (Lab 4)
 Technical documentation to be
consulted listed in the References
section of this presentation
Stejarel Veres <[email protected]>
31
References
1.
2.
3.
4.
5.
6.
7.
8.
J. Postel, STD0005/RFC0791: Internet Protocol
J. Postel, STD0005/RFC0792: Internet Control Message Protocol
J. C. Mogul, J. Postel, STD0005/RFC0950: Internet Standard
Subnetting Procedure
Y. Rekhter, T. Li, RFC1518: An Architecture for IP Address
Allocation with CIDR
IANA, RFC3330: Special-Use IPv4 Addresses
Y. Rekhter, B. Moskowitz, D. Karrenberg, G. J. de Groot, E. Lear,
RFC1918: Address Allocation for Private Internets
Cisco IOS IP Command Reference, Volume 1 of 4: Addressing and
Services, Release 12.3
http://www.cisco.com/univercd/cc/td/doc/product/software/ios12
3/123cgcr/ipras_r/ip1bookg.pdf
Cisco IOS IP Command Reference, Volume 2 of 4: Routing
Protocols, Release 12.3
http://www.cisco.com/univercd/cc/td/doc/product/software/ios12
3/123cgcr/iprrp_r/ip2bookg.pdf
Stejarel Veres <[email protected]>
32