Ccna VPDF
Ccna VPDF
Guide
200-301
Networking Today
Communication is almost as important to us as our reliance on air, water, food, and shelter. In today’s world,
through the use of networks, we are connected like never before.
No Boundaries
• World without boundaries
• Global communities
• Human network
Network Components
Host Roles
Every computer on a network is called a host or end
device.
Servers are computers that provide information to end
devices:
• email servers
• web servers Server Type Description
Peer-to-Peer
It is possible to have a device be a client and a server in a Peer-to-Peer Network. This type of network
design is only recommended for very small networks.
Advantages Disadvantages
End Devices
An end device is where a message originates from or where it is received. Data originates with an end
device, flows through the network, and arrives at an end device.
An intermediary device interconnects end devices. Examples include switches, wireless access points,
routers, and firewalls.
Management of data as it flows through a network is also the role of an intermediary device, including:
• Regenerate and retransmit data signals.
• Maintain information about what pathways exist in the network.
• Notify other devices of errors and communication failures.
Network Media
Communication across a network is carried through a medium which allows a message to travel from source
to destination.
Network Representations
Physical topology diagrams illustrate the Logical topology diagrams illustrate devices,
physical location of intermediary devices ports, and the addressing scheme of the
and cable installation. network.
LAN WAN
Interconnect end devices in a limited area. Interconnect LANs over wide geographical areas.
Administered by a single organization or individual. Typically administered by one or more service providers.
Provide high-speed bandwidth to internal devices. Typically provide slower speed links between LANs.
The Converging Network
Converged networks can deliver data, voice, and video over the same network infrastructure. The network
infrastructure uses the same set of rules and standards.
Reliable Networks
Network Architecture
Fault Tolerance
Quality of Service
Network Security
Video Communication
• Video calls are made to anyone, regardless of where they are located.
• Video conferencing is a powerful tool for communicating with others.
• Video is becoming a critical requirement for effective collaboration.
• Cisco TelePresence powers is one way of working where everyone, everywhere.
Cloud Computing
Cloud computing allows us to store personal files or backup our data on servers over the internet.
• Applications can also be accessed using the Cloud.
• Allows businesses to deliver to any device anywhere in the world.
Cloud computing is made possible by data centers.
• Smaller companies that can’t afford their own data centers, lease server and storage services
from larger data center organizations in the Cloud.
Powerline Networking
• Can allow devices to connect to a LAN
where data network cables or wireless
communications are not a viable option.
• Using a standard powerline adapter, devices
can connect to the LAN wherever there is an
electrical outlet by sending data on certain
frequencies.
• Powerline networking is especially useful
when wireless access points cannot reach all
the devices in the home.
Wireless Broadband
0
Security Threats
• Network security is an integral of
networking regardless of the size of
the network.
• The network security that is
implemented must take into account
the environment while securing the
data, but still allowing for quality of
service that is expected of the network.
• Securing a network involves many
protocols, technologies, devices, tools,
and tpartechniques in order to secure
data and mitigate threats.
• Threat vectors might be external or internal.
Security Solutions
Security must be implemented in multiple layers using
more than one security solution.
Network security components for home or small office
network:
• Antivirus and antispyware software should be
installed on end devices.
• Firewall filtering used to block unauthorized access to
the network
Operating Systems
• Shell - The user interface that allows users to
request specific tasks from the computer. These
requests can be made either through the CLI or
GUI interfaces.
• Kernel - Communicates between the hardware
and software of a computer and manages how
hardware resources are used to meet software
requirements.
• Hardware - The physical part of a computer
including underlying electronics.
GUI
• A GUI allows the user to interact with the system
using an environment of graphical icons, menus,
and windows.
• A GUI is more user-friendly and requires less
knowledge of the underlying command structure
that controls the system.
• Examples of these are: Windows, macOS, Linux
KDE, Apple iOS and Android.
• GUIs can fail, crash, or simply not operate as
specified. For these reasons, network devices are typically accessed through a CLI.
Purpose of an OS
Access Methods
Subconfiguration Modes:
• To move out of any subconfiguration mode to get back to global configuration mode, use the exit
command. To return to privilege EXEC mode, use the end command or key combination Ctrl +Z.
Device Names
• The first configuration command on any device should be to give it a unique hostname.
• By default, all devices are assigned a factory default name. For example, a Cisco IOS switch is
“Switch.”
Configure Passwords
Use the show running-config command to verify that the passwords on the device are now encrypted.
Banner Messages
▪ A banner message is important to warn unauthorized personnel from attempting to access the device.
▪ To create a banner message of the day on a network device, use the banner motd # the message of
the day # global config command.
▪ There are two system files that store the device configuration:
startup-config - This is the saved configuration file that is stored in NVRAM. It contains all the commands that will
be used by the device upon startup or reboot. Flash does not lose its contents when the device is powered off.
running-config - This is stored in RAM. It reflects the current configuration. Modifying a running configuration
affects the operation of a Cisco device immediately. RAM is volatile memory. It loses all of its content when the
device is powered off or restarted
To save changes made to the running configuration to the startup configuration file, use the copy running-
config startup-config privileged EXEC mode command.
Communications Fundamentals
Networks can vary in size and complexity. It is not enough to have a connection, devices must agree on
“how” to communicate.
There are three elements to any communication:
• There will be a source (sender).
• There will be a destination (receiver).
• There will be a channel (media) that provides for the path
of communications to occur.
Communications Protocols
• All communications are governed by
protocols.
• Protocols are the rules that communications
will follow.
• These rules will vary depending on the
protocol.
Protocols must account for the following
requirements:
• An identified sender and receiver
• Common language and grammar
• Speed and timing of delivery
• Confirmation or acknowledgment requirements
Network Protocol Requirements
Common computer protocols must be in agreement and include the following requirements:
• Message encoding
• Message formatting and encapsulation
• Message size
• Message timing
• Message delivery options
Message Encoding
• Encoding is the process of converting information into another acceptable form for transmission.
• Decoding reverses this process to interpret the information.
Message Timing
Flow Control – Manages the rate of data transmission and defines how much information can be sent and
the speed at which it can be delivered.
Response Timeout – Manages how long a device waits when it does not hear a reply from the destination.
Access method - Determines when someone can send a message.
• There may be various rules governing issues like “collisions”. This is when more than
one device sends traffic at the same time and the messages become corrupt.
• Some protocols are proactive and attempt to prevent collisions; other protocols are
reactive and establish a recovery method after the collision occurs.
Protocols
Network Communications enable two or more devices to communicate over one or more
networks
Network Security secure data to provide authentication, data integrity, and data
encryption
Routing enable routers to exchange route information, compare path
information, and select best path
Service Discovery used for the automatic detection of devices or services
Network Protocol Functions
• Devices use agreed-upon protocols to communicate.
• Protocols may have may have one or functions.
Function Description
TCP/IP Protocol
• TCP/IP protocols operate at the application, transport, and internet layers.
• The most common network access layer LAN protocols are Ethernet and WLAN (wireless LAN).
TCP/IP Communication Process
Reference Models
Application Represents data to the user, plus encoding and dialog control.
Network Access Controls the hardware devices and media that make up the network.
Segmenting Messages
Sequencing
De-encapsulation
Data Access
Addresses
Both the data link and network layers use addressing to deliver data from source to destination.
Network layer source and destination addresses - Responsible for delivering the IP packet from original
source to the final destination.
Data link layer source and destination addresses – Responsible for delivering the data link frame from
one network interface card (NIC) to another NIC on the same network.
Layer 3 Logical Address
• Once Layer 2 on PC1 forwards to the default gateway (Router), the router then can start the routing
process of getting the information to actual destination.
• The data link addressing is local addressing so it will have a source and destination for each link.
• The MAC addressing for the first segment is :
o Source – AA-AA-AA-AA-AA-AA (PC1) Sends the frame.
o Destination – 11-11-11-11-11-11 (R1- Default Gateway MAC) Receives the frame.
Note: While the L2 local addressing will change from link to link or hop to hop, the L3 addressing remains the same.
Physical Layer
Copper Cabling
Copper cabling is the most common type of cabling used in networks today. It is inexpensive, easy to install,
and has low resistance to electrical current flow.
Limitations:
• Attenuation – the longer the electrical signals have to travel, the weaker they get.
• The electrical signal is susceptible to interference from two sources, which can distort and
corrupt the data signals (Electromagnetic Interference (EMI) and Radio Frequency
Interference (RFI) and Crosstalk).
Mitigation:
• Strict adherence to cable length limits will mitigate attenuation.
• Some kinds of copper cable mitigate EMI and RFI by using metallic shielding and grounding.
• Some kinds of copper cable mitigate crosstalk by twisting opposing circuit pair wires
together.
Types of Copper Cabling
UTP Cabling
UTP has four pairs of color-coded copper wires twisted together and
encased in a flexible plastic sheath. No shielding is used. UTP relies
on the following properties to limit crosstalk:
• Cancellation - Each wire in a pair of wires uses opposite polarity.
One wire is negative, the other wire is positive. They are twisted together and the magnetic fields effectively
cancel each other and outside EMI/RFI.
• Variation in twists per foot in each wire - Each wire is twisted a different amount, which helps prevent
crosstalk amongst the wires in the cable.
• Larger core
• Very small core • Uses less expensive LEDs
• Uses expensive lasers • LEDs transmit at different angles
• Long-distance applications • Up to 10 Gbps over 550 meters
Dispersion refers to the spreading out of a light pulse over time. Increased dispersion means increased loss
of signal strength. MMF has greater dispersion than SMF, with a the maximum cable distance for MMF is
550 meters.
SC-SC MM Patch Cord LC-LC SM Patch Cord ST-LC MM Patch Cord ST-SC SM Patch Cord
A yellow jacket is for single-mode fiber cables and orange (or aqua) for multimode fiber cables.
Fiber versus Copper
Optical fiber is primarily used as backbone cabling for high-traffic, point-to-point connections between data distribution
facilities and for the interconnection of buildings in multi-building campuses.
Wireless Media
Wireless LAN
There are a number of WLAN standards. When purchasing WLAN equipment, ensure compatibility, and
interoperability.
Network Administrators must develop and apply stringent security policies and processes to protect WLANs
from unauthorized access and damage.
Number Systems
The binary positional notation system operates as shown in the tables below.
192
168
192.168.11.10
11
10
IPv4 Addresses
• Routers and computers only understand binary, while humans work in decimal. It is important for
you to gain a thorough understanding of these two numbering systems and how they are used in
networking.
• The Data Link layer is responsible for communications between end-device network interface cards.
• It allows upper layer protocols to access the physical layer media and encapsulates Layer 3 packets
(IPv4 and IPv6) into Layer 2 Frames.
• It also performs error detection and rejects corrupts frames.
IEEE 802 LAN/MAN standards are specific to the type of network (Ethernet, WLAN, WPAN, etc).
The Data Link Layer consists of two sublayers. Logical Link Control (LLC) and Media Access Control
(MAC).
• The LLC sublayer communicates between the networking software at the upper layers and
the device hardware at the lower layers.
• The MAC sublayer is responsible for data encapsulation and media access control.
Providing Access to Media
Packets exchanged between nodes may experience numerous data link layers and media transitions.
At each hop along the path, a router performs four basic Layer 2 functions:
• Accepts a frame from the network medium.
• De-encapsulates the frame to expose the encapsulated packet.
• Re-encapsulates the packet into a new frame.
• Forwards the new frame on the medium of the next network segment.
Topologies
The topology of a network is the arrangement and relationship of the network devices and the
interconnections between them.
There are two types of topologies used when describing networks:
• Physical topology – shows physical connections and how devices are interconnected.
• Logical topology – identifies the virtual connections between devices using device interfaces
and IP addressing schemes.
WAN Topologies
LAN Topologies
Half-duplex communication
• Only allows one device to send or receive at a time on a shared medium.
• Used on WLANs and legacy bus topologies with Ethernet hubs.
Full-duplex communication
• Allows both devices to simultaneously transmit and receive on a shared medium.
• Ethernet switches operate in full-duplex mode.
Contention-based access
All nodes operating in half-duplex, competing for use of the medium. Examples are:
• Carrier sense multiple access with collision detection (CSMA/CD) as used on legacy bus-
topology Ethernet.
• Carrier sense multiple access with collision avoidance (CSMA/CA) as used on Wireless
LANs.
Controlled access
• Deterministic access where each node has its own time on the medium.
• Used on legacy networks such as Token Ring and ARCNET.
CSMA/CD
• Used by legacy Ethernet LANs.
• Operates in half-duplex mode where only one device sends or receives at a time.
• Uses a collision detection process to govern when a device can send and what happens if
multiple devices send at the same time.
CSMA/CD collision detection process:
• Devices transmitting simultaneously will result in a signal collision on the shared media.
• Devices detect the collision.
• Devices wait a random period of time and retransmit data.
Ethernet Frames
Ethernet Encapsulation
• Ethernet operates in the data link layer and the
physical layer.
• It is a family of networking technologies defined in
the IEEE 802.2 and 802.3 standards.
The 802 LAN/MAN standards, including Ethernet, use two separate sublayers of the data link layer to
operate:
• LLC Sublayer: (IEEE 802.2) Places information in the frame to identify which network layer
protocol is used for the frame.
• MAC Sublayer: (IEEE 802.3, 802.11, or 802.15) Responsible for data encapsulation and media
access control, and provides data link layer addressing.
MAC Sublayer
The MAC sublayer is responsible for data encapsulation and accessing the media.
Data Encapsulation
IEEE 802.3 data encapsulation includes the following:
1. Ethernet frame - This is the internal structure of the Ethernet frame.
2. Ethernet Addressing - The Ethernet frame includes both a source and destination MAC address to deliver the
Ethernet frame from Ethernet NIC to Ethernet NIC on the same LAN.
3. Ethernet Error detection - The Ethernet frame includes a frame check sequence (FCS) trailer used for error
detection.
Media Access
• The IEEE 802.3 MAC sublayer includes the specifications for different Ethernet communications
standards over various types of media including copper and fiber.
• Legacy Ethernet using a bus
topology or hubs, is a shared, half-
duplex medium. Ethernet over a
half-duplex medium uses a
contention-based access method,
carrier sense multiple
access/collision detection
(CSMA/CD).
• Ethernet LANs of today use
switches that operate in full-duplex.
Full-duplex communications with
Ethernet switches do not require
access control through CSMA/CD.
Ethernet Frame Fields
• The minimum Ethernet frame size is 64 bytes and the maximum is 1518 bytes. The preamble field is
not included when describing the size of the frame.
• Any frame less than 64 bytes in length is considered a “collision fragment” or “runt frame” and is
automatically discarded. Frames with more than 1500 bytes of data are considered “jumbo” or “baby
giant frames”.
• If the size of a transmitted frame is less than the minimum, or greater than the maximum, the
receiving device drops the frame. Dropped frames are likely to be the result of collisions or other
unwanted signals. They are considered invalid. Jumbo frames are usually supported by most Fast
Ethernet and Gigabit Ethernet switches and NICs.
Frame Processing
• When a device is forwarding a message to an Ethernet network, the Ethernet header include a Source
MAC address and a Destination MAC address.
• When a NIC receives an Ethernet frame, it examines the destination MAC address to see if it
matches the physical MAC address that is stored in RAM. If there is no match, the device discards
the frame. If there is a match, it passes the frame up the OSI layers, where the de-encapsulation
process takes place.
Note: Ethernet NICs will also accept frames if the destination MAC address is a broadcast or a multicast group of
which the host is a member.
• Any device that is the source or destination of an Ethernet frame, will have an Ethernet NIC and
therefore, a MAC address. This includes workstations, servers, printers, mobile devices, and routers.
Unicast MAC Address
In Ethernet, different MAC addresses are used for Layer 2 unicast, broadcast, and multicast
communications.
• A unicast MAC address is the unique
address that is used when a frame is sent
from a single transmitting device to a
single destination device.
• The process that a source host uses to
determine the destination MAC address
associated with an IPv4 address is
known as Address Resolution Protocol
(ARP). The process that a source host
uses to determine the destination MAC
address associated with an IPv6 address
is known as Neighbor Discovery (ND).
Note: The source MAC address must always be a unicast.
An Ethernet multicast frame is received and processed by a group of devices that belong to the same
multicast group.
• There is a destination MAC address of 01-
00-5E when the encapsulated data is an
IPv4 multicast packet and a destination
MAC address of 33-33 when the
encapsulated data is an IPv6 multicast
packet.
• There are other reserved multicast
destination MAC addresses for when the
encapsulated data is not IP, such as
Spanning Tree Protocol (STP).
• It is flooded out all Ethernet switch ports
except the incoming port, unless the switch
is configured for multicast snooping. It is not forwarded by a router, unless the router is configured
to route multicast packets.
• Because multicast addresses represent a group of addresses (sometimes called a host group), they can
only be used as the destination of a packet. The source will always be a unicast address.
• As with the unicast and broadcast addresses, the multicast IP address requires a corresponding
multicast MAC address.
Switch Fundamentals
• A Layer 2 Ethernet switch uses Layer 2 MAC addresses to make forwarding decisions. It is
completely unaware of the data (protocol) being carried in the data portion of the frame, such as an
IPv4 packet, an ARP message, or an IPv6 ND packet. The switch makes its forwarding decisions
based solely on the Layer 2 Ethernet MAC addresses.
• An Ethernet switch examines its MAC address table to make a forwarding decision for each frame,
unlike legacy Ethernet hubs that repeat bits out all ports except the incoming port.
• When a switch is turned on, the MAC address table is empty
Note: The MAC address table is sometimes referred to as a content addressable memory (CAM) table.
Switch Learning and Forwarding
Filtering Frames
As a switch receives frames from different devices, it is able to populate its MAC address table by
examining the source MAC address of every frame. When the MAC address table of the switch contains the
destination MAC address, it is able to filter the frame and forward out a single port.
Switch Speeds and Forwarding Methods
Switches use one of the following forwarding methods for switching data between network ports:
• Store-and-forward switching - This frame forwarding method receives the entire frame and
computes the CRC. If the CRC is valid, the switch looks up the destination address, which
determines the outgoing interface. Then the frame is forwarded out of the correct port.
• Cut-through switching - This frame forwarding method forwards the frame before it is entirely
received. At a minimum, the destination address of the frame must be read before the frame can be
forwarded.
• A big advantage of store-and-forward switching is that it determines if a frame has errors before
propagating the frame. When an error is detected in a frame, the switch discards the frame.
Discarding frames with errors reduces the amount of bandwidth consumed by corrupt data.
• Store-and-forward switching is required for quality of service (QoS) analysis on converged networks
where frame classification for traffic prioritization is necessary. For example, voice over IP (VoIP)
data streams need to have priority over web-browsing traffic.
Cut-Through Switching
In cut-through switching, the switch acts upon the data as soon as it is received, even if the transmission is
not complete. The switch buffers just enough of the frame to read the destination MAC address so that it can
determine to which port it should forward out the data. The switch does not perform any error checking on
the frame.
There are two variants of cut-through switching:
• Fast-forward switching - Offers the lowest level of latency by immediately forwarding a
packet after reading the destination address. Because fast-forward switching starts forwarding
before the entire packet has been received, there may be times when packets are relayed with
errors. The destination NIC discards the faulty packet upon receipt. Fast-forward switching is
the typical cut-through method of switching.
• Fragment-free switching - A compromise between the high latency and high integrity of
store-and-forward switching and the low latency and reduced integrity of fast-forward
switching, the switch stores and performs an error check on the first 64 bytes of the frame
before forwarding. Because most network errors and collisions occur during the first 64
bytes, this ensures that a collision has not occurred before forwarding the frame.
Memory Buffering on Switches
An Ethernet switch may use a buffering technique to store frames before forwarding them or when the
destination port is busy because of congestion.
Method Description
• Frames are stored in queues that are linked to specific incoming and outgoing ports.
• A frame is transmitted to the outgoing port only when all the frames ahead in the queue have
been successfully transmitted.
Port-based memory
• It is possible for a single frame to delay the transmission of all the frames in memory
because of a busy destination port.
• This delay occurs even if the other frames could be transmitted to open destination ports.
• Deposits all frames into a common memory buffer shared by all switch ports and the amount
of buffer memory required by a port is dynamically allocated.
Shared memory • The frames in the buffer are dynamically linked to the destination port enabling a packet to
be received on one port and then transmitted on another port, without moving it to a
different queue.
Shared memory buffering also results in larger frames that can be transmitted with fewer dropped frames. This is
important with asymmetric switching which allows for different data rates on different ports. Therefore, more
bandwidth can be dedicated to certain ports (e.g., server port).
Two of the most basic settings on a switch are the bandwidth (“speed”) and duplex settings for each
individual switch port. It is critical that the duplex and bandwidth settings match between the switch port
and the connected devices.
There are two types of duplex settings used for communications on an Ethernet network:
• Full-duplex - Both ends of the connection can send and receive simultaneously.
• Half-duplex - Only one end of the connection can send at a time.
Autonegotiation is an optional function found on most Ethernet switches and NICs. It enables two devices to
automatically negotiate the best speed and duplex capabilities.
Note: Gigabit Ethernet ports only operate in full-duplex.
• Duplex mismatch is one of the most common causes of performance issues on 10/100 Mbps Ethernet links. It
occurs when one port on the link operates at half-duplex while the other port operates at full-duplex.
• This can occur when one or both ports on a link are reset, and the autonegotiation process does not result in
both link partners having the same configuration.
• It also can occur when users reconfigure one side of a link and forget to reconfigure the other. Both sides of a
link should have autonegotiation on,
or both sides should have it off. Best
practice is to configure both
Ethernet switch ports as full-duplex.
Auto-MDIX
Connections between devices once required the use of either a crossover or straight-through cable. The type
of cable required depended on the type of interconnecting devices.
Note: A direct connection between a router and a host requires a cross-over connection.
• Most switch devices now support the automatic medium-dependent interface crossover (auto-MDIX) feature.
When enabled, the switch automatically detects the type of cable attached to the port and configures the
interfaces accordingly.
• The auto-MDIX feature is enabled by default on switches running Cisco IOS Release 12.2(18)SE or later.
However, the feature could be disabled. For this reason, you should always use the correct cable type and not
rely on the auto-MDIX feature.
• Auto-MDIX can be re-enabled using the mdix auto interface configuration command.
Network Layer
IPv4 Packet
Function Description
Version This will be for v4, as opposed to v6, a 4 bit field= 0100
Differentiated Services Used for QoS: DiffServ – DS field or the older IntServ – ToS or Type of Service
Time to Live (TTL) Layer 3 hop count. When it becomes zero the router will discard the packet.
IPv6 Packets
Limitations of IPv4
IPv4 has three major limitations:
• IPv4 address depletion – We have basically run out of IPv4 addressing.
• Lack of end-to-end connectivity – To make IPv4 survive this long, private addressing and NAT were
created. This ended direct communications with public addressing.
• Increased network complexity – NAT was meant as temporary solution and creates issues on the
network as a side effect of manipulating the network headers addressing. NAT causes latency and
troubleshooting issues.
IPv6 Overview
• IPv6 was developed by Internet
Engineering Task Force (IETF).
• IPv6 overcomes the limitations of
IPv4.
• Improvements that IPv6 provides:
Increased address space – based on 128
bit address, not 32 bits
Improved packet handling – simplified
header with fewer fields
Eliminates the need for NAT – since
there is a huge amount of addressing,
there is no need to use private addressing
internally and be mapped to a shared
public address
IPv4 Packet Header Fields in the IPv6 Packet Header
Function Description
Version This will be for v6, as opposed to v4, a 4 bit field= 0110
Flow Label Informs device to handle identical flow labels the same way, 20 bit field
Payload Length This 16-bit field indicates the length of the data portion or payload of the IPv6 packet
Next Header I.D.s next level protocol: ICMP, TCP, UDP, etc.
What happens when the router receives the frame from the host device?
• Default Route – this forwards all traffic to a specific direction when there is not a match in the
routing table
Static Routing
Static Route Characteristics:
• Must be configured manually
• Must be adjusted manually by the
administrator when there is a change
in the topology
• Good for small non-redundant
networks
• Often used in conjunction with a
dynamic routing protocol for
configuring a default route
Dynamic Routing
Dynamic Routes Automatically:
• Discover remote networks
• Maintain up-to-date information
• Choose the best path to the
destination
• Find new best paths when there is
a topology change
Dynamic routing can also share static default routes with the other routers.
Introduction to an IPv4 Routing Table
Address Resolution
MAC and IP
When the destination IP address is on a remote network, the destination MAC address is that of the default
gateway.
• ARP is used by IPv4 to associate the IPv4 address of a device with the MAC address of the device
NIC.
• ICMPv6 is used by IPv6 to associate the IPv6 address of a device with the MAC address of the device
NIC.
ARP
ARP Functions
To send a frame, a device will search its ARP table for a destination IPv4 address and a corresponding MAC
address.
• If the packet’s destination IPv4 address is on the same network, the device will search the ARP table
for the destination IPv4 address.
• If the destination IPv4 address is on a different network, the device will search the ARP table for the
IPv4 address of the default gateway.
• If the device locates the IPv4 address, its corresponding MAC address is used as the destination MAC
address in the frame.
• If there is no ARP table entry is found, then the device sends an ARP request.
Removing Entries from an ARP Table
C:\Users\PC> arp -a
• A switch must have a default gateway address IT IS WRONG ON AR, AND ON THE GLOBAL
configured to remotely manage the switch from BUG LIST
another network.
•
STOP
To configure an IPv4 default gateway on a switch, use the
ip default-gateway ip-address global configuration command.
IPv4 Addressing
Unicast
• Unicast transmission is sending a packet to one destination IP address.
• For example, the PC at 172.16.4.1 sends a unicast packet to the printer at 172.16.4.253.
Broadcast
• Broadcast transmission is sending a packet to all other destination IP addresses.
• For example, the PC at 172.16.4.1 sends a broadcast packet to all IPv4 hosts.
Multicast
• Multicast transmission is sending a packet to a multicast address group.
• For example, the PC at 172.16.4.1 sends a multicast packet to the multicast group address
224.10.10.5.
Types of IPv4 Addresses
• As defined in in RFC 1918, public IPv4 addresses are globally routed between internet service provider (ISP)
routers.
Network Address and
RFC 1918 Private Address Range
• Private addresses are common blocks of Prefix
addresses used by most organizations to assign 10.0.0.0/8 10.0.0.0 - 10.255.255.255
IPv4 addresses to internal hosts.
172.16.0.0/12 172.16.0.0 - 172.31.255.255
• Private IPv4 addresses are not unique and can be 192.168.0.0/16 192.168.0.0 - 192.168.255.255
used internally within any network.
• However, private addresses are not globally routable.
Loopback addresses
• 127.0.0.0 /8 (127.0.0.1 to 127.255.255.254)
• Commonly identified as only 127.0.0.1
• Used on a host to test if TCP/IP is operational.
Link-Local addresses
• 169.254.0.0 /16 (169.254.0.1 to 169.254.255.254)
• Commonly known as the Automatic Private IP Addressing (APIPA) addresses or self-assigned addresses.
• Used by Windows DHCP clients to self-configure when no DHCP servers are available.
Legacy Classful Addressing
Assignment of IP Addresses
• The Internet Assigned Numbers Authority
(IANA) manages and allocates blocks of IPv4
and IPv6 addresses to five Regional Internet
Registries (RIRs).
• RIRs are responsible for allocating IP
addresses to ISPs who provide IPv4 address
blocks to smaller ISPs and organizations.
nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
/8 255.0.0.0 16,777,214
11111111.00000000.00000000.00000000
nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
/16 255.255.0.0 65,534
11111111.11111111.00000000.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
/24 255.255.255.0 254
11111111.11111111.11111111.00000000
Subnet Private versus Public IPv4 Address Space
Enterprise networks will have an:
• Intranet - A company’s internal network typically
using private IPv4 addresses.
• DMZ – A companies internet facing servers.
Devices in the DMZ use public IPv4 addresses.
• A company could use the 10.0.0.0/8 and subnet on
the /16 or /24 network boundary.
• The DMZ devices would have to be configured with
public IP addresses.
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
/25 255.255.255.128 2 126
11111111.11111111.11111111.10000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
/26 255.255.255.192 4 62
11111111.11111111.11111111.11000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
/27 255.255.255.224 8 30
11111111.11111111.11111111.11100000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
/28 255.255.255.240 16 14
11111111.11111111.11111111.11110000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
/29 255.255.255.248 32 6
11111111.11111111.11111111.11111000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
/30 255.255.255.252 64 2
11111111.11111111.11111111.11111100
Example: Efficient IPv4 Subnetting
VLSM
However, the point-to-point WAN links only require two addresses and
therefore waste 28 addresses each for a total of 84 unused addresses.
• Applying a traditional subnetting scheme to this scenario is not
very efficient and is wasteful.
• VLSM was developed to avoid wasting addresses by enabling us to subnet a subnet.
VLSM
• The left side displays the traditional subnetting scheme (i.e., the same subnet mask) while the right
side illustrates how VLSM can be used to subnet a subnet and divided the last subnet into eight /30
subnets.
• When using VLSM, always begin by satisfying the host requirements of the largest subnet and
continue subnetting until the host requirements of the smallest subnet are satisfied.
IPv4 Issues
Need for IPv6
• IPv4 is running out of addresses. IPv6 is the successor to IPv4. IPv6 has a much larger 128-bit
address space.
• The development of IPv6 also included fixes for IPv4 limitations and other enhancements.
• With an increasing internet population, a limited IPv4 address space, issues with NAT and the IoT,
the time has come to begin the transition to IPv6.
Both IPv4 and IPv6 will coexist in the near future and the transition will take several years.
The IETF has created various protocols and tools to help network administrators migrate their networks to
IPv6. These migration techniques can be divided into three categories:
• Dual stack -The devices run both IPv4 and IPv6 protocol stacks simultaneously.
• Tunneling – A method of transporting an IPv6 packet over an IPv4 network. The IPv6 packet is
encapsulated inside an IPv4 packet.
• Translation - Network Address Translation 64 (NAT64) allows IPv6-enabled devices to
communicate with IPv4-enabled devices using a translation technique similar to NAT for IPv4.
Note: Tunneling and translation are for transitioning to native IPv6 and should only be used where needed. The goal
should be native IPv6 communications from source to destination.
IPv6 Addressing Formats
• IPv6 addresses are 128 bits in length and written in hexadecimal.
• IPv6 addresses are not case-sensitive and can be written in either lowercase or uppercase.
• The preferred format for writing an IPv6 address is x:x:x:x:x:x:x:x, with each “x” consisting of four
hexadecimal values.
• In IPv6, a hextet is the unofficial term used to refer to a segment of 16 bits, or four hexadecimal values.
• Examples of IPv6 addresses in the preferred format:
2001:0db8:0000:1111:0000:0000:0000:0200
2001:0db8:0000:00a3:abcd:0000:0000:1234
The first rule to help reduce the notation of IPv6 addresses is to omit any leading 0s (zeros).
Examples:
• 01ab can be represented as 1ab
• 09f0 can be represented as 9f0
• 0a00 can be represented as a00
• 00ab can be represented as ab
Note: This rule only applies to leading 0s, NOT to trailing 0s, otherwise the address would be ambiguous.
Type Format
Note: The double colon (::) can only be used once within an address, otherwise there would be more than one possible
resulting address.
Type Format
Compressed 2001:db8:0:1111::200
IPv6 Address Types
Note: It is strongly recommended to use a 64-bit Interface ID for most networks. This is because stateless address
autoconfiguration (SLAAC) uses 64 bits for the Interface ID. It also makes subnetting easier to create and manage.
The IPv6 unique local addresses (range fc00::/7 to fdff::/7) have some similarity to RFC 1918 private
addresses for IPv4, but there are significant differences:
• Unique local addresses are used for local addressing within a site or between a limited number of sites.
• Unique local addresses can be used for devices that will never need to access another network.
• Unique local addresses are not globally routed or translated to a global IPv6 address.
Note: Many sites use the private nature of RFC 1918 addresses to attempt to secure or hide their network from
potential security risks. This was never the intended use of ULAs.
The example topology requires five subnets, one for each LAN as well as for the serial link between R1 and
R2.
The five IPv6 subnets were allocated, with the subnet ID field 0001 through 0005. Each /64 subnet will
provide more addresses than will ever be needed.
Host Reachability
ICMP Echo Message can be used to test the reachability
of a host on an IP network.
In the example:
• The local host sends an ICMP Echo
Request to a host.
• If the host is available, the destination
host responds with an Echo Reply.
ICMPv6 Messages
ICMPv6 has new features and improved functionality not found in ICMPv4, including four new protocols as
part of the Neighbor Discovery Protocol (ND or NDP).
Messaging between an IPv6 router and an IPv6 device, including dynamic address allocation are as follows:
• Router Solicitation (RS) message
• Router Advertisement (RA) message
Messaging between IPv6 devices, including duplicate address detection and address resolution are as
follows:
• Neighbor Solicitation (NS) message
• Neighbor Advertisement (NA) message
Note: ICMPv6 ND also includes the redirect message, which has a similar function to the redirect message used in
ICMPv4.
Note: DAD is not required, but RFC 4861 recommends that DAD is performed on unicast addresses.
The ping command can be used to test the ability of a host to communicate on the local network.
The default gateway address is most often used because the router is normally always operational.
• A successful ping to the default gateway indicates that the host and the router interface serving as the
default gateway are both operational on the local network.
• If the default gateway address does not respond, a ping can be sent to the IP address of another host
on the local network that is known to be operational.
Ping a Remote Host
Ping can also be used to test the ability of a local host to communicate across an internetwork.
A local host can ping a host on a remote network. A successful ping across the internetwork confirms
communication on the local network.
Note: Many network administrators limit or prohibit the entry of ICMP messages therefore, the lack of
a ping response could be due to security restrictions.
Transportation of Data
UDP is also used by request-and-reply applications where the data is minimal, and retransmission can be
done quickly.
If it is important that all the data arrives and that it can be processed in its proper sequence, TCP is used as
the transport protocol.
TCP Overview
TCP Features
▪ Establishes a Session - TCP is a connection-oriented protocol that negotiates and establishes a
permanent connection (or session) between source and destination devices prior to forwarding any
traffic.
▪ Ensures Reliable Delivery - For many reasons, it is possible for a segment to become corrupted or
lost completely, as it is transmitted over the network. TCP ensures that each segment that is sent by
the source arrives at the destination.
▪ Provides Same-Order Delivery - Because networks may provide multiple routes that can have
different transmission rates, data can arrive in the wrong order.
▪ Supports Flow Control - Network hosts have limited resources (i.e., memory and processing
power). When TCP is aware that these resources are overtaxed, it can request that the sending
application reduce the rate of data flow.
TCP Header
TCP is a stateful protocol which means it keeps track of the state of the communication session.
TCP records which information it has sent, and which information has been acknowledged.
Source Port A 16-bit field used to identify the source application by port number.
Destination Port A 16-bit field used to identify the destination application by port number.
A 32-bit field used to indicate that data has been received and the next byte expected from
Acknowledgment Number
the source.
Header Length A 4-bit field known as ʺdata offsetʺ that indicates the length of the TCP segment header.
A 6-bit field used that includes bit codes, or flags, which indicate the purpose and function of
Control bits
the TCP segment.
Window size A 16-bit field used to indicate the number of bytes that can be accepted at one time.
Checksum A 16-bit field used for error checking of the segment header and data.
TCP handles all tasks associated with dividing the data stream into
segments, providing reliability, controlling data flow, and reordering
segments.
UDP Overview
UDP Features
UDP features include the following:
• Data is reconstructed in the order that it is received.
• Any segments that are lost are not resent.
• There is no session establishment.
• The sending is not informed about resource availability.
UDP Header
The UDP header is far simpler than the TCP header because it only has four fields and requires 8 bytes (i.e.
64 bits).
Source Port A 16-bit field used to identify the source application by port number.
Destination Port A 16-bit field used to identify the destination application by port number.
Length A 16-bit field that indicates the length of the UDP datagram header.
Checksum A 16-bit field used for error checking of the datagram header and data.
TCP and UDP transport layer protocols use port numbers to manage multiple, simultaneous conversations.
The source port number is associated with the originating application on the local host whereas the
destination port number is associated with the destination application on the remote host.
Socket Pairs
• The source and destination ports are placed within the segment.
• The segments are then encapsulated within an IP packet.
• The combination of the source IP address and source port number, or the destination IP address and
destination port number is known as a socket.
• Sockets enable multiple processes, running on a client, to distinguish themselves from each other,
and multiple connections to a server process to be distinguished from each other.
Port Number Groups
• These port numbers are reserved for common or popular services and applications
Well-known such as web browsers, email clients, and remote access clients.
0 to 1,023
Ports • Defined well-known ports for common server applications enables clients to
easily identify the associated service required.
• These port numbers are assigned by IANA to a requesting entity to use with
specific processes or applications.
• These processes are primarily individual applications that a user has chosen to
Registered
1,024 to 49,151 install, rather than common applications that would receive a well-known port
Ports
number.
• For example, Cisco has registered port 1812 for its RADIUS server authentication
process.
23 TCP Telnet
Step 1: When the client has no more data to send in the stream, it
sends a segment with the FIN flag set.
Step 2: The server sends an ACK to acknowledge the receipt of
the FIN to terminate the session from client to server.
Step 3: The server sends a FIN to the client to terminate the server-
to-client session.
Step 4: The client responds with an ACK to acknowledge the FIN
from the server.
After the communication is completed the sessions are closed, and the connection is terminated. The
connection and session mechanisms enable TCP reliability function.
Host operating systems today typically employ an optional TCP feature called selective acknowledgment (SACK),
negotiated during the three-way handshake.
If both hosts support SACK, the receiver can explicitly acknowledge which segments (bytes) were received including
any discontinuous segments.
TCP Flow Control – Window Size and Acknowledgments
TCP also provides mechanisms for flow control as
follows:
• Flow control is the amount of data that the
destination can receive and process reliably.
• Flow control helps maintain the reliability of TCP
transmission by adjusting the rate of data flow
between source and destination for a given session.
Maximum Segment Size (MSS) is the maximum amount of data that the destination device can receive.
• A common MSS is 1,460 bytes when using IPv4.
• A host determines the value of its MSS field by subtracting the IP and TCP headers from the Ethernet
maximum transmission unit (MTU), which is 1500 bytes be default.
• 1500 minus 60 (20 bytes for the IPv4 header and 20 bytes for the TCP header) leaves 1460 bytes.
When congestion occurs on a network, it results in packets being discarded by the overloaded router.
To avoid and control congestion, TCP employs several congestion handling mechanisms, timers, and
algorithms.
UDP Communication
Application Layer
• The upper three layers of the OSI model (application, presentation, and session) define functions of the
TCP/IP application layer.
• The application layer
provides the interface
between the applications
used to communicate, and
the underlying network over
which messages are
transmitted.
• Some of the most widely
known application layer
protocols include HTTP,
FTP, TFTP, IMAP and
DNS.
Presentation and Session Layer
Name System
DNS - Domain Name System (or Service)
• TCP, UDP client 53
• Translates domain names, such as cisco.com, into IP addresses.
Host Config
DHCP - Dynamic Host Configuration Protocol
• UDP client 68, server 67
• Dynamically assigns IP addresses to be re-used when no longer needed
Web
HTTP - Hypertext Transfer Protocol
• TCP 80, 8080
• A set of rules for exchanging text, graphic images, sound, video, and other multimedia files on the World
Wide Web
Note: DHCP for IPv6 (DHCPv6) provides similar services for IPv6 clients. However, DHCPv6 does not provide a
default gateway address. This can only be obtained dynamically from the Router Advertisement message of the router.
DHCP Operation
The DHCP Process:
• When an IPv4, DHCP-configured device boots up or connects to the network, the client broadcasts a DHCP
discover (DHCPDISCOVER) message to identify any available DHCP servers on the network.
• A DHCP server replies with a DHCP offer (DHCPOFFER) message, which offers a lease to the client. (If a
client receives more than one offer due to multiple
DHCP servers on the network, it must choose one.)
• The client sends a DHCP request (DHCPREQUEST)
message that identifies the explicit server and lease
offer that the client is accepting.
• The server then returns a DHCP acknowledgment
(DHCPACK) message that acknowledges to the client
that the lease has been finalized.
• If the offer is no longer valid, then the selected server
responds with a DHCP negative acknowledgment
(DHCPNAK) message and the process must begin
with a new DHCPDISCOVER message.
Note: DHCPv6 has a set of messages that is similar to those for DHCPv4. The DHCPv6 messages are SOLICIT,
ADVERTISE, INFORMATION REQUEST, and REPLY.
FTP was developed to allow for data transfers between a client and a server. An FTP client is an application
which runs on a computer that is being used to push and pull data from an FTP server.
Step 1 - The client establishes the first connection to the
server for control traffic using TCP port 21. The traffic
consists of client commands and server replies.
Step 2 - The client establishes the second connection to the
server for the actual data transfer using TCP port 20. This
connection is created every time there is data to be
transferred.
Step 3 - The data transfer can happen in either direction.
The client can download (pull) data from the server, or the
client can upload (push) data to the server.
Server Message Block
The Server Message Block (SMB) is a client/server, request-response file sharing protocol. Servers can
make their own resources available to clients on the network.
Three functions of SMB messages:
• Start, authenticate, and terminate sessions
• Control file and printer access
• Allow an application to send or receive messages to
or from another device
Types of Threats
Attacks on a network can be devastating and can result in a loss of time and money due to damage, or theft
of important information or assets. Intruders can gain access to a network through software vulnerabilities,
hardware attacks, or through guessing someone's username and password. Intruders who gain access by
modifying software or exploiting software vulnerabilities are called threat actors.
After the threat actor gains access to the network, four types of threats may arise:
• Information Theft
• Data Loss and manipulation
• Identity Theft
• Disruption of Service
Types of Vulnerabilities
Vulnerability is the degree of weakness in a network or a device. Some degree of vulnerability is inherent in
routers, switches, desktops, servers, and even security devices. Typically, the network devices under attack
are the endpoints, such as servers and desktop computers.
Physical Security
If network resources can be physically compromised, a threat actor can deny the use of network resources.
The four classes of physical threats are as follows:
• Hardware threats - This includes physical damage to servers, routers, switches, cabling plant, and
workstations.
• Environmental threats - This includes temperature extremes (too hot or too cold) or humidity
extremes (too wet or too dry).
• Electrical threats - This includes voltage spikes, insufficient supply voltage (brownouts),
unconditioned power (noise), and total power loss.
• Maintenance threats - This includes poor handling of key electrical components (electrostatic
discharge), lack of critical spare parts, poor cabling, and poor labeling.
A good plan for physical security must be created and implemented to address these issues.
Network Attacks
Types of Malware
Malware is short for malicious software. It is code or software specifically designed to damage, disrupt,
steal, or inflict “bad” or illegitimate action on data, hosts, or networks. The following are types of malware:
• Viruses - A computer virus is a type of malware that propagates by inserting a copy of itself into, and
becoming part of, another program. It spreads from one computer to another, leaving infections as it travels.
• Worms - Computer worms are similar to viruses in that they replicate functional copies of themselves and can
cause the same type of damage. In contrast to viruses, which require the spreading of an infected host file,
worms are standalone software and do not require a host program or human help to propagate.
• Trojan Horses - It is a harmful piece of software that looks legitimate. Unlike viruses and worms, Trojan
horses do not reproduce by infecting other files. They self-replicate. Trojan horses must spread through user
interaction such as opening an email attachment or downloading and running a file from the internet.
Reconnaissance Attacks
In addition to malicious code attacks, it is also possible for networks to fall prey to various network attacks.
Network attacks can be classified into three major categories:
• Reconnaissance attacks - The discovery and mapping of systems, services, or vulnerabilities.
• Access attacks - The unauthorized manipulation of data, system access, or user privileges.
• Denial of service - The disabling or corruption of networks, systems, or services.
For reconnaissance attacks, external threat actors can use internet tools, such as
the nslookup and whois utilities, to easily determine the IP address space assigned to a given corporation or
entity. After the IP address space is determined, a threat actor can then ping the publicly available IP
addresses to identify the addresses that are active.
Access Attacks
Access attacks exploit known vulnerabilities in authentication services, FTP services, and web services to
gain entry to web accounts, confidential databases, and other sensitive information.
Access attacks can be classified into four types:
• Password attacks - Implemented using brute force, trojan horse, and packet sniffers
• Trust exploitation - A threat actor uses unauthorized privileges to gain access to a system, possibly
compromising the target.
• Port redirection: - A threat actor uses a compromised system as a base for attacks against other targets. For
example, a threat actor using SSH (port 22) to connect to a compromised host A. Host A is trusted by host B
and, therefore, the threat actor can use Telnet (port 23) to access it.
• Man-in-the middle - The threat actor is positioned in between two legitimate entities in order to read or
modify the data that passes between the two parties.
Keep Backups
Backing up device configurations and data is one of the most effective ways of protecting against data loss.
Backups should be performed on a regular basis as identified in the security policy. Data backups are usually
stored offsite to protect the backup media if anything happens to the main facility.
Consideration Description
• Always validate backups to ensure the integrity of the data and validate the file restoration
Storage
procedures.
• Backups should be transported to an approved offsite storage location on a daily, weekly, or monthly
Security
rotation, as required by the security policy.
Validation • Backups should be protected using strong passwords. The password is required to restore the data.
Upgrade, Update, and Patch
Types of Firewalls
Firewall products come packaged in various forms. These products use different techniques for determining
what will be permitted or denied access to a network. They include the following:
• Packet filtering - Prevents or allows access based on IP or MAC addresses
• Application filtering - Prevents or allows access by specific application types based on port numbers
• URL filtering - Prevents or allows access to websites based on specific URLs or keywords
• Stateful packet inspection (SPI) - Incoming packets must be legitimate responses to requests from
internal hosts. Unsolicited packets are blocked unless permitted specifically. SPI can also include the
capability to recognize and filter out specific types of attacks, such as denial of service (DoS).
Endpoint Security
An endpoint, or host, is an individual computer system or device that acts as a network client. Common
endpoints are laptops, desktops, servers, smartphones, and tablets.
Securing endpoint devices is one of the most challenging jobs of a network administrator because it involves
human nature. A company must have well-documented policies in place and employees must be aware of
these rules.
Employees need to be trained on proper use of the network. Policies often include the use of antivirus
software and host intrusion prevention. More comprehensive endpoint security solutions rely on network
access control.
Device Security
Cisco AutoSecure
The security settings are set to the default values when a new operating system is installed on a device. In
most cases, this level of security is inadequate. For Cisco routers, the Cisco AutoSecure feature can be used
to assist securing the system.
In addition, there are some simple steps that should be taken that apply to most operating systems:
• Default usernames and passwords should be changed immediately.
• Access to system resources should be restricted to only the individuals that are authorized to use those
resources.
• Any unnecessary services and applications should be turned off and uninstalled when possible.
• Often, devices shipped from the manufacturer have been sitting in a warehouse for a period of time
and do not have the most up-to-date patches installed. It is important to update any software and
install any security patches prior to implementation.
Passwords
To protect network devices, it is important to use strong passwords. Here are standard guidelines to follow:
• Use a password length of at least eight characters, preferably 10 or more characters.
• Make passwords complex. Include a mix of uppercase and lowercase letters, numbers, symbols, and
spaces, if allowed.
• Avoid passwords based on repetition, common dictionary words, letter or number sequences,
usernames, relative or pet names, biographical information, such as birthdates, ID numbers, ancestor
names, or other easily identifiable pieces of information.
• Deliberately misspell a password. For example, Smith = Smyth = 5mYth or Security = 5ecur1ty.
• Change passwords often. If a password is unknowingly compromised, the window of opportunity for
the threat actor to use the password is limited.
• Do not write passwords down and leave them in obvious places such as on the desk or monitor.
On Cisco routers, leading spaces are ignored for passwords, but spaces after the first character are not.
Therefore, one method to create a strong password is to use the space bar and create a phrase made of many
words. This is called a passphrase. A passphrase is often easier to remember than a simple password. It is
also longer and harder to guess.
Additional Password Security
There are several steps that can be taken to help ensure that passwords remain secret on a Cisco router and
switch including these:
• Encrypt all plaintext passwords with the
service password-encryption command.
• Set a minimum acceptable password length
with the security passwords min-length
command.
• Deter brute-force password guessing attacks
with the login block-
for # attempts # within # command.
• Disable an inactive privileged EXEC mode
access after a specified amount of time with
the exec-timeout command.
Enable SSH
It is possible to configure a Cisco device to support SSH using the following steps:
1. Configure a unique device hostname. A device must have a unique hostname other than the default.
2. Configure the IP domain name. Configure the IP domain name of the network by using the global
configuration mode command ip-domain name.
3. Generate a key to encrypt SSH traffic. SSH encrypts traffic between source and destination. However, to do
so, a unique authentication key must be generated by using the global configuration command crypto key
generate rsa general-keys modulus bits. The modulus bits determines the size of the key and can be
configured from 360 bits to 2048 bits. The larger the bit value, the more secure the key. However, larger bit
values also take longer to encrypt and decrypt information. The minimum recommended modulus length is
1024 bits.
4. Verify or create a local database entry. Create a local database username entry using the username global
configuration command.
5. Authenticate against the local database. Use the login local line configuration command to authenticate the
vty line against the local database.
6. Enable vty inbound SSH sessions. By default, no input session is allowed on vty lines. You can specify
multiple input protocols including Telnet and SSH using the transport input [ssh | telnet] command.
Disable Unused Services
Cisco routers and switches start with a list of active services that may or may not be required in your
network. Disable any unused services to preserve system resources, such as CPU cycles and RAM, and
prevent threat actors from exploiting these services.
• The type of services that are on by default will vary depending on the IOS version. For example, IOS-XE
typically will have only HTTPS and DHCP ports open. You can verify this with the show ip ports
all command.
• IOS versions prior to IOS-XE use the show control-plane host open-ports command.
Like large networks, small networks require planning and design to meet user requirements. Planning
ensures that all requirements, cost factors, and deployment options are given due consideration. One of the
first design considerations is the type of intermediary devices to use to support the network.
Factors that must be considered when selecting network devices include:
• cost
• speed and types of ports/interfaces
• expandability
• operating system features and services
IP Addressing for a Small Network
When implementing a network, create an IP addressing scheme and use it. All hosts and devices within an
internetwork must have a unique address. Devices that will factor into the IP addressing scheme include the
following:
• End user devices - The number and type of connections (i.e., wired, wireless, remote access)
• Servers and peripherals devices (e.g., printers and security cameras)
• Intermediary devices including switches and access points
It is recommended that you plan, document, and maintain an IP addressing scheme based on device type.
The use of a planned IP addressing scheme makes it easier to identify a type of device and to troubleshoot
problems.
Traffic Management
• The goal for a good network design is to enhance the productivity of the employees and minimize
network downtime.
• The routers and switches in a small
network should be configured to
support real-time traffic, such as
voice and video, in an appropriate
manner relative to other data traffic.
A good network design will
implement quality of service (QoS).
• Priority queuing has four queues.
The high-priority queue is always
emptied first.
Small Network Applications and Protocols
Common Applications
After you have set it up, your network still needs certain types of applications and protocols in order to
work. The network is only as useful as the applications that are on it.
There are two forms of software programs or processes that provide access to the network:
• Network Applications: Applications that implement application layer protocols and are able to
communicate directly with the lower layers of the protocol stack.
• Application Layer Services: For applications that are not network-aware, the programs that interface
with the network and prepare the data for transfer.
Common Protocols
Network protocols support the applications and services used by employees in a small network.
• Network administrators commonly require access to network devices and servers. The two most common
remote access solutions are Telnet and Secure Shell (SSH).
• Hypertext Transfer Protocol (HTTP) and Hypertext Transfer Protocol Secure (HTTP) are used between web
clients and web servers.
• Simple Mail Transfer Protocol (SMTP) is used to send email, Post Office Protocol (POP3) or Internet Mail
Access Protocol (IMAP) are used by clients to retrieve email.
• File Transfer Protocol (FTP) and Security File Transfer Protocol (SFTP) are used to download and upload
files between a client and an FTP server.
• Dynamic Host Configuration Protocol (DHCP) is used by clients to acquire an IP configuration from a DHCP
Server.
• The Domain Name Service (DNS) resolves domain names to IP addresses.
Note: A server could provide multiple network services. For instance, a server could be an email, FTP and SSH
server.
These network protocols comprise the fundamental toolset of a network professional, defining:
• Processes on either end of a communication session.
• Types of messages.
• Syntax of the messages.
• Meaning of informational fields.
• How messages are sent and the expected response.
• Interaction with the next lower layer.
Many companies have established a policy of using secure versions (e.g., SSH, SFTP, and HTTPS) of these protocols
whenever possible.
Voice and Video Applications
• Businesses today are increasingly using IP telephony and streaming media to communicate with
customers and business partners, as well as enabling their employees to work remotely.
• The network administrator must ensure the proper equipment is installed in the network and that the
network devices are configured to ensure priority delivery.
• The factors that a small network administrator must consider when supporting real-time applications:
o Infrastructure - Does it have the capacity and capability to support real-time applications?
o VoIP - VoIP is typically less expensive than IP Telephony, but at the cost of quality and features.
o IP Telephony - This employs dedicated servers form call control and signaling.
o Real-Time Applications - The network must support Quality of Service (QoS) mechanisms to
minimize latency issues. Real-Time Transport Protocol (RTP) and Real-Time Transport Control
Protocol (RTCP) and two protocols that support real-time applications.
Protocol Analysis
It is important to understand the type of traffic that is crossing the network as well as the current traffic flow.
There are several network management tools that can be used for this purpose.
To determine traffic flow patterns, it is important to do the following:
• Capture traffic during peak utilization times to get a good representation of the different traffic types.
• Perform the capture on different network segments and devices as some traffic will be local to a
particular segment.
• Information gathered by the protocol analyzer is evaluated based on the source and destination of the
traffic, as well as the type of traffic being sent.
• This analysis can be used to make decisions on how to manage the traffic more efficiently.
Employee Network Utilization
Many operating systems provide built-in tools to display such network utilization information. These tools
can be used to capture a “snapshot” of information such as the following:
• OS and OS Version
• CPU utilization
• RAM utilization
• Drive utilization
• Non-Network applications
• Network applications
Documenting snapshots for employees in a small network over a period of time is very useful to identify
evolving protocol requirements and associated traffic flows.
Whether your network is small and new, or you are scaling an existing network, you will always want to be
able to verify that your components are properly connected to each other and to the internet.
• The ping command, available on most operating systems, is the most effective way to quickly test Layer 3
connectivity between a source and destination IP address.
• The ping command uses the Internet Control Message Protocol (ICMP) echo (ICMP Type 8) and echo reply
(ICMP Type 0) messages.
On a Windows 10 host, the ping command sends four consecutive ICMP echo messages and expects four
consecutive ICMP echo replies from the destination. The IOS ping sends five ICMP echo messages and
displays an indicator for each ICMP echo reply received.
IOS Ping Indicators are as follows:
Element Description
• A period means that time expired waiting for an echo reply message.
.
• This indicates a connectivity problem occurred somewhere along the path.
• Uppercase U indicates a router along the path responded with an ICMP Type 3 “destination
unreachable” error message.
U
• Possible reasons include the router does not know the direction to the destination network or it could
not find the host on the destination network.
Note: Other possible ping replies include Q, M, ?, or &. However, the meaning of these are out of scope for this
module.
Extended Ping
The ping command is useful to quickly determine if there is a Layer 3 connectivity problem. However,
it does not identify where the problem is located along the path.
• Traceroute can help locate Layer 3 problem areas in a network. A trace returns a list of hops as a packet is
routed through a network.
• The syntax of the trace command varies between operating systems.
Extended Traceroute
Like the extended ping command, there is also an extended traceroute command. It allows the
administrator to adjust parameters related to the command operation.
The Windows tracert command allows the input of several parameters through options in the command
line. However, it is not guided like the extended traceroute IOS command. The following output displays the
available options for the Windows tracert command:
• The Cisco IOS extended traceroute option enables the user to
create a special type of trace by adjusting parameters related to
the command operation.
• Extended traceroute is entered in privileged EXEC mode by
typing traceroute without a destination IP address. IOS will
guide you through the command options by presenting a number
of prompts related to the setting of all the different parameters.
Network Baseline
• One of the most effective tools for monitoring and troubleshooting network performance is to
establish a network baseline.
• One method for starting a baseline is to copy and paste the results from an executed ping, trace, or
other relevant commands into a text file. These text files can be time stamped with the date and
saved into an archive for later retrieval and comparison.
• Among items to consider are error messages and the response times from host to host.
• Corporate networks should have extensive baselines; more extensive than we can describe in this
course. Professional-grade software tools are available for storing and maintaining baseline
information.
The arp command is executed from the Windows, Linux, or Mac command prompt. The command lists all
devices currently in the ARP cache of the host.
• The arp -a command displays the known IP address and MAC address binding. The ARP cache only displays
information from devices that have been recently accessed.
• To ensure that the ARP cache is populated, ping a device so that it will have an entry in the ARP table.
• The cache can be cleared by using the netsh interface ip delete arpcache command in the event the network
administrator wants to repopulate the cache with updated information.
Note: You may need administrator access on the host to be able to use the netsh interface ip delete
arpcache command.
Common show Commands Revisited
Command Description
Step Description
Step 2. Establish a Theory of • After the problem is identified, try to establish a theory of probable causes.
Probable Causes • This step often yields more than a few probable causes to the problem.
• Based on the probable causes, test your theories to determine which one is
the cause of the problem.
Step 3. Test the Theory to
• A technician may apply a quick fix to test and see if it solves the problem.
Determine Cause
• If a quick fix does not correct the problem, you might need to research the
problem further to establish the exact cause.
Step 4. Establish a Plan of Action After you have determined the exact cause of the problem, establish a plan of action
and Implement the Solution to resolve the problem and implement the solution.
Step 5. Verify Solution and • After you have corrected the problem, verify full functionality.
Implement Preventive Measures • If applicable, implement preventive measures.
Resolve or Escalate?
• In some situations, it may not be possible to resolve the problem immediately. A problem should be
escalated when it requires a manager decision, some specific expertise, or network access level
unavailable to the troubleshooting technician.
• A company policy should clearly state when and how a technician should escalate a problem.
To list a brief description of all the debugging command options, use the debug ? command in privileged
EXEC mode at the command line.
To turn off a specific debugging feature, add the no keyword in front of the debug command
Alternatively, you can enter the undebug form of the command in privileged EXEC mode.
To turn off all active debug commands at once, use the undebug all command.
• Be cautious using some debug commands, as they may generate a substantial amount of output and
use a large portion of system resources. The router could get so busy displaying debug messages that
it would not have enough processing power to perform its network functions, or even listen to
commands to turn off debugging.
Troubleshooting Scenarios
After a Cisco switch is powered on, it goes through the following five-step boot sequence:
Step 1: First, the switch loads a power-on self-test (POST) program stored in ROM. POST checks the CPU subsystem.
It tests the CPU, DRAM, and the portion of the flash device that makes up the flash file system.
Step 2: Next, the switch loads the boot loader software. The boot loader is a small program stored in ROM that is run
immediately after POST successfully completes.
Step 3: The boot loader performs low-level CPU initialization. It initializes the CPU registers, which control where
physical memory is mapped, the quantity of memory, and its speed.
Step 4: The boot loader initializes the flash file system on the system board.
Step 5: Finally, the boot loader locates and loads a default IOS operating system software image into memory and gives
control of the switch over to the IOS.
Command Definition
By default, the switch is configured to have its management controlled through VLAN 1. All ports are
assigned to VLAN 1 by default. For security purposes, it is considered a best practice to use a VLAN other
than VLAN 1 for the management VLAN,
Step 1: Configure the Management Interface: From VLAN interface configuration mode, an IPv4 address
and subnet mask is applied to the management SVI of the switch.
Note: The SVI for VLAN 99 will not appear as “up/up” until VLAN 99 is created and there is a device connected to a
switch port associated with VLAN 99.
Note: The switch may need to be configured for IPv6. For example, before you can configure IPv6 addressing on a
Cisco Catalyst 2960 running IOS version 15.0, you will need to enter the global configuration command sdm prefer
dual-ipv4-and-ipv6 default and then reload the switch.
Enter interface configuration mode for the SVI. S1(config)# interface vlan 99
Configure the management interface IPv4 address. S1(config-if)# ip address 172.17.99.11 255.255.255.0
Configure the management interface IPv6 address S1(config-if)# ipv6 address 2001:db8:acad:99::1/64
Save the running config to the startup config. S1# copy running-config startup-config
Configure the default gateway for the switch. S1(config)# ip default-gateway 172.17.99.1
Save the running config to the startup config. S1# copy running-config startup-config
Step 3: Verify Configuration
• The show ip interface brief and show ipv6
interface brief commands are useful for
determining the status of both physical and
virtual interfaces. The output shown confirms
that interface VLAN 99 has been configured
with an IPv4 and IPv6 address.
Note: An IP address applied to the SVI is only for remote
management access to the switch; this does not allow the switch to route Layer 3 packets.
Duplex Communication
• Full-duplex communication increases bandwidth efficiency by allowing both ends of a connection to transmit
and receive data simultaneously. This is also known as bidirectional communication and it requires micro
segmentation.
• A micro segmented LAN is created when a switch port has only one device connected and is operating in full-
duplex mode. There is no collision domain associated with a switch port operating in full-duplex mode.
• Unlike full-duplex communication, half-duplex communication is unidirectional. Half-duplex communication
creates performance issues because data can flow in only one direction at a time, often resulting in collisions.
• Gigabit Ethernet and 10 Gb NICs require full-duplex connections to operate. In full-duplex mode, the collision
detection circuit on the NIC is disabled. Full-duplex offers 100 percent efficiency in both directions
(transmitting and receiving). This results in a doubling of the potential use of the stated bandwidth.
Save the running config to the startup config. S1# copy running-config startup-config
The show interfaces command is another commonly used command, which displays status and statistics
information on the network interfaces of the switch. The show interfaces command is frequently used when
configuring and monitoring network devices.
The first line of the output for
the show interfaces fastEthernet
0/18 command indicates that the
FastEthernet 0/18 interface is
up/up, meaning that it is
operational. Further down, the
output shows that the duplex is full
and the speed is 100 Mbps.
Secure Remote Access
Telnet Operation
SSH Operation
Secure Shell (SSH) is a secure protocol that uses TCP port 22. It provides a secure (encrypted) management
connection to a remote device. SSH should replace Telnet for management connections. SSH provides
security for remote connections by providing strong encryption when a device is authenticated (username
and password) and also for the transmitted data between the communicating devices.
Note: To delete the RSA key pair, use the crypto key zeroize rsa global configuration mode command. After the RSA
key pair is deleted, the SSH server is automatically disabled.
Step 4: Configure user authentication - The SSH server can authenticate users locally or using an authentication
server. To use the local authentication method, create a username and password pair using
the username username secret password global configuration mode command.
Step 5: Configure the vty lines - Enable the SSH protocol on the vty lines by using the transport input ssh line
configuration mode command. Use the line vty global configuration mode command and then the login local line
configuration mode command to require local authentication for SSH connections from the local username database.
Step 6: Enable SSH version 2 - By default, SSH supports both versions 1 and 2. When supporting both versions, this
is shown in the show ip ssh output as supporting version 2. Enable SSH version using the ip ssh version 2 global
configuration command.
To display the version and configuration data for SSH on the device that you configured as an SSH server,
use the show ip ssh command. In the example, SSH version 2 is enabled.
Configure a banner to provide legal notification of unauthorized access, as shown in the example.
One distinguishing feature between switches and routers is the type of interfaces supported by each. For
example, Layer 2 switches support LANs; therefore, they have multiple FastEthernet or Gigabit Ethernet
ports. The dual stack topology in the figure is used to demonstrate the configuration of router IPv4 and IPv6
interfaces.
Routers support LANs and WANs and can interconnect different types of networks; therefore, they support
many types of interfaces. For example, G2 ISRs have one or two integrated Gigabit Ethernet interfaces and
High-Speed WAN Interface Card (HWIC) slots to accommodate other types of network interfaces, including
serial, DSL, and cable interfaces.
To be available, an interface must be:
• Configured with at least one IP address - Use
the ip address ip-address subnet-mask and
the ipv6 address ipv6-address/prefix interface
configuration commands.
• Activated - By default, LAN and WAN interfaces
are not activated (shutdown). To enable an
interface, it must be activated using the no
shutdown command. (This is similar to powering
on the interface.) The interface must also be
connected to another device (a hub, a switch, or
another router) for the physical layer to be active.
• Description - Optionally, the interface could also
be configured with a short description of up to
240 characters. It is good practice to configure a description on each interface. On production networks, the
benefits of interface descriptions are quickly realized as they are helpful in troubleshooting and in identifying
a third-party connection and contact information.
IPv4 Loopback Interfaces
• The loopback interface is a logical interface that is internal to the router. It is not assigned to a
physical port and can never be connected to any other device. It is considered a software interface
that is automatically placed in an “up” state, as long as the router is functioning.
• The loopback interface is useful in testing and managing a Cisco IOS device because it ensures that
at least one interface will always be available. For example, it can be used for testing purposes, such
as testing internal routing processes, by emulating networks behind the router.
• Loopback interfaces are also commonly used in lab environments to create additional interfaces. For
example, you can create multiple loopback interfaces on a router to simulate more networks for
configuration practice and testing purposes. The IPv4 address for each loopback interface must be
unique and unused by any other interface. In this curriculum, we often use a loopback interface to
simulate a link to the internet.
There are several show commands that can be used to verify the operation and configuration of an interface.
The following commands are especially useful to quickly identify the status of an interface:
• show ip interface brief and show ipv6 interface brief - These display a summary for all
interfaces including the IPv4 or IPv6 address of the interface and current operational status.
• show running-config interface interface-id - This displays the commands applied to the
specified interface.
• show ip route and show ipv6 route - These display the contents of the IPv4 or IPv6 routing
table stored in RAM. In Cisco IOS 15, active interfaces should appear in the routing table
with two related entries identified by the code ‘C’ (Connected) or ‘L’ (Local). In previous
IOS versions, only a single entry with the code ‘C’ will appear.
Verify Interface Status
The output of the show ip interface brief and show ipv6 interface brief commands can be used to quickly
reveal the status of all interfaces on the router. You can verify that the interfaces are active and operational
as indicated by the Status of “up” and Protocol of “up”, as shown in the example. A different output would
indicate a problem with either the configuration
The output of the show ipv6 interface brief command displays two configured IPv6 addresses per interface.
One address is the IPv6 global unicast address that was manually entered. The other address, which begins
with FE80, is the link-local unicast address for the interface. A link-local address is automatically added to
an interface whenever a global unicast address is assigned. An IPv6 network interface is required to have a
link-local address, but not necessarily a global unicast address.
The show ipv6 interface gigabitethernet 0/0/0 command displays the interface status and all of the IPv6
addresses belonging to the interface. Along with the link local address and global unicast address, the output
includes the multicast addresses assigned to the interface, beginning with prefix FF02, as shown in the
example.
Verify Interface Configuration
The output of the show running-config interface command displays the current commands applied to the
specified interface, as shown.
The following two commands are used to gather more detailed interface information:
• show interfaces- Displays interface information and packet flow count for all interfaces on
the device.
• show ip interface and show ipv6 interface - Displays the IPv4 and IPv6 related information
for all interfaces on a router..
Verify Routes
Frame Forwarding
Switching in Networking
Two terms are associated with frames entering or leaving an
interface:
• Ingress – entering the interface
• Egress – exiting the interface
A switch will use the destination MAC address to determine the egress interface.
Before a switch can make this decision it must learn what interface the destination is located.
A switch builds a MAC address table, also known as a Content Addressable Memory (CAM) table, by
recording the source MAC address into the table along with the port it was received.
Store-and-Forward Switching
Store-and-forward has two primary characteristics:
• Error Checking – The switch will check the Frame Check Sequence (FCS) for CRC errors. Bad
frames will be discarded.
• Buffering – The ingress interface will buffer the frame while it checks the FCS. This also allows the
switch to adjust to a potential difference in speeds between the ingress and egress ports.
Cut-Through Switching
• Cut-through forwards the frame immediately after determining the destination MAC.
• Fragment (Frag) Free method will check the destination and ensure that the frame is at least 64 Bytes. This
will eliminate runts.
Concepts of Cut-Through switching:
• Is appropriate for switches needing
latency to be under 10 microseconds
• Does not check the FCS, so it can
propagate errors
• May lead to bandwidth issues if the
switch propagates too many errors
• Cannot support ports with differing
speeds going from ingress to egress
Switching Domains
Collision Domains
Broadcast Domains
Switches use the MAC address table and full-duplex to eliminate collisions and avoid congestion.
Features of the switch that alleviate congestion are as follows:
Protocol Function
Fast Port Speeds Depending on the model, switches may have up to 100Gbps port speeds.
Fast Internal Switching This uses fast internal bus or shared memory to improve performance.
Large Frame Buffers This allows for temporary storage while processing large quantities of frames.
High Port Density This provides many ports for devices to be connected to LAN with less cost. This
also provides for more local traffic with less congestion.
STP
Layer 2 Loops
• Without STP enabled, Layer 2 loops can form, causing broadcast, multicast and unknown unicast
frames to loop endlessly. This can bring down a network quickly.
• When a loop occurs, the MAC address table on a switch will constantly change with the updates
from the broadcast frames, which results in MAC database instability. This can cause high CPU
utilization, which makes the switch unable to forward frames.
• An unknown unicast frame is when the switch does not have the destination MAC address in its
MAC address table and must forward the frame out all ports, except the ingress port.
Broadcast Storm
• A broadcast storm is an abnormally high number of broadcasts overwhelming the network during a
specific amount of time. Broadcast storms can disable a network within seconds by overwhelming
switches and end devices. Broadcast storms can be caused by a hardware problem such as a faulty
NIC or from a Layer 2 loop in the network.
• Layer 2 broadcasts in a network, such as ARP Requests are very common. Layer 2 multicasts are
typically forwarded the same way as a broadcast by the switch. IPv6 packets are never forwarded as
a Layer 2 broadcast, ICMPv6 Neighbor Discovery uses Layer 2 multicasts.
• A host caught in a Layer 2 loop is not accessible to other hosts on the network. Additionally, due to
the constant changes in its MAC address table, the switch does not know out of which port to
forward unicast frames.
• To prevent these issues from occurring in a redundant network, some type of spanning tree must be
enabled on the switches. Spanning tree is enabled, by default, on Cisco switches to prevent Layer 2
loops from occurring.
• During STA and STP functions, switches use Bridge Protocol Data Units (BPDUs) to share
information about themselves and their connections. BPDUs are used to elect the root bridge, root
ports, designated ports, and alternate ports.
• Each BPDU contains a bridge ID (BID) that identifies which switch sent the BPDU. The BID is
involved in making many of the STA decisions including root bridge and port roles.
• The BID contains a priority value, the MAC address of the switch, and an extended system ID. The
lowest BID value is determined by the combination of these three fields.
Bridge Priority: The default priority value for all Cisco switches is the decimal value 32768. The range is 0 to 61440
in increments of 4096. A lower bridge priority is preferable. A bridge priority of 0 takes precedence over all other
bridge priorities.
Extended System ID: The extended system ID value is a decimal value added to the bridge priority value in the BID
to identify the VLAN for this BPDU.
MAC address: When two switches are configured with the same priority and have the same extended system ID, the
switch having MAC address with the lowest value, expressed in hexadecimal, will have the lower BID. the
Note: The priority of all the switches is 32769. The value is based on the 32768 default bridge priority and the
extended system ID (VLAN 1 assignment) associated with each switch (32768+1).
• When the root bridge has been elected for a given spanning tree instance, the STA starts determining the best
paths to the root bridge from all destinations in the broadcast domain. The path information, known as the
internal root path cost, is determined by the sum of all the individual port costs along the path from the switch
to the root bridge.
• When a switch receives the BPDU, it adds the ingress port cost of the segment to determine its internal root
path cost.
• The default port costs are defined by the speed at which the port operates. The table shows the default port
costs suggested by IEEE. Cisco switches by default
use the values as defined by the IEEE 802.1D STP Cost: IEEE RSTP Cost: IEEE
Link Speed
standard, also known as the short path cost, for both 802.1D-1998 802.1w-2004
STP and RSTP.
10 Gbps 2 2,000
• Although switch ports have a default port cost
1 Gbps 4 20,000
associated with them, the port cost is configurable.
The ability to configure individual port costs gives the 100 Mbps 19 200,000
administrator the flexibility to manually control the
10 Mbps 100 2,000,000
spanning tree paths to the root bridge.
2. Elect the Root Ports
• Every non-root switch will select one root port.
The root port is the port closest to the root
bridge in terms of overall cost to the root
bridge. This overall cost is known as the
internal root path cost.
• The internal root path cost is equal to the sum
of all the port costs along the path to the root
bridge, as shown in the figure. Paths with the
lowest cost become preferred, and all other
redundant paths are blocked. In the example,
the internal root path cost from S2 to the root
bridge S1 over path 1 is 19 while the internal
root path cost over path 2 is 38. Because path 1
has a lower overall path cost to the root bridge,
it is the preferred path and F0/1 becomes the root port on S2.
Lowest Sender BID: This topology has four switches with switch S1 as the root bridge. Port F0/1 on switch S3 and
port F0/3 on switch S4 have been selected as root ports because they have the root path cost to the root bridge for their
respective switches. S2 has two ports, F0/1 and F0/2 with equal cost paths to the root bridge. The bridge IDs of S3 and
S4, will be used to break the tie. This is known as the sender’s BID. S3 has a BID of 32769.5555.5555.5555 and S4
has a BID of 32769.1111.1111.1111. Because S4 has a lower BID, the F0/1 port of S2, which is the port connected to
S4, will be the root port.
Lowest Sender Port Priority: This topology has two switches which are connected with two equal-cost
paths between them. S1 is the root bridge, so both of its ports are designated ports.
• S4 has two ports with equal-cost paths to the root bridge. Because both ports are connected to the same
switch, the sender’s BID (S1) is equal. So the first step is a tie.
• Next, is the sender’s (S1) port priority. The default port priority is 128, so both ports on S1 have the same port
priority. This is also a tie. However, if either port on S1 was configured with a lower port priority, S4 would
put its adjacent port in forwarding state. The other port on S4 would be a blocking state.
Lowest Sender Port ID: The last tie-breaker is the lowest sender’s port ID. Switch S4 has received BPDUs from
port F0/1 and port F0/2 on S1. The decision is based on the sender’s port ID, not the receiver’s port ID. Because the
port ID of F0/1 on S1 is lower than port F0/2, the port F0/6 on switch S4 will be the root port. This is the port on S4
that is connected to the F0/1 port on S1.
• Port F0/5 on S4 will become an alternate port and placed in the blocking state.
• Forward Delay Timer -The forward delay is the time that is spent in the listening and learning state. The
default is 15 seconds but can be modified to between 4 and 30 seconds.
• Max Age Timer -The max age is the maximum length of time that a switch waits before attempting to
change the STP topology. The default is 20 seconds but can be modified to between 6 and 40 seconds.
Note: The default times can be changed on the root bridge, which dictates the value of these timers for the STP
domain.
STP facilitates the logical loop-free path throughout the broadcast domain. The spanning tree is determined through
the information learned by the exchange of the BPDU frames between the interconnected switches. If a switch port
transitions directly from the blocking state to the forwarding state without information about the full topology during
the transition, the port can temporarily create a data loop. For this reason, STP has five ports states, four of which are
operational port states as shown in the figure. The disabled state is considered non-operational.
Operational Details of Each Port State
Port State BPDU MAC Address Table Forwarding Data Frames
Evolution of STP
This is the original IEEE 802.1D version (802.1D-1998 and earlier) that provides a loop-free topology in a
STP network with redundant links. Also called Common Spanning Tree (CST), it assumes one spanning tree instance
for the entire bridged network, regardless of the number of VLANs.
Per-VLAN Spanning Tree (PVST+) is a Cisco enhancement of STP that provides a separate 802.1D spanning tree
PVST+ instance for each VLAN configured in the network. PVST+ supports PortFast, UplinkFast, BackboneFast, BPDU
guard, BPDU filter, root guard, and loop guard.
802.1D-
This is an updated version of the STP standard, incorporating IEEE 802.1w.
2004
Rapid Spanning Tree Protocol (RSTP) or IEEE 802.1w is an evolution of STP that provides faster convergence
RSTP
than STP.
Rapid This is a Cisco enhancement of RSTP that uses PVST+ and provides a separate instance of 802.1w per VLAN.
PVST+ Each separate instance supports PortFast, BPDU guard, BPDU filter, root guard, and loop guard.
Multiple Spanning Tree Protocol (MSTP) is an IEEE standard inspired by the earlier Cisco proprietary Multiple
MSTP
Instance STP (MISTP) implementation. MSTP maps multiple VLANs into the same spanning tree instance.
Multiple Spanning Tree (MST) is the Cisco implementation of MSTP, which provides up to 16 instances of RSTP
MST and combines many VLANs with the same physical and logical topology into a common RSTP instance. Each
instance supports PortFast, BPDU guard, BPDU filter, root guard, and loop guard.
RSTP
• RSTP (IEEE 802.1w) supersedes the original 802.1D while retaining backward compatibility. The
802.1w STP terminology remains primarily the same as the original IEEE 802.1D STP terminology.
Most parameters have been left unchanged. Users that are familiar with the original STP standard
can easily configure RSTP. The same spanning tree algorithm is used for both STP and RSTP to
determine port roles and topology.
• RSTP increases the speed of the recalculation of the spanning tree when the Layer 2 network
topology changes. RSTP can achieve much faster convergence in a properly configured network,
sometimes in as little as a few hundred milliseconds. If a port is configured to be an alternate port it
can immediately change to a forwarding state without waiting for the network to converge.
Note: Rapid PVST+ is the Cisco implementation of RSTP on a per-VLAN basis. With Rapid PVST+ an independent
instance of RSTP runs for each VLAN.
RSTP Port States and Port Roles
There are only three port states in Root ports and designated ports are the same for
RSTP that correspond to the three both STP and RSTP. However, there are two RSTP
possible operational states in STP. port roles that correspond to the blocking state of
The 802.1D disabled, blocking, and STP. In STP, a blocked port is defined as not being
listening states are merged into a the designated or root port. RSTP has two port
unique 802.1w discarding state. roles for this purpose.
The alternate port has an alternate path to the root bridge. The
backup port is a backup to a shared medium, such as a hub. A
backup port is less common because hubs are now considered
legacy devices.
• When a device is connected to a switch port or when a switch powers up, the switch port goes through both
the listening and learning states, each time waiting for the Forward Delay timer to expire. This delay is 15
seconds for each state for a total of 30 seconds. This can present a problem for DHCP clients trying to
discover a DHCP server because the DHCP process may timeout. The result is that an IPv4 client will not
receive a valid IPv4 address.
• When a switch port is configured with PortFast, that port transitions from blocking to forwarding state
immediately, avoiding the 30 second delay. You can use PortFast on access ports to allow devices connected
to these ports to access the network immediately. PortFast should only be used on access ports. If you enable
PortFast on a port connecting to another switch, you risk creating a spanning tree loop.
• A PortFast-enabled switch port should never receive BPDUs because that would indicate that switch is
connected to the port, potentially causing a spanning tree loop. Cisco switches support a feature called BPDU
guard. When enabled, it immediately puts the switch port in an errdisabled (error-disabled) state upon receipt
of any BPDU. This protects against potential loops by effectively shutting down the port. The administrator
must manually put the interface back into service.
Alternatives to STP
• Over the years, organizations required greater resiliency and availability in the LAN. Ethernet LANs
went from a few interconnected switches connected to a single router, to a sophisticated hierarchical
network design including access, distribution and core layer switches.
• Depending on the implementation, Layer 2 may include not only the access layer, but also the
distribution or even the core layers. These designs may include hundreds of switches, with hundreds
or even thousands of VLANs. STP has adapted to the added redundancy and complexity with
enhancements, as part of RSTP and MSTP.
• An important aspect to network design is fast and predictable convergence when there is a failure or
change in the topology. Spanning tree does not offer the same efficiencies and predictabilities
provided by routing protocols at Layer 3.
• Layer 3 routing allows for redundant paths and loops in the topology, without blocking ports. For
this reason, some environments are transitioning to Layer 3 everywhere except where devices
connect to the access layer switch. In other words, the connections between access layer switches
and distribution switches would be Layer 3 instead of Layer 2.
VLANs
Benefits Description
Smaller Broadcast Domains Dividing the LAN reduces the number of broadcast domains
Improved Security Only users in the same VLAN can communicate together
Improved IT Efficiency VLANs can group devices with similar requirements, e.g. faculty vs.
students
Reduced Cost One switch can support multiple groups or VLANs
Better Performance Small broadcast domains reduce traffic, improving bandwidth
Simpler Management Similar groups will need similar applications and other network resources
Types of VLANs
Default VLAN
Native VLAN
• This is used for trunk links only.
• All frames are tagged on an 802.1Q trunk link except for those on the native VLAN.
Management VLAN
• This is used for SSH/Telnet VTY traffic and should not be carried with end user traffic.
• Typically, the VLAN that is the SVI for the Layer 2 switch.
Voice VLAN
With VLANs, unicast, multicast, and broadcast traffic is confined to a VLAN. Without a Layer 3 device to
connect the VLANs, devices in different VLANs cannot communicate.
Voice VLAN tagged with an appropriate Layer 2 class of service (CoS) priority value
Access VLAN can also be tagged with a Layer 2 CoS priority value
Access VLAN is not tagged (no Layer 2 CoS priority value)
The show interfaces fa0/18 switchport command can show us both data and voice VLANs assigned to the
interface.
Prompt Command
Task Command
Display VLAN name, status, and its ports one VLAN per line. brief
Display information about the identified VLAN ID number. id vlan-id
Display information about the identified VLAN name. The vlan-name is an ASCII string
name vlan-name
from 1 to 32 characters.
Display VLAN summary information. summary
Delete VLANs
Note: To restore to factory default – unplug all data cables, erase the startup-configuration and delete the vlan.dat file,
then reload the device.
VLAN Trunks
Configure and verify VLAN trunks. Trunks are layer 2 and carry traffic for all VLANs.
Introduction to DTP
Dynamic Trunking Protocol (DTP) is a proprietary Cisco protocol. DTP characteristics are as follows:
• On by default on Catalyst 2960 and 2950 switches
• Dynamic-auto is default on the 2960 and 2950 switches
• May be turned off with the nonegotiate command
• May be turned back on by setting the interface to dynamic-auto
• Setting a switch to a static trunk or static access will avoid negotiation issues with the switchport
mode trunk or the switchport mode access commands.
Negotiated Interface Modes
Option Description
Access Permanent access mode and negotiates to convert the neighboring link into an access link
dynamic auto Will becomes a trunk interface if the neighboring interface is set to trunk or desirable mode
dynamic desirable Actively seeks to become a trunk by negotiating with other auto or desirable interfaces
Trunk Permanent trunking mode and negotiates to convert the neighboring link into a trunk link
Limited
Trunk Trunk Trunk Trunk
connectivity
• The first inter-VLAN routing solution relied on using a router with multiple Ethernet interfaces.
Each router interface was connected to a switch port in different VLANs. The router interfaces
served as the default gateways to the local hosts on the VLAN subnet.
• Legacy inter-VLAN routing using physical
interfaces works, but it has a significant limitation. It
is not reasonably scalable because routers have a
limited number of physical interfaces. Requiring one
physical router interface per VLAN quickly exhausts
the physical interface capacity of a router.
Note: This method of inter-VLAN routing is no longer
implemented in switched networks and is included for
explanation purposes only.
Router-on-a-Stick Inter-VLAN Routing
The ‘router-on-a-stick’ inter-VLAN routing method overcomes the limitation of the legacy inter-VLAN
routing method. It only requires one physical Ethernet interface to route traffic between multiple VLANs on
a network.
• A Cisco IOS router Ethernet interface is configured as an 802.1Q trunk and connected to a trunk port on a
Layer 2 switch. Specifically, the router interface is configured using subinterfaces to identify routable
VLANs.
• The configured subinterfaces are software-based virtual interfaces. Each is associated with a single physical
Ethernet interface. Subinterfaces are configured in software on a router. Each subinterface is independently
configured with an IP address and VLAN assignment. Subinterfaces are configured for different subnets that
correspond to their VLAN assignment. This facilitates logical routing.
• When VLAN-tagged traffic enters the router interface, it is forwarded to the VLAN subinterface. After a
routing decision is made based on the destination IP network address, the router determines the exit interface
for the traffic. If the exit interface is configured as an 802.1q subinterface, the data frames are VLAN-tagged
with the new VLAN and sent back out the physical interface
Note: The router-on-a-stick method of inter-VLAN routing does not scale beyond 50 VLANs.
Router-on-a-Stick Scenario
R1 Subinterface Configuration
The router-on-a-stick method requires you to create a subinterface for each VLAN to be routed. A subinterface is
created using the interface interface_id subinterface_id global configuration mode command. The subinterface syntax
is the physical interface followed by a period and a subinterface number. Although not required, it is customary to
match the subinterface number with the VLAN number.
R1 Subinterface Configuration
In the configuration, the R1 G0/0/1
subinterfaces are configured for
VLANs 10, 20, and 99.
Verify Connectivity Between PC1 and PC2
Inter-VLAN SVIs are created the same way that the management VLAN interface is configured. The SVI is
created for a VLAN that exists on the switch. Although virtual, the SVI performs the same functions for the
VLAN as a router interface would. Specifically, it provides Layer 3 processing for packets that are sent to or
from all switch ports associated with that VLAN.
The following are advantages of using Layer 3 switches for inter-VLAN routing:
• They are much faster than router-on-a-stick because everything is hardware switched and routed.
• There is no need for external links from the switch to the router for routing.
• They are not limited to one link because Layer 2 EtherChannels can be used as trunk links between
the switches to increase bandwidth.
• Latency is much lower because data does not need to leave the switch in order to be routed to a
different network.
• They more commonly deployed in a campus LAN than routers.
• The only disadvantage is that Layer 3 switches are more expensive.
Inter-VLAN routing using the router-on-a-stick method is simple to implement for a small to medium-sized
organization. However, a large enterprise requires a faster, much more scalable method to provide inter-
VLAN routing.
Enterprise campus LANs use Layer 3 switches to provide inter-VLAN routing. Layer 3 switches use
hardware-based switching to achieve higher-packet processing rates than routers. Layer 3 switches are also
commonly implemented in enterprise distribution layer wiring closets.
Capabilities of a Layer 3 switch include the ability to do the following:
• Route from one VLAN to another using multiple switched virtual interfaces (SVIs).
• Convert a Layer 2 switchport to a Layer 3 interface (i.e., a routed port). A routed port is similar to a
physical interface on a Cisco IOS router.
• To provide inter-VLAN routing, Layer 3 switches use SVIs. SVIs are configured using the
same interface vlan vlan-id command used to create the management SVI on a Layer 2 switch. A
Layer 3 SVI must be created for each of the routable VLANs.
After the configuration is complete, the configuration can be verified by testing connectivity between the
hosts.
• From a host, verify connectivity to a host in another VLAN using the ping command. It is a good idea to first
verify the current host IP configuration using the ipconfig Windows host command.
• Next, verify connectivity with PC2 using the ping Windows host command. The successful ping output
confirms inter-VLAN routing is operating.
If VLANs are to be reachable by other Layer 3 devices, then they must be advertised using static or dynamic
routing. To enable routing on a Layer 3 switch, a routed port must be configured.
A routed port is created on a Layer 3 switch by disabling the switchport feature on a Layer 2 port that is
connected to another Layer 3 device. Specifically, configuring the no switchport interface configuration
command on a Layer 2 port converts it into a Layer 3 interface. Then the interface can be configured with an
IPv4 configuration to connect to a router or another Layer 3 switch.
EtherChannel
Link Aggregation
• There are scenarios in which more bandwidth or redundancy between devices is needed than what
can be provided by a single link. Multiple links could be connected between devices to increase
bandwidth.
• A link aggregation technology is needed that allows redundant links between devices that will not be
blocked by STP. That technology is known as EtherChannel.
• EtherChannel is a link aggregation technology that groups multiple physical Ethernet links together
into one single logical link. It is used to provide fault-tolerance, load sharing, increased bandwidth,
and redundancy between switches, routers, and servers.
• EtherChannel technology makes it possible to combine the number of physical links between the
switches to increase the overall speed of switch-to-switch communication.
EtherChannel
EtherChannel technology was originally developed by
Cisco as a LAN switch-to-switch technique of grouping
several Fast Ethernet or Gigabit Ethernet ports into one
logical channel.
When an EtherChannel is configured, the resulting virtual
interface is called a port channel. The physical interfaces are
bundled together into a port channel interface, as shown in
the figure.
Advantages of EtherChannel
• Most configuration tasks can be done on the EtherChannel interface instead of on each individual
port, ensuring configuration consistency throughout the links.
• EtherChannel relies on existing switch ports. There is no need to upgrade the link to a faster and
more expensive connection to have more bandwidth.
• Load balancing takes place between links that are part of the same EtherChannel.
• EtherChannel creates an aggregation that is seen as one logical link. When several EtherChannel
bundles exist between two switches, STP may block one of the bundles to prevent switching loops.
When STP blocks one of the redundant links, it blocks the entire EtherChannel. This blocks all the
ports belonging to that EtherChannel link. Where there is only one EtherChannel link, all physical
links in the EtherChannel are active because STP sees only one (logical) link.
• EtherChannel provides redundancy because the overall link is seen as one logical connection.
Additionally, the loss of one physical link within the channel does not create a change in the
topology.
Implementation Restrictions
PAgP (pronounced “Pag - P”) is a Cisco-proprietary protocol that aids in the automatic creation of
EtherChannel links. When an EtherChannel link is configured using PAgP, packets are sent between
EtherChannel-capable ports to negotiate the forming of a channel. When PAgP identifies matched Ethernet
links, it groups the links into an EtherChannel. The EtherChannel is then added to the spanning tree as a
single port.
When enabled, PAgP also manages the EtherChannel. PAgP packets are sent every 30 seconds. PAgP
checks for configuration consistency and manages link additions and failures between two switches. It
ensures that when an EtherChannel is created, all ports have the same type of configuration.
Note: In EtherChannel, it is mandatory that all ports have the same speed, duplex setting, and VLAN information.
Any port modification after the creation of the channel also changes all other channel ports.
PAgP helps create the EtherChannel link by detecting the configuration of each side and ensuring that links
are compatible so that the EtherChannel link can be enabled when needed.
The modes for PAgP as follows:
• On - This mode forces the interface to channel without PAgP. Interfaces configured in the on mode
do not exchange PAgP packets.
• PAgP desirable - This PAgP mode places an interface in an active negotiating state in which the
interface initiates negotiations with other interfaces by sending PAgP packets.
• PAgP auto - This PAgP mode places an interface in a passive negotiating state in which the interface
responds to the PAgP packets that it receives but does not initiate PAgP negotiation.
If all modes are disabled by using the no command, or if no mode is configured, then the EtherChannel is
disabled. The on mode manually places the interface in an EtherChannel, without any negotiation. It works
only if the other side is also set to on. If the other side is set to negotiate parameters through PAgP, no
EtherChannel forms, because the side that is set to on mode does not negotiate. No negotiation between the
two switches means there is no checking to make sure that all the links in the EtherChannel are terminating
on the other side, or that there is PAgP compatibility on the other switch.
S1 S2 Channel Establishment
On On Yes
On Desirable/Auto No
Auto Auto No
LACP
LACP is part of an IEEE specification (802.3ad) that allows several physical ports to be bundled to form a
single logical channel. LACP allows a switch to negotiate an automatic bundle by sending LACP packets to
the other switch. It performs a function similar to PAgP with Cisco EtherChannel. Because LACP is an
IEEE standard, it can be used to facilitate EtherChannels in multivendor environments. On Cisco devices,
both protocols are supported.
LACP provides the same negotiation benefits as PAgP. LACP helps create the EtherChannel link by
detecting the configuration of each side and making sure that they are compatible so that the EtherChannel
link can be enabled when needed. The modes for LACP are as follows:
• On - This mode forces the interface to channel without LACP. Interfaces configured in the on mode
do not exchange LACP packets.
• LACP active - This LACP mode places a port in an active negotiating state. In this state, the port
initiates negotiations with other ports by sending LACP packets.
• LACP passive - This LACP mode places a port in a passive negotiating state. In this state, the port
responds to the LACP packets that it receives but does not initiate LACP packet negotiation.
S1 S2 Channel Establishment
On On Yes
On Active/Passive No
Passive Passive No
Configure EtherChannel
The following guidelines and restrictions are useful for configuring EtherChannel:
• EtherChannel support - All Ethernet interfaces must support EtherChannel with no requirement that interfaces
be physically contiguous.
• Speed and duplex - Configure all interfaces in an EtherChannel to operate at the same speed and in the same
duplex mode.
• VLAN match - All interfaces in the EtherChannel bundle must be assigned to the same VLAN or be configured
as a trunk (shown in the figure).
• Range of VLANs - An EtherChannel supports the same allowed range of VLANs on all the interfaces in a
trunking EtherChannel. If the allowed range of VLANs is not the same, the interfaces do not form an
EtherChannel, even when they are set to auto or desirable mode.
• The figure shows a configuration that would allow an EtherChannel to form between S1 and S2.
• If these settings must be changed, configure them in port channel interface configuration mode. Any
configuration that is applied to the port channel interface also affects individual interfaces. However,
configurations that are applied to the individual
interfaces do not affect the port channel interface.
Therefore, making configuration changes to an
interface that is part of an EtherChannel link may
cause interface compatibility issues.
• The port channel can be configured in access mode,
trunk mode (most common), or on a routed port.
LACP Configuration
Verify EtherChannel
• The show interfaces port-channel command displays the general status of the port channel interface.
• The show etherchannel summary command displays one line of information per port channel.
• The show etherchannel port-channel command displays information about a specific port channel interface.
• The show interfaces etherchannel command can provide information about the role of a physical member
interface of the EtherChannel.
DHCPv4
• Dynamic Host Configuration Protocol v4 (DHCPv4) assigns IPv4 addresses and other network
configuration information dynamically. Because desktop clients typically make up the bulk of
network nodes, DHCPv4 is an extremely useful and timesaving tool for network administrators.
• A dedicated DHCPv4 server is scalable and relatively easy to manage. However, in a small branch or
SOHO location, a Cisco router can be configured to provide DHCPv4 services without the need for a
dedicated server. Cisco IOS software supports an optional, full-featured DHCPv4 server.
• The DHCPv4 server dynamically assigns, or leases, an IPv4 address from a pool of addresses for a
limited period of time chosen by the server, or until the client no longer needs the address.
• Clients lease the information from the server for an administratively defined period. Administrators
configure DHCPv4 servers to set the leases to time out at different intervals. The lease is typically
anywhere from 24 hours to a week or more. When the lease expires, the client must ask for another
address, although the client is typically reassigned the same address.
DHCPv4 Operation
DHCPv4 works in a client/server mode. When a client communicates with a DHCPv4 server, the server
assigns or leases an IPv4 address to that client.
• The client connects to the network with that leased IPv4 address until the lease expires. The client must
contact the DHCP server periodically to extend the lease.
• This lease mechanism ensures that clients that move or power off do not keep addresses that they no longer
need.
• When a lease expires, the DHCP server returns the address to the pool where it can be reallocated as
necessary.
Prior to lease expiration, the client begins a two-step process to renew the lease with the DHCPv4 server, as
shown in the figure:
1. DHCP Request (DHCPREQUEST)
Before the lease expires, the client sends a
DHCPREQUEST message directly to the DHCPv4
server that originally offered the IPv4 address. If a
DHCPACK is not received within a specified
amount of time, the client broadcasts another
DHCPREQUEST so that one of the other DHCPv4
servers can extend the lease.
Define the duration of the DHCP lease. lease {days [hours [ minutes]] | infinite}
Configuration Example
DHCPv4 Verification
Use the commands in the table to verify that the Cisco IOS DHCPv4 server is operational.
Command Description
show running-config | section dhcp Displays the DHCPv4 commands configured on the router.
Verify DHCPv4 Statistics: The output of the show ip dhcp server statistics is used to verify that messages
are being received or sent by the router. This command displays count information regarding the number of
DHCPv4 messages that have been sent and received.
DHCPv4 Relay
• In a complex hierarchical network, enterprise servers are usually located centrally. These servers
may provide DHCP, DNS, TFTP, and FTP services for the network. Network clients are not
typically on the same subnet as those servers. In order to locate the servers and receive services,
clients often use broadcast messages.
• In the figure, PC1 is attempting to acquire an IPv4 address from a DHCPv4 server using a broadcast
message. In this scenario, R1 is not configured as a DHCPv4 server and does not forward the
broadcast. Because the DHCPv4 server is located on a different network, PC1 cannot receive an IP
address using DHCP. R1 must be configured to relay DHCPv4 messages to the DHCPv4 server.
If automatic IPv6 addressing is selected, the host will use an Internet Control Message Protocol version 6
(ICMPv6) Router Advertisement (RA) message to help it autoconfigure an IPv6 configuration.
• The IPv6 link-local address is automatically
created by the host when it boots and the
Ethernet interface is active.
• The interface did not create an IPv6 GUA in
the output because the network segment did not
have a router to provide network configuration
instructions for the host.
Note: The "%" and number at the end of the link-local address is known as a Zone ID or Scope ID and is used by the
OS to associate the LLA with a specific interface.
Note: DHCPv6 is defined in RFC 3315.
By default, an IPv6-enabled router periodically send ICMPv6 RAs which simplifies how a host can
dynamically create or acquire its IPv6 configuration.
• A host can dynamically be assigned a GUA using stateless and stateful services.
• All stateless and stateful methods in this module use ICMPv6 RA messages to suggest to the host how to
create or acquire its IPv6 configuration.
• Although host operating systems follow the suggestion of the RA, the actual decision is ultimately up to the
host
Three RA Message Flags
How a client obtains an IPv6 GUA depends on settings in the RA message.
An ICMPv6 RA message includes the following three flags:
• A flag - The Address
Autoconfiguration flag signifies to
use Stateless Address
Autoconfiguration (SLAAC) to
create an IPv6 GUA
• O flag - The Other Configuration flag
signifies that additional information
is available from a stateless DHCPv6
server.
• M flag - The Managed Address
Configuration flag signifies to use a
stateful DHCPv6 server to obtain an
IPv6 GUA.
Using different combinations of the A, O and M flags, RA messages inform the host about the dynamic
options available.
SLAAC
SLAAC Overview
Not every network has access to a DHCPv6 server but every device in an IPv6 network needs a GUA. The
SLAAC method enables hosts to create their own unique IPv6 global unicast address without the services of
a DHCPv6 server.
• SLAAC is a stateless service which means there is no server that maintains network address
information to know which IPv6 addresses are being used and which ones are available.
• SLAAC sends periodic ICMPv6 RA messages (i.e., every 200 seconds) providing addressing and
other configuration information for hosts to autoconfigure their IPv6 address based on the information
in the RA.
• A host can also send a Router Solicitation (RS) message requesting an RA.
• SLAAC can be deployed as SLAAC only, or SLAAC with DHCPv6.
Enabling SLAAC
R1 G0/0/1 has been configured with the indicated IPv6
GUA and link-local addresses.
The R1 G0/0/01 IPv6 addresses include:
• Link-local IPv6 address - fe80::1
• GUA / subnet - 2001:db8:acad:1::1,
2001:db8:acad:1::/64
• IPv6 all-nodes group - ff02::1
R1 is configured to join the all IPv6 multicast group and start sending RA
messages containing address configuration information to hosts using
SLAAC.
The IPv6 all-routers group responds to the IPv6 multicast address ff02::2.
• The show ipv6 interface command verifies that
R1 has joined the IPv6 all-routers group (i.e.,
ff02::2).
• R1 will now begin to send RA messages every
200 seconds to the IPv6 all-nodes multicast
address ff02::1.
Using SLAAC, a host acquires its 64-bit IPv6 subnet information from the router RA and must generate the
remainder 64-bit interface identifier (ID) using either:
• Randomly generated - The 64-bit interface ID is randomly generated by the client operating system.
This is the method now used by Windows 10 hosts.
• EUI-64 - The host creates an interface ID using its 48-bit MAC address and inserts the hex value of
fffe in the middle of the address. Some operating systems default to the randomly generated interface
ID instead of the EUI-64 method, due to privacy concerns. This is because the Ethernet MAC address
of the host is used by EUI-64 to create the interface ID.
Note: Windows, Linux, and Mac OS allow for the user to modify the generation of the interface ID to be either
randomly generated or to use EUI-64.
If an RA indicates the stateless DHCPv6 method, the host uses the information in the RA message for
addressing and contacts a DHCPv6 server for additional information.
Note: The DHCPv6 server only provides configuration parameters for clients and does not maintain a list of IPv6
address bindings (i.e. stateless).
A router can also be a DHCPv6 client and get an IPv6 configuration from a DHCPv6 server, such as a router
functioning as a DHCPv6 server.
1. Enable IPv6 routing using the ipv6 unicast-routing command.
2. Configure the client router to create an LLA. An IPv6 link-local address is created on a router interface when
a global unicast address is configured, or without a GUA using the ipv6 enable interface configuration
command. Cisco IOS uses EUI-64 to create the Interface ID.
3. Configure the client router to use SLAAC using the ipv6 address autoconfig command.
4. Verify that the client router is assigned a GUA using the show ipv6 interface brief command.
5. Verify that the client router received other necessary DHCPv6 information. The show ipv6 dhcp interface
g0/0/1 command confirms DHCP option information, such as DNS server and domain name, have been
received by the client.
Configure a Stateful DHCPv6 Server
The stateful DHCP server option requires that the IPv6 enabled router tells the host to contact a DHCPv6
server to obtain all necessary IPv6 network addressing information.
There are five steps to configure and verify a router as a stateful DHCPv6 server:
1. Enable IPv6 routing using the ipv6 unicast-routing command.
2. Define a DHCPv6 pool name using the ipv6 dhcp pool POOL-NAME global config command.
3. Configure the DHCPv6 pool with options. Common options include the address prefix command, domain
name, DHS server IP address, and more.
4. Bind the interface to the pool using the ipv6 dhcp server POOL-NAME interface config command.
Manually change the M flag from 0 to 1 using the interface command ipv6 nd managed-config-flag. Manually
change the A flag from 1 to 0 using the ipv6 nd prefix default no-autoconfig interface command to inform the client
to not to use SLAAC to create a GUA. The router will now respond to stateful DHCPv6 requests with the information
contained in the pool.
5. Verify that the hosts have received IPv6 addressing information using the ipconfig /all command.
If the DHCPv6 server is located on a different network than the client, then the IPv6 router can be
configured as a DHCPv6 relay agent.
• The configuration of a DHCPv6 relay agent is similar to the configuration of an IPv4 router as a DHCPv4
relay.
• This command is configured on the interface facing the DHCPv6 clients and specifies the DHCPv6 server
address and egress interface to reach the server, as shown in the output. The egress interface is only required
when the next-hop address is an LLA.
Router Redundancy
One way to prevent a single point of failure at the default gateway is to implement a virtual router. To
implement this type of router redundancy, multiple routers are configured to work together to present the
illusion of a single router to the hosts on the LAN. By sharing an IP address and a MAC address, two or
more routers can act as a single virtual router.
• The IPv4 address of the virtual router is configured as the default gateway for the workstations on a
specific IPv4 segment.
• When frames are sent from host devices to the default gateway, the hosts use ARP to resolve the
MAC address that is associated with the IPv4 address of the default gateway. The ARP resolution
returns the MAC address of the virtual router. Frames that are sent to the MAC address of the virtual
router can then be physically processed by the currently active router within the virtual router group.
• A protocol is used to identify two or more routers as the devices that are responsible for processing
frames that are sent to the MAC or IP address of a single virtual router. Host devices send traffic to
the address of the virtual router. The physical router that forwards this traffic is transparent to the
host devices.
• A redundancy protocol provides the mechanism for determining which router should take the active
role in forwarding traffic. It also determines when the forwarding role must be taken over by a
standby router. The transition from one forwarding router to another is transparent to the end
devices.
• The ability of a network to dynamically recover from the failure of a device acting as a default
gateway is known as first-hop redundancy.
Steps for Router Failover
FHRP Options
HRSP is a Cisco-proprietary FHRP that is designed to allow for transparent failover of a first-hop IPv4 device.
Hot Standby Router HSRP is used in a group of routers for selecting an active device and a standby device. The active device is the
Protocol (HSRP) device that is used for routing packets; the standby device is the device that takes over when the active device fails,
or when pre-set conditions are met.
This is a Cisco-proprietary FHRP that provides the same functionality of HSRP, but in an IPv6 environment. An
HSRP IPv6 group has a virtual MAC address derived from the HSRP group number and a virtual IPv6 link-local
HSRP for IPv6 address derived from the HSRP virtual MAC address. Periodic router advertisements (RAs) are sent for the HSRP
virtual IPv6 link-local address when the HSRP group is active. When the group becomes inactive, these RAs stop
after a final RA is sent.
This is a non-proprietary election protocol that dynamically assigns responsibility for one or more virtual routers to
Virtual Router
the VRRP routers on an IPv4 LAN. This allows several routers on a multiaccess link to use the same virtual IPv4
Redundancy Protocol
address. In a VRRP configuration, one router is elected as the virtual router master, with the other routers acting as
version 2 (VRRPv2)
backups, in case the virtual router master fails.
This provides the capability to support IPv4 and IPv6 addresses. VRRPv3 works in multi-vendor environments and
VRRPv3
is more scalable than VRRPv2.
Gateway Load
This is a Cisco-proprietary FHRP that protects data traffic from a failed router or circuit, like HSRP and VRRP,
Balancing Protocol
while also allowing load balancing (also called load sharing) between a group of redundant routers.
(GLBP)
This is a Cisco-proprietary FHRP that provides the same functionality of GLBP, but in an IPv6 environment.
GLBP for IPv6 provides automatic router backup for IPv6 hosts configured with a single default gateway on a
GLBP for IPv6
LAN. Multiple first-hop routers on the LAN combine to offer a single virtual first-hop IPv6 router while sharing
the IPv6 packet forwarding load.
ICMP Router
Specified in RFC 1256, IRDP is a legacy FHRP solution. IRDP allows IPv4 hosts to locate routers that provide
Discovery Protocol
IPv4 connectivity to other (nonlocal) IP networks.
(IRDP)
HSRP
Cisco provides HSRP and HSRP for IPv6 as a way to avoid losing outside network access if your default
router fails. HSRP is a Cisco-proprietary FHRP that is designed to allow for transparent failover of a first-
hop IP device.
HSRP ensures high network availability by providing first-hop routing redundancy for IP hosts on networks
configured with an IP default gateway address. HSRP is used in a group of routers for selecting an active
device and a standby device. In a group of device interfaces, the active device is the device that is used for
routing packets; the standby device is the device that takes over when the active device fails, or when pre-set
conditions are met. The function of the HSRP standby router is to monitor the operational status of the
HSRP group and to quickly assume packet-forwarding responsibility if the active router fails.
The role of the active and standby routers is determined during the HSRP election process. By default, the
router with the numerically highest IPv4 address is elected as the active router. However, it is always better
to control how your network will operate under normal conditions rather than leaving it to chance.
• HSRP priority can be used to determine
the active router.
• The router with the highest HSRP
priority will become the active router.
• By default, the HSRP priority is 100.
• If the priorities are equal, the router
with the numerically highest IPv4
address is elected as the active router.
• To configure a router to be the active
router, use the standby
priority interface command. The range
of the HSRP priority is 0 to 255.
By default, after a router becomes the active router, it will remain the active router even if another router
comes online with a higher HSRP priority.
• To force a new HSRP election process to take place when a higher priority router comes online, preemption
must be enabled using the standby preempt interface command. Preemption is the ability of an HSRP router
to trigger the re-election process. With preemption enabled, a router that comes online with a higher HSRP
priority will assume the role of the active router.
• Preemption only allows a router to become the active router if it has a higher priority. A router enabled for
preemption, with equal priority but a higher IPv4 address will not preempt an active router. Refer to the
topology in the figure.
Note: With preemption disabled, the router that boots up first will become the active router if there are no other
routers online during the election process.
HSRP States and Times
Initial This state is entered through a configuration change or when an interface first becomes available.
The router has not determined the virtual IP address and has not yet seen a hello message from
Learn
the active router. In this state, the router waits to hear from the active router.
The router knows the virtual IP address, but the router is neither the active router nor the standby
Listen
router. It listens for hello messages from those routers.
The router sends periodic hello messages and actively participates in the election of the active
Speak
and/or standby router.
Standby The router is a candidate to become the next active router and sends periodic hello messages.
The active and standby HSRP routers send hello packets to the HSRP group multicast address every 3 seconds by
default. The standby router will become active if it does not receive a hello message from the active router after 10
seconds. You can lower these timer settings to speed up the failover or preemption. However, to avoid increased CPU
usage and unnecessary standby state changes, do not set the hello timer below 1 second or the hold timer below 4
seconds.
LAN Security
Endpoint Security
Various network security devices are required to protect the network perimeter from outside access. These
devices could include the following:
• Virtual Private Network (VPN) enabled router - provides a secure connection to remote users across a
public network and into the enterprise network. VPN services can be integrated into the firewall.
• Next-Generation Firewall (NGFW) - provides stateful packet inspection, application visibility and control, a
next-generation intrusion prevention system (NGIPS), advanced malware protection (AMP), and URL
filtering.
• Network Access Control (NAC) - includes authentication, authorization, and accounting (AAA) services. In
larger enterprises, these services might be incorporated into an appliance that can manage access policies
across a wide variety of users and device types. The Cisco Identity Services Engine (ISE) is an example of a
NAC device.
Endpoint Protection
• Endpoints are hosts which commonly consist of
laptops, desktops, servers, and IP phones, as well
as employee-owned devices. Endpoints are
particularly susceptible to malware-related
attacks that originate through email or web
browsing.
• Endpoints have typically used traditional host-
based security features, such as
antivirus/antimalware, host-based firewalls, and
host-based intrusion prevention systems (HIPSs).
• Endpoints today are best protected by a
combination of NAC, AMP software, an email
security appliance (ESA), and a web security appliance (WSA).
The Cisco ESA device is designed to monitor Simple Mail Transfer Protocol (SMTP). The Cisco ESA is
constantly updated by real-time feeds from the Cisco Talos, which detects and correlates threats and
solutions by using a worldwide database monitoring system. This threat intelligence data is pulled by the
Cisco ESA every three to five minutes.
These are some of the functions of the Cisco ESA:
• Block known threats
• Remediate against stealth malware that evaded initial detection
• Discard emails with bad links
• Block access to newly infected sites.
• Encrypt content in outgoing email to prevent data loss.
Cisco Web Security Appliance
• The Cisco Web Security Appliance (WSA) is a mitigation technology for web-based threats. It helps
organizations address the challenges of securing and controlling web traffic.
• The Cisco WSA combines advanced malware protection, application visibility and control, acceptable use
policy controls, and reporting.
• Cisco WSA provides complete control over how users access the internet. Certain features and applications,
such as chat, messaging, video and audio, can be allowed, restricted with time and bandwidth limits, or
blocked, according to the organization’s requirements.
• The WSA can perform blacklisting of URLs, URL-filtering, malware scanning, URL categorization, Web
application filtering, and encryption and decryption of web traffic.
Access Control
Many types of authentication can be performed on networking devices, and each method offers varying
levels of security.
The simplest method of remote access authentication is to configure a login and password combination on
console, vty lines, and aux ports.
SSH is a more secure form of remote access:
• It requires a username and a password.
• The username and password can be authenticated locally.
The local database method has some limitations:
• User accounts must be configured locally on
each device which is not scalable.
• The method provides no fallback
authentication method.
AAA Components
AAA stands for Authentication, Authorization, and Accounting, and provides the primary framework to set
up access control on a network device.
AAA is a way to control who is permitted to access a network (authenticate), what they can do while they
are there (authorize), and to audit what actions they performed while accessing the network (accounting).
Authentication
Local and server-based are two common methods of implementing AAA authentication.
Local AAA Authentication:
• Method stores usernames and passwords locally in a network device (e.g., Cisco router).
• Users authenticate against the local database.
• Local AAA is ideal for small networks.
Authorization
• AAA authorization is automatic and does not require users to perform additional steps after authentication.
• Authorization governs what users can and cannot do on the network after they are authenticated.
• Authorization uses a set of attributes that describes the user’s access to the network. These attributes are used
by the AAA server to determine privileges and restrictions for that user.
Accounting
AAA accounting collects and reports usage data. This data can be used for such purposes as auditing or
billing. The collected data might include the start and stop connection times, executed commands, number of
packets, and number of bytes.
A primary use of accounting is to combine it with AAA authentication.
• The AAA server keeps a detailed log of exactly what the authenticated user does on the device, as
shown in the figure. This includes all EXEC and configuration commands issued by the user.
• The log contains numerous data fields, including the username, the date and time, and the actual
command that was entered by the user. This information is useful when troubleshooting devices. It
also provides evidence for when individuals perform malicious acts.
802.1X
The IEEE 802.1X standard is a port-based access control and authentication protocol. This protocol restricts
unauthorized workstations from connecting to a LAN through publicly accessible switch ports. The
authentication server authenticates each workstation that is connected to a switch port before making
available any services offered by the switch or the LAN.
With 802.1X port-based authentication, the devices in the network have specific roles:
• Client (Supplicant) - This is a
device running 802.1X-
compliant client software, which
is available for wired or wireless
devices.
• Switch (Authenticator) –The switch acts as an intermediary between the client and the authentication
server. It requests identifying information from the client, verifies that information with the
authentication server, and relays a response to the client. Another device that could act as
authenticator is a wireless access point.
• Authentication server –The server validates the identity of the client and notifies the switch or
wireless access point that the client is or is not authorized to access the LAN and switch services.
Layer 2 Vulnerabilities
Security is only as strong as the weakest link in the system, and Layer 2 is considered to be that weak link.
This is because LANs were traditionally under the administrative control of a single organization. We
inherently trusted all persons and devices connected to our LAN. Today, with BYOD and more
sophisticated attacks, our LANs have become more vulnerable to penetration.
Category Examples
Includes VLAN hopping and VLAN double-tagging attacks. It also includes attacks
VLAN Attacks
between devices on a common VLAN.
Address Spoofing Attacks Includes MAC address and IP address spoofing attacks.
Solution Description
Prevents many types of attacks including MAC address flooding attacks and
Port Security
DHCP starvation attacks.
Dynamic ARP Inspection (DAI) Prevents ARP spoofing and ARP poisoning attacks.
These Layer 2 solutions will not be effective if the management protocols are not secured. The following
strategies are recommended:
• Always use secure variants of management protocols such as SSH, Secure Copy Protocol (SCP), Secure FTP
(SFTP), and Secure Socket Layer/Transport Layer Security (SSL/TLS).
• Consider using out-of-band management network to manage devices.
• Use a dedicated management VLAN where nothing but management traffic resides.
• Use ACLs to filter unwanted access.
MAC Address Table Attack
All MAC tables have a fixed size and consequently, a switch can run out of resources in which to store
MAC addresses. MAC address flooding attacks take advantage of this limitation by bombarding the switch
with fake source MAC addresses until the switch MAC address table is full.
When this occurs, the switch treats the frame as an unknown unicast and begins to flood all incoming traffic
out all ports on the same VLAN without referencing the MAC table. This condition now allows a threat
actor to capture all of the frames sent from one host to another on the local LAN or local VLAN.
Note: Traffic is flooded only within the local LAN or VLAN. The threat actor can only capture traffic within the local
LAN or VLAN to which the threat actor is connected.
What makes tools such as macof so dangerous is that an attacker can create a MAC table overflow attack
very quickly. For instance, a Catalyst 6500 switch can store 132,000 MAC addresses in its MAC address
table. A tool such as macof can flood a switch with up to 8,000 bogus frames per second; creating a MAC
address table overflow attack in a matter of a few seconds.
Another reason why these attack tools are dangerous is because they not only affect the local switch, they
can also affect other connected Layer 2 switches. When the MAC address table of a switch is full, it starts
flooding out all ports including those connected to other Layer 2 switches.
To mitigate MAC address table overflow attacks, network administrators must implement port security. Port
security will only allow a specified number of source MAC addresses to be learned on the port. Port security
is further discussed in another module.
LAN Attacks
A VLAN hopping attack enables traffic from one VLAN to be seen by another VLAN without the aid of a
router. In a basic VLAN hopping attack, the threat actor configures a host to act like a switch to take
advantage of the automatic trunking port feature enabled by default on most switch ports.
The threat actor configures the host to spoof 802.1Q
signaling and Cisco-proprietary Dynamic Trunking
Protocol (DTP) signaling to trunk with the connecting
switch. If successful, the switch establishes a trunk link
with the host, as shown in the figure. Now the threat
actor can access all the VLANs on the switch. The
threat actor can send and receive traffic on any VLAN,
effectively hopping between VLANs.
A threat actor is specific situations could embed a hidden 802.1Q tag inside the frame that already has an
802.1Q tag. This tag allows the frame to go to a VLAN that the original 802.1Q tag did not specify.
• Step 1: The threat actor sends a double-tagged 802.1Q frame to the switch. The outer header has the VLAN
tag of the threat actor, which is the same as the native VLAN of the trunk port.
• Step 2: The frame arrives on the first switch, which looks at the first 4-byte 802.1Q tag. The switch sees that
the frame is destined for the native VLAN. The switch forwards the packet out all native VLAN ports after
stripping the VLAN tag. The frame is not retagged because it is part of the native VLAN. At this point, the
inner VLAN tag is still intact and has not been inspected by the first switch.
• Step 3: The frame arrives at the second switch which has no knowledge that it was supposed to be for the
native VLAN. Native VLAN traffic is not tagged by the sending switch as specified in the 802.1Q
specification. The second switch looks only at the inner 802.1Q tag that the threat actor inserted and sees that
the frame is destined the target VLAN. The second switch sends the frame on to the target or floods it,
depending on whether there is an existing MAC address table entry for the target.
A VLAN double-tagging attack is unidirectional and works only when the attacker is connected to a port
residing in the same VLAN as the native VLAN of the trunk port. The idea is that double tagging allows the
attacker to send data to hosts or servers on a VLAN that otherwise would be blocked by some type of access
control configuration. Presumably the return traffic will also be permitted, thus giving the attacker the ability
to communicate with devices on the normally blocked VLAN.
VLAN Attack Mitigation - VLAN hopping and VLAN double-tagging attacks can be prevented by
implementing the following trunk security guidelines:
• Disable trunking on all access ports.
• Disable auto trunking on trunk links so that trunks must be manually enabled.
• Be sure that the native VLAN is only used for trunk links.
DHCP Messages
DHCP servers dynamically provide IP configuration information including IP address, subnet mask, default
gateway, DNS servers, and more to clients. A review of the sequence of the DHCP message exchange
between client and server is show in the figure.
DHCP Attacks
Two types of DHCP attacks are DHCP starvation and DHCP spoofing. Both attacks are mitigated by
implementing DHCP snooping.
• DHCP Starvation Attack – The goal of this attack is to create a DoS for connecting clients. DHCP
starvation attacks require an attack tool such as Gobbler. Gobbler has the ability to look at the entire scope of
leasable IP addresses and tries to lease them all. Specifically, it creates DHCP discovery messages with bogus
MAC addresses.
• DHCP Spoofing Attack – This occurs when a rogue DHCP server is connected to the network and provides
false IP configuration parameters to legitimate clients. A rogue server can provide a variety of misleading
information, including the following:
• Wrong default gateway - The rogue server provides an invalid gateway or the IP
address of its host to create a man-in-the-middle attack. This may go entirely
undetected as the intruder intercepts the data flow through the network.
• Wrong DNS server - The rogue server provides an incorrect DNS server address
pointing the user to a nefarious website.
• Wrong IP address - The rogue server provides an invalid IP address effectively
creating a DoS attack on the DHCP client.
ARP Attacks
• Hosts broadcast ARP Requests to determine the MAC address of a host with a destination IP
address. All hosts on the subnet receive and process the ARP Request. The host with the matching IP
address in the ARP Request sends an ARP Reply.
• A client can send an unsolicited ARP Reply called a “gratuitous ARP”. Other hosts on the subnet
store the MAC address and IP address contained in the gratuitous ARP in their ARP tables.
• An attacker can send a gratuitous ARP message containing a spoofed MAC address to a switch, and
the switch would update its MAC table accordingly. In a typical attack, a threat actor sends
unsolicited ARP Replies to other hosts on the subnet with the MAC Address of the threat actor and
the IP address of the default gateway, effectively setting up a man-in-the-middle attack.
• There are many tools available on the internet to create ARP man-in-the-middle attacks.
• IPv6 uses ICMPv6 Neighbor Discovery Protocol for Layer 2 address resolution. IPv6 includes
strategies to mitigate Neighbor Advertisement spoofing, similar to the way IPv6 prevents a spoofed
ARP Reply.
• ARP spoofing and ARP poisoning are mitigated by implementing Dynamic ARP Inspection (DAI).
• IP address spoofing is when a threat actor hijacks a valid IP address of another device on the subnet
or uses a random IP address. IP address spoofing is difficult to mitigate, especially when it is used
inside a subnet in which the IP belongs.
• MAC address spoofing attacks occur when the threat actors alter the MAC address of their host to
match another known MAC address of a target host. The switch overwrites the current MAC table
entry and assigns the MAC address to the new port. It then inadvertently forwards frames destined
for the target host to the attacking host.
• When the target host sends traffic, the switch will correct the error, realigning the MAC address to
the original port. To stop the switch from returning the port assignment to its correct state, the threat
actor can create a program or script that will constantly send frames to the switch so that the switch
maintains the incorrect or spoofed information.
• There is no security mechanism at Layer 2 that allows a switch to verify the source of MAC
addresses, which is what makes it so vulnerable to spoofing.
• IP and MAC address spoofing can be mitigated by implementing IP Source Guard (IPSG).
STP Attack
• Network attackers can manipulate the Spanning Tree Protocol (STP) to conduct an attack by
spoofing the root bridge and changing the topology of a network. Attackers can then capture all
traffic for the immediate switched domain.
• To conduct an STP manipulation attack, the attacking host broadcasts STP bridge protocol data units
(BPDUs) containing configuration and topology changes that will force spanning-tree recalculations.
The BPDUs sent by the attacking host announce a lower bridge priority in an attempt to be elected as
the root bridge.
• This STP attack is mitigated by implementing BPDU Guard on all access ports. BPDU Guard is
discussed in more detail later in the course.
CDP Reconnaissance
The Cisco Discovery Protocol (CDP) is a proprietary Layer 2 link discovery protocol. It is enabled on all
Cisco devices by default. Network administrators also use CDP to help configure and troubleshoot network
devices. CDP information is sent out CDP-enabled ports in periodic, unencrypted, unauthenticated
broadcasts. CDP information includes the IP address of the device, IOS software version, platform,
capabilities, and the native VLAN. The device receiving the CDP message updates its CDP database.
To mitigate the exploitation of CDP, limit the use of CDP on devices or ports. For example, disable CDP on
edge ports that connect to untrusted devices.
• To disable CDP globally on a device, use the no cdp run global configuration mode command. To
enable CDP globally, use the cdp run global configuration command.
• To disable CDP on a port, use the no cdp enable interface configuration command. To enable CDP
on a port, use the cdp enable interface configuration command.
Note: Link Layer Discovery Protocol (LLDP) is also vulnerable to reconnaissance attacks. Configure no lldp run to
disable LLDP globally. To disable LLDP on the interface, configure no lldp transmit and no lldp receive.
Switch Security Configuration
Port security is enabled with the switchport port-security interface configuration command.
Notice in the example, the switchport port-security command was rejected. This is because port security
can only be configured on manually configured access ports or manually configured trunk ports. By default,
Layer 2 switch ports are set to dynamic auto (trunking on).
Therefore, in the example, the port is configured with
the switchport mode access interface configuration
command.
Note: Trunk port security is beyond the scope of this course.
Use the show port-security interface command to display the current port security settings for FastEthernet
0/1.
• Notice how port security is enabled, the violation mode is
shutdown, and how the maximum number of MAC addresses is 1.
• If a device is connected to the port, the switch will automatically
add the device’s MAC address as a secure MAC. In this example,
no device is connected to the port.
Note: If an active port is configured with the switchport port-
security command and more than one device is connected to that port, the
port will transition to the error-disabled state.
After port security is enabled, other port security specifics can be configured, as shown in the example.
To set the maximum number of MAC addresses allowed on a port, use the following command:
• The default port security value is 1.
• The maximum number of secure MAC addresses that can be configured depends the switch and the IOS.
• In this example, the maximum is 8192.
The switch can be configured to learn about MAC addresses on a secure port in one of three ways:
1. Manually Configured: The administrator manually configures a static MAC address(es) by using the following
command for each secure MAC address on the port:
2. Dynamically Learned: When the switchport port-security command is entered, the current source MAC for the
device connected to the port is automatically secured but is not added to the running configuration. If the switch is
rebooted, the port will have to re-learn the device’s MAC address.
3. Dynamically Learned – Sticky: The administrator can enable the switch to dynamically learn the MAC address
and “stick” them to the running configuration by using the following command:
Switch(config-if)# switchport port-security mac-address sticky
Saving the running configuration will commit the dynamically learned MAC address to NVRAM.
The example demonstrates a complete port security
configuration for FastEthernet 0/1.
• The administrator specifies a maximum of 4
MAC addresses, manually configures one secure
MAC address, and then configures the port to
dynamically learn additional secure MAC
addresses up to the 4 secure MAC address
maximum.
• Use the show port-security interface and
the show port-security address command to
verify the configuration.
Port security aging can be used to set the aging time for static and dynamic secure addresses on a port and
two types of aging are supported per port:
• Absolute - The secure addresses on the port are deleted after the specified aging time.
• Inactivity - The secure addresses on the port are deleted if they are inactive for a specified time.
Use aging to remove secure MAC addresses on a secure port without manually deleting the existing secure
MAC addresses.
• Aging of statically configured secure addresses can be enabled or disabled on a per-port basis.
Use the switchport port-security aging command to enable or disable static aging for the secure port, or to
set the aging time or type.
Switch(config-if)# switchport port-security aging {static | time time | type {absolute
| inactivity}}
If the MAC address of a device attached to a port differs from the list of secure addresses, then a port
violation occurs and the port enters the error-disabled state.
Switch(config-if)# switchport port-security violation {shutdown | restrict | protect}
Mode Description
The port transitions to the error-disabled state immediately, turns off the port LED, and sends a syslog message. It
shutdown
increments the violation counter. When a secure port is in the error-disabled state, an administrator must re-enable it
(default)
by entering the shutdown and no shutdown commands.
The port drops packets with unknown source addresses until you remove a sufficient number of secure MAC
restrict addresses to drop below the maximum value or increase the maximum value. This mode causes the Security
Violation counter to increment and generates a syslog message.
This is the least secure of the security violation modes. The port drops packets with unknown MAC source addresses
protect until you remove a sufficient number of secure MAC addresses to drop below the maximum value or increase the
maximum value. No syslog message is sent.
When a port is shutdown and placed in the error-disabled state, no traffic is sent or received on that port.
A series of port security related messages display on the console, as shown in the following example.
Note: The port protocol and link status are changed to down and the port LED is turned off.
• In the example, the show interface command identifies
the port status as err-disabled. The output of the show
port-security interface command now shows the port
status as secure-shutdown. The Security Violation
counter increments by 1.
• The administrator should determine what caused the
security violation If an unauthorized device is
connected to a secure port, the security threat is
eliminated before re-enabling the port.
• To re-enable the port, first use the shutdown command,
then, use the no shutdown command.
The goal of a DHCP starvation attack is to an attack tool such as Gobbler to create a Denial of Service
(DoS) for connecting clients.
Recall that DHCP starvation attacks can be effectively mitigated by using port security because Gobbler
uses a unique source MAC address for each DHCP request sent. However, mitigating DHCP spoofing
attacks requires more protection.
Gobbler could be configured to use the actual interface MAC address as the source Ethernet address, but
specify a different Ethernet address in the DHCP payload. This would render port security ineffective
because the source MAC address would be legitimate.
DHCP spoofing attacks can be mitigated by using DHCP snooping on trusted ports.
DHCP Snooping
DHCP snooping filters DHCP messages and rate-limits DHCP traffic on untrusted ports.
• Devices under administrative control (e.g., switches, routers, and servers) are trusted sources.
• Trusted interfaces (e.g., trunk links, server ports) must be explicitly configured as trusted.
• Devices outside the network and all access ports are generally treated as untrusted sources.
A DHCP table is built that includes the source MAC address of a device on an untrusted port and the IP
address assigned by the DHCP server to that device.
• The MAC address and IP address are bound together.
• Therefore, this table is called the DHCP snooping binding table.
Refer to the DHCP snooping sample topology with trusted and untrusted ports.
Use the show ip dhcp snooping privileged EXEC command to verify DHCP snooping settings.
Use the show ip dhcp snooping binding command to view the clients that have received DHCP
information.
Note: DHCP snooping is also required by Dynamic ARP Inspection (DAI).
Mitigate ARP Attacks
In a typical ARP attack, a threat actor can send unsolicited ARP replies to other hosts on the subnet with the
MAC Address of the threat actor and the IP address of the default gateway. To prevent ARP spoofing and
the resulting ARP poisoning, a switch must ensure that only valid ARP Requests and Replies are relayed.
Dynamic ARP inspection (DAI) requires DHCP snooping and helps prevent ARP attacks by:
• Not relaying invalid or gratuitous ARP Replies out to other ports in the same VLAN.
• Intercepting all ARP Requests and Replies on untrusted ports.
• Verifying each intercepted packet for a valid IP-to-MAC binding.
• Dropping and logging ARP Replies coming from invalid to prevent ARP poisoning.
• Error-disabling the interface if the configured DAI number of ARP packets is exceeded.
The ip arp inspection validate {[src-mac] [dst-mac] [ip]} global configuration command is used to
configure DAI to drop ARP packets when the IP addresses are invalid.
• It can be used when the MAC addresses in the
body of the ARP packets do not match the
addresses that are specified in the Ethernet header.
• Notice in the following example how only one
command can be configured.
• Therefore, entering multiple ip arp inspection
validate commands overwrites the previous
command.
• To include more than one validation method, enter
them on the same command line as shown in the output.
BPDU Guard
• BPDU guard immediately error disables a port that receives a BPDU.
• Like PortFast, BPDU guard should only be configured on interfaces attached to end devices.
Configure PortFast
PortFast bypasses the STP listening and learning states to minimize the time that access ports must wait for
STP to converge.
• Only enable PortFast on access ports.
• PortFast on inter switch links can create a spanning-tree loop.
To verify whether PortFast is enabled globally you can use either the:
• show running-config | begin span command
• show spanning-tree summary command
To verify if PortFast is enabled an interface, use the show running-config interface type/number command.
The show spanning-tree interface type/number detail command can also be used for verification.
An access port could receive an unexpected BPDUs accidentally or because a user connected an
unauthorized switch to the access port.
• If a BPDU is received on a BPDU Guard enabled access port,
the port is put into error-disabled state.
• This means the port is shut down and must be manually re-
enabled or automatically recovered through the errdisable
recovery cause psecure_violation global command.
Benefits of Wireless
Wireless Technologies
Cellular Broadband – Carry both voice and data. Used by phones, automobiles, tablets,
and laptops.
• Global System of Mobile (GSM) – Internationally recognized
• Code Division Multiple Access (CDMA) – Primarily used on the US.
Satellite Broadband – Uses directional satellite dish aligned with satellite in
geostationary orbit. Needs clear line of site. Typically used in rural locations where
cable and DSL are unavailable.
802.11 Standards
802.11 WLAN standards define how radio frequencies are used for wireless links.
Radio Frequencies
All wireless devices operate in the range of the electromagnetic spectrum. WLAN networks operate in the
2.4 and 5 GHz frequency bands.
• 2.4 GHz (UHF) – 802.11b/g/n/ax
• 5 GHz (SHF) – 802.11a/n/ac/ax
Wireless Standards Organizations
Standards ensure interoperability between devices that are made by different manufacturers. Internationally,
the three organizations influencing WLAN standards:
• International Telecommunication Union (ITU) – Regulates the allocation of radio spectrum and
satellite orbits.
• Institute of Electrical and Electronics Engineers (IEEE) – Specifies how a radio frequency is
modulated to carry information. Maintains the standards for local and metropolitan area networks
(MAN) with the IEEE 802 LAN/MAN family of standards.
• Wi-Fi Alliance – Promotes the growth and acceptance of WLANs. It is an association of vendors
whose objective is to improve the interoperability of products that are based on the 802.11 standard
WLAN Components
Wireless NICs
To communicate wirelessly, laptops, tablets, smart phones, and even the
latest automobiles include integrated wireless NICs that incorporate a radio
transmitter/receiver.
If a device does not have an integrated wireless NIC, then a USB wireless
adapter can be used.
Wireless Antennas
The 802.11 frame format is similar to the Ethernet frame format, except that it contains more fields.
CSMA/CA
WLANs are half-duplex and a client cannot “hear” while it is sending, making it impossible to detect a
collision.
WLANs use carrier sense multiple access with collision avoidance (CSMA/CA) to determine how and when
to send data. A wireless client does the following:
1. Listens to the channel to see if it is idle, i.e. no other traffic currently on the channel.
2. Sends a ready to send (RTS) message the AP to request dedicated access to the network.
3. Receives a clear to send (CTS) message from the AP granting access to send.
4. Waits a random amount of time before restarting the process if no CTS message received.
5. Transmits the data.
6. Acknowledges all transmissions. If a wireless client does not receive an acknowledgment, it assumes
a collision occurred and restarts the process
Wireless Client and AP Association
Wireless clients connect to the AP using a passive or active scanning (probing) process.
• Passive mode – AP openly advertises its service by periodically sending broadcast beacon frames
containing the SSID, supported standards, and security settings.
• Active mode – Wireless clients must know the name of the SSID. The wireless client initiates the
process by broadcasting a probe request frame on multiple channels.
Passive mode
Active mode
CAPWAP Operation
Introduction to CAPWAP
• CAPWAP is an IEEE standard protocol that enables a WLC to
manage multiple APs and WLANs.
• Based on LWAPP but adds additional security with Datagram
Transport Layer Security (DLTS).
• Encapsulates and forwards WLAN client traffic between an AP
and a WLC over tunnels using UDP ports 5246 and 5247.
• Operates over both IPv4 and IPv6. IPv4 uses IP protocol 17 and
IPv6 uses IP protocol 136.
The CAPWAP split MAC concept does all AP MAC Functions WLC MAC Functions
the functions normally performed by
Beacons and probe responses Authentication
individual APs and distributes them between
two functional components: Packet acknowledgements Association and re-association of
and retransmissions roaming clients
• AP MAC Functions
Frame queueing and packet Frame translation to other
• WLC MAC Functions prioritization protocols
DTLS Encryption
FlexConnect enables the configuration and control of Aps over a WAN link.
There are two modes of option for the FlexConnect AP:
• Connected mode – The WLC is reachable. The FlexConnect AP has CAPWAP connectivity with the WLC
through the CAPWAP tunnel. The WLC performs all CAPWAP functions.
• Standalone mode – The WLC is unreachable. The FlexConnect AP has lost CAPWAP connectivity with the
WLC. The FlexConnect AP can assume some of the WLC functions such as switching client data traffic
locally and performing client authentication locally.
Channel Management
If the demand for a specific wireless channel is too high, the channel may become oversaturated, degrading
the quality of the communication.
Channel saturation can be mitigated using techniques that use the channels more efficiently.
• Direct-Sequence Spread Spectrum (DSSS) - A modulation technique designed to spread a signal over a
larger frequency band. Used by 802.11b devices to avoid interference from other devices using the same 2.4
GHz frequency.
• Frequency-Hopping Spread Spectrum (FHSS) - Transmits radio signals by rapidly switching a carrier
signal among many frequency channels. Sender and receiver must be synchronized to “know” which channel
to jump to. Used by the original 802.11 standard.
• Orthogonal Frequency-Division Multiplexing (OFDM) - A subset of frequency division multiplexing in
which a single channel uses multiple sub-channels on adjacent frequencies. OFDM is used by a number of
communication systems including 802.11a/g/n/ac.
Channel Selection
• The 2.4 GHz band is subdivided into multiple
channels each allotted 22 MHz bandwidth and
separated from the next channel by 5 MHz.
• A best practice for 802.11b/g/n WLANs requiring
multiple APs is to use non-overlapping channels
such as 1, 6, and 11.
• For the 5GHz standards 802.11a/n/ac, there
are 24 channels. Each channel is separated
from the next channel by 20 MHz.
• Non-overlapping channels are 36, 48, and 60.
WLAN Threats
A WLAN is open to anyone within range of an AP and the appropriate credentials to associate to it.
Attacks can be generated by outsiders, disgruntled employees, and even unintentionally by employees.
Wireless networks are specifically susceptible to several threats, including the following:
• Interception of data
• Wireless intruders
• Denial of Service (DoS) Attacks
• Rogue APs
DoS Attacks
• A rogue AP is an AP or wireless router that has been connected to a corporate network without
explicit authorization and against corporate policy.
• Once connected, the rogue AP can be used by an attacker to capture MAC addresses, capture data
packets, gain access to network resources, or launch a man-in-the-middle attack.
• A personal network hotspot could also be used as a rogue AP. For example, a user with secure
network access enables their authorized Windows host to become a Wi-Fi AP.
• To prevent the installation of rogue APs, organizations must configure WLCs with rogue AP policies
and use monitoring software to actively monitor the radio spectrum for unauthorized APs.
Man-in-the-Middle Attack
In a man-in-the-middle (MITM) attack, the hacker is positioned in between two legitimate entities in order
to read or modify the data that passes between the two parties. A popular wireless MITM attack is called the
“evil twin AP” attack, where an attacker introduces a rogue AP and configures it with the same SSID as a
legitimate AP.
Defeating a MITM attack begins with identifying legitimate devices on the WLAN. To do this, users must
be authenticated. After all of the legitimate devices are known, the network can be monitored for abnormal
devices or traffic.
Secure WLANs
To address the threats of keeping wireless intruders out and protecting data, two early security features were
used and are still available on most routers and APs:
SSID Cloaking
• APs and some wireless routers allow the SSID beacon frame to be disabled. Wireless clients must be
manually configured with the SSID to connect to the network.
Wired Equivalent Privacy The original 802.11 specification designed to secure the data using the Rivest Cipher 4
(WEP) (RC4) encryption method with a static key. WEP is no longer recommended and should
never be used.
Wi-Fi Protected Access A Wi-Fi Alliance standard that uses WEP but secures the data with the much stronger
(WPA) Temporal Key Integrity Protocol (TKIP) encryption algorithm. TKIP changes the key for
each packet, making it much more difficult to hack.
WPA2 It uses the Advanced Encryption Standard (AES) for encryption. AES is currently
considered the strongest encryption protocol.
WPA3 This is the next generation of Wi-Fi security. All WPA3-enabled devices use the latest
security methods, disallow outdated legacy protocols, and require the use of Protected
Management Frames (PMF).
WPA 3
Because WPA2 is no longer considered secure, WPA3 is recommended when available. WPA3 Includes
four features:
• WPA3 – Personal : Thwarts brute force attacks by using Simultaneous Authentication of Equals (SAE).
• WPA3 – Enterprise : Uses 802.1X/EAP authentication. However, it requires the use of a 192-bit
cryptographic suite and eliminates the mixing of security protocols for previous 802.11 standards.
• Open Networks : Does not use any authentication. However, uses Opportunistic Wireless Encryption (OWE)
to encrypt all wireless traffic.
• IoT Onboarding : Uses Device Provisioning Protocol (DPP) to quickly onboard IoT devices.
Remote Site WLAN Configuration
Port Forwarding
Wireless routers typically block TCP and UDP ports to prevent unauthorized access in and out of a LAN.
• However, there are situations when specific ports must be opened so that certain programs and applications
can communicate with devices on different networks.
• Port forwarding is a rule-based method of directing traffic between devices on separate networks.
• Port triggering allows the router to temporarily forward data through inbound ports to a specific device.
• You can use port triggering to forward data to a computer only when a designated port range is used to make
an outbound request.
WLC Topology
The topology and addressing scheme used for this topic are shown in the figure and the table.
• The access point (AP) is a controller-based AP as opposed to an autonomous AP, so it requires no initial
configuration and is often called lightweight APs (LAPs).
• LAPs use the Lightweight Access Point Protocol (LWAPP) to communicate with a WLAN controller (WLC).
• Controller-based APs are useful in situations where many APs are required in the network.
• As more APs are added, each AP is automatically configured and managed by the WLC.
S1 VLAN 1 DHCP
Wireless
NIC DHCP
Laptop
Log in to the WLC
Configuring a wireless LAN controller (WLC) is not that much different from configuring a wireless router.
The WLC controls APs and provides more services and management capabilities.
• The user logs into the WLC using
credentials that were configured during
initial setup.
• The Network Summary page is a
dashboard that provides a quick overview
of configured wireless networks,
associated access points (APs), and active
clients.
• You can also see the number of rogue
access points and clients.
View AP Information
Click Access Points from the left menu to view an overall picture of the AP’s system information and
performance.
• The AP is using IP address 192.168.200.3.
• Because Cisco Discovery Protocol (CDP) is active on this network, the WLC knows that the AP is connected
to the FastEthernet 0/1 port on the switch.
• This AP in the topology is a Cisco Aironet 1815i which means you can use the command-line and a limited
set of familiar IOS commands.
Advanced Settings
Most WLC will come with some basic settings and menus that users can quickly access to implement a
variety of common configurations.
• However, as a network administrator, you will typically access the advanced settings.
• For the Cisco 3504 Wireless Controller, click Advanced in the upper right-hand corner to access the advanced
Summary page.
• From here, you can access all the features of the WLC.
Configure a WLAN
Wireless LAN Controllers have Layer 2 switch ports and virtual interfaces that are created in software and
are very similar to VLAN interfaces.
• Each physical port can support many APs and WLANs.
• The ports on the WLC are essentially trunk ports that
can carry traffic from multiple VLANs to a switch for
distribution to multiple APs.
2. Apply and Enable the WLAN: Next the WLAN is enabled the WLAN settings are configured.
3. Select the Interface: The interface that will carry the WLAN traffic must be selected.
4. Secure the WLAN: The Security tab is used to access all the available options for securing the
LAN.
5. Verify the WLAN is Operational: The WLANs menu on the left is used to view the newly
configured WLAN and its settings.
6. Monitor the WLAN: The Monitor tab is used to access the advanced Summary page and confirm
that the Wireless_LAN now has one client using its services.
7. View Wireless Client Details: Click Clients in the left menu to view more information about the
clients connected to the WLAN.
Configure a WPA2 Enterprise WLAN on the WLC
Enter the IPv4 address for PC-A and the shared secret that will be used between the WLC and the RADIUS
server and then click Apply.
After clicking Apply, the list of configured RADIUS Authentication Servers refreshes with the new server
listed.
5. Verify the enable DHCP scope: The network administrator is returned to the DHCP Scopes page
and can verify the scope is ready to be allocated to a new WLAN.
By default, all newly created WLANs on the WLC will use WPA2 with Advanced Encryption System
(AES).
• 802.1X is the default key management protocol used to communicate with the RADIUS server.
• Next, create a new WLAN to use interface vlan5.
Configuring a new WLAN on the WLC includes the following steps:
1. Create a new WLAN.
2. Configure the WLAN name and SSID.
3. Enable the WLAN for VLAN 5.
4. Verify AES and 802.1X defaults.
5. Configure WLAN security to use the RADIUS server.
6. Verify the new WLAN is available.
4. Verify AES and 802.1X defaults: Click the Security tab to view the default security configuration
for the new WLAN.
5. Configure the
RADIUS server: To
select the RADIUS
server that will be used
to authenticate WLAN
users, click the AAA
Servers tab and in the
dropdown box, select
the RADIUS server that
was configured on the
WLC previously, and
then Apply your
changes.
6. Verify that the new WLAN is available: To verify that the new WLAN is listed and enabled click
on the WLANs submenu.
Troubleshooting Approaches
Network problems can be simple or complex, and can result from a combination of hardware, software, and
connectivity issues.
• Technicians must be able to analyze the problem and determine the cause of the error before they can resolve
the network issue.
• This process is called troubleshooting.
Troubleshooting any sort of network problem should follow a systematic approach.
A common and efficient troubleshooting methodology is based on the scientific method and can be broken
into the six main steps shown in the table.
The first step in the troubleshooting process is to identify the problem. While
1 Identify the Problem
tools can be used in this step, a conversation with the user is often very helpful.
After you have talked to the user and identified the problem, you can try and
Establish a Theory of Probable
2 establish a theory of probable causes. This step often yields more than a few
Causes
probable causes to the problem.
Based on the probable causes, test your theories to determine which one is the
Test the Theory to Determine cause of the problem. A technician will often apply a quick procedure to test and
3
Cause see if it solves the problem. If a quick procedure does not correct the problem, you
might need to research the problem further to establish the exact cause.
Document Findings, Actions, and In the final step of the troubleshooting process, document your findings, actions,
6
Outcomes and outcomes. This is very important for future reference.
Wireless Client Not Connecting
If there is no connectivity, check the following:
• Confirm the network configuration on the PC using the ipconfig command.
• Confirm that the device can connect to the wired network. Ping a known IP address.
• If needed, reload drivers as appropriate for the client or try a different wireless NIC.
• If the wireless NIC of the client is working, check the security mode and encryption settings on the
client.
If the PC is operational but the wireless connection is performing poorly, check the following:
• Is the PC out of the planned coverage area (BSA)?
• Check the channel settings on the wireless client.
• Check for interference with the 2.4 GHz band.
Next, ensure that all the devices are actually in place.
• Consider a possible physical security issue.
• Is there power to all devices and are they powered on?
Finally, inspect links between cabled devices looking for bad connectors or damaged or missing cables.
• If the physical plant is in place, verify the wired LAN by pinging devices, including the AP.
• If connectivity still fails at this point, perhaps something is wrong with the AP or its configuration.
• When the user PC is eliminated as the source of the problem, and the physical status of devices is
confirmed, begin investigating the performance of the AP.
• Check the power status of the AP.
To optimize and increase the bandwidth of 802.11 dual-band routers and APs, either:
• Upgrade your wireless clients - Older 802.11b, 802.11g, and even 802.11n devices can slow the entire
WLAN. For the best performance, all wireless devices should support the same highest acceptable standard.
• Split the traffic - The easiest way to improve wireless performance is to split the wireless traffic between the
802.11n 2.4 GHz band and the 5 GHz band. Therefore, 802.11n (or better) can use the two bands as two
separate wireless networks to help manage the traffic.
Updating Firmware
Most wireless routers and APs offer upgradable firmware that should be periodically verified.
On a WLC, there will most likely be the ability to upgrade the firmware on all APs that the WLC controls.
• In the figure, the firmware
image that will be used to
upgrade all the APs is
downloaded.
• On a Cisco 3504 Wireless
Controller,
click WIRELESS > Access
Points > Global
Configuration and then
scroll to the bottom of the
page for the AP Image Pre-download section.
Routing
Path Determination
Two Functions of a Router
When a router receives an IP packet on one interface, it determines which interface to use to forward the
packet to the destination. This is known as routing. The interface that the router uses to forward the packet
may be the final destination, or it may be a network connected to another router that is used to reach the
destination network. Each network that a router connects to typically requires a separate interface, but this
may not always be the case.
The primary functions of a router are to determine the best path to forward packets based on the information
in its routing table, and to forward packets toward their destination.
Router Functions Example
The router uses its IP routing table to determine
which path (route) to use to forward a packet. R1
and R2 will use their respective IP routing tables
to first determine the best path, and then forward
the packet.
Directly Connected Networks: Added to the routing table when a local interface is configured with an IP
address and subnet mask (prefix length) and is active (up and up).
Remote Networks: Networks that are not directly connected to the router. Routers learn about remote
networks in two ways:
• Static routes - Added to the routing table when a route is manually configured.
• Dynamic routing protocols - Added to the routing table when routing protocols dynamically learn
about the remote network.
Default Route: Specifies a next-hop router to use when the routing table does not contain a specific route
that matches the destination IP address. The default route can be entered manually as a static route, or
learned automatically from a dynamic routing protocol.
• A default route has a /0 prefix length. This means that no bits need to match the destination IP address
for this route entry to be used. If there are no routes with a match longer than 0 bits, the default route
is used to forward the packet. The default route is sometimes referred to as a gateway of last resort.
Packet Forwarding
After a router has determined the best path, it could do the following:
Forward the Packet to a Device on a Directly Connected Network
• If the route entry indicates that the egress interface is a directly connected network, the packet can be
forwarded directly to the destination device. Typically this is an Ethernet LAN.
• To encapsulate the packet in the Ethernet frame, the router needs to determine the destination MAC address
associated with the destination IP address of the packet. The process varies based on whether the packet is an
IPv4 or IPv6 packet.
After a router has determined the best path, it could do the following:
Forward the Packet to a Next-Hop Router
• If the route entry indicates that the destination IP address is on a remote network, meaning a device on
network that is not directly connected. The packet must be forwarded to the next-hop router. The next-hop
address is indicated in the route entry.
• If the forwarding router and the next-hop router are on an Ethernet network, a similar process (ARP and
ICMPv6 Neighbor Discovery) will occur for determining the destination MAC address of the packet as
described previously. The difference is that the router will search for the IP address of the next-hop router in
its ARP table or neighbor cache, instead of the destination IP address of the packet.
Note: This process will vary for other types of Layer 2 networks.
After a router has determined the best path, it could do the following:
Drop the Packet - No Match in Routing Table
• If there is no match between the destination IP address and a prefix in the routing table, and if there is no
default route, the packet will be dropped.
Topology
The topology in the figure will be used for configuration and verification examples. It will also be used in
the next topic to discuss the IP routing table.
IP Routing Table
Route Sources
A routing table contains a list of routes to known networks (prefixes and prefix lengths). The source of this
information is derived from the following:
• Directly connected networks
• Static routes
• Dynamic routing protocols
The source for each route in the routing table is identified by a code. Common codes include the following:
• L - Identifies the address assigned to a router interface.
• C - Identifies a directly connected network.
• S - Identifies a static route created to reach a specific network.
• O - Identifies a dynamically learned network from another router using the OSPF routing protocol.
• * - This route is a candidate for a default route.
Every router makes its decision alone, based • R1 can only forward packets using its own routing table.
on the information it has in its own routing • R1 does not know what routes are in the routing tables of other
table. routers (e.g., R2).
R1 receives a packet with the destination IP address of PC1 and the source IP
Routing information about a path does not address of PC3. Just because R1 knows to forward the packet out its G0/0/0
provide return routing information. interface, doesn’t necessarily mean that it knows how to forward packets
originating from PC1 back to the remote network of PC3
Routing Table Entries
Default Route
The default route specifies a next-hop
router to use when the routing table
does not contain a specific route that
matches the destination IP address. A
default route can be either a static route
or learned automatically from a
dynamic routing protocol. A default
route has an IPv4 route entry of
0.0.0.0/0 or an IPv6 route entry of ::/0.
This means that zero or no bits need to
match between the destination IP
address and the default route.
Administrative Distance
A route entry for a specific network address (prefix and prefix length) can only appear once in the routing
table. However, it is possible that the routing table learns about the same network address from more than
one routing source. Except for very specific circumstances, only one dynamic routing protocol should be
implemented on a router. Each routing protocol may decide on a different path to reach the destination based
on the metric of that routing protocol.
This raises a few questions, such as the following:
• How does the router know which source to use?
• Which route should it install in the routing table?
Cisco IOS uses what is known as the Route Source Administrative Distance
administrative distance (AD) to determine the
route to install into the IP routing table. The AD Directly connected 0
represents the "trustworthiness" of the route. The Static route 1
lower the AD, the more trustworthy the route
source. EIGRP summary route 5
External BGP 20
Internal EIGRP 90
The table lists various routing protocols and their
associated ADs. OSPF 110
IS-IS 115
RIP 120
Static or Dynamic?
Static and dynamic routing are not mutually exclusive. Rather, most networks use a combination of dynamic
routing protocols and static routes.
Static routes are commonly used in the following scenarios:
• As a default route forwarding packets to a service provider
• For routes outside the routing domain and not learned by the dynamic routing protocol
• When the network administrator wants to explicitly define the path for a specific network
• For routing between stub networks
Static routes are useful for smaller networks with only one path to an outside network. They also provide
security in a larger network for certain types of traffic, or links to other networks that need more control.
Dynamic routing protocols are implemented in any type of network consisting of more than just a few
routers. Dynamic routing protocols are scalable and automatically determine better routes if there is a
change in the topology.
The table shows a comparison of some the differences between dynamic and static routing.
Resource Usage Uses CPU, memory, and link bandwidth No additional resources needed
The table classifies the current routing protocols. Interior Gateway Protocols (IGPs) are routing protocols
used to exchange routing information within a routing domain administered by a single organization. There
is only one EGP and it is BGP. BGP is used to exchange routing information between different
organizations, known as autonomous systems (AS). BGP is used by ISPs to route packets over the internet.
Distance vector, link-state, and path vector routing protocols refer to the type of routing algorithm used to
determine best path.
• The metric is “cost” which is the based on the cumulative bandwidth from
Open Shortest Path First (OSPF) source to destination.
• Faster links are assigned lower costs compared to slower (higher cost) links.
Enhanced Interior Gateway • It calculates a metric based on the slowest bandwidth and delay values.
Routing Protocol (EIGRP) • It could also include load and reliability into the metric calculation.
Load Balancing
When a router has two or more paths to a destination with equal cost metrics, then the router forwards the
packets using both paths equally. This is called equal cost load balancing.
• The routing table contains the single destination network, but has multiple exit interfaces, one for each equal
cost path. The router forwards packets using the multiple exit interfaces listed in the routing table.
• If configured correctly, load balancing can increase the effectiveness and performance of the network.
• Equal cost load balancing is implemented automatically by dynamic routing protocols. It is enabled with static
routes when there are multiple static routes to the same destination network using different next-hop routers.
Note: Only EIGRP supports unequal cost load balancing.
Static Routes
Static routes are configured using the ip route and ipv6 route global configuration commands.
Next-Hop Options
When configuring a static route, the next hop can be identified by an IP address, exit interface, or both. How
the destination is specified creates one of the three following types of static route:
• Next-hop route - Only the next-hop IP address is specified
• Directly connected static route - Only the router exit interface is specified
• Fully specified static route - The next-hop IP address and exit interface are specified
Dual-Stack Topology
The figure shows a dual-stack network topology. Currently, no static routes are configured for either IPv4 or
IPv6.
IPv4 Starting Routing Tables
• Each router has entries only for directly connected networks and associated local addresses.
• R1 can ping R2, but cannot ping the R3 LAN
R1# show ip route | begin Gateway
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
C 172.16.2.0/24 is directly connected, Serial0/1/0
L 172.16.2.1/32 is directly connected, Serial0/1/0
C 172.16.3.0/24 is directly connected, GigabitEthernet0/0/0
L 172.16.3.1/32 is directly connected, GigabitEthernet0/0/0
R1#
R1# ping 172.16.2.2
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5)
R1# ping 192.168.2.1
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
The routing table for R1 now has routes to the three remote IPv6 networks.
IPv4 Directly Connected Static Route
When configuring a static route, another option is to use the exit interface to specify the next-hop
address. Three directly connected IPv4 static routes are configured on R1 using the exit interface.
Note: Using a next-hop address is generally recommended. Directly connected static routes should only be used with
point-to-point serial interfaces.
In a fully specified static route, both the exit interface and the next-hop IPV6 address are specified.
There is a situation in IPv6 when a fully specified static route must be used. If the IPv6 static route uses an
IPv6 link-local address as the next-hop address, use a fully specified static route. The figure shows an
example of a fully specified IPv6 static route using an IPv6 link-local address as the next-hop address.
The reason a fully specified static route must be used is because IPv6 link-local addresses are not contained
in the IPv6 routing table. Link-local addresses are only unique on a given link or network. The next-hop
link-local address may be a valid address on multiple networks connected to the router. Therefore, it is
necessary that the exit interface be included.
The following example shows the IPv6 routing table
entry for this route. Notice that both the next-hop link-
local address and the exit interface are included.
IPv6 Default Static Route: The command syntax for an IPv6 default static route is similar to any other
IPv6 static route, except that the ipv6-prefix/prefix-length is ::/0, which matches all routes.
Router(config)# ipv6 route ::/0 {ipv6-address | exit-intf}
An IPv6 default static route is configured in similar fashion. With this configuration any packets not
matching more specific IPv6 route entries are forwarded to R2 at 2001:db8:acad:2::2
R1(config)# ipv6 route ::/0 2001:db8:acad:2::2
Verify a Default Static Route
This example shows the show ipv6 route static command output to display the contents of the routing table.
Notice that the static default route configuration
uses the ::/0 prefix for IPv6 default routes.
Remember that the IPv6 prefix-length in a routing
table determines how many bits must match
between the destination IP address of the packet
and the route in the routing table. A ::/0 prefix
indicates that none of the bits are required to
match. As long as a more specific match does not
exist, the default static route matches all packets.
The show ip route and show ipv6 route output verifies that the default routes to R2 are installed in the
routing table. Note that the IPv4 floating static route to R3 is not present in the routing table.
Host Routes
A host route is an IPv4 address with a 32-bit mask, or an IPv6 address with a 128-bit mask. The following
shows the three ways a host route can be added to the routing table:
• Automatically installed when an IP address is configured on the router
• Configured as a static host route
• Host route automatically obtained through other methods
For IPv6 static routes, the next-hop address can be the link-local address of the adjacent router. However,
you must specify an interface type and an
interface number when using a link-local
address as the next hop, as shown in the
example. First, the original IPv6 static host
route is removed, then a fully specified
route configured with the IPv6 address of
the server and the IPv6 link-local address
of the ISP router.
Assuming R1 matched a routing table entry, it encapsulates the packet in a new frame and forwards it out of
interface S0/1/0 to R2.
• R2 receives the packet on its S0/1/0 interface.
• It decapsulates and processes the packet the same
way R1 did.
• When R2 finds a match in the routing table, it uses
the identified next-hop IP address or exit interface
and sends the packet out of its interface S0/1/1
towards R3.
• R3 receives the packet, decapsulates it, and searches
the routing table for a match.
• The destination IP address of PC3 matches the
directly connected G0/0/0 interface. Therefore, R3
searches the ARP table for the Layer 2 MAC address
of PC3.
• If no ARP entry exists, then R3 sends an ARP request
out of the G0/0/0 interface.
• PC3 responds with an ARP reply containing its MAC
address.
• R3 encapsulates the packet in a new frame and uses the PC3 MAC address as the destination MAC address
and the G0/0/0 MAC address as the source MAC address.
• The frame is forwarded out of interface G0/0/0 and PC3 receives and processes it accordingly.
Network Changes
Networks fail for a number of reasons:
• An interface can fail
• A service provider drops a connection
• Links can become oversaturated
• An administrator may enter a wrong configuration.
Network administrators are responsible for pinpointing and solving the problem.
To efficiently find and solve these issues, it is advantageous to be intimately familiar with tools to help
isolate routing problems quickly.
Common Troubleshooting Commands
Command Description
Introduction to OSPF
• OSPF is a link-state routing protocol that was developed as an alternative for the distance vector
Routing Information Protocol (RIP). OSPF has significant advantages over RIP in that it offers faster
convergence and scales to much larger network implementations.
• OSPF is a link-state routing protocol that uses the concept of areas. A network administrator can
divide the routing domain into distinct areas that help control routing update traffic.
A link is an interface on a router, a network segment that connects two routers, or a stub network such as an
Ethernet LAN that is connected to a single router.
Information about the state of a link is known as a link-state. All link-state information includes the network
prefix, prefix length, and cost.
• This module covers basic, single-area OSPF implementations and configurations.
Components of OSPF
• All routing protocols share similar components. They all use routing protocol messages to exchange
route information. The messages help build data structures, which are then processed using a routing
algorithm.
• Routers running OSPF exchange messages to convey routing information using five types of
packets:
▪ Hello packet
▪ Database description packet
▪ Link-state request packet
▪ Link-state update packet
▪ Link-state acknowledgment packet
• These packets are used to discover neighboring routers and also to exchange routing information to
maintain accurate information about the network.
OSPF messages are used to create and maintain three OSPF databases, as follows:
• The router builds the topology table using results of calculations based on the Dijkstra shortest-path
first (SPF) algorithm. The SPF algorithm is based on the cumulative cost to reach a destination.
• The SPF algorithm creates an SPF tree by placing each router at the root of the tree and calculating
the shortest path to each node. The SPF tree is then used to calculate the best routes. OSPF places the
best routes into the forwarding database, which is used to make the routing table.
Link-State Operation
To maintain routing information, OSPF routers complete a generic link-state routing process to reach a state
of convergence. The following are the link-state routing steps that are completed by a router:
1. Establish Neighbor Adjacencies
2. Exchange Link-State Advertisements
3. Build the Link State Database
4. Execute the SPF Algorithm
5. Choose the Best Route
Single-Area and Multiarea OSPF
To make OSPF more efficient and scalable, OSPF supports hierarchical routing using areas. An OSPF area
is a group of routers that share the same link-state information in their LSDBs. OSPF can be implemented in
one of two ways, as follows:
• Single-Area OSPF - All routers are in one area. Best practice is to use area 0.
• Multiarea OSPF - OSPF is implemented using multiple areas, in a hierarchical fashion. All areas must
connect to the backbone area (area 0). Routers interconnecting the areas are referred to as Area Border
Routers (ABRs).
Multiarea OSPF
The hierarchical-topology design options with multiarea OSPF can offer the following advantages.
• Smaller routing tables - Tables are smaller because there are fewer routing table entries. This is
because network addresses can be summarized between areas. Route summarization is not enabled by
default.
• Reduced link-state update overhead - Designing multiarea OSPF with smaller areas minimizes
processing and memory requirements.
• Reduced frequency of SPF calculations -– Multiarea OSPF localize the impact of a topology change
within an area. For instance, it minimizes routing update impact because LSA flooding stops at the area
boundary.
OSPFv3
• OSPFv3 is the OSPFv2 equivalent for exchanging IPv6 prefixes. OSPFv3 exchanges routing
information to populate the IPv6 routing table with remote prefixes.
Note: With the OSPFv3 Address Families feature, OSPFv3 includes support for both IPv4 and IPv6.
OSPF Address Families is beyond the scope of this curriculum.
• OSPFv3 has the same functionality as OSPFv2, but uses IPv6 as the network layer transport,
communicating with OSPFv3 peers and advertising IPv6 routes. OSPFv3 also uses the SPF
algorithm as the computation engine to determine the best paths throughout the routing domain.
• OSPFv3 has separate processes from its IPv4 counterpart. The processes and operations are basically
the same as in the IPv4 routing protocol, but run independently.
OSPF Packets
3 Link-State Request (LSR) Requests specific link-state records from router to router
Link-State Updates
• LSUs are also used to forward OSPF routing updates. An
LSU packet can contain 11 different types of OSPFv2
LSAs. OSPFv3 renamed several of these LSAs and also
contains two additional LSAs.
• LSU and LSA are often used interchangeably, but the
correct hierarchy is LSU packets contain LSA messages.
Hello Packet
The OSPF Type 1 packet is the Hello packet.
Hello packets are used to do the following:
• Discover OSPF neighbors and establish
neighbor adjacencies.
• Advertise parameters on which two
routers must agree to become neighbors.
• Elect the Designated Router (DR) and
Backup Designated Router (BDR) on
multiaccess networks like Ethernet.
Point-to-point links do not require DR
or BDR.
State Description
On point-to-point networks, the two routers decide which router will initiate the DBD packet
ExStart State
exchange and decide upon the initial DBD packet sequence number.
1 Down to Init State When OSPFv2 is enabled on the interface, R1 transitions from Down to Init and starts
sending OSPFv2 Hellos out of the interface in an attempt to discover neighbors.
2 Init State When a R2 receives a hello from the previously unknown router R1, it adds R1’s router ID
to the neighbor list and responds with a Hello packet containing its own router ID.
3 Two-Way State R1 receives R2’s hello and notices that the message contains the R1 router ID in the list of
R2’s neighbors. R1 adds R2’s router ID to the neighbor list and transitions to the Two-Way
State.
If R1 and R2 are connected with a point-to-point link, they transition to ExStart
If R1 and R2 are connected over a common Ethernet network, the DR/BDR election occurs.
4 Elect the DR & BDR The DR and BDR election occurs, where the router with the highest router ID or highest
priority is elected as the DR, and second highest is the BDR
After the Two-Way state, routers transition to database synchronization states. This is a three step process,
as follows:
• Decide first router: The router with the highest router ID sends its DBD first.
• Exchange DBDs: As many as needed to convey the database. The other router must acknowledge
each DBD with an LSAck packet.
• Send an LSR: Each router compares the DBD information with the local LSDB. If the DBD has
more current link information, the router transitions to the loading state.
After all LSRs have been exchanged and satisfied, the routers are considered synchronized and in a full
state. Updates (LSUs) are sent:
• When a change is perceived (incremental updates)
• Every 30 minutes
The Need for a DR
OSPF Router ID
OSPFv2 is enabled using the router ospf process-id global configuration mode command. The process-id value
represents a number between 1 and 65,535 and is selected by the network administrator. The process-id value is
locally significant. It is considered best practice to use the same process-id on all OSPF routers.
Router IDs
• An OSPF router ID is a 32-bit value, represented as an IPv4 address. It is used to uniquely identify
an OSPF router, and all OSPF packets include the router ID of the originating router.
• Every router requires a router ID to participate in an OSPF domain. It can be defined by an
administrator or automatically assigned by the router. The router ID is used by an OSPF-enabled
router to do the following:
▪ Participate in the synchronization of OSPF databases – During the Exchange State, the
router with the highest router ID will send their database descriptor (DBD) packets first.
▪ Participate in the election of the designated router (DR) - In a multiaccess LAN
environment, the router with the highest router ID is elected the DR. The routing device with
the second highest router ID is elected the backup designated router (BDR).
Instead of relying on physical interface, the router ID can be assigned to a loopback interface. Typically, the
IPv4 address for this type of loopback interface should be configured using a 32-bit subnet mask
(255.255.255.255). This effectively creates a host route. A 32-bit host route would not get advertised as a
route to other OSPF routers.
OSPF does not need to be enabled on an interface for that interface to be chosen as the router ID.
Modify a Router ID
• After a router selects a R1# show ip protocols | include Router ID
Router ID 10.10.1.1
router ID, an active R1# conf t
OSPF router does not Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# router ospf 10
allow the router ID to R1(config-router)# router-id 1.1.1.1
be changed until the % OSPF: Reload or use "clear ip ospf process" command, for this to take
effect
router is reloaded or R1(config-router)# end
the OSPF process is R1# clear ip ospf process
Reset ALL OSPF processes? [no]: y
reset. *Jun 6 01:09:46.975: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on
GigabitEthernet0/0/1 from FULL to DOWN, Neighbor Down: Interface down or
• Clearing the OSPF detached
*Jun 6 01:09:46.981: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on
process is the preferred GigabitEthernet0/0/1 from LOADING to FULL, Loading Done *
method to reset the R1# show ip protocols | include Router ID
Router ID 1.1.1.1
router ID. R1#
Point-to-Point OSPF Networks
• The network-address wildcard-mask syntax is used to enable OSPF on interfaces. Any interfaces on
a router that match this part of the command are enabled to send and receive OSPF packets.
• The area area-id syntax refers to the OSPF area. When configuring single-area OSPFv2,
the network command must be configured with the same area-id value on all routers. Although any
area ID can be used, it is good practice to use an area ID of 0 with single-area OSPFv2. This
convention makes it easier if the network is later altered to support multiarea OSPFv2.
Within routing configuration mode, there are two ways to identify the interfaces that will participate in the
OSPFv2 routing process.
• In the first example, the wildcard mask identifies the interface based on the network addresses. Any active
interface that is configured with an IPv4 R1(config)# router ospf 10
R1(config-router)# network 10.10.1.0 0.0.0.255 area 0
address belonging to that network will R1(config-router)# network 10.1.1.4 0.0.0.3 area 0
participate in the OSPFv2 routing R1(config-router)# network 10.1.1.12 0.0.0.3 area 0
process. R1(config-router)#
Note: Some IOS versions allow the subnet mask to be entered instead of the wildcard mask. The IOS then converts the
subnet mask to the wildcard mask format.
• As an alternative, OSPFv2 can be enabled by specifying the exact interface IPv4 address using a quad zero
wildcard mask. Entering network 10.1.1.5 R1(config)# router ospf 10
0.0.0.0 area 0 on R1 tells the router to R1(config-router)# network 10.10.1.1 0.0.0.0 area 0
enable interface Gigabit Ethernet 0/0/0 for R1(config-router)# network 10.1.1.5 0.0.0.0 area 0
R1(config-router)# network 10.1.1.14 0.0.0.0 area 0
the routing process. R1(config-router)#
• The advantage of specifying the interface is that the wildcard mask calculation is not necessary. Notice that in
all cases, the area argument specifies area 0.
Remove the network commands using the no form of the command. Then go to each interface and configure
the ip ospf command
R1(config)# router ospf 10
R1(config-router)# no network 10.10.1.1 0.0.0.0 area 0
R1(config-router)# no network 10.1.1.5 0.0.0.0 area 0
R1(config-router)# no network 10.1.1.14 0.0.0.0 area 0
R1(config-router)# interface GigabitEthernet 0/0/0
R1(config-if)# ip ospf 10 area 0
R1(config-if)# interface GigabitEthernet 0/0/1
R1(config-if)# ip ospf 10 area 0
R1(config-if)# interface Loopback 0
R1(config-if)# ip ospf 10 area 0
R1(config-if)#
Passive Interface
By default, OSPF messages are forwarded out all OSPF-enabled interfaces. However, these messages only
need to be sent out interfaces that are connecting to other OSPF-enabled routers.
Sending out unneeded messages on a LAN affects the network in three ways:
• Inefficient Use of Bandwidth - Available bandwidth is consumed transporting unnecessary messages.
• Inefficient Use of Resources - All devices on the LAN must process and eventually discard the message.
• Increased Security Risk - Without additional OSPF security configurations, OSPF messages can be
intercepted with packet sniffing software. Routing updates can be modified and sent back to the router,
corrupting the routing table with false metrics that misdirect traffic.
Configure Passive Interfaces
By default, Cisco routers elect a DR and BDR on Ethernet interfaces, even if there is only one other device
on the link. You can verify this with the show ip ospf interface command. The DR/ BDR election process is
unnecessary as there can only be two routers on the point-to-point network between R1 and R2. Notice in
the output that the router has designated the network type as BROADCAST.
R1# show ip ospf interface GigabitEthernet 0/0/0
GigabitEthernet0/0/0 is up, line protocol is up
Internet Address 10.1.1.5/30, Area 0, Attached via Interface Enable
Process ID 10, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Enabled by interface config, including secondary ip addresses
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 2.2.2.2, Interface address 10.1.1.6
Backup Designated router (ID) 1.1.1.1, Interface address 10.1.1.5
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
To change this to a point-to-point network, use the interface configuration command ip ospf network point-
to-point on all interfaces where you want to disable the DR/BDR election process.
• Result at R2:
R2# show ip route | include 10.10.1
O 10.10.1.0/24 [110/2] via 10.1.1.5, 00:03:05, GigabitEthernet0/0/0
To verify the OSPFv2 adjacencies, use the show ip ospf neighbor command. The state of neighbors in
multiaccess networks can be as follows:
• FULL/DROTHER - This is a DR or BDR router that is fully adjacent with a non-DR or BDR router. These
two neighbors can exchange Hello packets, updates, queries, replies, and acknowledgments.
• FULL/DR - The router is fully adjacent with the indicated DR neighbor. These two neighbors can exchange
Hello packets, updates, queries, replies, and acknowledgments.
• FULL/BDR - The router is fully adjacent with the indicated BDR neighbor. These two neighbors can
exchange Hello packets, updates, queries, replies, and acknowledgments.
• 2-WAY/DROTHER - The non-DR or BDR router has a neighbor relationship with another non-DR or BDR
router. These two neighbors exchange Hello packets.
The normal state for an OSPF router is usually FULL. If a router is stuck in another state, it is an indication
that there are problems in forming adjacencies. The only exception to this is the 2-WAY state, which is
normal in a multiaccess broadcast network.
The output generated by R2 confirms that R2 has adjacencies with the following routers:
• R1 with router ID 1.1.1.1 is in a Full state and R1 is neither the DR nor BDR.
• R3 with router ID 3.3.3.3 is in a Full state and the role of R3 is DR.
R2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DROTHER 00:00:31 192.168.1.1 GigabitEthernet0/0/0
3.3.3.3 1 FULL/DR 00:00:34 192.168.1.3
GigabitEthernet0/0/0 R2#
Default DR/BDR Election Process
The OSPF DR and BDR election is based on the following criteria, in sequential order:
1. The routers in the network elect the router with the highest interface priority as the DR. The router
with the second highest interface priority is becomes the BDR.
• The priority can be configured to be any number between 0 – 255.
• If the interface priority value is set to 0, that interface cannot be elected as DR nor BDR.
• The default priority of multiaccess broadcast interfaces is 1.
2. If the interface priorities are equal, then the router with the highest router ID is elected the DR. The
router with the second highest router ID is the BDR.
• The election process takes place when the first router with an OSPF-enabled interface is active on
the network. If all of the routers on the network have not finished booting, it is possible that a
router with a lower router ID becomes the DR.
• The addition of a new router does not initiate a new election process.
• Changing the reference bandwidth does not actually affect the bandwidth capacity on the link; rather,
it simply affects the calculation used to determine the metric.
• To adjust the reference bandwidth, use the auto-cost reference-bandwidth Mbps router
configuration command.
This command must be configured on every router in the OSPF domain.
Notice in the command that the value is expressed in Mbps; therefore, to adjust the costs for Gigabit
Ethernet, use the command auto-cost reference-bandwidth 1000. For 10 Gigabit Ethernet, use the
command auto-cost reference-bandwidth 10000.
To return to the default reference bandwidth, use the auto-cost reference-bandwidth 100 command.
• Another option is to change the cost on one specific interface using the ip ospf cost cost command.
• Whichever method is used, it is important to apply the configuration to all routers in the OSPF routing
domain.
• The table shows the OSPF cost if the reference bandwidth is adjusted to accommodate 10 Gigabit Ethernet
links. The reference bandwidth should be adjusted anytime there are links faster than FastEthernet (100
Mbps).
• Use the show ip ospf interface command to verify the current OSPFv2 cost assigned to the interface.
OSPF Accumulates Cost
• The cost of an OSPF route is the
accumulated value from one router to the
destination network.
• Assuming the auto-cost reference-
bandwidth 10000 command has been
configured on all three routers, the cost of
the links between each router is now 10.
The loopback interfaces have a default
cost of 1.
• You can calculate the cost for each router to reach each network.
• For example, the total cost for R1 to reach the 10.10.2.0/24 network is 11. This is because the link to
R2 cost = 10 and the loopback default cost = 1. 10 + 1 = 11.
• You can verify this with the show ip route command.
Verifying the accumulated cost for the path to the 10.10.2.0/24 network:
R1# show ip route | include 10.10.2.0
O 10.10.2.0/24 [110/11] via 10.1.1.6, 01:05:02, GigabitEthernet0/0/0
R1# show ip route 10.10.2.0
Routing entry for 10.10.2.0/24
Known via "ospf 10", distance 110, metric 11, type intra area
Last update from 10.1.1.6 on GigabitEthernet0/0/0, 01:05:13 ago
Routing Descriptor Blocks:
* 10.1.1.6, from 2.2.2.2, 01:05:13 ago, via GigabitEthernet0/0/0
Route metric is 11, traffic share count is 1
R1#
To change the cost value reported by the local OSPF router to other OSPF routers, use the interface
configuration command ip ospf cost value.
R1(config)# interface g0/0/1 R1(config-if)# ip ospf cost 30 R1(config-
if)# interface lo0 R1(config-if)# ip ospf cost 10 R1(config-if)# end
R1#
Test Failover to Backup Route
What happens if the link between R1 and R2 goes down? You can simulate that by shutting down the
Gigabit Ethernet 0/0/0 interface and verifying the routing table is updated to use R3 as the next-hop router.
R1# show ip route ospf | begin 10
Notice that R1 can 10.0.0.0/8 is variably subnetted, 8 subnets, 3 masks
now reach the O 10.1.1.4/30 [110/50] via 10.1.1.13, 00:00:14, GigabitEthernet0/0/1
O 10.1.1.8/30 [110/40] via 10.1.1.13, 00:00:14, GigabitEthernet0/0/1
10.1.1.4/30 network O 10.10.2.0/24 [110/50] via 10.1.1.13, 00:00:14, GigabitEthernet0/0/1
through R3 with a O 10.10.3.0/24 [110/40] via 10.1.1.13, 00:00:14, GigabitEthernet0/0/1
R1#
cost value of 50.
• The Dead interval is the period that the router waits to receive a Hello packet before declaring the
neighbor down. If the Dead interval expires before the routers receive a Hello packet, OSPF removes
that neighbor from its link-state database (LSDB). The router floods the LSDB with information
about the down neighbor out all OSPF-enabled interfaces. Cisco uses a default of 4 times the Hello
interval. This is 40 seconds on multiaccess and point-to-point networks.
• It may be desirable to change the OSPF timers so that routers detect network failures in less time.
Doing this increases traffic, but sometimes the need for quick convergence is more important than
the extra traffic it creates.
Note: The default Hello and Dead intervals are based on best practices and should only be altered in rare situations.
• OSPFv2 Hello and Dead intervals can be modified manually using the following interface
configuration mode commands:
Router(config-if)# ip ospf hello-interval seconds
Router(config-if)# ip ospf dead-interval seconds
• Use the no ip ospf hello-interval and no ip ospf dead-interval commands to reset the intervals to
their default.
• In the example, the Hello interval for the link between R1 and R2 is changed to 5 seconds. The Cisco
IOS automatically modifies the Dead interval to four times the Hello interval. However, you can
document the new Dead interval in the configuration by manually setting it to 20 seconds, as shown.
• When the Dead Timer on R1 expires, R1 and R2 lose adjacency. R1 and R2 must be configured with
the same Hello interval. Use the show ip ospf neighbor command on R1 to verify the neighbor
adjacencies.
In the example, R2 is configured with a loopback to simulate a connection to the internet. A default route is
configured and propagated to all other OSPF routers in the routing domain.
Note: When configuring static routes, best practice is to use the next-hop IP address. However, when simulating a
connection to the internet, there is no next-hop IP address. Therefore, we use the exit-intf argument.
Additional commands for determining that OSPF is operating as expected include the following:
• show ip ospf neighbor
• show ip protocols
• show ip ospf
• show ip ospf interface
Network Security
Assets An asset is anything of value to the organization. It includes people, equipment, resources, and data.
Vulnerability A vulnerability is a weakness in a system, or its design, that could be exploited by a threat.
Mitigation is the counter-measure that reduces the likelihood or severity of a potential threat or risk.
Mitigation
Network security involves multiple mitigation techniques.
Risk is the likelihood of a threat to exploit the vulnerability of an asset, with the aim of negatively
Risk affecting an organization. Risk is measured using the probability of the occurrence of an event and its
consequences.
Data loss or data exfiltration is when data is intentionally or unintentionally lost, stolen, or leaked to the
outside world. The data loss can result in:
• Brand damage and loss of reputation
• Loss of competitive advantage
• Loss of customers
• Loss of revenue
• Litigation/legal action resulting in fines and civil penalties
• Significant cost and effort to notify affected parties and recover from the breach
Network security professionals must protect the organization’s data. Various Data Loss Prevention (DLP)
controls must be implemented which combine strategic, operational and tactical measures.
Email/Social
Intercepted email or IM messages could be captured and reveal confidential information.
Networking
If the data is not stored using an encryption algorithm, then the thief can retrieve valuable
Unencrypted Devices
confidential data.
Cloud Storage Devices Sensitive data can be lost if access to the cloud is compromised due to weak security settings.
One risk is that an employee could perform an unauthorized transfer of data to a USB drive.
Removable Media
Another risk is that a USB drive containing valuable corporate data could be lost.
Improper Access Passwords or weak passwords which have been compromised can provide a threat actor with easy
Control access to corporate data.
Threat Actors
The Hacker
Hacker is a common term used to describe a threat actor
These are ethical hackers who use their programming skills for good, ethical, and legal
White Hat Hackers purposes. Security vulnerabilities are reported to developers for them to fix before the
vulnerabilities can be exploited.
These are individuals who commit crimes and do arguably unethical things, but not for
Gray Hat Hackers personal gain or to cause damage. Gray hat hackers may disclose a vulnerability to the
affected organization after having compromised their network.
These are unethical criminals who compromise computer and network security for personal
Black Hat Hackers
gain, or for malicious reasons, such as attacking networks.
The Evolution of Hackers
The table displays modern hacking terms and a brief description of each.
These are teenagers or inexperienced hackers running existing scripts, tools, and exploits, to cause
Script Kiddies
harm, but typically not for profit.
Vulnerability These are usually gray hat hackers who attempt to discover exploits and report them to vendors,
Broker sometimes for prizes or rewards.
These are gray hat hackers who publicly protest organizations or governments by posting articles,
Hacktivists
videos, leaking sensitive information, and performing network attacks.
These are black hat hackers who are either self-employed or working for large cybercrime
Cyber criminals
organizations.
These are either white hat or black hat hackers who steal government secrets, gather intelligence, and
State-Sponsored sabotage networks. Their targets are foreign governments, terrorist groups, and corporations. Most
countries in the world participate to some degree in state-sponsored hacking
Cyber Criminals
It is estimated that cyber criminals steal billions of dollars from consumers and businesses. Cyber criminals
operate in an underground economy where they buy, sell, and trade attack toolkits, zero day exploit code,
botnet services, banking Trojans, keyloggers, and much more. They also buy and sell the private information
and intellectual property they steal. Cyber criminals target small businesses and consumers, as well as large
enterprises and entire industries.
Hacktivists
Two examples of hacktivist groups are Anonymous and the Syrian Electronic Army. Although most
hacktivist groups are not well organized, they can cause significant problems for governments and
businesses. Hacktivists tend to rely on fairly basic, freely available tools.
State-Sponsored Hackers
State-sponsored hackers create advanced, customized attack code, often using previously undiscovered
software vulnerabilities called zero-day vulnerabilities. An example of a state-sponsored attack involves the
Stuxnet malware that was created to damage Iran’s nuclear enrichment capabilities.
Threat Actor Tools
To exploit a vulnerability, a threat actor must have a technique or tool. Over the years, attack tools have
become more sophisticated, and highly automated. These new tools require less technical knowledge to
implement.
The table highlights categories of common penetration testing tools. Notice how some tools are used by
white hats and black hats. Keep in mind that the list is not exhaustive as new tools are always being
developed.
Penetration Testing
Description
Tool
Password cracking tools are often referred to as password recovery tools and can be used to crack
or recover a password. Password crackers repeatedly make guesses in order to crack the password.
Password Crackers
Examples of password cracking tools include John the Ripper, Ophcrack, L0phtCrack, THC
Hydra, Rainbow Crack, and Medusa.
Wireless hacking tools are used to intentionally hack into a wireless network to detect security
Wireless Hacking Tools vulnerabilities. Examples of wireless hacking tools include Aircrack-ng, Kismet, InSSIDer,
KisMAC, Firesheep, and ViStumbler.
Network scanning tools are used to probe network devices, servers, and hosts for open TCP or
Network Scanning and
UDP ports. Examples of scanning tools include Nmap, SuperScan, Angry IP Scanner, and
Hacking Tools
NetScanTools.
These tools are used to probe and test a firewall’s robustness using specially crafted forged
Packet Crafting Tools
packets. Examples include Hping, Scapy, Socat, Yersinia, Netcat, Nping, and Nemesis.
These tools are used to capture and analyze packets within traditional Ethernet LANs or WLANs.
Packet Sniffers Tools include Wireshark, Tcpdump, Ettercap, Dsniff, EtherApe, Paros, Fiddler, Ratproxy, and
SSLstrip.
Penetration
Description
Testing Tool
This is a directory and file integrity checker used by white hats to detect installed root kits. Example tools
Rootkit Detectors
include AIDE, Netfilter, and PF: OpenBSD Packet Filter.
Fuzzers to Search Fuzzers are tools used by threat actors to discover a computer’s security vulnerabilities. Examples of
Vulnerabilities fuzzers include Skipfish, Wapiti, and W3af.
These tools are used by white hat hackers to sniff out any trace of evidence existing in a computer.
Forensic Tools
Example of tools include Sleuth Kit, Helix, Maltego, and Encase.
These tools are used by black hats to reverse engineer binary files when writing exploits. They are also
Debuggers used by white hats when analyzing malware. Debugging tools include GDB, WinDbg, IDA Pro, and
Immunity Debugger.
Hacking Operating These are specially designed operating systems preloaded with tools optimized for hacking. Examples of
Systems specially designed hacking operating systems include Kali Linux, BackBox Linux.
Encryption tools use algorithm schemes to encode the data to prevent unauthorized access to the
Encryption Tools encrypted data. Examples of these tools include VeraCrypt, CipherShed, OpenSSH, OpenSSL, Tor,
OpenVPN, and Stunnel.
Vulnerability These tools identify whether a remote host is vulnerable to a security attack. Examples of vulnerability
Exploitation Tools exploitation tools include Metasploit, Core Impact, Sqlmap, Social Engineer Toolkit, and Netsparker.
These tools scan a network or system to identify open ports. They can also be used to scan for known
Vulnerability
vulnerabilities and scan VMs, BYOD devices, and client databases. Examples of tools include Nipper,
Scanners
Core Impact, Nessus, SAINT, and OpenVAS
Attack Types
Eavesdropping This is when a threat actor captures and “listens” to network traffic. This attack is also referred to as
Attack sniffing or snooping.
Data Modification If threat actors have captured enterprise traffic, they can alter the data in the packet without the
Attack knowledge of the sender or receiver.
IP Address A threat actor constructs an IP packet that appears to originate from a valid address inside the corporate
Spoofing Attack intranet.
If threat actors discover a valid user account, the threat actors have the same rights as the real user.
Password-Based
Threat actors could use that valid account to obtain lists of other users, network information, change
Attacks
server and network configurations, and modify, reroute, or delete data.
A DoS attack prevents normal use of a computer or network by valid users. A DoS attack can flood a
Denial of Service
computer or the entire network with traffic until a shutdown occurs because of the overload. A DoS
Attack
attack can also block traffic, which results in a loss of access to network resources by authorized users.
Man-in-the-Middle This attack occurs when threat actors have positioned themselves between a source and destination. They
Attack can now actively monitor, capture, and control the communication transparently.
If a threat actor obtains a secret key, that key is referred to as a compromised key. A compromised key
Compromised-Key
can be used to gain access to a secured communication without the sender or receiver being aware of the
Attack
attack.
A sniffer is an application or device that can read, monitor, and capture network data exchanges and read
Sniffer Attack network packets. If the packets are not encrypted, a sniffer provides a full view of the data inside the
packet
Malware
Overview of Malware
• This topic introduces you to different types of malware that hackers use to gain access to end
devices.
• End devices are particularly prone to malware attacks. It is important to know about malware
because threat actors rely on users to install malware to help exploit the security gaps.
Modern viruses are developed for specific intent such as those listed in the table.
Boot sector virus Virus attacks the boot sector, file partition table, or file system.
Script viruses Virus attacks the OS interpreter which is used to execute scripts.
Threat actors use Trojan horses to compromise hosts. A Trojan horse is a program that looks useful but also
carries malicious code. Trojan horses are often provided with free online programs such as computer games.
There are several types of Trojan horses as described in the table.
Data-sending Trojan horse provides the threat actor with sensitive data, such as passwords.
Trojan horse will use the victim's computer as the source device to launch attacks and perform
Proxy
other illegal activities.
FTP Trojan horse enables unauthorized file transfer services on end devices.
Security software
Trojan horse stops antivirus programs or firewalls from functioning.
disabler
Trojan horse actively attempts to steal confidential information, such as credit card numbers, by
Keylogger
recording key strokes entered into a web form.
• Ransomware typically denies a user access to their files by encrypting the files and then displaying a
message demanding a ransom for the decryption key.
Ransomware
• Users without up-to-date backups must pay the ransom to decrypt their files.
• Payment is usually made using wire transfer or crypto currencies such as Bitcoin.
• Rootkits are used by threat actors to gain administrator account-level access to a computer.
• They are very difficult to detect because they can alter firewall, antivirus protection, system files, and
even OS commands to conceal their presence.
Rootkit • They can provide a backdoor to threat actors giving them access to the PC, and allowing them to
upload files, and install new software to be used in a DDoS attack.
• Special rootkit removal tools must be used to remove them, or a complete OS re-install may be
required.
• Like adware but, used to gather information about the user and send to threat actors without the user’s
consent.
Spyware
• Spyware can be a low threat, gathering browsing data, or it can be a high threat capturing personal and
financial information.
• A worm is a self-replicating program that propagates automatically without user actions by exploiting
vulnerabilities in legitimate software.
Worm
• It uses the network to search for other victims with the same vulnerability.
• The intent of a worm is usually to slow or disrupt network operations
Common Network Attacks
• When malware is delivered and installed, the payload can be used to cause a variety of network
related attacks.
• To mitigate attacks, it is useful to understand the types of attacks. By categorizing network attacks, it
is possible to address types of attacks rather than individual attacks.
• Networks are susceptible to the following types of attacks:
o Reconnaissance Attacks
o Access Attacks
o DoS Attacks
Reconnaissance Attacks
• Reconnaissance is information gathering.
• Threat actors use reconnaissance (or recon) attacks to do unauthorized discovery and mapping of
systems, services, or vulnerabilities. Recon attacks precede access attacks or DoS attacks.
Some of the techniques used by malicious threat actors to conduct reconnaissance attacks are described in
the table.
Technique Description
Perform an information The threat actor is looking for initial information about a target. Various tools can be used,
query of a target including the Google search, organizations website, whois, and more.
Initiate a ping sweep of The information query usually reveals the target’s network address. The threat actor can now
the target network initiate a ping sweep to determine which IP addresses are active.
Initiate a port scan of This is used to determine which ports or services are available. Examples of port scanners include
active IP addresses Nmap, SuperScan, Angry IP Scanner, and NetScanTools.
This is to query the identified ports to determine the type and version of the application and
Run vulnerability
operating system that is running on the host. Examples of tools include Nipper, Core Impact,
scanners
Nessus, SAINT, and Open VAS.
The threat actor now attempts to discover vulnerable services that can be exploited. A variety of
Run exploitation tools vulnerability exploitation tools exist including Metasploit, Core Impact, Sqlmap, Social Engineer
Toolkit, and Netsparker.
Access Attacks
• Access attacks exploit known vulnerabilities in authentication services, FTP services, and web
services. The purpose of these types of attacks is to gain entry to web accounts, confidential
databases, and other sensitive information.
• Threat actors use access attacks on network devices and computers to retrieve data, gain access, or to
escalate access privileges to administrator status.
• Password Attacks: In a password attack, the threat actor attempts to discover critical system
passwords using various methods. Password attacks are very common and can be launched using a
variety of password cracking tools.
• Spoofing Attacks: In spoofing attacks, the threat actor device attempts to pose as another device by
falsifying data. Common spoofing attacks include IP spoofing, MAC spoofing, and DHCP spoofing.
These spoofing attacks will be discussed in more detail later in this module
• Other Access attacks include:
o Trust exploitations
o Port redirections
o Man-in-the-middle attacks
o Buffer overflow attacks
Pretexting A threat actor pretends to need personal or financial data to confirm the identity of the recipient.
A threat actor sends fraudulent email which is disguised as being from a legitimate, trusted source
Phishing to trick the recipient into installing malware on their device, or to share personal or financial
information.
Spear phishing A threat actor creates a targeted phishing attack tailored for a specific individual or organization.
Also known as junk mail, this is unsolicited email which often contains harmful links, malware,
Spam
or deceptive content.
Sometimes called “Quid pro quo”, this is when a threat actor requests personal information from a
Something for Something
party in exchange for something such as a gift.
A threat actor leaves a malware infected flash drive in a public location. A victim finds the drive
Baiting
and unsuspectingly inserts it into their laptop, unintentionally installing malware.
This type of attack is where a threat actor pretends to be someone they are not to gain the trust of
Impersonation
a victim.
This is where a threat actor quickly follows an authorized person into a secure location to gain
Tailgating
access to a secure area.
This is where a threat actor inconspicuously looks over someone’s shoulder to steal their
Shoulder surfing
passwords or other information.
Dumpster diving This is where a threat actor rummages through trash bins to discover confidential documents
A Denial of Service (DoS) attack creates some sort of interruption of network services to users, devices, or
applications. There are two major types of DoS attacks:
o Overwhelming Quantity of Traffic - The threat actor sends an enormous quantity of data at a rate
that the network, host, or application cannot handle. This causes transmission and response times to
slow down. It can also crash a device or service.
o Maliciously Formatted Packets - The threat actor sends a maliciously formatted packet to a host or
application and the receiver is unable to handle it. This causes the receiving device to run very slowly
or crash.
• DoS attacks are a major risk because they interrupt communication and cause significant loss of time
and money. These attacks are relatively simple to conduct, even by an unskilled threat actor.
• A Distributed DoS Attack (DDoS) is similar to a DoS attack, but it originates from multiple,
coordinated sources.
IP Vulnerabilities and Threats
Threat actors use Internet Control Message Protocol (ICMP) echo packets (pings) to discover
ICMP attacks subnets and hosts on a protected network, to generate DoS flood attacks, and to alter host routing
tables.
Amplification and Threat actors attempt to prevent legitimate users from accessing information or services using
reflection attacks DoS and DDoS attacks.
Threat actors spoof the source IP address in an IP packet to perform blind spoofing or non-blind
Address spoofing attacks
spoofing.
Threat actors position themselves between a source and destination to transparently monitor,
Man-in-the-middle attack
capture, and control the communication. They could eavesdrop by inspecting captured packets,
(MITM)
or alter packets and forward them to their original destination.
Threat actors gain access to the physical network, and then use an MITM attack to hijack a
Session hijacking
session
ICMP Attacks
• Threat actors use ICMP for reconnaissance and scanning attacks. They can launch information-
gathering attacks to map out a network topology, discover which hosts are active (reachable),
identify the host operating system (OS fingerprinting), and determine the state of a firewall. Threat
actors also use ICMP for DoS attacks.
• Note: ICMP for IPv4 (ICMPv4) and ICMP for IPv6 (ICMPv6) are susceptible to similar types of attacks.
• Networks should have strict ICMP access control list (ACL) filtering on the network edge to avoid
ICMP probing from the internet. In the case of large networks, security devices such as firewalls and
intrusion detection systems (IDS) detect such attacks and generate alerts to the security analysts.
ICMP echo request and echo reply This is used to perform host verification and DoS attacks.
ICMP unreachable This is used to perform network reconnaissance and scanning attacks.
This is used to lure a target host into sending all traffic through a
ICMP redirects
compromised device and create a MITM attack.
ICMP router discovery This is used to inject bogus route entries into the routing table of a target host.
Amplification and Reflection Attacks
Threat actors often use amplification and reflection techniques to create DoS attacks. The example in the
figure illustrates a Smurf attack is used to overwhelm a target host.
Note: Newer forms of amplification and reflection attacks such as DNS-based reflection and amplification attacks and
Network Time Protocol (NTP) amplification attacks are now being used.
Threat actors also use resource exhaustion attacks to either to crash a target host or to consume the resources
of a network.
• IP address spoofing attacks occur when a threat actor creates packets with false source IP address
information to either hide the identity of the sender, or to pose as another legitimate user. Spoofing is
usually incorporated into another attack such as a Smurf attack.
• Spoofing attacks can be non-blind or blind:
▪ Non-blind spoofing - The threat actor can see the traffic that is being sent between the host
and the target. Non-blind spoofing determines the state of a firewall and sequence-number
prediction. It can also hijack an authorized session.
▪ Blind spoofing - The threat actor cannot see the traffic that is being sent between the host and
the target. Blind spoofing is used in DoS attacks.
• MAC address spoofing attacks are used when threat actors have access to the internal network.
Threat actors alter the MAC address of their host to match another known MAC address of a target
host.
TCP and UDP Vulnerabilities
• TCP segment information appears immediately after the IP header. The fields of the TCP segment
and the flags for the Control Bits field are displayed in the figure.
• The following are the six control bits of the TCP segment:
o URG - Urgent pointer field significant
o ACK - Acknowledgment field significant
o PSH - Push function
o RST- Reset the connection
o SYN - Synchronize sequence numbers
o FIN - No more data from sender
TCP Services
TCP provides these services:
• Reliable delivery - TCP incorporates acknowledgments to guarantee delivery. If a timely acknowledgment is
not received, the sender retransmits the data. Requiring acknowledgments of received data can cause
substantial delays. Examples of application layer protocols that make use of TCP reliability include HTTP,
SSL/TLS, FTP, DNS zone transfers, and others.
• Flow control - TCP implements flow control to address this issue. Rather than acknowledge one segment at a
time, multiple segments can be acknowledged with a single acknowledgment segment.
• Stateful communication - TCP stateful communication between two parties occurs during the TCP three-way
handshake.
A TCP connection is established in three steps:
1. The initiating client requests a client-to-server
communication session with the server.
2. The server acknowledges the client-to-server
communication session and requests a server-to-
client communication session.
3. The initiating client acknowledges the server-to-
client communication session.
TCP Attacks
TCP SYN Flood Attack
1. The threat actor sends multiple SYN
requests to a webserver.
2. The web server replies with SYN-
ACKs for each SYN request and
waits to complete the three-way
handshake. The threat actor does not
respond to the SYN-ACKs.
3. A valid user cannot access the web
server because the web server has too
many half-opened TCP connections.
A threat actor could do a TCP reset attack and send a spoofed packet
containing a TCP RST to one or both endpoints.
TCP session hijacking is another TCP vulnerability. Although difficult to conduct, a threat actor takes over
an already-authenticated host as it communicates with the target. The threat actor must spoof the IP address
of one host, predict the next sequence number, and send an ACK to the other host. If successful, the threat
actor could send, but not receive, data from the target device.
UDP Segment Header and Operation
• UDP is commonly used by DNS, TFTP, NFS, and SNMP. It is also used with real-time applications
such as media streaming or VoIP. UDP is a connectionless transport layer protocol. It has much
lower overhead than TCP because it is not connection-oriented and does not offer the sophisticated
retransmission, sequencing, and flow control mechanisms that provide reliability.
• These reliability functions are not provided by the transport layer protocol and must be implemented
elsewhere if required.
• The low overhead of UDP makes it very desirable for protocols that make simple request and reply
transactions.
UDP Attacks
• UDP is not protected by any encryption. You can add encryption to UDP, but it is not available by
default. The lack of encryption means that anyone can see the traffic, change it, and send it on to its
destination.
• UDP Flood Attacks: The threat actor uses a tool like UDP Unicorn or Low Orbit Ion Cannon. These
tools send a flood of UDP packets, often from a spoofed host, to a server on the subnet. The program
will sweep through all the known ports trying to find closed ports. This will cause the server to reply
with an ICMP port unreachable message. Because there are many closed ports on the server, this
creates a lot of traffic on the segment, which uses up most of the bandwidth. The result is very
similar to a DoS attack.
IP Services
ARP Vulnerabilities
• Hosts broadcast an ARP Request to other hosts on the segment to determine the MAC address of a
host with a particular IP address. The host with the matching IP address in the ARP Request sends an
ARP Reply.
• Any client can send an unsolicited ARP Reply called a “gratuitous ARP.” When a host sends a
gratuitous ARP, other hosts on the subnet store the MAC address and IP address contained in the
gratuitous ARP in their ARP tables.
• This feature of ARP also means that any host can claim to be the owner of any IP or MAC. A threat
actor can poison the ARP cache of devices on the local network, creating an MITM attack to redirect
traffic.
ARP Cache Poisoning
The ARP poisoning attack can be passive or active. Passive ARP poisoning is where threat actors steal
confidential information. Active ARP poisoning is where threat actors modify data in transit or inject
malicious data.
DNS Attacks
• The Domain Name Service (DNS) protocol defines an automated service that matches resource
names, such as www.cisco.com, with the required numeric network address, such as the IPv4 or IPv6
address. It includes the format for queries, responses, and data and uses resource records (RR) to
identify the type of DNS response.
• Securing DNS is often overlooked. However, it is crucial to the operation of a network and should be
secured accordingly.
• DNS attacks include the following:
o DNS open resolver attacks
o DNS stealth attacks
o DNS domain shadowing attacks
o DNS tunneling attacks
DNS Open Resolver Attacks: A DNS open resolver answers queries from clients outside of its administrative domain.
DNS open resolvers are vulnerable to multiple malicious activities described in the table.
Threat actors send spoofed, falsified record resource (RR) information to a DNS resolver
to redirect users from legitimate sites to malicious sites. DNS cache poisoning attacks can
DNS cache poisoning attacks
all be used to inform the DNS resolver to use a malicious name server that is providing
RR information for malicious activities.
Threat actors use DoS or DDoS attacks on DNS open resolvers to increase the volume of
DNS amplification and attacks and to hide the true source of an attack. Threat actors send DNS messages to the
reflection attacks open resolvers using the IP address of a target host. These attacks are possible because
the open resolver will respond to queries from anyone asking a question.
A DoS attack that consumes the resources of the DNS open resolvers. This DoS attack
consumes all the available resources to negatively affect the operations of the DNS open
DNS resource utilization attacks
resolver. The impact of this DoS attack may require the DNS open resolver to be
rebooted or services to be stopped and restarted.
DNS Stealth Attacks: To hide their identity, threat actors also use the DNS stealth techniques described in
the table to carry out their attacks.
Threat actors use this technique to hide their phishing and malware delivery sites behind a
quickly-changing network of compromised DNS hosts. The DNS IP addresses are continuously
Fast Flux
changed within minutes. Botnets often employ Fast Flux techniques to effectively hide malicious
servers from being detected.
Threat actors use this technique to rapidly change the hostname to IP address mappings and to
Double IP Flux also change the authoritative name server. This increases the difficulty of identifying the source
of the attack.
Domain Generation Threat actors use this technique in malware to randomly generate domain names that can then be
Algorithms used as rendezvous points to their command and control (C&C) servers.
DNS Domain Shadowing Attacks: Domain shadowing involves the threat actor gathering domain account
credentials in order to silently create multiple sub-domains to be used during the attacks. These subdomains
typically point to malicious servers without alerting the actual owner of the parent domain.
DNS Tunneling
Threat actors who use DNS tunneling place non-DNS traffic within DNS traffic. This method often
circumvents security solutions when a threat actor wishes to communicate with bots inside a protected
network, or exfiltrate data from the organization. This is how DNS tunneling works for CnC commands sent
to a botnet:
1. The command data is split into multiple encoded chunks.
2. Each chunk is placed into a lower level domain name label of the DNS query.
3. Because there is no response from the local or networked DNS for the query, the request is
sent to the ISP’s recursive DNS servers.
4. The recursive DNS service will forward the query to the threat actor’s authoritative name
server.
5. The process is repeated until all the queries containing the chunks of are sent.
6. When the threat actor’s authoritative name server receives the DNS queries from the infected
devices, it sends responses for each DNS query, which contain the encapsulated, encoded
CnC commands.
7. The malware on the compromised host recombines the chunks and executes the commands
hidden within the DNS record.
• To stop DNS tunneling, the network administrator must use a filter that inspects DNS traffic. Pay
close attention to DNS queries that are longer than average, or those that have a suspicious domain
name..
DHCP
• DHCP servers dynamically
provide IP configuration
information to clients.
• In the figure, a client broadcasts a
DHCP discover message. The
DHCP responds with a unicast
offer that includes addressing
information the client can use. The
client broadcasts a DHCP request
to tell the server that the client
accepts the offer. The server
responds with a unicast
acknowledgment accepting the
request.
DHCP Attacks
A DHCP spoofing attack occurs when a rogue DHCP server is connected to the network and provides false
IP configuration parameters to legitimate clients. A rogue server can provide a variety of misleading
information:
Wrong default gateway - Threat actor provides an invalid gateway, or the IP address of its host to create a
MITM attack. This may go entirely undetected as the intruder intercepts the data flow through the network.
Wrong DNS server - Threat actor provides an incorrect DNS server address pointing the user to a malicious
website.
Wrong IP address - Threat actor provides an invalid IP address, invalid default gateway IP address, or
both. The threat actor then creates a DoS attack on the DHCP client.
Assume a threat actor has successfully connected a rogue DHCP server to a switch port on the same subnet
as the target clients. The goal of the rogue server is to provide clients with false IP configuration
information.
1. The client broadcasts a DHCP Discover request looking for a response from a DHCP server. Both servers
receive the message.
2. The legitimate and rogue DHCP servers each respond with valid IP configuration parameters. The client
replies to the first offer received
3. The client received the rogue offer first. It broadcasts a DHCP request accepting the parameters from the
rogue server. The legitimate and rogue server each receive the request.
4. Only the rogue server unicasts a reply to the client to acknowledge its request. The legitimate server stops
communicating with the client because the request has already been acknowledged.
Confidentiality, Availability, and Integrity
Network security consists of protecting information and information systems from unauthorized access, use,
disclosure, disruption, modification, or destruction.
Most organizations follow the CIA information security triad:
• Confidentiality - Only authorized individuals, entities, or processes can access sensitive information. It
may require using cryptographic encryption algorithms such as AES to encrypt and decrypt data.
• Integrity - Refers to protecting data from unauthorized alteration. It requires the use of cryptographic
hashing algorithms such as SHA.
• Availability - Authorized users must have uninterrupted access to important resources and data. It
requires implementing redundant services, gateways, and links.
• To ensure secure communications across both public and private networks, you must secure devices
including routers, switches, servers, and hosts. Most organizations employ a defense-in-depth
approach to security. It requires a combination of networking devices and services working together.
• Several security devices and services are implemented.
o VPN
o ASA Firewall
o IPS
o ESA/WSA
o AAA Server
• All network devices including the router and switches are hardened.
• You must also secure data as it travels across various links.
Firewalls
A firewall is a system, or group of systems, that enforces an access control policy between networks.
IPS
• To defend against fast-moving and evolving attacks, you may need cost-effective detection and
prevention systems integrated into the entry and exit points of the network.
• IDS and IPS technologies share several characteristics. IDS and IPS technologies are both deployed
as sensors. An IDS or IPS sensor can be in the form of several different devices:
o A router configured with Cisco IOS IPS software
o A device specifically designed to provide dedicated IDS or IPS services
o A network module installed in an adaptive security appliance (ASA), switch, or router
o IDS and IPS technologies detect patterns in network traffic using signatures, which is a set of
rules that used to detect malicious activity. IDS and IPS technologies can detect atomic
signature patterns (single-packet) or composite signature patterns (multi-packet).
• The Cisco Email Security Appliance (ESA) is a special device designed to monitor Simple Mail Transfer
Protocol (SMTP). The Cisco ESA is constantly updated by real-time feeds from the Cisco Talos. This threat
intelligence data is pulled by the Cisco ESA every three to five minutes.
• The Cisco Web Security Appliance (WSA) is a mitigation technology for web-based threats. The Cisco WSA
combines advanced malware protection, application visibility and control, acceptable use policy controls, and
reporting.
• Cisco WSA provides complete control over how users access the internet. The WSA can perform blacklisting
of URLs, URL-filtering, malware scanning, URL categorization, web application filtering, and encryption and
decryption of web traffic.
Cryptography
Securing Communications
Organizations must provide support to secure the data as it travels across links. This may include internal
traffic, but it is even more important to protect the data that travels outside of the organization.
These are the four elements of secure communications:
• Data Integrity - Guarantees that the message was not altered. Integrity is ensured by implementing either
Message Digest version 5 (MD5) or Secure Hash Algorithm (SHA) hash-generating algorithms.
• Origin Authentication - Guarantees that the message is not a forgery and does come from whom it states.
Many modern networks ensure authentication with protocols, such as hash message authentication code
(HMAC).
• Data Confidentiality - Guarantees that only authorized users can read the message. Data confidentiality is
implemented using symmetric and asymmetric encryption algorithms.
• Data Non-Repudiation - Guarantees that the sender cannot repudiate, or refute, the validity of a message
sent. Nonrepudiation relies on the fact that only the sender has the unique characteristics or signature for how
that message is treated.
Cryptography can be used almost anywhere that there is data communication. In fact, the trend is toward all
communication being encrypted.
Data Integrity
Hash functions are used to ensure the integrity of a message. They guarantee that message data has not
changed accidentally or intentionally.
In the figure, the sender is sending a $100 money transfer to Alex. The sender wants to ensure that the
message is not altered on its way to the receiver.
1. The sending device inputs the message into a hashing algorithm and computes its fixed-length hash of
4ehiDx67NMop9.
2. This hash is then attached to the message and sent to the receiver. Both the message and the hash are
in plaintext.
3. The receiving device removes the hash from the message and inputs the message into the same
hashing algorithm. If the computed hash is equal to the one that is attached to the message, the
message has not been altered during transit. If the hashes are not equal, then the integrity of the
message can no longer be trusted.
Hash Functions
• There are three well-known hash functions.
o MD5 with 128-bit Digest: MD5 is a one-way function that produces a 128-bit hashed message. MD5
is a legacy algorithm that should only be used when no better alternatives are available. Use SHA-2
instead.
o SHA Hashing Algorithm: SHA-1 is very similar to the MD5 hash functions. SHA-1 creates a 160-
bit hashed message and is slightly slower than MD5. SHA-1 has known flaws and is a legacy
algorithm. Use SHA-2 when possible.
o SHA-2: This includes SHA-224 (224 bit), SHA-256 (256 bit), SHA-384 (384 bit), and SHA-512 (512
bit). SHA-256, SHA-384, and SHA-512 are next-generation algorithms and should be used whenever
possible.
• While hashing can be used to detect accidental changes, it cannot be used to guard against deliberate
changes. This means that anyone can compute a hash for any data, if they have the correct hash
function.
• Therefore, hashing is vulnerable to man-in-the-middle attacks and does not provide security to
transmitted data.
Origin Authentication
Data Confidentiality
There are two classes of encryption used to provide data confidentiality. These two classes differ in how
they use keys.
Symmetric encryption algorithms such as (DES), 3DES, and Advanced Encryption Standard (AES) are
based on the premise that each communicating party knows the pre-shared key. Data confidentiality can also
be ensured using asymmetric
algorithms, including Rivest,
Shamir, and Adleman (RSA)
and the public key infrastructure
(PKI).
Symmetric Encryption
• Symmetric algorithms use the same pre-shared key, also called a secret key, to encrypt and decrypt
data. A pre-shared key is known by the sender and receiver before any encrypted communications
can take place.
• Symmetric encryption algorithms are commonly used with VPN traffic because they use less CPU
resources than asymmetric encryption algorithms.
• When using symmetric encryption
algorithms, the longer the key, the
longer it will take for someone to
discover the key. To ensure that the
encryption is safe, use a minimum key
length of 128 bits.
Symmetric Encryption
Description
Algorithms
3DES This is a newer version of DES, but it repeats the DES algorithm process three times.
(Triple DES) It is considered very trustworthy when implemented using very short key lifetimes.
Software-Optimized Encryption SEAL is a faster alternative symmetric encryption algorithm to DES, 3DES, and
Algorithm AES. It uses a 160-bit encryption key and has a lower impact on the CPU compared
(SEAL) to other software-based algorithms.
This algorithm was developed by Ron Rivest. Several variations have been
Rivest ciphers
developed, but RC4 is the most prevalent in use. RC4 is a stream cipher and is used
(RC) series algorithms
to secure web traffic in SSL and TLS.
Asymmetric Encryption
• Asymmetric algorithms, also called public-key algorithms, are designed so that the key that is used
for encryption is different from the key that is used for decryption.
• Asymmetric algorithms use a public key and a private key. The complementary paired key is
required for decryption. Data encrypted with the public key requires the private key to decrypt.
Asymmetric algorithms achieve confidentiality, authentication, and integrity by using this process.
• Because neither party has a shared secret, very long key lengths must be used. Asymmetric
encryption can use key lengths between 512 to 4,096 bits. Key lengths greater than or equal to 1,024
bits can be trusted while shorter key lengths are considered unreliable.
• Examples of protocols that use asymmetric key algorithms include:
o Internet Key Exchange (IKE) - This is a fundamental component of IPsec VPNs.
o Secure Socket Layer (SSL) - This is now implemented as IETF standard Transport Layer
Security (TLS).
o Secure Shell (SSH) - This protocol provides a secure remote access connection to network
devices.
o Pretty Good Privacy (PGP) - This computer program provides cryptographic privacy and
authentication. It is often used to increase the security of email communications.
• Asymmetric algorithms are substantially slower than symmetric algorithms. Their design is based on
computational problems, such as factoring extremely large numbers or computing discrete
logarithms of extremely large numbers.
• Because they are slow, asymmetric algorithms are typically used in low-volume cryptographic
mechanisms, such as digital signatures and key exchange.
Asymmetric Encryption
Key Length Description
Algorithm
What is an ACL?
An ACL is a series of IOS commands that are used to filter packets based on information found in the packet
header. By default, a router does not have any ACLs configured. When an ACL is applied to an interface,
the router performs the additional task of evaluating all network packets as they pass through the interface to
determine if the packet can be forwarded.
• An ACL uses a sequential list of permit or deny statements, known as access control entries (ACEs).
Note: ACEs are also commonly called ACL statements.
• When network traffic passes through an interface configured with an ACL, the router compares the
information within the packet against each ACE, in sequential order, to determine if the packet
matches one of the ACEs. This process is called packet filtering.
Several tasks performed by routers require the use of ACLs to identify traffic:
• Limit network traffic to increase network performance
• Provide traffic flow control
• Provide a basic level of security for network access
• Filter traffic based on traffic type
• Screen hosts to permit or deny access to network services
• Provide priority to certain classes of network traffic
Packet Filtering
• Packet filtering controls access to a network by analyzing the incoming and/or outgoing packets and
forwarding them or discarding them based on given criteria.
• Packet filtering can occur at Layer 3 or Layer 4.
• Cisco routers support two types of ACLs:
o Standard ACLs - ACLs only filter at Layer
3 using the source IPv4 address only.
o Extended ACLs - ACLs filter at Layer 3
using the source and / or destination IPv4
address. They can also filter at Layer 4
using TCP, UDP ports, and optional
protocol type information for finer control.
ACL Operation
• ACLs define the set of rules that give added control for packets that enter inbound interfaces, packets
that relay through the router, and packets that exit outbound interfaces of the router.
• ACLs can be configured to apply to inbound traffic and outbound traffic.
Note: ACLs do not act on packets that originate from the router itself.
• An inbound ACL filters packets before they are routed to the outbound interface. An inbound ACL is
efficient because it saves the overhead of routing lookups if the packet is discarded.
• An outbound ACL filters packets after being routed, regardless of the inbound interface.
When an ACL is applied to an interface, it follows a specific operating procedure. Here are the operational
steps used when traffic has entered a router interface with an inbound standard IPv4 ACL configured:
1. The router extracts the source IPv4 address from the packet header.
2. The router starts at the top of the ACL and compares the source IPv4 address to each ACE in a
sequential order.
3. When a match is made, the router carries out the instruction, either permitting or denying the packet,
and the remaining ACEs in the ACL, if any, are not analyzed.
4. If the source IPv4 address does not match any ACEs in the ACL, the packet is discarded because there
is an implicit deny ACE automatically applied to all ACLs.
The last ACE statement of an ACL is always an implicit deny that blocks all traffic. It is hidden and not displayed in
the configuration.
Note: An ACL must have at least one permit statement otherwise all traffic will be denied due to the implicit deny
ACE statement.
A wildcard mask is similar to a subnet mask in that it uses the ANDing process to identify which bits in an
IPv4 address to match. Unlike a subnet mask, in which binary 1 is equal to a match and binary 0 is not a
match, in a wildcard mask, the reverse is true.
• An IPv4 ACE uses a 32-bit wildcard mask to determine which bits of the address to examine for a
match.
• Wildcard masks use the following rules to match binary 1s and 0s:
o Wildcard mask bit 0 - Match the corresponding bit value in the address
o Wildcard mask bit 1 - Ignore the corresponding bit value in the address
Wildcard Mask Last Octet (in Binary) Meaning (0 - match, 1 - ignore)
Decimal Binary
Decimal Binary
Decimal Binary
192.168.16.0/24 11000000.10101000.00010000.00000000
Permitted IPv4 Address to
192.168.31.0/24 11000000.10101000.00011111.00000000
There is a limit on the number of ACLs that can be applied on a router interface. For example, a dual-
stacked (i.e, IPv4 and IPv6) router interface can have up to four ACLs applied, as shown in the figure.
Specifically, a router interface can have:
• One outbound IPv4 ACL.
• One inbound IPv4 ACL.
• One inbound IPv6 ACL.
• One outbound IPv6 ACL.
Using ACLs requires attention to detail and great care. Mistakes can be costly in terms of downtime,
troubleshooting efforts, and poor network service. Basic planning is required before configuring an ACL.
Guideline Benefit
Use a text editor to create, edit, and save all of your ACLs. This will help you create a library of reusable ACLs.
Numbered ACLs
• ACLs numbered 1-99, or 1300-1999 are standard ACLs, while ACLs numbered 100-199, or 2000-
2699 are extended ACLs.
R1(config)# access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
<1100-1199> Extended 48-bit MAC address access list
<1300-1999> IP standard access list (expanded range)
<200-299> Protocol type-code access list
<2000-2699> IP extended access list (expanded range)
<700-799> 48-bit MAC address access list
rate-limit Simple rate-limit specific access list
template Enable IP template acls
Router(config)# access-list
Named ACLs
• Named ACLs are the preferred method to use when configuring ACLs. Specifically, standard and
extended ACLs can be named to provide information about the purpose of the ACL. For example,
naming an extended ACL FTP-FILTER is far better than having a numbered ACL 100.
• The ip access-list global configuration command is used to create a named ACL, as shown in the
following example.
R1(config)# ip access-list extended FTP-FILTER
R1(config-ext-nacl)# permit tcp 192.168.10.0 0.0.0.255 any eq ftp
R1(config-ext-nacl)# permit tcp 192.168.10.0 0.0.0.255 any eq ftp-data
R1(config-ext-nacl)#
Parameter Description
log (Optional) Generates and sends an informational message when the ACE is matched
Note: Use the no access-list access-list-number global configuration command to remove a numbered standard ACL.
• Use the show running-config command to review the ACL in the configuration.
• Use the show ip interface command to verify the ACL is applied to the interface.
Named Standard ACL Example
The example ACL permits traffic from host 192.168.10.10 and all hosts on the 192.168.20.0/24 network out
interface serial 0/1/0 on router R1.
• Use the show access-list command to review the ACL in the configuration.
• Use the show ip interface command to verify the ACL is applied to the interface.
After an ACL is configured, it may need to be modified. ACLs with multiple ACEs can be complex to
configure. Sometimes the configured ACE does not yield the expected behaviors.
There are two methods to use when modifying an ACL:
• Use a text editor.
• Use sequence numbers.
Text Editor Method
ACLs with multiple ACEs should be created in a text editor. This allows you to plan the required ACEs,
create the ACL, and then paste it into the router interface. It also simplifies the tasks to edit and fix an ACL.
To correct an error in an ACL:
• Copy the ACL from the running
configuration and paste it into the text editor.
• Make the necessary edits or changes.
• Remove the previously configured ACL on
the router.
• Copy and paste the edited ACL back to the
router.
A standard ACL can secure remote administrative access to a device using the vty lines by implementing the
following two steps:
• Create an ACL to identify which administrative hosts should be allowed remote access.
• Apply the ACL to incoming traffic on the vty lines.
Extended ACLs
Extended ACLs provide a greater degree of control. They can filter on source address, destination address,
protocol (i.e., IP, TCP, UDP, ICMP), and port number.
Extended ACLs can be created as:
• Numbered Extended ACL - Created using the access-list access-list-number global configuration command.
• Named Extended ACL - Created using the ip access-list extended access-list-name.
Protocol Options
Selecting a protocol influences port options. Many TCP port options are available, as shown in the output.
Extended ACLs can filter on different port number and port name options.
This example configures an extended ACL 100 to filter HTTP traffic. The first ACE uses the www port
name. The second ACE uses the port number 80. Both ACEs achieve exactly the same result.
Configuring the port number is required when there is not a specific protocol name listed such as SSH (port
number 22) or an HTTPS (port number 443), as shown in the next example.
Apply a Numbered Extended IPv4 ACL
In this example, the ACL permits both HTTP and HTTPS traffic from the 192.168.10.0 network to go to any
destination.
Extended ACLs can be applied in various locations. However, they are commonly applied close to the
source. Here ACL 110 is applied inbound on the R1 G0/0/0 interface.
Note: A match occurs if the returning TCP segment has the ACK or reset (RST) flag bits set, indicating that the packet
belongs to an existing connection.
NAT
• Private IPv4 addresses cannot be routed over the A 10.0.0.0 – 10.255.255.255 10.0.0.0/8
internet and are used within an organization or B 172.16.0.0 – 172.31.255.255 172.16.0.0/12
site to allow devices to communicate locally.
C 192.168.0.0 – 192.168.255.255 192.168.0.0/16
• To allow a device with a private IPv4 address
to access devices and resources outside of the
local network, the private address must first
be translated to a public address.
• NAT provides the translation of private
addresses to public addresses.
What is NAT
• The primary use of NAT is to conserve public IPv4 addresses.
• NAT allows networks to use private IPv4
addresses internally and translates them to a
public address when needed.
• A NAT router typically operates at the border
of a stub network.
• When a device inside the stub network wants
to communicate with a device outside of its
network, the packet is forwarded to the border
router which performs the NAT process,
translating the internal private address of the
device to a public, outside, routable address.
How NAT Works
PC1 wants to communicate with an outside web server with public address 209.165.201.1.
1. PC1 sends a packet addressed to the web server.
2. R2 receives the packet and reads the source IPv4 address to determine if it needs translation.
3. R2 adds mapping of the local to global address to the NAT table.
4. R2 sends the packet with the translated source address toward the destination.
5. The web server responds with a packet addressed to the inside global address of PC1 (209.165.200.226).
6. R2 receives the packet with destination address 209.165.200.226. R2 checks the NAT table and finds an entry
for this mapping. R2 uses this information and translates the inside global address (209.165.200.226) to the
inside local address (192.168.10.10), and the packet is forwarded toward PC1.
NAT Terminology
Types of NAT
Static NAT
Some packets do not contain a Layer 4 port number, such as ICMPv4 messages. Each of these types of
protocols is handled differently by PAT.
For example, ICMPv4 query messages, echo requests, and echo replies include a Query ID. ICMPv4 uses
the Query ID to identify an echo request with its corresponding echo reply.
Note: Other ICMPv4 messages do not use the Query ID. These messages and other protocols that do not use TCP or
UDP port numbers vary and are beyond the scope of this curriculum.
Advantages of NAT
• NAT conserves the legally registered addressing scheme by allowing the privatization of intranets.
• NAT conserves addresses through application port-level multiplexing.
• NAT increases the flexibility of connections to the public network.
• NAT provides consistency for internal network addressing schemes.
• NAT allows the existing private IPv4 address scheme to remain while allowing for easy change to a
new public addressing scheme.
• NAT hides the IPv4 addresses of users and other devices.
Disadvantages of NAT
• NAT increases forwarding delays.
• End-to-end addressing is lost.
• End-to-end IPv4 traceability is lost.
• NAT complicates the use of tunneling protocols, such as IPsec.
• Services that require the initiation of TCP connections from the outside network, or stateless
protocols, such as those using UDP, can be disrupted.
Static NAT
To configure PAT to use a single IPv4 address, add the keyword overload to the ip nat inside source
command.
In the example, all hosts from network 192.168.0.0/16 (matching ACL 1) that send traffic through router R2 to the
internet will be translated to IPv4 address 209.165.200.225 (IPv4 address of interface S0/1/1). The traffic flows will be
identified by port numbers in the NAT table because the overload keyword is configured.
An ISP may allocate more than one public IPv4 address to an organization. In this scenario the organization
can configure PAT to use a pool of IPv4 public addresses for translation.
To configure PAT for a dynamic NAT address pool, simply add the keyword overload to the ip nat inside
source command.
In the example, NAT-POOL2 is bound to an ACL to permit 192.168.0.0/16 to be translated. These hosts can share an
IPv4 address from the pool because PAT is enabled with the keyword overload.
IPv6 was developed with the intention of making NAT for IPv4 with translation between public and private
IPv4 addresses unnecessary.
• However, IPv6 does include its own IPv6 private address space, unique local addresses (ULAs).
• IPv6 unique local addresses (ULA) are similar to RFC 1918 private addresses in IPv4 but have a different
purpose.
• ULA addresses are meant for only local communications within a site. ULA addresses are not meant to
provide additional IPv6 address space, nor to provide a level of security.
• IPv6 does provide for protocol translation between IPv4 and IPv6 known as NAT64.
NAT64
LANs provide networking services within a small WANs provide networking services over large
geographic area. geographical areas.
LANs are used to interconnect local computers, WANs are used to interconnect remote users, networks,
peripherals, and other devices. and sites.
A LAN is owned and managed by an organization or WANs are owned and managed by internet service,
home user. telephone, cable, and satellite providers.
Other than the network infrastructure costs, there is no fee WAN services are provided for a fee.
to use a LAN.
LANs provide high bandwidth speeds using wired WANs providers offer low to high bandwidth speeds,
Ethernet and Wi-Fi services. over long distances.
A public WAN connection is typically provided by an ISP or telecommunications service provider using the internet.
In this case, the service levels and bandwidth may vary, and the shared connections do not guarantee security.
WAN Topologies
WANs are implemented using the following logical topology designs:
• Point-to-Point Topology
• Hub-and-Spoke Topology
• Dual-homed Topology
• Fully Meshed Topology
• Partially Meshed Topology
Note: Large networks usually deploy a combination of these topologies.
Point-to-Point Topology
• Employs a point-to-point circuit between two endpoints.
• Involves a Layer 2 transport service through the service
provider network.
• The point-to-point connection is transparent to the customer
network.
Note: It can become expensive if many point-to-point connections are required.
Hub-and-Spoke Topology
• Enables a single interface on the hub router to be shared by all
spoke circuits.
• Spoke routers can be interconnected through the hub router
using virtual circuits and routed subinterfaces.
• Spoke routers can only communicate with each other through
the hub router.
Note: The hub router represents a single point of failure. If it fails, inter-spoke communication also fails.
Dual-homed Topology
• Offers enhanced network redundancy, load balancing, distributed computing and processing, and the ability to
implement backup service provider connections.
• More expensive to implement than single-homed topologies.
This is because they require additional networking
hardware, such as additional routers and switches.
• More difficult to implement because they require additional,
and more complex, configurations.
Fully Meshed Topology
Carrier Connections
Another aspect of WAN design is how an organization connects to the internet. An organization usually
signs a service level agreement (SLA) with a service provider. The SLA outlines the expected services
relating to the reliability and availability of the connection.
The service provider may or may not be the actual carrier. A carrier
owns and maintains the physical connection and equipment between the
provider and the customer. Typically, an organization will choose either
a single-carrier or dual-carrier WAN connection.
A single-carrier connection is when an organization connects to only
one service provider. An SLA is negotiated between the organization
and the service provider.
A dual-carrier connection provides redundancy and increases network
availability. The organization negotiates separate SLAs with two
different service providers.
Evolving Networks
Network requirements of a company can change dramatically as the company grows over time.
• A network must meet the day-to-day operational needs of business, and it must be able to adapt and grow as a
company changes.
• Network designers and administrators meet these challenges by carefully choosing network technologies,
protocols, and service providers.
• Networks can be optimized by using a variety of network design techniques and architectures.
To illustrate differences between network size, we will use a fictitious company called SPAN Engineering as
it grows from a small, local, business into a global enterprise.
Small Network
SPAN, a small fictitious company, started with a few employees
in a small office.
• Uses a single LAN connected to a wireless router for sharing
data and peripherals.
• Connection to the internet is through a common broadband
service called Digital Subscriber Line (DSL)
• IT support is contracted from the DSL provider.
Campus Network
Within a few years SPAN grew and required several floors of
a building.
The company now required a Campus Area Network (CAN).
• A firewall secures internet access to corporate users.
• In-house IT staff to support and maintain the network.
Branch Network
Distributed Network
• SPAN Engineering has now been in business for 20
years and has grown to thousands of employees
distributed in offices worldwide.
• Site-to-site and remote access Virtual Private
Networks (VPNs) enable the company to use the
internet to connect easily and securely with employees
and facilities around the world.
WAN Standards
Modern WAN standards are defined and managed by a number of recognized authorities including the
following:
• TIA/EIA - Telecommunications Industry Association and Electronic Industries Alliance
• ISO - International Organization for Standardization
• IEEE - Institute of Electrical and Electronics Engineers
Most WAN standards focus on the physical layer and the data link layer.
Layer 1 Protocols
• Synchronous Digital Hierarchy (SDH)
• Synchronous Optical Networking (SONET)
• Dense Wavelength Division Multiplexing (DWDM)
Layer 2 Protocols
• Broadband (i.e., DSL and Cable)
• Wireless
• Ethernet WAN (Metro Ethernet)
• Multiprotocol Label Switching
(MPLS)
• Point-to-Point Protocol (PPP) (less
used)
• High-Level Data Link Control
(HDLC) (less used)
• Frame Relay (legacy)
• Asynchronous Transfer Mode (ATM)
(legacy)
Common WAN Terminology
There are specific terms used to describe WAN connections between the subscriber (i.e., the company /
client) and the WAN service provider.
Data Terminal Equipment Connects the subscriber LANs to the WAN communication
(DTE) device
Customer Premises Equipment This is the DTE and DCE devices located on the enterprise
(CPE) edge
Point-of-Presence (POP) The point where the subscriber connects to the service
provider network
Local Loop (last mile) The copper or fiber cable that connects the CPE to the CO of the service provider
Central office (CO) The local service provider facility or building that connects the CPE to the provider network
Toll network Includes backhaul, long-haul, all-digital, fiber-optic communications lines, switches, routers,
and other equipment inside the WAN provider network
Backhaul network Connects multiple access nodes of the service provider network
Backbone network Large, high-capacity networks used to interconnect service provider networks and to create a
redundant network.
WAN Devices
DSL Modem / Collectively known as broadband modems, these high-speed digital modems
Cable Modem connect to the DTE router using Ethernet.
CSU/DSU Digital-leased lines require a CSU and a DSU. It connects a digital device to a
digital line.
Optical Connect fiber-optic media to copper media and convert optical signals to electronic
Converter pulses.
WAN Core WAN backbone consists of multiple high-speed routers and Layer 3 switches.
devices
Serial Communication
• Almost all network communications occur using a serial
communication delivery. Serial communication transmits bits
sequentially over a single channel.
• In contrast, parallel communications simultaneously transmit
several bits using multiple wires.
• As the cable length increases, the synchronization timing
between multiple channels becomes more sensitive to
distance. For this reason, parallel communication is limited to
very short distances
Circuit-Switched Communication
A circuit-switched network establishes a dedicated circuit (or channel) between endpoints before the users
can communicate.
• Establishes a dedicated virtual connection through the
service provider network before communication can start.
• All communication uses the same path.
• The two most common types of circuit-switched WAN
technologies are the public switched telephone network
(PSTN) and the legacy Integrated Services Digital Network
(ISDN).
Packet-Switched Communication
Network communication is most commonly implemented
using packet-switched communication.
• Segments traffic data into packets that are routed over
a shared network.
• Much less expensive and more flexible than circuit
switching.
• Common types of packet-switched WAN technologies
are:
• Ethernet WAN (Metro Ethernet),
• Multiprotocol Label Switching (MPLS)
• Frame Relay
• Asynchronous Transfer Mode (ATM).
Service provider networks use fiber-optic infrastructures to transport user data between destinations. Fiber-
optic cable is far superior to copper cable for long distance transmissions due to its much lower attenuation
and interference.
There are two optical fiber OSI layer 1 standards available to service providers:
• SDH - Synchronous Digital Hierarchy (SDH) is a global standard for transporting data over fiber-optic cable.
• SONET - Synchronous Optical Networking (SONET) is the North American standard that provides the same
services as SDH.
SDH/SONET define how to transfer multiple data, voice, and video communications over optical fiber
using lasers or light-emitting diodes (LEDs) over great distances.
Dense Wavelength Division Multiplexing (DWDM) is a newer technology that increases the data-carrying
capacity of SDH and SONET by simultaneously sending multiple streams of data (multiplexing) using
different wavelengths of light.
Traditional WAN Connectivity Options
Point-to-point lines could be leased from a service provider and were called “leased lines”. The term refers
to the fact that the organization pays a monthly lease fee to a service provider to use the line.
• Leased lines are available in different fixed capacities and are generally priced based on the bandwidth
required and the distance between the two connected points.
• There are two systems used to define the digital capacity of a copper media serial link:
▪ T-carrier - Used in North America, T-carrier provides T1 links supporting bandwidth up to
1.544 Mbps and T3 links supporting bandwidth up to 43.7 Mbps.
▪ E-carrier – Used in Europe, E-carrier provides E1 links supporting bandwidth up to 2.048
Mbps and E3 links supporting bandwidth up to 34.368 Mbps.
Circuit-switched connections are provided by Public Service Telephone Network (PSTN) carriers. The local
loop connecting the CPE to the CO is copper media.
There are two traditional circuit-switched options:
Public Service Telephone Network (PSTN)
• Dialup WAN access uses the PSTN as its WAN connection. Traditional local loops can transport binary
computer data through the voice telephone network using a voiceband modem.
• The physical characteristics of the local loop and its connection to the PSTN limit the rate of the signal to less
than 56 kbps.
Packet-Switch Options
Packet switching segments data into packets that are routed over a shared network. It allows many pairs of
nodes to communicate over the same channel.
There are two traditional (legacy) circuit-switched options:
Frame Relay
• Frame Relay is a simple Layer 2 non-broadcast multi-access (NBMA) WAN technology that is used to
interconnect enterprise LANs.
• Frame Relay creates PVCs which are uniquely identified by a data-link connection identifier (DLCI).
The figure displays the local loop connections most likely encountered today.
Dedicated broadband
• Fiber can be installed independently by
an organization to connect remote
locations directly together.
• Dark fiber can be leased or purchased
from a supplier.
Packet-switched
• Metro Ethernet – Replacing many traditional WAN options.
• MPLS – Enables sites to connect to the provider regardless of its access technologies.
Internet-based broadband
• Organizations are now commonly using the global internet infrastructure for WAN connectivity.
Ethernet WAN
Service providers now offer Ethernet WAN service using fiber-optic cabling.
The Ethernet WAN service can go by many names,
including the following:
• Metropolitan Ethernet (Metro E)
• Ethernet over MPLS (EoMPLS)
• Virtual Private LAN Service (VPLS)
There are several benefits to an Ethernet WAN:
• Reduced expenses and administration
• Easy integration with existing networks
• Enhanced business productivity
MPLS
Multiprotocol Label Switching (MPLS) is a high-performance service provider WAN routing technology
to interconnect clients without regard to access method or payload.
• MPLS supports a variety of client access methods (e.g., Ethernet, DSL, Cable, Frame Relay).
• MPLS can encapsulate all types of protocols including IPv4 and IPv6 traffic.
• An MPLS router can be a customer edge (CE) router, a provider edge (PE) router, or an internal provider (P)
router.
• MPLS routers are label switched routers (LSRs). They attach labels to packets that are then used by other
MPLS routers to forward traffic.
MPLS also provides services for QoS support, traffic engineering, redundancy, and VPNs
Internet-Based Connectivity
Internet-based broadband connectivity is an alternative to using dedicated WAN options, can be divided into
wired and wireless options.
Wired Options
• Wired options use permanent cabling (e.g., copper or
fiber) to provide consistent bandwidth, and reduce error
rates and latency. Examples: DSL, cable connections,
and optical fiber networks.
Wireless Options
• Wireless options are less expensive to implement
compared to other WAN connectivity options because
they use radio waves instead of wired media to transmit
data. Examples: cellular 3G/4G/5G or satellite internet
services.
• Wireless signals can be negatively affected by factors such as distance from radio towers, interference from
other sources and weather.
DSL Technology
Digital Subscriber Line (DSL) is a high-speed, always-on, connection technology that uses existing twisted-
pair telephone lines to provide IP services to users.
DSL are categorized as either Asymmetric DSL
(ADSL) or Symmetric DSL (SDSL).
• ADSL and ADSL2+ provide higher downstream
bandwidth to the user than upload bandwidth.
• SDSL provides the same capacity in both directions.
DSL transfer rates are dependent on the actual length of the
local loop, and the type and condition of the cabling.
DSL Connections
Service providers deploy DSL connections in the local loop. The connection is set up between the DSL
modem and the DSL access multiplexer (DSLAM).
• The DSL modem converts the Ethernet signals from the teleworker device to a DSL signal, which is
transmitted to a DSL access multiplexer (DSLAM) at the provider location.
• A DSLAM is located at the Central Office (CO) of the provider and concentrates connections from multiple
DSL subscribers.
• DSL is not a shared medium. Each user has a separate direct connection to the DSLAM. Adding users does
not impede performance.
ISPs use PPP as the Layer 2 protocol for broadband DSL connections.
• PPP can be used to authenticate the subscriber.
• PPP can assign a public IPv4 address to the subscriber.
• PPP provides link-quality management features.
There are two ways PPP over Ethernet (PPPoE) can be deployed:
• Host with PPoE Client - The PPPoE client software communicates with the DSL modem using PPPoE and
the modem communicates with the ISP using PPP.
• Router PPPoE Client - The router is the PPPoE client and obtains its configuration from the provider.
Cable Technology
Cable technology is a high-speed always-on connection technology that uses a coaxial cable from the cable
company to provide IP services to users.
The Data over Cable Service Interface Specification (DOCSIS) is the international standard for adding high-
bandwidth data to an existing cable system.
• The optical node converts RF signals to light pulses over fiber-optic cable.
• The fiber media enables the signals to travel over long distances to the provider headend where a Cable
Modem Termination System (CMTS) is located.
• The headend contains the databases needed to provide internet access while the CMTS is responsible for
communicating with the cable modems.
Note: All the local subscribers share the
same cable bandwidth. As more users
join the service, available bandwidth
may drop below the expected rate.
Optical Fiber
Many municipalities, cities, and providers install fiber-optic cable to the user location. This is commonly
referred to as Fiber to the x (FTTx) and includes the following:
• Fiber to the Home (FTTH) - Fiber reaches the boundary of the residence.
• Fiber to the Building (FTTB) - Fiber reaches the boundary of the building with the final connection to the
individual living space being made via alternative means.
• Fiber to the Node/Neighborhood (FTTN) – Optical cabling reaches an optical node that converts optical
signals to a format acceptable for twisted pair or coaxial cable to the premise.
Note: FTTx can deliver the highest bandwidth of all broadband options.
VPN Technology
VPNs can be used to address security concerns incurred when a remote office worker uses broadband
services to access the corporate WAN over the internet.
A VPN is an encrypted connection between private networks over a public network. VPN tunnels are routed
through the internet from the private network of the company to the remote site or employee host.
There are several benefits to using VPN:
• Cost savings - Eliminates expensive, dedicated WAN links and modem banks.
• Security - Advanced encryption and authentication protocols protect data from unauthorized access.
• Scalability - Corporations can add large amounts of capacity without adding significant infrastructure.
• Compatibility with broadband technology - Supported by broadband service providers such as DSL and
cable.
Each broadband solution has advantages and disadvantages. If there are multiple broadband solutions
available, a cost-versus-benefit analysis should be performed to determine the best solution.
Some factors to consider include the following:
• Cable - Bandwidth is shared by many users. Therefore, upstream data rates are often slow during high-usage
hours in areas with over-subscription.
• DSL - Limited bandwidth that is distance sensitive (in relation to the ISP central office). Upload rate is
proportionally lower compared to download rate.
• Fiber-to-the-Home - This option requires fiber installation directly to the home.
• Cellular/Mobile - With this option, coverage is often an issue, even within a small office or home office
where bandwidth is relatively limited.
• Municipal Wi-Fi - Most municipalities do not have a mesh Wi-Fi network deployed. If is available and in
range, then it is a viable option.
• Satellite - This option is expensive and provides limited capacity per subscriber. Typically used when no
other option is available.
VPN Technology
Benefit Description
Cost Savings Organizations can use VPNs to reduce their connectivity costs while simultaneously increasing remote
connection bandwidth.
Security Encryption and authentication protocols protect data from unauthorized access.
Scalability VPNs allow organizations to use the internet, making it easy to add new users without adding
significant infrastructure.
Compatibility VPNs can be implemented across a wide variety of WAN link options including broadband
technologies. Remote workers can use these high-speed connections to gain secure access to corporate
networks.
A remote-access VPN is dynamically created to establish a secure connection between a client and a VPN
terminating device.
Enterprise and Service Provider VPNs
VPNs can be managed and deployed as:
• Enterprise VPNs - common solution for securing enterprise traffic across the internet. Site-to-site and remote
access VPNs are created and
managed by the enterprise using
IPsec and SSL VPNs.
• Service Provider VPNs - created
and managed by the provider
network. The provider uses
Multiprotocol Label Switching
(MPLS) at Layer 2 or Layer 3 to
create secure channels between an
enterprise’s sites, effectively
segregating the traffic from other
customer traffic.
Types of VPNs
Remote-Access VPNs
• Remote-access VPNs let remote and mobile users securely connect to the enterprise.
• Remote-access VPNs are typically enabled dynamically by the user when required and can be
created using either IPsec or SSL.
o Clientless VPN connection -The
connection is secured using a web
browser SSL connection.
o Client-based VPN connection -
VPN client software such as Cisco
AnyConnect Secure Mobility Client
must be installed on the remote
user’s end device.
SSL VPNs
SSL uses the public key infrastructure and digital certificates to authenticate peers. The type of VPN method
implemented is based on the access requirements of the users and the organization’s IT processes. The table
compares IPsec and SSL remote access deployments.
Applications supported Extensive – All IP-based applications Limited – Only web-based applications and file
sharing
Encryption strength Strong – Key lengths 56 – 256 bits Moderate to strong - Key lengths 40 – 256 bits
Connection complexity Medium – Requires VPN client Low – Requires web browser on a host
installed on a host
Connection option Limited – Only specific devices with Extensive – Any device with a web browser
specific configurations can connect can connect
For example, Branch and HQ need to exchange OSPF routing information over an IPsec VPN. GRE over IPsec is
used to support the routing protocol traffic over the IPsec VPN. Specifically, the OSPF packets (i.e., passenger
protocol) would be encapsulated by GRE (i.e., carrier protocol) and subsequently encapsulated in an IPsec VPN
tunnel.
Site-to-site IPsec VPNs and GRE over IPsec are not sufficient when the enterprise adds many more sites.
Dynamic Multipoint VPN (DMVPN) is a Cisco software solution for building multiple VPNs in an easy,
dynamic, and scalable manner.
• DMVPN simplifies the VPN tunnel configuration and provides a flexible option to connect a central
site with branch sites.
• It uses a hub-and-spoke configuration to establish a full mesh topology.
• Spoke sites establish secure VPN tunnels with the hub site.
• Each site is configure using Multipoint Generic Routing Encapsulation (mGRE). The mGRE tunnel
interface allows a single GRE interface to dynamically support multiple IPsec tunnels.
• Spoke sites can also obtain information about each other, and alternatively build direct tunnels
between themselves (spoke-to-spoke tunnels).
IPsec Virtual Tunnel Interface
IPsec Virtual Tunnel Interface (VTI) simplifies the configuration process required to support multiple sites
and remote access.
• IPsec VTI configurations are applied to a virtual interface instead of static mapping the IPsec sessions to a
physical interface.
• IPsec VTI is capable of sending and receiving both IP unicast and multicast encrypted traffic. Therefore,
routing protocols are automatically
supported without having to
configure GRE tunnels.
• IPsec VTI can be configured
between sites or in a hub-and-spoke
topology.
Today, service providers use MPLS in their core network. Traffic is forwarded through the MPLS backbone
using labels. Traffic is secure because service provider customers cannot see each other’s traffic.
• MPLS can provide clients with managed VPN solutions; therefore, securing traffic between client
sites is the responsibility of the service provider.
• There are two types of MPLS VPN solutions supported by service providers:
o Layer 3 MPLS VPN - The service provider participates in customer routing by establishing a peering
between the customer’s routers and the provider’s routers.
o Layer 2 MPLS VPN - The service provider is not involved in the customer routing. Instead, the
provider deploys a Virtual Private LAN Service (VPLS) to emulate an Ethernet multiaccess LAN
segment over the MPLS network. No routing is involved. The customer’s routers effectively belong to
the same multiaccess network.
IPsec
IPsec Technologies
IPsec is an IETF standard that defines how a VPN can be secured across IP networks. IPsec protects and
authenticates IP packets between source and destination and provides these essential security functions:
• Confidentiality - Uses encryption algorithms to prevent cybercriminals from reading the packet
contents.
• Integrity - Uses hashing algorithms to ensure that packets have not been altered between source and
destination.
• Origin authentication - Uses the Internet Key Exchange (IKE) protocol to authenticate source and
destination.
• Diffie-Hellman – Used to secure key exchange.
Integrity
• Data integrity means that the data has not
changed in transit.
• A method of proving data integrity is required.
• The Hashed Message Authentication Code
(HMAC) is a data integrity algorithm that
guarantees the integrity of the message using a
hash value.
o Message-Digest 5 (MD5) uses a 128-bit
shared-secret key.
o The Secure Hash Algorithm (SHA) uses a
160-bit secret key.
Authentication
There are two IPsec peer authentication methods:
1. Pre-shared key (PSK) - (PSK) value is entered
into each peer manually.
• Easy to configure manually
• Does not scale well
• Must be configured on every peer
2. Rivest, Shamir, and Adleman (RSA) -
authentication uses digital certificates to
authenticate the peers.
Each peer must authenticate its opposite peer before the tunnel
is considered secure.
DH provides allows two peers to establish a shared secret key over an insecure channel.
Variations of the DH key exchange are specified
as DH groups:
• DH groups 1, 2, and 5 should no longer be
used.
• DH groups 14, 15, and 16 use larger key
sizes with 2048 bits, 3072 bits, and 4096 bits,
respectively
• DH groups 19, 20, 21 and 24 with respective
key sizes of 256 bits, 384 bits, 521 bits, and
2048 bits support Elliptical Curve
Cryptography (ECC), which reduces the time
needed to generate keys.
QoS
Prioritizing Traffic
• When traffic volume is greater than what can be transported across the network, devices queue (hold)
the packets in memory until resources become available to transmit them.
• Queuing packets causes delay because
new packets cannot be transmitted
until previous packets have been
processed.
• If the number of packets to be queued
continues to increase, the memory
within the device fills up and packets
are dropped.
• One QoS technique that can help with
this problem is to classify data into
multiple queues, as shown in the
figure.
Note: A device implements QoS only when it is experiencing some type of congestion.
Delay Description
Code delay The fixed amount of time it takes to compress data at the source before transmitting to the first
internetworking device, usually a switch.
Packetization delay The fixed time it takes to encapsulate a packet with all the necessary header information.
Queuing delay The variable amount of time a frame or packet waits to be transmitted on the link.
Serialization delay The fixed amount of time it takes to transmit a frame onto the wire.
Propagation delay The variable amount of time it takes for the frame to travel between the source and destination.
De-jitter delay The fixed amount of time it takes to buffer a flow of packets and then send them out in evenly
spaced intervals.
Packet Loss
Without QoS mechanisms, time-sensitive packets, such as real-
time video and voice, are dropped with the same frequency as
data that is not time-sensitive.
• When a router receives a Real-Time Protocol (RTP) digital
audio stream for Voice over IP (VoIP), it compensates for
the jitter that is encountered using a playout delay buffer.
• The playout delay buffer buffers these packets and then plays
them out in a steady stream.
If the jitter is so large that it causes packets to be received out of the range of the play out buffer, the out-of-
range packets are discarded and dropouts are heard in the
audio.
• For losses as small as one packet, the digital signal
processor (DSP) interpolates what it thinks the audio
should be and no problem is audible to the user.
• When jitter exceeds what the DSP can do to make up
for the missing packets, audio problems are heard.
Note: In a properly designed network, packet loss should be near zero.
Traffic Characteristics
In the early 2000s, the predominant types of IP traffic were voice and data.
• Voice traffic has a predictable bandwidth need and known packet arrival times.
• Data traffic is not real-time and has unpredictable bandwidth need.
• Data traffic can temporarily burst, as when a large file is being downloaded. This bursting can consume the
entire bandwidth of a link.
More recently, video traffic has become the increasingly important to business communications and
operations.
• According to the Cisco Visual Networking Index (VNI), video traffic represented 70% of all traffic in 2017.
• By 2022, video will represent 82% of all traffic.
• Mobile video traffic will reach 60.9 exabytes per month by 2022.
The type of demands that voice, video, and data traffic place on the network are very different.
Voice
Voice traffic is predictable and smooth and very sensitive to delays and dropped packets.
• Voice packets must receive a higher priority than other types of traffic.
• Cisco products use the RTP port range 16384 to 32767 to prioritize voice traffic.
Voice can tolerate a certain amount of latency, jitter, and loss without any noticeable effects
Latency should be no more than 150 milliseconds (ms).
• Jitter should be no more than 30 ms, and packet loss no more than 1%.
• Voice traffic requires at least 30 Kbps of bandwidth.
Data
Data applications that have no tolerance for data loss, such as email and web pages, use TCP to ensure that if
packets are lost in transit, they will be resent.
• Data traffic can be smooth or bursty. Data Traffic Characteristics
Data traffic is relatively insensitive to drops and delays compared to voice and video. Quality of Experience
or QoE is important to consider with data traffic.
• Does the data come from an interactive application?
• Is the data mission critical?
Interactive Prioritize for the lowest delay of all data traffic Applications could benefit from lower delay.
and strive for a 1 to 2 second response time.
Not interactive Delay can vary greatly as long as the necessary Gets any leftover bandwidth after all voice,
minimum bandwidth is supplied. video, and other data application needs are met.
Queuing Algorithms
The QoS policy implemented by the network administrator becomes active when congestion occurs on the
link. Queuing is a congestion management tool that can buffer, prioritize, and, if required, reorder packets
before being transmitted to the destination.
A number of queuing algorithms are available:
• First-In, First-Out (FIFO)
• Weighted Fair Queuing (WFQ)
• Class-Based Weighted Fair Queuing (CBWFQ)
• Low Latency Queuing (LLQ)
Weighted Fair Queuing (WFQ) is an automated scheduling method that provides fair bandwidth allocation
to all network traffic.
• WFQ applies priority, or weights, to identified traffic, classifies it into conversations or flows, and then
determines how much bandwidth each
flow is allowed relative to other
flows.
• WFQ classifies traffic into different
flows based on source and destination
IP addresses, MAC addresses, port
numbers, protocol, and Type of
Service (ToS) value.
• WFQ is not supported with tunneling
and encryption because these features
modify the packet content information
required by WFQ for classification.
Class-Based Weighted Fair Queuing (CBWFQ)
Class-Based Weighted Fair Queuing (CBWFQ) extends the standard WFQ functionality to provide support
for user-defined traffic classes.
o Traffic classes are defined based on match criteria including protocols, access control lists (ACLs),
and input interfaces.
o Packets satisfying the match criteria for a class constitute the traffic for that class.
o A FIFO queue is reserved for each class, and traffic belonging to a class is directed to the queue for
that class.
• A class can be assigned characteristics, such as bandwidth, weight, and maximum packet limit. The
bandwidth assigned to a class is the guaranteed bandwidth delivered during congestion.
• Packets belonging to a class are subject to the bandwidth and queue limits, which is the maximum
number of packets allowed to accumulate in the queue, that characterize the class.
After a queue has reached its configured queue limit, adding more packets to the class causes tail drop or
packet drop to take effect, depending on how class policy is configured.
• Tail drop discards any packet that
arrives at the tail end of a queue that
has completely used up its packet-
holding resources.
• This is the default queuing response to
congestion. Tail drop treats all traffic
equally and does not differentiate
between classes of service.
Model Description
Integrated services • Provides very high QoS to IP packets with guaranteed delivery.
(IntServ) • Defines a signaling process for applications to signal to the network that they require
special QoS for a period and that bandwidth should be reserved.
• IntServ can severely limit the scalability of a network.
Best Effort
The basic design of the internet is best-effort packet delivery and provides no guarantees.
• The best-effort model treats all network packets in the same way, so an emergency voice message is treated
the same way that a digital photograph attached to an email is treated.
Benefits Drawbacks
Scalability is only limited by available bandwidth, in Packets will arrive whenever they can and in any order
which case all traffic is equally affected. possible, if they arrive at all.
It is the easiest and quickest model to deploy. Critical data is treated the same as casual email is treated.
Integrated Services
IntServ delivers the end-to-end QoS that real-time applications require.
• Explicitly manages network resources to provide QoS to
individual flows or streams, sometimes called
microflows.
• Uses resource reservation and admission-control
mechanisms as building blocks to establish and maintain
QoS.
• Uses a connection-oriented approach. Each individual
communication must explicitly specify its traffic
descriptor and requested resources to the network.
• The edge router performs admission control to ensure
that available resources are sufficient in the network.
In the IntServ model, the application requests a specific kind of service from the network before sending
data.
• The application informs the network of its traffic profile and requests a particular kind of service that can
encompass its bandwidth and delay requirements.
• IntServ uses the Resource Reservation Protocol (RSVP) to signal the QoS needs of an application’s traffic
along devices in the end-to-end path through the network.
• If network devices along the path can reserve the necessary bandwidth, the originating application can begin
transmitting. If the requested reservation fails along the path, the originating application does not send any
data.
Benefits Drawbacks
• Explicit end-to-end resource admission • Resource intensive due to the stateful architecture
control requirement for continuous signaling.
• Per-request policy admission control • Flow-based approach not scalable to large
• Signaling of dynamic port numbers implementations such as the internet.
Differentiated Services
The differentiated services (DiffServ) QoS model
specifies a simple and scalable mechanism for
classifying and managing network traffic.
• Is not an end-to-end QoS strategy because it cannot
enforce end-to-end guarantees.
• Hosts forward traffic to a router which classifies
the flows into aggregates (classes) and provides the
appropriate QoS policy for the classes.
• Enforces and applies QoS mechanisms on a hop-by-hop basis, uniformly applying global meaning to each
traffic class to provide both flexibility and scalability.
• DiffServ divides network traffic into classes based on business requirements. Each of the classes can then be
assigned a different level of service.
• As the packets traverse a network, each of the network devices identifies the packet class and services the
packet according to that class.
• It is possible to choose many levels of service with DiffServ.
Benefits Drawbacks
QoS Tools
QoS Tools Description
Classification and marking tools • Sessions, or flows, are analyzed to determine what traffic class they belong
to.
• When the traffic class is determined, the packets are marked.
Congestion avoidance tools • Traffic classes are allotted portions of network resources, as defined by the
QoS policy.
• The QoS policy also identifies how some traffic may be selectively dropped,
delayed, or re-marked to avoid congestion.
• The primary congestion avoidance tool is WRED and is used to regulate
TCP data traffic in a bandwidth-efficient manner before tail drops caused by
queue overflows occur.
Congestion management tools • When traffic exceeds available network resources, traffic is queued to await
availability of resources.
• Common Cisco IOS-based congestion management tools include CBWFQ
and LLQ algorithms.
The figure shows the sequence of QoS tools used when applied to packet flows.
• Ingress packets are classified and their respective IP header is marked.
• To avoid congestion, packets are then allocated resources based on defined policies.
• Packets are then queued and forwarded out the egress interface based on their defined QoS shaping and
policing policy.
Note: Classification and marking can be done on ingress or egress, whereas other QoS actions such queuing and
shaping are usually done on egress.
Before a packet can have a QoS policy applied to it, the packet has to be classified.
Classification determines the class of traffic to which packets or frames belong. Only after traffic is marked
can policies be applied to it.
How a packet is classified depends on the QoS implementation.
• Methods of classifying traffic flows at Layer 2 and 3 include using interfaces, ACLs, and class maps.
• Traffic can also be classified at Layers 4 to 7 using Network Based Application Recognition (NBAR).
How traffic is marked usually depends on the technology. The decision of whether to mark traffic at Layers
2 or 3 (or both) is not trivial and should be made after consideration of the following points:
• Layer 2 marking of frames can be performed for non-IP traffic.
• Layer 2 marking of frames is the only QoS option available for switches that are not “IP aware”.
• Layer 3 marking will carry the QoS information end-to-end.
The 802.1Q standard also includes the QoS prioritization scheme known as IEEE 802.1p. The 802.1p standard uses
the first three bits in the Tag Control Information (TCI) field. Known as the Priority (PRI) field, this 3-bit field
identifies the Class of Service (CoS) markings.
Three bits means that a Layer 2 Ethernet frame can be marked with one of eight levels of priority (values 0-7).
4 100 Videoconferencing
6 110 Reserved
7 111 Reserved
Marking at Layer 3
DSCP Values
The 64 DSCP values are organized into three categories:
• Best-Effort (BE) - This is the default for all IP packets. The DSCP value is 0. The per-hop behavior is normal
routing. When a router experiences congestion, these packets will be dropped. No QoS plan is implemented.
• Expedited Forwarding (EF) - RFC 3246 defines EF as the DSCP decimal value 46 (binary 101110). The
first 3 bits (101) map directly to the Layer 2 CoS value 5 used for voice traffic. At Layer 3, Cisco recommends
that EF only be used to mark voice packets.
• Assured Forwarding (AF) - RFC 2597 defines AF to use the 5 most significant DSCP bits to indicate queues
and drop preference.
Trust Boundaries
Traffic should be classified and marked as close to its source as technically and administratively feasible.
This defines the trust boundary.
1. Trusted endpoints have the capabilities and intelligence to mark application traffic to the appropriate
Layer 2 CoS and/or Layer 3 DSCP values.
2. Secure endpoints can have traffic marked at the Layer 2 switch.
3. Traffic can also be marked at Layer 3 switches / routers.
Congestion Avoidance
Congestion avoidance tools monitor network traffic loads in an effort to anticipate and avoid congestion at
common network and internetwork bottlenecks before congestion becomes a problem.
• They monitor network traffic loads in an effort to anticipate and avoid congestion at common network and
internetwork bottlenecks before congestion becomes a problem.
• They monitor the average depth of the queue. When the queue is below the minimum threshold, there are no
drops. As the queue fills up to the maximum threshold, a small percentage of packets are dropped. When the
maximum threshold is passed, all packets are dropped.
Some congestion avoidance techniques provide preferential treatment for which packets get dropped.
• Weighted random early detection (WRED) allows for congestion avoidance on network interfaces by
providing buffer management and allowing TCP traffic to decrease, or throttle back, before buffers are
exhausted.
• WRED helps avoid tail drops and maximizes network use and TCP-based application performance.
Policing is applied to inbound traffic on an interface. Policing is commonly implemented by service providers to
enforce a contracted customer information rate (CIR). However, the service provider may also allow bursting over the
CIR if the service provider’s network is not currently experiencing congestion.
NTP
As a network grows, it becomes difficult to ensure that all infrastructure devices are operating with
synchronized time using the manual method.
A better solution is to configure the NTP on the network. This protocol allows routers on the network to
synchronize their time settings with an NTP server, which provides more consistent time settings. NTP can
be set up to synchronize to a private master clock, or it can synchronize to a publicly available NTP server
on the internet. NTP uses UDP port 123 and is documented in RFC 1305.
NTP Operation
The show ntp associations and show ntp status commands are used to verify that R1 is synchronized with the NTP
server at 209.165.200.225. Notice that R1 is synchronized with a stratum 1 NTP server at 209.165.200.225, which is
synchronized with a GPS clock. The show ntp status command displays that R1 is now a stratum 2 device that is
synchronized with the NTP server at 209.165.220.225.
R1# show ntp associations
SNMP
Introduction to SNMP
SNMP was developed to allow administrators to manage nodes on an IP network. It enables network
administrators to monitor and manage network performance, find and solve network problems, and plan for
network growth.
SNMP is an application layer protocol that provides a message format for communication between managers
and agents. The SNMP system consists of three elements:
• SNMP manager
• SNMP agents (managed node)
• Management Information Base (MIB)
SNMP defines how management information is exchanged between network management applications and
management agents. The SNMP manager polls the agents and queries the MIB for SNMP agents on UDP
port 161. SNMP agents send any SNMP traps to the SNMP manager on UDP port 162.
• The SNMP manager is part of a network management
system (NMS). The SNMP manager can collect
information from an SNMP agent by using the “get”
action and can change configurations on an agent by
using the “set” action. SNMP agents can forward
information directly to a network manager by using
“traps”.
• The SNMP agent and MIB reside on SNMP client
devices. MIBs store data about the device and
operational statistics and are meant to be available to
authenticated remote users. The SNMP agent is
responsible for providing access to the local MIB.
SNMP Operation
• SNMP agents that reside on managed devices collect and store information about the device and its
operation locally in the MIB. The SNMP manager then uses the SNMP agent to access information
within the MIB.
• There are two primary SNMP manager requests, get and set. In addition to configuration, a set can
cause an action to occur, like restarting a router.
Operation Description
Retrieves a value from a variable within a table; the SNMP manager does not need to know the
get-next-request exact variable name. A sequential search is performed to find the needed variable from within a
table.
Retrieves large blocks of data, such as multiple rows in a table, that would otherwise require the
get-bulk-request
transmission of many small blocks of data. (Only works with SNMPv2 or later.)
Community Strings
SNMPv1 and SNMPv2c use community strings that control access to the MIB. Community strings are
plaintext passwords. SNMP community strings authenticate access to MIB objects.
There are two types of community strings:
• Read-only (ro) - This type provides access to the MIB variables, but does not allow these variables to be
changed, only read. Because security is minimal in version 2c, many organizations use SNMPv2c in read-only
mode.
• Read-write (rw) - This type provides read and write access to all objects in the MIB.
To view or set MIB variables, the user must specify the appropriate community string for read or write
access.
MIB Object ID
The MIB organizes variables hierarchically. Formally, the MIB defines each variable as an object ID (OID).
OIDs uniquely identify managed objects. The MIB organizes the OIDs based on RFC standards into a
hierarchy of OIDs, usually shown as a tree.
• The MIB tree for any given device includes some branches with variables common to many networking
devices and some branches with variables specific to that
device or vendor.
• RFCs define some common public variables. Most devices
implement these MIB variables. In addition, networking
equipment vendors, like Cisco, can define their own private
branches of the tree to accommodate new variables specific to
their devices.
Introduction to Syslog
Syslog uses UDP port 514 to send event notification messages across IP networks to event message
collectors, as shown in the figure.
The syslog logging service provides three primary functions,
as follows:
• The ability to gather logging information for
monitoring and troubleshooting
• The ability to select the type of logging information
that is captured
• The ability to specify the destinations of captured
syslog messages
Syslog Operation
The syslog protocol starts by sending system messages and debug output to a local logging process. Syslog
configuration may send these messages across the network to an external syslog server, where they can be
retrieved without needing to access the actual device.
Alternatively, syslog messages may be sent to an internal buffer. Messages sent to the internal buffer are
only viewable through the CLI of the device.
The network administrator may specify that only certain types of system messages be sent to various
destinations. Popular destinations for syslog messages include the following:
• Logging buffer (RAM inside a router or switch)
• Console line
• Terminal line
• Syslog server
Cisco devices produce syslog messages as a result of network events. Every syslog message contains a
severity level and a facility.
The smaller numerical levels are the more critical syslog alarms. The severity level of the messages can be
set to control where each type of message is displayed (i.e. on the console or the other destinations).
The complete list of syslog levels is shown in the table.
Syslog Facilities
In addition to specifying the severity, syslog messages also contain information on the facility. Syslog
facilities are service identifiers that identify and categorize system state data for error and event message
reporting. The logging facility options that are available are specific to the networking device.
Some common syslog message facilities reported on Cisco IOS routers include:
• IP
• OSPF protocol
• SYS operating system
• IP security (IPsec)
• Interface IP (IF)
By default, the format of syslog messages on the Cisco IOS Software is as follows:
%facility-severity-MNEMONIC: description
For example, sample output on a Cisco switch for an EtherChannel link changing state to up is:
%LINK-3-UPDOWN: Interface Port-channel1, changed state to up
Here the facility is LINK and the severity level is 3, with a MNEMONIC of UPDOWN.
Configure Syslog Timestamp
By default, log messages are not timestamped. Log messages should be timestamped so that when they are
sent to another destination, such as a Syslog server, there is record of when the message was generated. Use
the command service timestamps log datetime to force logged events to display the date and time.
With the Cisco 2960 switch flash file system, you can copy configuration files, and archive (upload and
download) software images.
The command to view the file systems on a Catalyst switch is the same as on a Cisco router: show file
systems.
A configuration can be copied from a file and then directly pasted to a device. The file will require editing to
ensure that encrypted passwords are in plaintext, and that non-command text such as --More-- and IOS
messages are removed.
In addition, you may want to add enable and configure terminal to the beginning of the file or enter global
configuration mode before pasting the configuration. Instead of copying and pasting, a configuration can be
restored from a text file by using Tera Term. When using Tera Term, the steps are as follows:
Step 1. On the File menu, click Send file.
Step 2. Locate the file to be copied into the device and click Open.
Step 3. Tera Term will paste the file into the device.
The text in the file will be applied as commands in the CLI and become the running configuration on the
device.
Use the following steps to restore the running configuration from a TFTP server:
Step 1. Enter the copy tftp running-config command.
Step 2. Enter the IP address of the host where the configuration file is stored.
Step 3. Enter the name to assign to the configuration file.
Step 4. Press Enter to confirm each choice.
R1# copy running-config tftp
Remote host []?192.168.10.254
Name of the configuration file to write[R1-config]? R1-Jan-2019
Write file R1-Jan-2019 to 192.168.10.254? [confirm]
Writing R1-Jan-2019 !!!!!! [OK]
Use the dir command to see the file on the USB drive and use the more command to see the contents.
To Restore Configurations with a USB Flash Drive, it will be necessary to edit the USB R1-Config file with
a text editor. Assuming the file name is R1-Config, use the command copy usbflash0:/R1-Config running-
config to restore a running configuration.
Passwords on devices are used to prevent unauthorized access. For encrypted passwords, such as the enable
secret passwords, the passwords must be replaced after recovery. Depending on the device, the detailed
procedure for password recovery varies.
Step 1. Enter the ROMMON mode.
Step 2. Change the configuration register.
Step 3. Copy the startup-config to the running-config.
Step 4. Change the password.
Step 5. Save the running-config as the new startup-config.
Step 6. Reload the device.
Password Recovery Example
Step 1. Enter the ROMMON mode. With console access, a user can access the ROMMON mode by using
a break sequence during the boot up process or removing the external flash memory when the device is
powered off.
When successful, the rommon 1 > prompt displays, as shown in the example.
Step 2. Change the configuration register. The confreg 0x2142 command allows the user to set the
configuration register to 0x2142, which causes the device to ignore the startup config file during startup.
After setting the configuration register to 0x2142, type reset at the prompt to restart the device. Enter the
break sequence while the device is rebooting and decompressing the IOS. The example displays the terminal
output of a 1941 router in the ROMMON mode after using a break sequence during the boot up process.
Step 3. Copy the startup-config to the running-config. After the device has finished reloading, issue
the copy startup-config running-config command.
CAUTION: Do not enter copy running-config startup-config. This command erases your original startup
configuration.
Router# copy startup-config running-config
Destination filename [running-config]?
1450 bytes copied in 0.156 secs (9295 bytes/sec)
R1#
Step 4. Change the password. Because you are in privileged EXEC mode, you can now configure all the
necessary passwords.
Note: The password cisco is not a strong password and is used here only as an example
Step 5. Save the running-config as the new startup-config. After the new passwords are configured,
change the configuration register back to 0x2102 by using the config-register 0x2102 command in the
global configuration mode. Save the running-config to startup-config.
As a network grows, Cisco IOS Software images and configuration files can be stored on a central TFTP
server. This helps to control the number of IOS images and the revisions to those IOS images, as well as the
configuration files that must be maintained.
Production internetworks usually span wide areas and contain multiple routers. For any network, it is good
practice to keep a backup copy of the Cisco IOS Software image in case the system image on the router
becomes corrupted or accidentally erased.
Widely distributed routers need a source or backup location for Cisco IOS Software images. Using a
network TFTP server allows image and configuration uploads and downloads over the network. The
network TFTP server can be another router, a workstation, or a host system.
To maintain network operations with minimum down time, it is necessary to have procedures in place for
backing up Cisco IOS images. This allows the network administrator to quickly copy an image back to a
router in case of a corrupted or erased image. Use the following steps:
Step 1. Ping the TFTP server. Ping the TFTP server to test connectivity.
Step 2. Verify image size in flash. Verify that the TFTP server has sufficient disk space to accommodate the Cisco
IOS Software image. Use the show flash0: command on the router to determine the size of the Cisco IOS image file.
Step 3. Copy the image to the TFTP server. Copy the image to the TFTP server by using the copy source-url
destination-url command. After issuing the command by using the specified source and destination URLs, the user is
prompted for the source file name, IP address of the remote host, and destination file name. The transfer will then
begin.
During startup, the bootstrap code parses the startup configuration file in NVRAM for the boot
system commands that specify the name and location of the Cisco IOS Software image to load. Several boot
system commands can be entered in sequence to provide a fault-tolerant boot plan.
If there are no boot system commands in the configuration, the router defaults to loading the first valid
Cisco IOS image in flash memory and runs it.
To upgrade to the copied IOS image after that image is saved on the flash memory of the router, configure
the router to load the new image by using the boot system command. Save the configuration. Reload the
router to boot the router with new image.
Network Design
Hierarchical Networks
Routers, or multilayer switches, are usually deployed in pairs in a configuration referred to as a building, or
departmental, switch block.
• Each switch block acts independently of the others.
• As a result, the failure of a single device does not cause the network to go down.
Increase Bandwidth
Link aggregation (e.g., EtherChannel) allows an administrator to increase the amount of bandwidth between
devices by creating one logical link made up of several
physical links.
• EtherChannel combines existing switch ports into one
logical link using a Port Channel interface.
• Most configuration tasks are done on the Port Channel
interface (instead of on each individual port) to ensure
configuration consistency on the links.
• EtherChannel can load balance between links.
Switch Platforms
There is a variety of switch platforms, form factors, and other features that must be considered before
choosing a switch. When designing a network, it is important to select the proper hardware to meet current
network requirements, as well as to allow for network growth. Within an enterprise network, both switches
and routers play a critical role in network communication.
Campus LAN Switches, such as the Cisco 3850 series shown
here, support high concentrations of user connections with speed
and security appropriate for the enterprise network.
The Cisco Nexus platform promotes infrastructure scalability, operational continuity, and transport
flexibility in the data center.
Service provider Ethernet access switches feature application intelligence, unified services, virtualization,
integrated security, and simplified management.
Cisco Nexus virtual networking switch platforms provide secure multi-tenant services by adding
virtualization intelligence technology to the data center network.
Switch Form Factors
When selecting switches, network administrators must determine the switch form factors. This includes
fixed configuration, modular configuration, stackable, or non-stackable.
Features and options on fixed configuration switches are limited to those that
originally come with the switch.
Special cables are used to connect stackable switches that allow them to
effectively operate as one large switch.
The thickness of the switch, which is expressed in the number of rack
units, is also important for switches that are mounted in a rack. For
example, the fixed configuration switches shown in the figure are all one
rack units (1U) or 1.75 inches (44.45 mm) in height.
Port Density
The port density of a switch refers to the number of ports available on a
single switch.
Fixed configuration switches support a variety of port density configurations.
The Cisco Catalyst 3850 come in 12, 24, 48 port configurations.
Modular switches can support very high port densities through the addition of multiple switchport line cards.
The modular Catalyst 9400 switch supports 384 switchport interfaces.
Forwarding Rates
Forwarding rates define the processing capabilities of a switch by rating how much data the switch can
process per second.
• Switch product lines are classified by forwarding rates.
• Entry-level switches have lower forwarding rates than enterprise-level switches.
If switch forwarding rate is too low, it cannot accommodate full wire-speed communication across all of its
switch ports.
• Wire speed is the data rate that each Ethernet port on the switch is capable of attaining.
• Data rates can be 100 Mbps, 1 Gbps, 10 Gbps, or 100 Gbps.
• Access layer switches typically do not need to operate at full wire speed, because they are physically limited
by their uplinks to the distribution layer.
Multilayer Switching
Multilayer switches are typically deployed in the core and distribution layers of an organization's switched
network.
• They support some routing protocols and forward IP packets at a rate close to that of Layer 2 forwarding.
• Multilayer switches often support specialized hardware, such as application-specific integrated circuits
(ASICs).
• ASICs along with dedicated software data structures can streamline the forwarding of IP packets independent
of the CPU.
The cost of a switch will depend on the number and speed of the interfaces, supported features, and
Cost
expansion capability.
Port density Network switches must support the appropriate number of devices on the network.
It is now common to power access points, IP phones, and compact switches user Power over Ethernet
Power (PoE).
In addition to PoE considerations, some chassis-based switches support redundant power supplies.
Reliability The switch should provide continuous access to the network.
Port speed The speed of the network connection is of primary concern to end users.
The ability of the switch to store frames is important in a network where there may be congested ports
Frame buffers
to servers or other areas of the network.
The number of users on a network typically grows over time; therefore, the switch should provide the
Scalability
opportunity for growth.
Router Hardware
Router Requirements
Routers use the network portion (prefix) of the destination IP address to route packets to the proper
destination.
• They select an alternate path if a link goes down.
• All hosts on a network specify the IP address of the local router interface as their default gateway.
Cisco Routers
Branch routers, shown in the figure, optimize branch services on a single platform while delivering an
optimal application experience across branch and WAN infrastructures. Shown are the Cisco Integrated
Services Router (ISR) 4000 Series Routers.
Network edge routers, shown in the figure, enable the network edge to deliver high-performance, highly
secure, and reliable services that unite campus, data center, and branch networks. Shown are the Cisco
Aggregation Services Routers (ASR) 9000 Series Routers.
Service provider routers, shown in the figure, deliver end-to-end
scalable solutions and subscriber-aware services. Shown are the Cisco
Network Convergence System (NCS) 6000 Series Routers.
Industrial routers, such as the ones shown in the figure, are designed to provide enterprise-class features in
rugged and harsh environments. Shown are the Cisco 1100 Series Industrial Integrated Services Routers.
Cisco ASR 9000 and 1000 Series Aggregation Services Routers: These routers provide density and
resiliency with programmability, for a scalable network edge.
Cisco Network Convergence System 5500 Series Routers: These routers are designed to efficiently scale
between large data centers and large enterprise networks, web, and service provider WAN and aggregation
networks.
Cisco 800 Industrial Integrated Services Router: This router is compact and designed for harsh
environments.
Network Troubleshooting
Network Documentation
Accurate and complete network documentation is required to effectively monitor and troubleshoot networks.
Common network documentation includes the following:
• Physical and logical network topology diagrams
• Network device documentation that records all pertinent device information
• Network performance baseline documentation
All network documentation should be kept in a single location and backup documentation should be
maintained and kept in a separate location.
Network Topology Diagrams
There are two types of network topology diagrams: physical and logical.
Physical Topology
Logical Topology
Network Device Documentation
Network device documentation should contain accurate, up-to-date records of the network hardware and
software. Documentation should include all pertinent information about the network devices.
Router Device
Documentation
Switch Device
Documentation
End-System
Documentation
When conducting the initial baseline, start by selecting a few variables that represent the defined policies.
If too many data points are selected, the amount of data can be overwhelming, making analysis of the
collected data difficult.
Start out simply and fine-tune along the way.
Some good starting variables are interface utilization and CPU utilization.
Step 2 - Identify Devices and Ports of Interest
When capturing data for analysis, the period specified should be:
• At a minimum, seven days long.
• Last no more than six weeks, unless specific long-term trends need to be measured.
• Generally, a two-to-four-week baseline is adequate.
Conduct an annual analysis of the entire network, or baseline different sections of the network on a rotating
basis.
Analysis must be conducted regularly to understand how the network is affected by growth and other
changes.
Data Measurement
Command Description
show version • Displays uptime, version information for device software and hardware
show ip interface [brief]
• Displays all the configuration options that are set on an interface.
show ipv6 interface [brief]
show interfaces • Displays detailed output for each interface.
show ip route [static | eigrp | ospf | bgp] • Displays the routing table content listing directly connected networks
show ipv6 route [static | eigrp | ospf | bgp] and learned remote networks.
show cdp neighbors detail • Displays detailed information about directly connected Cisco devices.
show arp • Displays the contents of the ARP table (IPv4) and the neighbor table
show ipv6 neighbors (IPv6).
show running-config • Displays current configuration.
show vlan • Displays the status of VLANs on a switch.
show port • Displays the status of ports on a switch.
• Used to collect a large amount of information using multiple show
show tech-support
commands for technical support reporting purposes.
Troubleshooting Process
Steps Description
Define the Problem • Verify that there is a problem and then properly define what the problem is.
Gather
• Targets (i.e., hosts, devices) are identified, accessed, and information gathered.
Information
Analyze • Identify possible causes using network documentation, network baselines, knowledge
Information bases, and peers.
Eliminate Possible
• Progressively eliminate possible causes to eventually identify the most probable cause.
Causes
Propose Hypothesis • When the most probable cause has been identified, a solution must be formulated.
• Assess the urgency of the problem, create a rollback plan, implement the solution, and
Test Hypothesis
verify outcome.
• When solved, inform all involved and document the cause and solution to help solve future
Solve the Problem
problems.
Question End Users
The table provides questioning guidelines and sample open ended end-user questions.
Gather Information
Common Cisco IOS commands used to gather network problem symptoms.
Command Description
ping {host |ip-address} • Sends an echo request packet to an address, then waits for a reply.
traceroute destination • Identifies the path a packet takes through the networks.
• Connects to an IP address using the Telnet application (Note: Use SSH
telnet {host | ip-address}
whenever possible).
ssh -l user-id ip-address • Connects to an IP address using SSH.
show ip interface brief
• Displays a summary status of all interfaces on a device.
show ipv6 interface brief
show ip route
• Displays the current IPv4 and IPv6 routing tables.
show ipv6 route
• Displays the global and interface-specific status of any configured Layer 3
show protocols
protocol.
debug • Displays a list of options for enabling or disabling debugging events.
Bottom-Up Good approach to use when the problem is suspected to be a physical one.
Top-Down Use this approach for simpler problems, or when you think the problem is with a piece of software.
Divide-and-
Start at a middle layer (i.e, Layer 3) and tests in both directions from that layer.
Conquer
Used to discover the actual traffic path from source to destination to reduce the scope of
Follow-the-Path
troubleshooting.
Substitution You physically swap a suspected problematic device with a known, working one.
Comparison Attempts to resolve the problem by comparing a nonoperational element with the working one.
Educated guess Success of this method varies based on your troubleshooting experience and ability.
Protocol Analyzers
Digital Multimeters Devices measure electrical values of voltage, current, and resistance.
Cable Testers Handheld devices are designed for testing the various types of data communication cabling.
Cable Analyzers Multifunctional handheld devices used to test and certify copper and fiber cables.
Portable Network
Specialized device used for troubleshooting switched networks and VLANs.
Analyzers
Browser-based interface that displays device performance analysis in a switched and routed
Cisco Prime NAM
environment.
Syslog Server as a Troubleshooting Tool
Syslog is used by syslog clients to send text-based log messages to a syslog server.
Level Keyword
• Log messages can be sent to the console, VTY lines, memory buffer, or syslog
0 Emergencies
server.
1 Alerts
• Cisco IOS log messages fall into one of eight levels.
2 Critical
• The lower the level number, the higher the severity level.
3 Errors
• By default, the console displays level 6 (debugging) messages. 4 Warnings
• In the command output, level 0 (emergencies) to 5 (notifications) are sent to the 5 Notifications
syslog server at 209.165.200.225. 6 Informational
7 Debugging
Symptom Description
Power-related Check the operation of the fans and ensure that the chassis intake and exhaust vents are clear.
Faulty or corrupt NIC driver files, bad cabling, or grounding problems can cause network
Hardware faults
transmission errors such as late collisions, short frames, and jabber.
Look for damaged cables, improper cable, and poorly crimped connectors.
Cabling faults
Suspect cables should be tested or exchanged with a known functioning cable.
Attenuation can be caused if a cable length exceeds the design limit for the media, or when there
Attenuation
is a poor connection resulting from a loose cable, or dirty or oxidized contacts.
Local electromagnetic interference (EMI) can be generated by many sources, such as crosstalk,
Noise
nearby electric cables, large electric motors, FM radio stations, police radio, and more.
Interface configuration Causes can include incorrect clock rate, incorrect clock source, and interface not being turned on.
errors This causes a loss of connectivity with attached network segments.
Exceeding design limits A component could operate sub-optimally if it is being utilized beyond specifications.
Symptoms include processes with high CPU utilization percentages, input queue drops, slow
CPU overload performance, SNMP timeouts, no remote access, no DHCP services, Telnet, and pings are slow
or fail to respond.
Symptom Description
No functionality or connectivity Some Layer 2 problems can stop the exchange of frames across a link, while others only
at the network layer or above cause network performance to degrade.
• Frames can take a suboptimal path to their destination but still arrive causing
Network is operating below
the network to experience unexpected high-bandwidth usage on links.
baseline performance levels
• An extended or continuous ping can help reveal if frames are being dropped.
• Operating systems use broadcasts and multicasts extensively.
• Generally, excessive broadcasts are the result of a poorly programmed or
Excessive broadcasts
configured applications, a large Layer 2 broadcast domains, or an underlying
network problems .
• Routers send messages when it detects a problem with interpreting incoming
frames (encapsulation or framing problems) or when keepalives are expected
Console messages but do not arrive.
• The most common console message that indicates a Layer 2 problem is a line
protocol down message
The table lists issues that commonly cause network problems at the data link layer.
Symptom Description
• Occurs when the network is nearly or completely non-functional, affecting all users and
applications on the network.
Network failure
• These failures are usually noticed quickly by users and network administrators and are
obviously critical to the productivity of a company.
• These involve a subset of users, applications, destinations, or a type of traffic.
• Optimization issues can be difficult to detect and even harder to isolate and diagnose.
Suboptimal performance
• This is because they usually involve multiple layers, or even a single host computer.
• Determining that the problem is a network layer problem can take time.
• Often a change in the topology may unknowingly have effects on other areas of the
network.
General network issues
• Determine whether anything in the network has recently changed, and if there is anyone
currently working on the network infrastructure.
Check for any equipment and connectivity problems, including power problems, environmental
Connectivity issues
problems, and Layer 1 problems, such as cabling problems, bad ports, and ISP problems.
Routing table Check the routing table for anything unexpected, such as missing routes or unexpected routes.
Neighbor issues Check to see if there are any problems with the routers forming neighbor adjacencies.
Topology database Check the table for anything unexpected, such as missing entries or unexpected entries.
Transport Layer Troubleshooting – ACLs
The table lists areas where ACL misconfigurations commonly occur.
Misconfigurations Description
Selection of traffic flow An ACL must be applied to the correct interface in the correct traffic direction.
Order of access control entries The entries in an ACL should be from specific to general.
Implicit deny any The implicit ACE can be the cause of an ACL misconfiguration.
Addresses and IPv4 wildcard Complex IPv4 wildcard masks are more efficient, but are more subject to configuration
masks errors.
Selection of transport layer
It is important that only the correct transport layer protocol be specified in an ACE.
protocol
Source and destination ports Ensuring that the correct inbound and outbound ports are specified in an ACE
Use of the established keyword The established keyword applied incorrectly, can provide unexpected results.
Uncommon protocols Misconfigured ACLs often cause problems for protocols other than TCP and UDP.
Symptom Description
Applications Description
SSH/Telnet Enables users to establish terminal session connections with remote hosts.
HTTP Supports the exchanging of text, graphic images, sound, video, and other multimedia files on the web.
FTP Performs interactive file transfers between hosts.
TFTP Performs basic interactive file transfers typically between hosts and networking devices.
SMTP Supports basic message delivery services.
POP Connects to mail servers and downloads email.
SNMP Collects management information from network devices.
DNS Maps IP addresses to the names assigned to network devices.
NFS Network File System (NFS) enables computers to mount and use drives on remote hosts.
Troubleshooting IP Connectivity
Usually what initiates a troubleshooting effort is the discovery that there is a problem with end-to-end
connectivity.
Two of the most common utilities used to verify a problem with end-to-end connectivity are ping and
traceroute.
For example, the MAC address on Fa0/1 The following configuration changes Fa0/1 to
should be in VLAN 10 instead of VLAN 1. VLAN 10 and verifies the change.
For example, a PC is unable to acquire its IPv6 R1 is enabled as an IPv6 router and now the output
configuration using SLAAC. The command output is verifies that R1 is a member of ff02::2, the All-IPv6-
missing the all IPv6-router multicast group (FF02::2). Routers multicast group.
In this example, ACL 100 has been The ACL is removed from G0/0/0 and
incorrectly configured inbound on the G0/0/0 configured inbound on S0/1/1.
instead of inbound on S0/1/1.
Network Virtualization
Cloud Computing
Cloud Overview
Cloud computing addresses a variety of data management issues:
• Enables access to organizational data anywhere and at any time
• Streamlines the organization’s IT operations by subscribing only to needed services
• Eliminates or reduces the need for onsite IT equipment, maintenance, and management
• Reduces cost for equipment, energy, physical plant requirements, and personnel training needs
• Enables rapid responses to increasing data volume requirements
Cloud Services
The three main cloud computing services defined by the National Institute of Standards and Technology
(NIST) in their Special Publication 800-145 are as follows:
• Software as a Service (SaaS) - The cloud provider is responsible for access to applications and services that
are delivered over the internet.
• Platform as a Service (PaaS) - The cloud provider is responsible for providing users access to the
development tools and services used to deliver the applications.
• Infrastructure as a Service (IaaS) - The cloud provider is responsible for giving IT managers access to the
network equipment, virtualized network services, and supporting network infrastructure.
Cloud service providers have extended this model to also provide IT support for each of the cloud
computing services (ITaaS). For businesses, ITaaS can extend the capability of the network without
requiring investment in new infrastructure, training new personnel, or licensing new software.
Cloud Models
There are four primary cloud models:
• Public clouds - Cloud-based applications and services made available to the general population.
• Private clouds - Cloud-based applications and services intended for a specific organization or entity, such as
the government.
• Hybrid clouds - A hybrid cloud is made up of two or more clouds (example: part private, part public), where
each part remains a separate object, but both are connected using a single architecture.
• Community clouds - A community cloud is created for exclusive use by a specific community. The
differences between public clouds and community clouds are the functional needs that have been customized
for the community. For example, healthcare organizations must remain compliant with policies and laws (e.g.,
HIPAA) that require special authentication and confidentiality.
Data centers are the physical facilities that provide the compute, network, and storage needs of cloud
computing services. Cloud service providers use data centers to host their cloud services and cloud-based
resources.
Virtualization
Dedicated Servers
Historically, enterprise servers consisted of a server OS, such as Windows Server or Linux Server, installed
on specific hardware. All of a server’s RAM, processing power, and hard drive space were dedicated to the
service provided (e.g., Web, email services, etc.).
• When a component fails, the service that is provided by this server becomes unavailable. This is known as a
single point of failure.
• Dedicated servers were generally underused. They often sat idle for long periods of time, waiting until there
was a need to deliver the specific service they provide. These servers wasted energy and took up more space
than was warranted by the amount of service provided. This is known as server sprawl.
Server Virtualization
• Server virtualization takes advantage of idle resources
and consolidates the number of required servers. This
also allows for multiple operating systems to exist on
a single hardware platform.
• The use of virtualization normally includes
redundancy to protect from a single point of failure.
• The hypervisor is a program, firmware, or hardware
that adds an abstraction layer on top of the physical
hardware. The abstraction layer is used to create
virtual machines which have access to all the
hardware of the physical machine such as CPUs,
memory, disk controllers, and NICs.
Advantages of Virtualization
One major advantage of virtualization is overall reduced cost:
• Less equipment is required
• Less energy is consumed
• Less space is required
Abstraction Layers
A computer system consists of the following abstraction layers: Services, OS, Firmware, and Hardware.
• At each of these layers of abstraction, some type of programming code is used as an interface between the
layer below and the layer above.
• A hypervisor is installed between the firmware and the OS. The hypervisor can support multiple instances of
OSs.
Type 2 Hypervisors
• A Type 2 hypervisor is software that creates and runs VM
instances. The computer, on which a hypervisor is
supporting one or more VMs, is a host machine. Type 2
hypervisors are also called hosted hypervisors.
• A big advantage of Type 2 hypervisors is that
management console software is not required.
Type 1 Hypervisors
• Type 1 hypervisors are also called the “bare metal” approach because the hypervisor is installed
directly on the hardware. Type 1 hypervisors are usually used on enterprise servers and data center
networking devices.
• With Type 1 hypervisors, the hypervisor is installed directly
on the server or networking hardware. Then, instances of an
OS are installed on the hypervisor, as shown in the figure.
Type 1 hypervisors have direct access to the hardware
resources. Therefore, they are more efficient than hosted
architectures. Type 1 hypervisors improve scalability,
performance, and robustness.
Installing a VM on a Hypervisor
• Type 1 hypervisors require a “management console” to manage the hypervisor. Management
software is used to manage multiple servers using the same hypervisor. The management console can
automatically consolidate servers and power on or off servers as required.
• The management console provides recovery from hardware failure. If a server component fails, the
management console automatically moves the VM to another server. Cisco Unified Computing
System (UCS) Manager controls multiple servers and manages resources for thousands of VMs.
• Some management consoles also allow server over allocation. Over allocation is when multiple OS
instances are installed, but their memory allocation exceeds the total amount of memory that a server
has. Over allocation is a common practice because all four OS instances rarely require the all their
allocated resources at any one moment.
The Complexity of Network Virtualization
• Server virtualization hides server resources. This can create problems when using traditional network
architectures.
• VMs are movable, and the network administrator must be able to add, drop, and change network
resources and profiles to support their mobility. This process would be manual and time-consuming
with traditional network switches.
• Traffic flows differ from the traditional client-server model. Typically, there is a considerable
amount of traffic being exchanged between virtual servers (East-West traffic) that changes in
location and intensity over time. North-South traffic is typically traffic destined for offsite locations
such as another data center, other cloud providers, or the internet.
In a traditional router or switch architecture, the control plane and data plane functions occur in the same
device. Routing decisions and packet forwarding are the responsibility of the device operating system. In
SDN, management of the control plane is moved to a centralized SDN controller. The figure compares
traditional and SDN architectures.
• The SDN controller is a logical entity that enables network administrators to manage and dictate how
the data plane of switches and routers should handle network traffic. It orchestrates, mediates, and
facilitates communication between applications and network elements.
• The complete SDN framework is shown in the figure. Note the use of Application Programming
Interfaces (APIs). An API is a standardized definition of the proper way for an application to request
services from another application.
• The SDN controller uses northbound APIs to communicate with the upstream applications, helping
network administrators shape traffic and deploy services. The SDN controller uses southbound APIs
to define the behavior of the data planes on downstream switches and routers. OpenFlow is a widely
implemented southbound API.
Controllers
SDN Types
APIC-EM Features
Cisco APIC-EM provides a single interface for
network management including:
• Discovering and accessing device and host
inventories.
• Viewing the topology (as shown in the figure).
• Tracing a path between end points.
• Setting policies.
Thinking Devices
• Many devices now incorporate smart technology to help to govern their behavior. This can be as
simple as a smart appliance lowering its power consumption during periods of peak demand or as
complex as a self-driving car.
• Whenever a device takes a course of action based on an outside piece of information, then that
device is referred to as a smart device. Many devices that we interact with now have the word smart
in their names. This indicates that the device has the ability to alter its behavior depending on its
environment.
• In order for devices to “think”, they need to be programmed using network automation tools.
Data Formats
Data formats have rules and structure similar to what we have with programming and written languages.
Each data format will have specific characteristics:
• Syntax, which includes the types of brackets used, such as [ ], ( ), { }, the use of white space, or indentation,
quotes, commas, and more.
• How objects are represented, such as characters, strings, lists, and arrays.
• How key/value pairs are represented. The key is usually on the left side and it identifies or describes the data.
The value on the right is the data itself and can be a character, string, number, list or another type of data.
{
"message": "success",
"timestamp": 1560789260, message: success
"iss_position": { timestamp: 1560789260 iss_position:
"latitude": "25.9990", latitude: '25.9990’ longitude: '-
"longitude": "- 132.6992'
132.6992"
} YAML Format
}
JSON Format
XML Format
At times a key may contain more than one value. This is known as an array. An array in JSON is an ordered
list of values. Characteristics of arrays in JSON include:
• The key followed by a colon and a list of values enclosed in square brackets [ ].
• The array is an ordered list of values.
• The array can contain multiple value types including a string, number, Boolean, object or another array inside
the array.
• Each value in the array is separated by a comma.
For example, a list of IPv4 addresses might look like the following output. The key is “addresses”. Each
item in the list is a separate object, separated by braces { }. The objects are two key/value pairs: an IPv4
address (“ip”) and a subnet mask (“netmask”) separated by a comma. The array of objects in the list is also
separated by a comma following the closing brace for each object.
{
"addresses": [
{
"ip": "172.16.0.2",
"netmask": "255.255.255.0"
},
{
"ip": "172.16.0.3",
"netmask": "255.255.255.0"
},
{
"ip": "172.16.0.4",
"netmask": "255.255.255.0"
}
]
}
{
"ietf-interfaces:interface": {
"name": "GigabitEthernet2",
"description": "Wide Area Network",
"enabled": true,
"ietf-ip:ipv4": {
"address": [
{
"ip": "172.16.0.2",
"netmask": "255.255.255.0"
},
{
"ip": "172.16.0.3",
"netmask": "255.255.255.0"
},
{
"ip": "172.16.0.4",
"netmask": "255.255.255.0"
}
]
}
}
}
XML Data Format
XML is one more type of human readable data format used to store, transfer, and read data by applications.
Some of the characteristics of XML include:
• It is like HTML , which is the standardized markup language for creating web pages and web applications.
• It is self-descriptive. It encloses data within a related set of tags: <tag>data</tag>
• Unlike HTML, XML uses no predefined tags or document structure.
XML objects are one or more key/value pairs, with the beginning tag used as the name of the
key: <key>value</key>
The output shows the same data for GigabitEthernet2 formatted as an XML data structure. Notice how the
values are enclosed within the object tags. In this example, each key/value pair is on a separate line and
some lines are indented. This is not required but is done for readability. The list uses repeated instances
of <tag></tag> for each element in the list. The elements within these repeated instances represent one or
more key/value pairs.
<?xml version="1.0" encoding="UTF-8" ?>
<ietf-interfaces:interface>
<name>GigabitEthernet2</name>
<description>Wide Area Network</description>
<enabled>true</enabled>
<ietf-ip:ipv4>
<address>
<ip>172.16.0.2</ip>
<netmask>255.255.255.0</netmask>
</address>
<address>
<ip>172.16.0.3</ip>
<netmask>255.255.255.0</netmask>
</address>
<address>
<ip>172.16.0.4</ip>
<netmask>255.255.255.0</netmask>
</address>
</ietf-ip:ipv4>
</ietf-interfaces:interface>
The API
• An API is software that allows other applications to access its data or services. It is a set of rules
describing how one application can interact with another, and the instructions to allow the interaction
to occur. The user sends an API request to a server asking for specific information and receives an
API response in return from the server along with the requested information.
• An API is similar to a waiter in a restaurant, as shown in the following figure.
An API Example
An important consideration when developing an API is the distinction between open, internal, and partner
APIs:
• Open APIs or Public APIs - These APIs are publicly available and can be used with no restrictions. Because
these APIs are public, many API providers require the user to get a free key, or token, prior to using the API.
This is to help control the number of API requests they receive and process.
• Internal or Private APIs - These are APIs that are used by an organization or company to access data and
services for internal use only. An example of an internal API is allowing authorized salespeople access to
internal sales data on their mobile devices.
• Partner APIs - These are APIs that are used between a company and its business partners or contractors to
facilitate business between them. The business partner must have a license or other form of permission to use
the API. A travel service using an airline’s API is an example of a partner API.
Types of Web Service APIs
A web service is a service that is available over the internet, using the World Wide Web. There are four
types of web service APIs:
• Simple Object Access Protocol (SOAP)
• Representational State Transfer (REST)
• eXtensible Markup Language-Remote Procedure Call (XML-RPC)
• JavaScript Object Notation-Remote Procedure Call (JSON-RPC)
RESTful Implementation
A RESTful web service is implemented using HTTP. It is a collection of resources with four defined
aspects:
• The base Uniform Resource Identifier (URI) for the web service, such
as http://example.com/resources.
• The data format supported by the web service. This is often JSON, YAML, or XML but could be any
other data format that is a valid hypertext standard.
• The set of operations supported by the web service using HTTP methods.
• The API must be hypertext driven.
RESTful APIs use common HTTP methods including POST, GET, PUT, PATCH and DELETE. As shown
in the following table, these correspond to RESTful operations: Create, Read, Update, and Delete (or
CRUD).
POST Create
GET Read
PUT/PATCH Update
DELETE Delete
Web resources and web services such as RESTful APIs are identified using a URI. A URI is a string of
characters that identifies a specific network resource. A URI has two specializations:
• Uniform Resource Name (URN) - identifies only the namespace of the resource (web page, document,
image, etc.) without reference to the protocol.
• Uniform Resource Locator (URL) - defines the network location of a specific resource. HTTP or HTTPS
URLs are typically used with web browsers. Protocols such as FTP, SFTP, SSH, and others can use a URL. A
URL using SFTP might look like: sftp://sftp.example.com.
Many RESTful APIs, including public APIs, require a key. The key is used to identify the source of the
request. Here are some reasons why an API provider may require a key:
• To authenticate the source to make sure they are authorized to use the API.
• To limit the number of people using the API.
• To limit the number of requests per user.
• To better capture and track the data being requested by users.
• To gather information on the people using the API.
Note: The MapQuest API does require a key. Search the internet for the URL to obtain a MapQuest key. Use the
search parameters: developer.mapquest. You can also search the internet for the current URL that outlines the
MapQuest privacy policy.
Simple Network Management Protocol (SNMP) lets administrators manage nodes on an IP network. With a
network management station (NMS), network administrators use
SNMP to monitor and manage network performance, find and
solve network problems, and perform queries for statistics.
SNMP is not typically used for configuration due to security
concerns and difficulty in implementation.
You can also use APIs to automate the deployment and
management of network resources. Instead of manually
configuring ports, access lists, QoS, and load balancing policies,
you can use tools to automate configurations.
Network Automation
Ansible, Chef, Puppet, and SaltStack all come with API documentation for configuring RESTful API
requests. All of them support JSON and YAML as well as other data formats. The following table shows a
summary of a comparison of major characteristics of Ansible, Puppet, Chef, and SaltStack configuration
management tools.
What programming
Python + YAML Ruby Ruby Python
language?
Agent-based or
Agentless Agent-based Supports both Supports both
agentless?
Cisco views IBN as having three essential functions: translation, activation, and assurance. These functions
interact with the underlying physical and virtual infrastructure, as shown in the figure.
Translation - The translation function enables the network administrator to express the expected networking behavior
that will best support the business intent.
Activation - The captured intent then needs to be interpreted into policies that can be applied across the network. The
activation function installs these policies into the physical and virtual network infrastructure using networkwide
automation.
Assurance - In order to continuously check that the expressed intent is honored by the network at any point in time,
the assurance function maintains a continuous validation-and-verification loop.
Network Infrastructure as Fabric
• From the perspective of IBN, the physical and virtual network infrastructure is a fabric; an overlay
that represents the logical topology used to
virtually connect to devices. The overlay
limits the number of devices the network
administrator must program and provides
services and alternative forwarding
methods not controlled by the underlying
physical devices.
• The overlay is where encapsulation
protocols like IPsec and CAPWAP occur.
Using an IBN solution, the network
administrator can use policies to specify
exactly what happens in the overlay control
plane. Notice that how the switches are
physically connected is not a concern of the
overlay.
Cisco DNA
Description Benefits
Solution
• Used to provide visibility by using the • Reduce risk and protect your organization
network as a sensor for real-time analysis against threats - even in encrypted traffic.
Cisco DNA and intelligence. • Gain 360-degree visibility through real-time
Security • It provides increased granular control to analytics for deep intelligence across the
enforce policy and contain threats across network.
the network. • Lower complexity with end-to-end security.
Cisco DNA Center
• Cisco DNA Center is the foundational controller and analytics platform at the heart of Cisco DNA. It
supports the expression of intent for multiple use cases, including basic automation capabilities,
fabric provisioning, and policy-based segmentation in the enterprise network. Cisco DNA Center is a
network management and command center for provisioning and configuring network devices. It is a
hardware and software platform providing a ‘single-pane-of-glass’ (single interface) that focuses on
assurance, analytics, and automation.
• The DNA Center interface launch page gives you an overall health summary and network snapshot.
From here, the network administrator can quickly drill down into areas of interest.
At the top, menus provide you access to DNA Center’s five main areas. As shown in the figure, these are:
• Design - Model your entire network, from sites and buildings to devices and links, both physical and virtual,
across campus, branch, WAN, and cloud.
• Policy - Use policies to automate and simplify network management, reducing cost and risk while speeding
rollout of new and enhanced services.
• Provision - Provide new services to users with ease, speed, and security across your enterprise network,
regardless of network size and complexity.
• Assurance - Use proactive monitoring and insights from the network, devices, and applications to predict
problems faster and ensure that policy and configuration changes achieve the business intent and the user
experience you want.
• Platform - Use APIs to integrate with your preferred IT systems to create end-to-end solutions and add
support for multi-vendor devices.