Routing and Switching
Course Information
Dr. Fawaz Saleem
Bokhari
Course Information
1. Network
Fundamentals
2. Routing Protocols
and Concepts
3. Switching
Techniques
•Introduction to
Networks by Cisco
Press
•Routing and Switching
Essentials, Companion
Guide by Cisco
Academy
Course Material
Text Book/s
Tools•Packet Tracer
http://www.cabrillo.edu/~rgraziani/
Quiz: 15%
Mid-Term: 35%
Final-Term: 50%
Grading
Tips
•Find a quiet space
•Do not multitask
•Take notes on paper or in your
book
Succeeding in this course
Components of a Network
TechnologyThen and Now
Technology Then and Now
Networks Support the Way We Learn
•Virtual Classrooms
•On-demand Video
•Collaborative
Learning Spaces
•Mobile Learning
Networks Support the Way We Communicate
•Instant Messaging
(IM)
•Social Media
•Weblogs
•Podcasting
•P2P File Sharing
Networks Support the Way We Play/Do Business
•Online Gaming
•Online Shopping
•Online
Entertainment
Network Components - Clients and Servers
•Client, Server, or both
•Software determines
the role
•Run application
programs
Hosts
Servers
Clients
•Provide information and
services to clients
•e-mail or web pages
•Request information
from the server.
Peer to Peer
Advantages
Disadvantages
•Easy to set up
•Less complexity
•Lower cost
•No centralized
administration
•Not so secure
•Not scalable
Network Components
DevicesMedia
End Devices
•Computers
•Printers
•VoIP Phones
•Security Cameras
•Mobile Handheld Devices
Intermediary Network Devices
•Network Access (Switches and Wireless
Access Points)
•Internetworking (Routers)
•Security (Firewalls)
Network Media
•Copper – Electronic pulses
•Fiber Optics – Pulses of light
•Wireless – Electromagnetic waves
Network Representations
Topology DiagramsPhysical Topology
Topology DiagramsLogical Topology
Topology Diagrams
Logical Topology
Physical Topology
LANs, WANs and the Internet
Types of Networks
Types of Networks
•Local Area Network
(LAN)
•Wide Area Network
(WAN)
•Metropolitan Area
Network (MAN)
•Wireless LAN
(WLAN)
•Storage Area
Network (SAN)
Local Area Network (LAN)
•Interconnects devices in a limited area
•Administered by single organization/individual
•Provide high speed bandwidth
Wide Area Network (WAN)
•Interconnects LANs
•Administered by multiple service providers
•Slower speed links between LANs
MAN, WLAN, and SAN
•Greater than LAN but
smaller than WAN
MAN
WLAN
SAN
•Similar to LAN but
wireless
•Designed to support
file servers, and
provide data storage.
The Internet – A Network of Networks
Connecting to the Internet
Internet Access
Technologies
Internet Access Technologies
Packet Tracer Basics: Part I
Part I
Packet Tracer Basics: Part II
Part II
Rules of Communication
Establishing Rules
Establishing Rules
•Communication begins
with a message, or
information, that must
be sent from a source
to a destination
Protocol: Rules that
govern communications
Protocol suite: A
group of inter-related
protocols
Example: TCP/IP
Message Encoding
Message Formatting and Encapsulation
Message Size, Timing, Access Method
•Breaks into smaller size or
sentences
Message Size
Timing
Access Method
•When to speak, and how
long to wait for a response
•Determines when someone
is able to send a message
•If two people talk at the
same time, a collision
occurs
•Hosts need an access
method to know when to
begin sending messages
Flow Control, Response Timeout
•How much information
can be sent.
•Hosts use flow control to
negotiate how much data
can be sent/received
Flow Control
Response Timeout•Hosts on the network also
have rules that specify
how long to wait for
responses and what
action to take if a
response timeout occurs
Message Delivery Options - Unicast
Message Delivery Options - Multicast
Message Delivery Options - Broadcast
Message Delivery Options - Broadcast
•Unicast
•Multicast
•Broadcast
Protocol Suites
TCP/IP Protocol Suites
TCP/IP Protocol Suite
TCP/IP Protocol Suite
Standard Organizations
ISOCIABIETFIEEEISO
ISOC, IAB, IETF, & IRTF
IEEE
Reference Models
Benefits of Layered Model
Benefits of Layered Model
OSI Model
TCP/IP Model
Internetwork Operating System (IOS)
Cisco IOS
Cisco IOS
•All networking equipment
depend on operating
systems:
-End users -Switches-Routers-Wireless access points-Firewalls
Cisco Internetwork Operating System (IOS)
•Collection of network operating systems used on Cisco devices
Operating System
Operating System
Operating System
IOS Functions
Accessing an IOS Device
Console Access Methods
Console Access Methods
•Most common
methods to access
the Command Line
Interface
•Console•Telnet or SSH•AUX port
Console Port
•Device is accessible even if no networking serviceshave been configured
•Need a special console cable (aka rollover cable)
•Allows configuration commands to be entered
•Should be configured with passwords to prevent unauthorized access
•Device should be located in a secure room so console port can not be easily accessed
Telnet, SSH, and AUX Methods
Telnet• Method for remotely accessing the CLI over a network• Require active networking services and one active
interface that is configured
Secure Shell (SSH) – Preferred over Telnet• Remote login similar to Telnet but utilizes more security• Stronger password authentication• Uses encryption when transporting data
Aux Port (not used too much)• Out-of-band connection• Uses telephone line• Can be used like console port
Terminal Emulation Program
Software available for connecting to a networking device
(usually same as terminal/serial/console connection):
•PuTTY
•Tera Term
•HyperTerminal
•OS X Terminal
Navigating the IOS
IOS Modes of Operation
IOS Modes of Operation
Primary Modes
Global Configuration Mode and Submodes
Global Configuration Mode and Submodes
Navigating Between IOS Modes
Navigating Between IOS Modes
•User Mode
•Privileged Mode
•Global
•Configuration Mode
The Command Structure
Basic IOS Command Structure
Basic IOS Command Structure
Cisco IOS Command Reference
For the ping command:
Switch> ping IP-address
Switch> ping 10.10.10.5
The command is ping and the user defined argument is the 10.10.10.5.
Similarly, the syntax for entering the traceroutecommand is:
Switch> traceroute IP-address
Switch> traceroute 192.168.254.254
The command is traceroute and the user defined argument is the 192.168.254.254.
Context-Sensitive Help
Command Syntax Check
Hot Keys and Shortcuts
• Tab - Completes the remainder of a partially typed
command or keyword
• Ctrl-R - Redisplays a line
• Ctrl-A – Moves cursor to the beginning of the line
• Ctrl-Z - Exits configuration mode and returns to user EXEC
• Down Arrow - Allows the user to scroll forward through
former commands
• Up Arrow - Allows the user to scroll backward through
former commands
• Ctrl-Shift-6 - Allows the user to interrupt an IOS process
such as ping or traceroute.
• Ctrl-C - Aborts the current command and exits the
configuration mode
IOS Examination Commands
The “show version” Command
The Command Structure
•IOS Command
Structure
•Context-Sensitvie
Help
•Command Syntax
Check
•Hot Keys and
Shortcuts
•IOS Examination
Commands
Packet Tracer – Navigating the IOS
Basic ConnectionsAccessing the CLIExploring EXEC ModesSetting the Clock
Configuring Hostnames
Device Names
Device Names
Hostnames allow devices to be identified by network administrators over a network or the Internet.
Some guidelines for naming conventions are that names
should:
• Start with a letter
• Contain no spaces
• End with a letter or digit
• Use only letters, digits, and dashes
• Be less than 64 characters in length
Configuring Hostnames
Limiting Access to Device Configurations
Securing Device Access
Securing Device Access
•Enable Password
•Enable Secret
•Console Password
•VTY Password
Securing Privilege EXEC Access
• use the enable secret command, not the older enable password command
• enable secret provides greater security because the password is encrypted
Securing User EXEC Access
Console port must be secured
• Reduces the chance of unauthorized personnel
physically plugging a cable into the device and gaining
device access
VTY lines allow access to a Cisco device via Telnet
Securing Device Access
•Enable Password
•Enable Secret
•Console Password
•VTY Password
Packet Tracer – Configuring Initial Switch
Verify Default Switch ConfigurationConfigure a Basic Switch ConfigurationConfigure a MOTD BannerConfigure S2
Packet Tracer – Building a Simple Network
Set up the Network Topology
Configure PC Hosts
Configure and Verify Basic
Switch Settings
Packet Tracer – Configuring Switch Management Address
Configure a Basic Network
Device
Verify and Test Network
Connectivity
Physical Layer Protocols
Connecting to the
Network
Connecting to the Network
A physical connection can be a wired connection using a cable
or a wireless connection using radio waves.
Network Interface Cards
•Network Interface Cards (NICs) connect a device to the
network.
•Ethernet NICs are used for a wired connection whereas WLAN
(Wireless Local Area Network) NICs are used for wireless.
Purpose of Physical Layer
The OSI physical layer provides the means to transport the bits
that make up a data link layer frame across the network media.
Physical Layer Media
The physical layer produces the representation and groupings of bits
for each type of media as:
•Copper cable: The signals are patterns of electrical pulses.
•Fiber-optic cable: The signals are patterns of light.
•Wireless: The signals are patterns of microwave transmissions.
Physical Layer Standards
Physical Layer Fundamentals
BandwidthThroughput
Bandwidth
Bandwidth is the capacity of a medium to carry data.
Typically measured in kilobits per second (kb/s) or megabits per
second (Mb/s).
Throughput
•Throughput is the
measure of the transfer of
bits across the media
over a given period of
time.
•Due to a number of
factors, throughput
usually does not match
the specified bandwidth
in physical layer
implementations.
•http://www.speedtest.net/
•http://ipv6-
test.com/speedtest/
Physical Layer Protocols
NICsPhysical Layer
Media, Standards,
Fundamentals
Network Media
Copper CablingUTP CablingFiber Optic CablingWireless Media
Copper Media
Unshielded Twisted-Pair Cable
Shielded Twisted-Pair Cable
Coaxial Cable
Copper Media Safety
Fiber Optic Cabling
Fiber vs. Copper
Implementation issues Copper media Fibre-optic
Bandwidth supported 10 Mbps – 10 Gbps 10 Mbps – 100 Gbps
DistanceRelatively short
(1 – 100 meters)
Relatively High
(1 – 100,000 meters)
Immunity to EMI and RFI LowHigh
(Completely immune)
Immunity to electrical hazards LowHigh
(Completely immune)
Media and connector costs Lowest Highest
Installation skills required Lowest Highest
Safety precautions Lowest Highest
Wireless Media
802.11 Wi-Fi Standards
Standard Maximum Speed FrequencyBackwardscompatible
802.11a 54 Mbps 5 GHz No
802.11b 11 Mbps 2.4 GHz No
802.11g 54 Mbps 2.4 GHz 802.11b
802.11n 600 Mbps 2.4 GHz or 5 GHz 802.11b/g
802.11ac1.3 Gbps
(1300 Mbps)2.4 GHz and 5.5 GHz 802.11b/g/n
802.11ad7 Gbps
(7000 Mbps)2.4 GHz, 5 GHz and 60
GHz 802.11b/g/n/ac
Network Media
Copper CablingUTP CablingFiber Optic CalbingWireless Media
Data Link Layer Protocols
Purpose of the Data Link Layer
Purpose of the Data Link Layer
Data Link Sublayers
Network
Data Link
LLC Sublayer
MAC Sublayer
Physical
Data Link layer has two sublayers (sometimes):
Logical Link Control (LLC) – Software processes that provide
services to the Network layer protocols.
Media Access Control (MAC) - Media access processes
performed by the hardware.
Provides Data Link layer addressing and framing of the data
according to the protocol in use.
Data Link Frame Fields - Header
Data Link Frame Fields - Header
Data Link Frame Fields - Header
Data Link Frame Fields – The Trailer
Data Link Frame Fields – The Trailer
Ethernet Protocol for LANs
Point-to-Point Protocol for WANs
Media Access Control – Data Link Frame
Data Link FrameEthernet ProtocolPPP Protocol
Data Link Layer Protocols
Link Layer Sublayers: LLC and MACFrame Structure
Network Layer Protocols
The Network Layer
The Network Layer
•Provides services to
allow end devices to
exchange data across
the network.
•Uses four basic
processes:
1. Addressing end
devices
2. Encapsulation
3. Routing
4. De-encapsulation
Network Layer Protocols
•Common Network Layer
Protocols
IPv4
IPv6
•Legacy Network Layer
Protocols
Novell Internetwork
Packet Exchange (IPX)
AppleTalk
Connectionless
Network Service
(CLNS/DECNet)
Characteristics of IP Protocol
•Connectionless:
No connection is
established before
sending data
packets.
• Best effort delivery:
No additional
overhead is used to
guarantee packet
delivery.
• Media independent:
Operates
independently of the
medium carrying the
data.
Connectionless Service
of
Best Effort Delivery – Unreliable
of
Media Independent
of
Network Layer Protocols
Network Layer FunctionsIP Characteristics
IPv4 Packet
IPv4 Packet Structure
IPv4 Packet Structure
•An IPv4 packet has
two parts:
IP Header -
Identifies the
packet
characteristics.
Payload -
Contains the Layer
4 segment
information and
the actual data.
IPv4 Packet Header
of
Sample IPv4 Packet
of
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
Version (4 bits)
– Indicates the version of IP currently used.
– 0100 = 4 and therefore IPv4
– 0110 = 6 and therefore IPv6
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
IP Header Length (4 bits)
– Identifies the number of 32-bit words in the header.
– The minimum value for this field is 5 (i.e., 5×32 = 160 bits = 20 bytes) and the maximum value is 15 (i.e., 15×32 = 480 bits = 60 bytes).
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) PaddingDifferentiated Services (8 bits)
– Formerly called the Type of Service (ToS) field.
– The field is used to determine the priority of each packet.
– First 6 bits identify the Differentiated Services Code Point (DSCP) value for QoS.
– Last 2 bits identify the explicit congestion notification (ECN) value used to prevent dropped packets during times of network congestion.
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
Total Length (16 bits)
– Sometimes referred to as the Packet Length.
– Defines the entire packet (fragment) size, including header and data, in bytes.
– The minimum length packet is 20 bytes (20-byte header + 0 bytes data) and the maximum is 65,535 bytes. .
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
A router may have to fragment a packet when forwarding it from one medium to another medium that has a smaller MTU.
When this happens, fragmentation occurs and the IPv4 packet uses the following 3 fields to keep track of the fragments
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) PaddingIdentification (16 bits)
– Field uniquely identifies the fragment of an original IP packet.
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) PaddingFlag (3 bits)
– This 3-bit field identifies how the packet is fragmented.
– It is used with the Fragment Offset and Identification fields to help reconstruct the fragment into the original packet.
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) PaddingFragment Offset (13 bits)
– Field identifies the order in which to place the packet fragment in the reconstruction of the original unfragmented packet.
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
Time-to-Live (TTL) (8 bits)
– Used to limit the lifetime of a packet.
– It is specified in seconds but is commonly referred to as hop count.
– If the TTL field decrements to zero, the router discards the packet and sends an ICMP Time Exceeded message to the source IP address.
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
Protocol (8 bits)
– Field indicates the data payload type that the packet is carrying, which enables the network layer to pass the data to the appropriate upper-layer protocol.
– Common values include ICMP (1), TCP (6), and UDP (17).
– Others: GRE (47), ESP (50), EIGRP (88), OSPF (89)
– http://www.iana.org/assignments/protocol-numbers/
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
Header Checksum (16 bits)
– Field is used for error checking of the IP header.
– The checksum of the header is recalculated and compared to the value in the checksum field.
– If the values do not match, the packet is discarded.
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
Source IP Address (32 bits)
– Contains a 32-bit binary value that represents the source IP address of the packet.
Sample IPv4 Packet
of
Version
IP Head
er Lengt
h
Differentiated Services
Total Length
DSCPECN
Identification Flag Fragment Offset
Time-To-Live Protocol Header Checksum
Source IP Address
Destination IP Address
Options (optional) Padding
Destination IP Address (32 bits)
– Contains a 32-bit binary value that represents the destination IP address of the packet.
IPv4 Packet
IPv4 Packet Header
IPv4 Address and Subnet Mask
IPv4 Address Structure
IPv4 Address Structure
of
11000000 . 10101000 . 00000001 . 00000101
We look at IP addresses using the “dotted decimal format” but
network devices only understand the binary format.
IPv4 Subnet Mask
of
Prefix Length
of
Subnet Mask: 192.168.11.10 255.255.255.0
The subnet mask identifies which part of the IP address refers to the network.
11111111 11111111 11111111 00000000
255 255 255 0
192 168 11 10
192 168 11 0
Network Portion Host Portion
The prefix length is the number of bits set to 1 in the subnet mask.
For example:
IP address: 192.168.11.10 255.255.255.0
Is the same as: 192.168.11.10 /24
IPv4 Subnet Mask
So how do hosts figure out
which part of the address
is the network portion?
Hosts compare the IP
address and the subnet
mask.
– “1” bits refer to the
network portion.
– “0” bits refer to the
host portion.
This tells them what
network they belong to.
Types of Addresses in a Network
•Network Address
•Host Address
•Broadcast Address
Network Address 10.1.1.0/24
of
• All devices in the network have the same network bits.
– The network address has all 0 bits in the host
portion.
Broadcast Address 10.1.1.255/24
of
• A broadcast address is used to send data to all hosts in the
network.
– The broadcast address has all 1 bits in the host
portion.
Host Address 10.1.1.10/24
of
• In IPv4 addresses, host addresses are the addresses between
the network address and the broadcast address devices in
that network.
1st Host Address
of
• The host portion of the first host address will contain all 0 bits with
a 1 bit for the lowest order or right-most bit. (“All 0’s and a 1.”)
– For example the first host address is 10.1.1.1 /24.
NOTE:
It is common in
many
addressing
schemes to use
the first host
address for the
router or
default gateway
address.
Last Host Address
of
• The host portion of the last host address will contain all 1 bits
with a 0 bit for the lowest order or right-most bit. (“All 1’s and a
0.”)
– For example, the last host address is 10.1.1.254.
Bringing it Al together
of
IPv4 Address and Subnet Mask
IPv4 AddressSubnet MaskTypes of Addresses
IPv4 Unicast, Broadcast, and Multicast
Addresses for User Devices
Addresses for User Devices
•Static Assignment
•Dynamic Assignment
Assigning a Static IPv4 Address to a Host
of
•Useful for printers, servers, and other networking devices that do not
change location often and need to be accessible to clients on the
network based on a fixed IP address.
•However, static addressing can be time-consuming to enter on each
host.
Destination Unicasts, Broadcasts and Multicasts
Source IP Addresses
are always unicast
Unicasts:
Packet travels from one host
to another specific host.
Multicasts:
Packet travels from one host
to a select number of other
hosts.
Supports voice and audio
broadcasts, news feeds.
Broadcasts:
Packet travels from one host
to all hosts on the local
network.
Unicast Addresses
of
Multicast Addresses
of
For example:
One hosts sends packets to
the multicast IP address
224.10.10.5/24.
Multicast clients subscribe to
the multicast group and listen
for packets destined to
224.10.10.5.
Broadcast Addresses
of
Directed broadcast is sent
to all hosts on a specific
network. An example
destination IPv4 address is
192.168.1.255 /24.
Limited broadcast is to all
hosts on the local network.
These packets use a
destination IPv4 address
255.255.255.255.
IPv4 Unicast, Broadcast, and Multicast
UnicastBroadcastMulticast
Packet Tracer – Investigate Unicast, Broadcast and Multicast Traffic
Generate UnicastTrafficGenerate Broadcast Traffic Investigate Multicast Traffic
Types of IPv4 Addresses
Private vs. Public Addresses
Private vs. Public Addresses
of
Special Use IPv4 Addresses
•Loopback address:
127.0.0.1
127.0.0.0 – 127.255.255.255
Hosts use to direct traffic to
themselves.
Link-Local addresses:
169.254.0.0/16
169.254.0.0 –
169.254.255.255
Host can automatically assign
itself an address if it has none.
TEST-NET addresses:
192.0.2.0 to 192.0.2.255
(192.0.2.0 /24)
Special Use IPv4 Addresses
of
Legacy Classful Addresses
of
Class A /8
Class B /16`
Class C /24
Class A, B, and C addresses: 0.0.0.0 - 223.255.255.255
Multicast addresses: 224.0.0.0 - 239.255.255.255
Experimental addresses: 240.0.0.0 - 255.255.255.254
Assignment of IP Addresses
of
• Internet Assigned Numbers Authority (IANA) manages the
allocation of IPv4 and IPv6 addresses. IPv4 address space are
allocated to various other registries to manage for particular
purposes or for regional areas. These registration companies are
called Regional Internet Registries (RIRs), as shown in the figure.
IANA
AfriNIC
Africa Region
APNIC
Asia/Pacific Region
ARIN
North America Region
LACNIC
atin America and some Caribbean
Islands
RIPE NCC (
Europe, the Middle East, and Central
Asia
Types of IPv4 Addresses
Private vs. Public Assignment of IP Addresses
Using Windows Calculator with Network Addresses
Convert Between Numbering Systems
Converting IPv4 Addresses to Binary
Convert IPv4 Addresses from Dotted Decimal to BinaryBitwise ANDingNetwork Address Calculation
Network Segmentation
Large Networks
Large Networks
of
150.50.0.0 /16
150.50.0.0 /16
• In large networks, a flat network configuration creates major issues.
Excessive broadcast traffic (e.g., DHCP, ARP) in one domain.
Manageability and security
•As well, a network address with a /16 mask can support 65,534 host
addresses on the same network.
What network would ever need to connect that many hosts on
one network?
Subnetting
of 150.50.0.0 /16
• Large networks need to be segmented into smaller sub-networks called
“Subnets”.
– In the example, 5 subnets are created by subnetting the /16 network
address into /24 addresses.
150.50.0.0 /16150.50.0.0 /16
150.50.1.0 /24150.50.2.0 /24
150.50.3.0 /24
150.50.4.0 /24
150.50.5.0 /24
5 subnetworks capable of supporting 254 Hosts each.
Reasons for Subnetting
Segmenting networks in
subnets creates smaller
groups of devices and
services in order to:
•Create smaller
broadcast domains.
•Limit the amount of
traffic on the other
network segments.
•Provide low-level
security.
Communication Between Subnets
of
• A router is required to subnet a network.
– Each router interface is on a different subnet.
– Devices on a subnet use the router interface as the default
gateway.
Each router interface is in
a different subnet and in
its own broadcast
domain.
Network Segmentation
Reasons for Subnetting
Subnetting an IPv4 Network
Basic Subnetting
Basic Subnetting
of
Basic Subnetting
of
Basic Subnetting
of
Subnets in Use
of
Subnets in Use
of
Subnets in Use
of
Subnets in Use
of
Subnetting Formulas
of
• Calculate Number of Subnets
• Calculate Number of Hosts
Subnetting an IPv4 Network
Basic Subnetting
Calculating IPv4 Subnets
Calculate IPv4 Address Subnetting
Packet Tracer – Subnetting Scenario
Design an IP Addressing SchemeAssign IP Addresses to Network Devices and Verify Connectivity
Packet Tracer – Subnetting Scenario - 2
Design an IP Addressing SchemeAssign IP Addresses to Network Devices and Verify Connectivity
Variable Length Subnet Masking (VLSM)
Traditional Subnetting
Traditional Subnetting
of
• So far, every subnet was the same size and all accommodated the
same number of hosts.
If all the subnets have the same requirements for the number of
hosts, these fixed size address blocks would be efficient.
• For example, how many subnets are required?
7 subnets of varying size.
Traditional Subnetting
of
• To meet the host requirement of the largest LAN we could borrow 3
bits (/27) to create 8 subnets of 30 hosts each.
But it also wastes addresses on the point-to-point links and limits
future growth by reducing the total number of subnets available.
• Solution:
“Subnet a subnet” using Variable Length Subnet Mask (VLSM).
Special Use IPv4 Addresses
• VLSM allows a network space
to be divided in unequal parts.
• With VLSM the subnet mask
will vary depending on how
many bits have been borrowed
for a particular subnet, thus the
“variable” part of the VLSM.
• VLSM enables a network
number to be configured with
different subnet masks on
different interfaces.
• Allows for more hierarchical
levels within an addressing
plan.
Allows for better route
summarization.
VLSM Example
of
The four LANs in our previous example can be accommodated using
a /27 subnet mask.
VLSM Example
of
This would create subnets with increments of 32, therefore:
Building A192.168.20.0/27
Building B192.168.20.32/27
Building C192.168.20.64/27
Building D192.168.20.96/27
.0 - .31
.32 - .63
.64 - 95
.96 - .127.128 - 159
.160 - 191
.192 - 223
.224 - 255
VLSM Example
of
• The WAN interfaces of the routers are assigned the IP addresses
and mask for the /30 subnets (2 hosts).
• In this example, the last subnet is subnetted into /30 subnets to
accommodate WAN interfaces:Building A192.168.20.0/27
Building B192.168.20.32/27
Building C192.168.20.64/27
Building D192.168.20.96/27
VLSM Example
of
VLSM Example
of
VLSM Example
of
VLSM Example
of
Variable Length Subnet Masking (VLSM)
VLSM BasicsVLSM in Practice
Anatomy of a Router
Why Routing
Why Routing
of The router is responsible for the routing of traffic between networks
Functions of a Router
• Routers are
computers
• Routers
interconnects
networks
• Routers choose
best paths
Router Components
• Routers are essentially
computers and require:
Operating systems (OS)
Central processing units
(CPU)
Random-access
memory (RAM)
Read-only memory
(ROM)
• Routers also have special
memory that includes
Flash
Nonvolatile random-
access memory
(NVRAM).
Router Memory
of
Memory Volatile /
Non-VolatileStores
RAM
(Random Access Memory)
Volatile
• Running IOS• Running configuration file• IP routing and ARP tables• Packet buffer
ROM(Read-Only Memory)
Non-Volatile• Bootup instructions• Basic diagnostic software• Limited IOS
NVRAM(Non-Volatile RAM)
Non-Volatile • Startup configuration file
Flash Non-Volatile• IOS• Other system files
Router Backplane
of
Two 4 GB flash card slots
Double-wide eHWIC slots eHWIC 0 AUX port
LANinterfaces
USB Ports
Console USB Type B
Console RJ45
Connecting to a Router
of
Router Interfaces
of
• A router interface is a physical connector that enables a router to send or
receive packets
• Types of router interfaces:
– Ethernet
– FastEthernet
– Gigabit Ethernet
– Serial
– DSL
– Cable
– ISDN
LAN and WAN Interfaces
of
• Router interfaces can be grouped into two categories:
– Ethernet LAN interfaces: Requires an IP address and enabled.
– Serial WAN interfaces – Requires an IP address and enabled.
Anatomy of a Router
Functions of a RouterRouter ComponentsRouter MemoryRouter Interfaces
Packet Tracer – Exploring Internetworking Devices
Identify Physical Characteristics of Internetworking DevicesSelect Correct Modules for ConnectivityConnect Devices
Router Bootup
Cisco IOS
Cisco IOS
of
Router Bootup Process
of
1. Both POST and the Bootstrap program are located in ROM.
1. Load IOS from Flash.2. None in Flash, then load from
TFTP server.
1. Load from NVRAM.2. None in NVRAM, then load from
TFTP server. 3. No Server/file, then enter Setup
mode from the console.
Router Bootup
Cisco IOSRouter BootupProcess
Configuring Routers
Basic Settings on a Router
Basic Settings on a Router
• Name the Device
• Secure
Management
Access
• Configure a Banner
Name the Device
of
Router# configure terminal
Enter configuration commands, one per line. End
with CNTL/Z.
Router(config)# hostname R1
R1(config)#
.2
.2
Secure Management Access
of
.2
.2
R1(config)# enable secret class
R1(config)# username admin secret class
R1(config)# line console 0
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)# ip domain-name cisco.com
R1(config)# crypto key generate rsa 1024
R1(config)# line vty 0 4
R1(config-line)# transport input ssh
R1(config-line)# login local
R1(config-line)# exit
R1(config)# service password-encryption
Configure a Banner
of
R1(config)# banner motd $ Authorized Access Only! $
R1(config)#
.2
.2
Configure an IPv4 Router Interface
of
Configure an IPv4 Router Interface
of
Configure an IPv4 Router Interface
of
Configuring Routers
Basic Settings on a RouterConfiguring IPv4 Router Interface
Packet Tracer – Configure Initial Router Settings
Verify the Default Router ConfigurationVerify and Configure Initial Router ConfigurationSave the Running Configuration File
Verify Connectivity of Directly Connected Networks
Verify Interface Settings
Verify Interface Settings
of
Verify Interface Settings
of
Verify Interface Settings
of
Filter Show Command Output
of
Filter Show Command Output
of
Filter Show Command Output
of
Filter Show Command Output
of
Command History Feature
of
Configuring Routers
Verify Interface SettingsFilter Show Command OutputCommand History Feature
Switching Packets Between Networks
Router Switching Function
Router Switching Function
of
PC1 Sends a Packet to PC2
of
R1 Forwards the Packet to PC2
of
R1 Forwards the Packet to PC2
of
R1 Forwards the Packet to PC2
of
R1 Forwards the Packet to PC2
of
R1 Forwards the Packet to PC2
of
Packet Routing – R2 Forwards the Packet to R3
of
Packet Routing – R2 Forwards the Packet to R3
of
Packet Routing – R2 Forwards the Packet to R3
of
Packet Routing – R2 Forwards the Packet to R3
of
Packet Routing – R2 Forwards the Packet to R3
of
Reach the Destination – R3 Forwards the Packet to PC2
of
Reach the Destination – R3 Forwards the Packet to PC2
of
Reach the Destination – R3 Forwards the Packet to PC2
of
Reach the Destination – R3 Forwards the Packet to PC2
of
Reach the Destination – R3 Forwards the Packet to PC2
of
Switching Packets Between Networks
Router Switching Functions
Path Determination
Routing Decisions
Routing Decisions
of
Best Path
• Router’s determine best-path
to a network:•Depends on the routing protocol•A protocol used between routers to determine “best path”
• Have own rules and metrics. A metric: Quantitative value used to measure the distance to a given route.
• Best path:Path with the lowest metric.
Routing Metric
of
Which path is my “best path”?
?
RIP’s metric is hop count
OSPF’s metric is bandwidth
EIGRP is bandwidth + delay
Load Balancing
of
To reach the 192.168.1.0/24 network it is 2 hops via R2 and 2 hops via R4.
192.168.1.0/24
?
?
What happens if a routing table has two or more paths
with the same metric to the same destination network?
(equal-cost metric)
Router will perform equal-cost load balancing.
All routing protocols (RIP, EIGRP, OSPF) support equal cost load
balancing; EIGRP also supports unequal cost load balancing.
Path Determination
Routing DecisionsBest PathLoad Balancing
Analyze the Routing Table
The Routing Table
The Routing Table
A routing table is a file stored in RAM
that contains information about:
Directly connected routes
Remote routes
Network or next hop associations
The Routing Table
of
Routing Table Sources
The show ip route commands are
used to display the contents of the
routing table:
Local route interfaces - Added to
the routing table when an interface is
configured. (displayed in IOS 15 or
newer)
Directly connected interfaces -
Added to the routing table when an
interface is configured and active.
Static routes - Added when a route is
manually configured and the exit
interface is active.
Dynamic routing protocol - Added
when EIGRP or OSPF are
implemented and networks are
identified.
Routing Table for R1
of
Remote Network Routing Entries
of
Analyze The Routing Table
The Routing TableRouting Table Entries
Directly Connected/Static/Dynamic Routes
Directly Connected Routes
Directly Connected Routes
of
Directly Connected Example
of
Directly Connected Example
of
Directly Connected Example
of
Statically Learned Routes
of
Static Default Route Example
of
Static Route Example
of
Dynamic Routing
of
Dynamic Routing Protocols
• Dynamic routing is used by routers
to share information about the
reachability and status of remote
networks.
• It performs network discovery and
maintains routing tables.
• Cisco routers can support a variety
of dynamic IPv4 routing protocols
including:
• EIGRP – Enhanced Interior
Gateway Routing Protocol
• OSPF – Open Shortest Path
First
• IS-IS – Intermediate System-to-
Intermediate System
• RIP – Routing Information
Protocol
Directly Connected/Static/Dynamic Routes
Directly Connected RoutesStatic RoutesDynamic Routing
Packet Tracer – Configuring and Verifying a Small Network
Configure Devices and Verify Connectivity Gather Information with Show Commands
Packet Tracer – Configuring & Verifying a Small Network - 2
Configure Devices and Verify Connectivity Gather Information with Show Commands
Testing the Network: Ping and ICMPv4
Testing the Network
Testing the Network
• IP is a best effort delivery system.
No mechanism to ensure that
the data is delivered
•So how do we know if a packet
encountered a problem along the
way?
•Internet Control Message Protocol
(ICMP)
Internet Control Message Protocol (ICMP)
•ICMP is available for both IPv4
and IPv6.
•ICMP is used for::
•Informational messages
(ping, traceroute)
•Error messages (network
unreachable)
•ICMP is a layer 3 protocol
directly encapsulated in another
layer 3 protocol IP.
•No transport header
•Knowledge of ICMP control
messages is an essential part of
network troubleshooting
•The ICMP packets are identified
by type and code fields.
Host Confirmation - Ping
•Ping is a utility used to verify connectivity to an IP host.
•It measures the round-trip time for messages sent from the originating host to a destination computer.
•Ping uses an ICMP Echo Message to determine if a host is reachable.
•A host initiates a ping (ICMP Echo Request) and the destination replies (ICMP Echo Reply).•ICMP only reports on the status of the delivered packet to the source device.
Ping – Testing the Local Stack
of
Ping – Testing Connectivity to the Local LAN
of
Ping – Testing Connectivity to Remote Host
of
Traceroute – Testing the Path
•Ping is used to indicate the
connectivity between two hosts.
•Traceroute (tracert) is used to
observe the path between these
hosts.
•The trace lists hops
successfully reached along
the way providing us with
important verification and
troubleshooting information.
•If the data fails at some hop
along the way, we have the
address of the last router
that responded to the trace
indicating where the problem
is.
Traceroute – Testing the Path
of
TTL 1
ICMP Time Exceeded
TTL 1 – 1 =0
TTL 2
ICMP Time Exceeded
TTL 2 – 1 =1
TTL 1
TTL 1 – 1 =0
TTL 3
ICMP Time Exceeded
TTL 3 – 1 =2
TTL 2
TTL 2 – 1 =1 TTL 2 – 1 =0
TTL 1
Testing the Network: Ping and ICMPv4
ICMPv4PingTraceroute
Packet Tracer – Building a Switch and Router Network - 1
Setup Topology
Configure Devices Verify ConnectivityDisplay Device Information
Packet Tracer – Building a Switch and Router Network - 2
Setup Topology
Configure Devices Verify ConnectivityDisplay Device Information
Packet Tracer – Testing Network Connectivity with Ping & Traceroute
Build and Configure a Network
Ping CommandTracert/TracerouteCommand
Packet Tracer – Testing Network Connectivity with Ping & Traceroute - 2
Build and Configure a Network
Ping CommandTracert/TracerouteCommand