Professional Documents
Culture Documents
Material de Repaso PDF
Material de Repaso PDF
Review
OSI Model,IPv4 Addressing,
ICMP & ARP
Alberto Arellano A. Ing. Msc.
aarellano@espoch.edu.ec
CCNA – CCNP - CCSP
What is a Network?
5
Client Computers
Software
6
Network Infrastructure
End Devices
Networking Devices
7 Media
End devices
9
Networking Devices
Switches
Routers
Firewalls
10 Access Point
Network media: The medium over which the
message travels.
Metallic wires - electrical impulses.
11
Physical Topology
23
Wireless PAN – BODY AREA
NETWORK
A body area network (BAN), also referred to as a wireless
body area network (WBAN) or a body sensor network (BSN),
is a wireless network of wearable computing devices.
Wireless- Controller Area
Network
A Controller Area Network (CAN bus) is a vehicle
bus standard designed to allow microcontrollers and devices
to communicate with each other in applications without a host
computer. Transmitting and receiving data at 20kbps in the
unlicensed 900MHz band.
EJERCICIO
Una red VAN que implementa la tecnología 802.15.4, está compuesta por 20
automóviles cada uno de los cuales posee un sistema de adquisición de
datos (motas) mediantes sensores, cada uno de las motas está compuesto
por 12 sensores: 4 de Temperatura, 2 tacómetro, 2 sensores de flujo de aire y
4 sensores de proximidad, además de un módulo de comunicación en 2.4
Ghz., las características de los sensores se muestran a continuación:
Determine:
• El % de uso de la red si todos las 20 automóviles están transmitiendo datos, y si se
considera un uso real del 75% del bit rate nominal del estándar 802.15.4.
• El tiempo de servicio de la red cuando 10, 15 y 20 autos transmiten datos, considere
un uso real del 50, 80 y 100% del bit rate nominal del estándar 802.15.4
Metropolitan Area
Network (MAN)
A metropolitan area
network (MAN) is a
high-speed network that
connects local area
networks (LANs) in a
metropolitan area.
Metropolitan Area Network
(MAN)
Main characteristics of MAN:
Areas of coverage: MANs connect various
locations such as campuses, offices, and
government, that are frequently used as links
between buildings.
Distance: MANs span (cover) distance up to 100
miles (161 km).
Ownership: MANs are owned by a group of users
who jointly own and operate the network.
Technologies: Metro Ethernet, SMDS, WIMAX
Wide Area
Network (WAN)
A wide area network (WAN) is a network that
covers a large geographical area.
Wide Area Network (WAN)
Main characteristics of WAN:
Areas of coverage: WANs located within a
countryside and worldwide networks, (such as a city,
country, or the world) using a communications
channel that combines many types of media such as
telephone lines, cables and radio waves. The Internet
is the world’s largest WAN.
Distance: WANs span (cover) distance greater than
160 Km.
Ownership: WANs have no ownership. (Carriers)
Technologies: Frame Relay, ATM, MPLS, LTE
CONMUTACION Y RUTEO I
Server
HTTP Data
Client
HTTP Data
The OSI physical layer provides the means to transport the bits
that make up a data link layer frame across the network media.
Physical Layer Media
The physical layer produces the representation and groupings of bits for
each type of media as:
Copper cable: The signals are patterns of electrical pulses.
Where,
BW =bandwidth at channel
L= number of signed levels used to represent data.
Noisy Channel :
Shannon capacity
An ideal noiseless channel never exists. The maximum data
rate for any noisy channel is:
Where,
C= Channel capacity in bits per second
BW= bandwidth of channel
S/N= signal to noise ratio.
Exercises
Solution
We can use the Nyquist formula as shown:
This means that the highest bit rate for a telephone line is
34.860 kbps. If we want to send data faster than this, we can
either increase the bandwidth of the line or improve the signal-
to-noise ratio.
SNR=104.5=31623
C=B log2(1+SNR) = 10 x 106 x log231623 = 149,5 Mbps
log231623=(log1031623/log102)
Exercises – Shannon &
Nyquist Capacity
We have a channel with a 1-MHz bandwidth. The SNR for this
channel is 63. What are the appropriate bit rate and signal
level?
Solution
First, we use the Shannon formula to find the upper
limit.
In the network of the figure, server A sends a data stream of 135 Kbps
every 30 seconds. This traffic was sent for 1 hour. Calculate the
utilization percentage of the link between R1 and R2
% U = 16200 / 20000
% U = 81%
Transmission Media
In data communications, the transmission medium is usually
free space, metallic cable, or fiber-optic cable. The information
is usually a signal that is the result of a conversion of data from
another form.
Copper Media
Unshielded Twisted Pair Shielded Twisted Pair
Coaxial Cable
Coaxial Cable
• Coaxial cable is a
copper-cored cable
surrounded by a heavy
shielding and is used to
connect computers in a
network.
• Outer conductor shields
the inner conductor from
picking up stray signal
from the air.
Category Impedance Use
• High bandwidth but lossy
channel. RG-59 75 Cable TV
• Repeater is used to RG-58 50
Thin
regenerate the weakened Ethernet
signals. Thick
RG-11 50
Ethernet
Unshielded Twisted-
Pair (UTP) Cable
Components UTP Cabling
Systems
RJ45
connector
RJ45 Jack
connectors
Wall Plate
Components UTP Cabling
Systems
Types of UTP Cable
Use of UTP Cable
Shielded Twisted-Pair (STP)
Cable - Connectors
Testing UTP Cables
Fiber Optic Cabling
Types of Fiber Media
Types of Fiber Media
Types of Fiber Media
Network Fiber
Connectors
Transceivers
Testing Fiber Cables
OTDR
Wireless
70
802.11 Wi-Fi Standards
802.11 Operating Modes
IEEE 802.11 defines the following operating modes:
• Infrastructure mode
• Ad hoc mode
AD-HOC
INFRASTRUCTURE
802.11 Configuration
3G/4G Networks
First Generation Mobile Systems (1G)
Voice Signals Only
Analogue Cellular Phones
NMT, AMPS
Second Generation Mobile Systems (2G)
Voice & Data Signals
Digital Fidelity Cellular Phones
GSM, CDMA, TDMA
Third Generation Mobile System (2.5G)
Enhance 2G
Higher Data Rates
GPRS, EGDE
Third Generation Mobile System (3G)
Voice, Data & Video Signals
Video Telephony/ Internet Surfing
3G, W-CDMA, UMTS
Fourth Generation Mobile System (4G)
Enhanced 3G/ Interoperability Protocol
High Speed & IP-based
4G, Mobile IP
3G/4G Networks
Technology 1G 2G 2.5G 3G 4G
Design Began 1970 1980 1985 1190 2000
Data Bandwidth 1.9 kbps 14.4 kbps 384 kbps 2 Mbps 2000Mbps
PSTN, Packet
Core Network PSTN PSTN Packet Network Internet
Network
5G Networks
CONMUTACION Y RUTEO I
SMTPProtocol (SMTP)
Simple Mail Transfer • Used to transfer mail messages and attachments.
Post OfficePOP
Protocol (POP) • Used by email clients to retrieve email from a remote server.
DNS
Domain Name System (DNS) • Used to resolve Internet names to IP addresses
Telnet
Telnet • Used to provide remote access to networking devices.
File TransferFTP
Protocol (FTP) • Used for interactive file transfer between systems.
TFTPProtocol (TFTP)
Trivial File Transfer • Used for connectionless active file transfer.
Dynamic Host Configuration Protocol • Used to dynamically assign an IP address, subnet mask,
DHCP
(DHCP) default gateway, and DNS server addresses to a host.
Application
Layer
HTTP SMTP POP FTP DNS DHCP TFTP SNMP
Transport
Layer
TCP UDP
Internet
Layer
IP
Network
Access
Layer LAN / WAN
TCP versus UDP
TCP UDP
UDP Header (8 bytes)
connection.
Client: TCP source port
Server: TCP destination port
May also include the range of Registered Ports (Numbers 1024 to
49151)
Hypertext Transfer Protocol (HTTP)
HTTP HTTP
HTTP
HTTP
Client
Server
Server program
HTTP
Client
HTTP
Server
Internet)
Upload files (e.g. send to the Internet).
POP3
IMAP
Email servers communicate with each other using the Simple Mail
Transfer Protocol (SMTP) to send mail.
SMTP uses TCP port 25.
For example:
cisco.com = 72.163.4.161
Uta.edu.ec = 200.93.227.4
facebook.com = 31.13.73.1
Domain names, such as www.uta.edu.ec, are much easier for people to
remember than 200.93.227.4.
Root DNS Servers Map
http://www.root-servers.org/
nslookup
Displays default DNS server for your host
Can be used to query a domain name and get the IP address
ipconfig /displaydns
After a certain amount of time, specified in the Time to Live (TTL)
associated with the DNS resource record, the resolver discards the
record from the cache.
ipconfig /flushdns – Manually deletes entries
The default TTL for positive responses is 86,400 seconds (1 day).
The default TTL for negative responses is 300 seconds.
Dynamic Host Configuration
Protocol
Default Gateway
Domain Name
DNS Server
NetBIOS Name
Transport Layer Port
Numbers
Hypertext Transfer Protocol (HTTP) - TCP Port 80
Hypertext Transfer Protocol Secure (HTTPS)- TCP Port 443
Simple Mail Transfer Protocol (SMTP) - TCP Port 25
Post Office Protocol (POP) - TCP Port 110
Telnet - TCP Port 23
SSH - TCP 22
File Transfer Protocol (FTP) - TCP Ports 20 & 21
Trivial FTP (TFTP) - UDP 69
Domain Name System (DNS) - TCP/UDP Port 53
Dynamic Host Configuration Protocol - UDP Port 67 & 68
CONMUTACION Y RUTEO I
Functions
of the
Network
Layer Layer IP
The network layer, or OSI Layer 3, provides services to allow end devices to
exchange data across the network.
The network layer uses four basic processes:
Addressing end devices
Encapsulation
Routing
De-encapsulation
Network Layer Protocols
Characteristics of IPv4
Connectionless:
No connection is established before sending data
packets.
Best effort delivery:
No guarantee packet delivery.
Media independent:
Operates independently of the medium carrying
the data.
Best Effort Delivery =
Unreliable
IPv4 Media Independent
Source IP Address
Destination IP Address
Options (optional)
Padding
Sample IPv4 Packet
IP Header Differentiated Services
Version Total Length
Length
DSCP ECN
Source IP Address
Destination IP Address
Source IP Address
Destination IP Address
Version (4 bits)
– Indicates the version of IP currently used.
– 0100 = 4 and therefore IPv4
– 0110 = 6 and therefore IPv6
IP Header Differentiated Services
Version Total Length
Length
DSCP ECN
Source IP Address
Destination IP Address
Source IP Address
Destination IP Address
Source IP Address
Destination IP Address
Source IP Address
Destination IP Address
Options (optional)
A router may have to fragment
Padding
a packet
when forwarding it from one medium to
another medium that has a smaller MTU.
When this happens, fragmentation
occurs and the IPv4 packet uses the
following 3 fields to keep track of the
fragments
IP Header Differentiated Services
Version Total Length
Length
DSCP ECN
Source IP Address
Destination IP Address
Source IP Address
Destination IP Address
Flag (3 bits)
– This 3-bit field identifies how the packet is fragmented.
– It is used with the Fragment Offset and Identification
fields to help reconstruct the fragment into the original
packet.
IP Header Differentiated Services
Version Total Length
Length
DSCP ECN
Source IP Address
Destination IP Address
127
IP Header Differentiated Services
Version Total Length
Length
DSCP ECN
Source IP Address
Destination IP Address
Source IP Address
Destination IP Address
Protocol (8 bits)
– Field indicates the data payload type that the packet is
carrying, which enables the network layer to pass the data
to the appropriate upper-layer protocol.
– Common values include ICMP (1), TCP (6), and UDP (17).
– Others: GRE (47), ESP (50), EIGRP (88), OSPF (89)
– http://www.iana.org/assignments/protocol-numbers/
IP Header Differentiated Services
Version Total Length
Length
DSCP ECN
Source IP Address
Destination IP Address
Source IP Address
Destination IP Address
Source IP Address
Destination IP Address
Tema 5. Direccionamiento
IPv4
Alberto Arellano A. Ing. Msc.
aarellano@espoch.edu.ec
CCNA – CCNP - CCSP
133
IPv4 Address
“The identifier used in the IP layer of the TCP/IP protocol
suite to identify each device connected to the Internet is
called the Internet address or IP address. An IPv4 address
is a 32-bit address that uniquely and universally defines the
connection of a host or a router to the Internet; an IP
address is the address of the interface”.(Berhouz Forouzan)
HOST
TCP/IP uses the term host to refer to an end system that
attaches to the Internet.
IPv4 Address
11111111111111110000000000000000
An IP address is a hierarchical address that is made up of two parts:
A network portion
A host portion.
Subnet Mask
Used to define the:
Network portion
Host portion
32 bits
11111111.11111111.00000000.00000000
Expressed as:
Dotted decimal
Ex: 255.255.0.0
Slash notation or prefix length
/16 (the number of one bits)
Example
192 168 11 10
192 168 11 0
The prefix length is the number of bits set to 1 in the subnet mask.
It is written in “slash notation”, a “/” followed by the number of
bits set to 1.
For example:
IP address: 192.168.11.10 255.255.255.0
Is the same as: 192.168.11.10 /24
Valid Subnet Mask Values
1 0 0 0 0 0 0 0 128
1 1 0 0 0 0 0 0 192
1 1 1 0 0 0 0 0 224
1 1 1 1 0 0 0 0 240
1 1 1 1 1 0 0 0 248
1 1 1 1 1 1 0 0 252
1 1 1 1 1 1 1 0 254
1 1 1 1 1 1 1 1 255
Subnet Masks
So how do hosts figure out which part of the address is the network portion?
Hosts AND the IPv4 address and the subnet mask.
“1” bits refer to the network portion.
“0” bits refer to the host portion.
Hosts actually use a the Boolean “AND” operation to accomplish this task.
This tells them what network they belong to.
Destination IP Address
A B
192.168.1.100 192.168.2.101
255.255.255.0 255.255.255.0
192.168.1.10 192.168.1.11
Same network?
AND AND
192.168.1.100 192.168.2.101
Same network?
AND AND
portion.
Host Range
Host Addresses in binary
Dynamically
Static Assignment
DHCP Discover
Mac Address
DHCP Request
IP, MAC Address
Client DHCP
Server
DHCP Offer
IP, Lease time
DHCP Ack
IP, Lease time
Dynamic vs. Static IP
Addressing Quiz
Desktop computer Server Router Switch
Source IP addresses
are always unicast
Unicasts:
Packet travels from one host to another specific host.
Multicasts:
Packet travels from one host to a select number of other hosts.
Supports voice and audio broadcasts, news feeds, distribution of
software, re-imaging clients off peak times.
Broadcasts:
Packet travels from one host to all hosts on the local network.
Destination Address Type
Classful Addressing
Class A /8
Class B /16
Class C /24
IPv4 Address Classes
Address # of Possible # of Possible Total Possible
Class Networks Hosts Addresses
Class A. 255.0.0.0 or /8
Was reserved for governments and extremely large organizations.
Class B. 255.255.0.0 or /8
Was reserved for medium/large organizations.
A 0 0 – 127 8 24
B 10 128 - 191 16 16
none.
TEST-NET addresses:
192.0.2.0 to 192.0.2.255 (192.0.2.0 /24)
Subnetting
Problem: Organizations
have multiple networks
which are independently University Network
managed Engineering Medical
Solution 1: Allocate a School School
separate network
address for each network Library
Difficult to manage
From the outside of
the organization, each
network must be
addressable.
Solution 2: Add another
172.16.0.0/24 172.16.10.0/24
172.16.5.0/24 172.16.25.0/24
165
Basic Idea of Subnetting
Split the host number portion of an IP address into a
subnet number and a (smaller) host number.
Result is a 3-layer hierarchy
Then:
Subnets can be freely assigned within the organization
Internally, subnets are treated as separate networks
Subnet structure is not visible outside the organization
How your provider (ISP) sees
you….
150.50.1.0 /24
150.50.2.0 /24
150.50.0.0 /16
150.50.0.0
150.50.3/16
.0 /24
150.50.4.0 /24
150.50.5.0 /24
192.168.1.0
255.255.255.0
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 60 hosts per
subnet
Calculating the number
subnets/hosts
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 0 0 0 0 0 0 0 0
6 host bits
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 60 hosts per
subnet
Calculating the number
subnets/hosts
Number of subnets
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 1 1 0 0 0 0 0 0 255.255.255.192
6 host bits
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 60 hosts per subnet
Number of subnets
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 1 1 0 0 0 0 0 0 255.255.255.192
192.168.1. 0 0 0 0 0 0 0 0 192.168.1.0/26
192.168.1. 0 1 0 0 0 0 0 0 192.168.1.64/26
192.168.1. 1 0 0 0 0 0 0 0 192.168.1.128/26
192.168.1. 1 1 0 0 0 0 0 0 192.168.1.192/26
Number of Hosts per subnet: 6 bits, 64-2 hosts, 64 TOTAL
hosts, 62 usable hosts
Number of Subnets: 2 bits or 4 subnets
Calculating the number
subnets/hosts
192.168.1.0
255.255.255.0
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 12 hosts per
subnet
Calculating the number
subnets/hosts
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 0 0 0 0 0 0 0 0
4 host bits
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 12 hosts per
subnet
Calculating the number
subnets/hosts
Number of subnets
192.168.1. 0 0 0 0 0 0 0 0
255.255.255. 1 1 1 1 0 0 0 0 255.255.255.240
4 host bits
Network Host
Network 192.168.1.0/24
Need:
As many subnets as possible, 12 hosts per subnet
192.168.1. 0 0 0 0 0 0 0 0 192.168.1.0/28
192.168.1. 0 0 0 1 0 0 0 0 192.168.1.16/28
192.168.1. 0 0 1 0 0 0 0 0 192.168.1.32/28
192.168.1. 0 0 1 1 0 0 0 0 192.168.1.48/28
New Subnet Mask:
192.168.1. 0 1 0 0 0 0 0 0 192.168.1.64/28
255.255.255.240 (/28)
Number of Hosts per
192.168.1. 0 1 0 1 0 0 0 0 192.168.1.80/28
192.168.1. 0 1 1 0 0 0 0 0 192.168.1.96/28
subnet: 4 bits, 16-2
192.168.1. 0 1 1 1 0 0 0 0 192.168.1.112/28
hosts, 16 TOTAL hosts,
192.168.1. 1 0 0 0 0 0 0 0 192.168.1.128/28
14 usable hosts
Number of Subnets: 4
192.168.1. 1 0 0 1 0 0 0 0 192.168.1.144/28
192.168.1. 1 0 1 0 0 0 0 0 192.168.1.160/28
bits or 16 subnets
192.168.1. 1 0 1 1 0 0 0 0 192.168.1.176/28
192.168.1. 1 1 0 0 0 0 0 0 192.168.1.192/28
192.168.1. 1 1 0 1 0 0 0 0 192.168.1.208/28
192.168.1. 1 1 1 0 0 0 0 0 192.168.1.224/28
192.168.1. 1 1 1 1 0 0 0 0 192.168.1.240/28
VLSM
28 to 10.3.255.240 / 28
Subnet 10.4.0.0/16, 4 more bits
are borrowed again, to create 16
subnets with a /20 mask.
– Mask allows for 2,046 host
20 to 10.4.240.0 / 20
Classless Inter-Domain Routing
(CIDR)-Supernetting
Route summarization done by CIDR
Routes are summarized with masks that are less than
that of the default classful mask (supernetting)
-Example:
172.16.0.0 / 13 is the summarized
route for the 172.16.0.0 / 16 to
172.23.0.0 / 16 classful networks
Answer:????
ICMP
Internet Control Message Protocol
RFC 792
ICMP is available for both IPv4 and IPv6.
ICMPv4 is the messaging protocol for IPv4.
Route redirection
Time exceeded
Type
the type of service being provided. There’s a specific type number for each
error or informational message sent.
Code
the error code provides further information on the message type. It tells what
was the possible cause to the problem.
Checksum
the 16-bit one's complement of the one's complement sum of the ICMP
message starting with the ICMP type. Used to find problems on the ICMP
message ONLY.
ICMP Messages
source device.
ICMP: Echo Request/Reply
8 0
Send
0 0
Reply
ICMP: Echo Request/Reply
ICMP: Echo Request/Reply
Destination or Service
Unreachable
When a router cannot deliver a packet, it sends an ICMP
Destination Unreachable message to the source.
Message includes a code indicating why it could not be
delivered.
Some of the Destination Unreachable codes for ICMPv4 are:
0 - net unreachable.
1 - host unreachable.
2 - protocol unreachable.
3 - port unreachable.
The ping crosses R1, then R2, but R3 encounters a link error.
R1 R2 R3 PC2
PC1
Destination or Service
Unreachable
C:\Users\eietr> ping 192.168.2.115 Codes 0 (net
Pinging 192.168.1.115 with 32 bytes of data:
unreachable) is sent
Reply from 192.168.1.116: Destination net unreachable. when a router does
Reply from 192.168.1.116: Destination net unreachable. not have the
Reply from 192.168.1.116: Destination net unreachable. requested network.
Reply from 192.168.1.116: Destination net unreachable.
C:\Users\eietr>
www.pingtest.net
Ping Tools (pingdeli)
https://www.etopian.com/software/ip-network-ping-tool-freeware/
Ping Tools - IPERF
Route Redirection
time-exceeded
message
ICMP Type=11 Code=0 or 1 Checksum
header Rest of Header=unused (all zero)
Data IP header and first 8 bytes of original datagram’s data
• Code=0, TTL count exceeded
• Code=1, Fragment reassembly time exceeded
Time-exceeded
Router Router
TTL=1 X
Traceroute
tracert www.espol.edu.ec
Open Visual Traceroute
Address Resolution Protocol
(ARP)
MAC Address
Representations
MAC Address Format
OUI unique
An Intel MAC address: 00-21-CC-BA-44-C4
0000 0000 - 0010 0001 – 1100 1100 - 1011 1010 – 0100 0100 – 1100 0100
IEEE OUI FAQs: http://standards.ieee.org/faqs/OUI.html
Unicast MAC Address
Broadcast MAC Address
Multicast MAC Address
Protocol Type: This field is the complement of the Hardware Type field,
Specifying the type of layer three addresses used in the message. For IPv4
addresses, this value is 2048 (0800 hex), which corresponds to the EtherType
code for the Internet Protocol.
Hardware Address Length: Specifies how long hardware addresses are in this
message. For Ethernet or other networks using IEEE 802 MAC addresses, the
value is 6.
ARP Message Format
192.168.10.10 192.168.10.11
255.255.255.0 255.255.255.0
Destination Address Source Address Type IP FCS
bb.bb aa.aa DA 192.168.10.11
Devices can only communicate with other devices on the same subnet
A knows that it is on the 192.168.10.0/24 subnet (AND operation with its IP address and
subnet mask). (Same subnet = Same subnet mask)
A knows that B (192.168.1.11) is on its same subnet (AND operation with B’s IP address
and A’s subnet mask)
SAME Subnet
A can reach B B 192.168.10.11
A 192.168.10.10
directly without AND 255.255.255.0
AND 255.255.255.0
going through a --------------------
--------------------
router 192.168.10.0
192.168.10.0
Understanding IP
communications
192.168.10.0/24 A MAC MAC C 192.168.20.0/24
Subnet aa.aa cc.cc Subnet
192.168.10.10 192.168.20.12
255.255.255.0 255.255.255.0
Devices can only communicate with other devices on the same subnet
A knows that it is on the 192.168.10.0/24 subnet (AND operation with its IP address and
subnet mask) (Same subnet = Same subnet mask)
A knows that C (192.168.20.12) is on a different subnet (AND operation with B’s IP
address and A’s subnet mask) – Can’t get there directly!
Destination MAC:
FF-FF-FF-FF-FF-FF
192.168.10.10 192.168.10.11
255.255.255.0 255.255.255.0
A C
192.168.10.10 192.168.20.12
255.255.255.0 255.255.255.0
A C
A C
192.168.1.110 192.168.1.50
MAC 00-0A MAC 00-0C
192.168.1.1
MAC 00-0D
R1 Internet
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
ARP Request
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
The target IPv4 is not me.
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
Here is my MAC
B MAC 00-0B address for the IPv4
PC-A’s ARP Cache address you were
IPv4 Address MAC Address looking for!
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Sender IPv4 Sender MAC
00-0A 00-0C 192.168.1.50 00-0C
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
Here is my MAC
B MAC 00-0B address for the IPv4
PC-A’s ARP Cache address you were
IPv4 Address MAC Address looking for!
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Sender IPv4 Sender MAC
00-0A 00-0C 192.168.1.50 00-0C
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
192.168.1.50 00-0C
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Sender IPv4 Sender MAC
00-0A 00-0C 192.168.1.50 00-0C
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
192.168.1.50 00-0C
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
The target IPv4 is not me.
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address The target IPv4 is not me.
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Here is my MAC address for
Default Gateway: 192.168.1.1 MAC 00-0D
the IPv4 address you were
looking for! Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Target IPv4 Target MAC
00-0A 00-0D 192.168.1.1 00-0D
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Target IPv4 Target MAC
00-0A 00-0D 192.168.1.1 00-0D
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
192.168.1.1 00-0D
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Target IPv4 Target MAC
00-00A 00-0D 192.168.1.1 00-0D
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
192.168.1.1 00-0D
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
192.168.1.110 192.168.1.50
MAC 00-0A MAC 00-0C
192.168.1.1
PC-A’s ARP Cache MAC 00-0D
IPv4 Address MAC Address
192.168.1.1 00-0D
Viewing and Clearing the
ARP Table
To view the local ARP table in Windows &
Linux: arp –a
To clear the local ARP table in Windows&
Linux: arp –d
CONMUTACION Y RUTEO I
IPv4
IPv4 was standardized in 1981,
provisioning 4.29 billion (232) IP
addresses for a world population
of 4.41 billion people. *
Private Address
Space
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
5
IPv4 Address Exhaustion
http://www.potaroo.net/tools/ipv4/
6
What is happening with the ISPs
And then there’s mobile…
https://www.google.com/intl/es/ipv6/statistics.html
IPv6 Adoption Statistics
https://www.akamai.com/uk/en/our-thinking/state-of-
the-internet-report/state-of-the-internet-ipv6-
adoption-visualization.jsp
Introducing IPv6
340 undecillion
= 340,282,366,920,938,463,463,374,607,431,768,211,456
IPv6 Introduction
10 nonillion
= 10,000,000,000,000,000,000,000,000,000,000
IPv6 Features
• IPv6 is not just about more addresses:
• Simplified Header
• End-to-end Connectivity
• Server-less autoconfiguration ("plug-n-play") and
reconfiguration.
• Faster Forwarding/Routing
• No Broadcast
• Mobility
• Enhanced Priority Support
IPv6: A Brief History
Benefits
• Native dual stack does not require any tunneling
mechanisms on internal networks
• Both IPv4 and IPv6 run independent of each other
• Dual stack supports gradual migration of endpoints,
networks, and applications
Tunneling – 6to4
IPv4
• IPv6 takes advantage of 64-bit
CPUs.
• Several differences between IPv4
and IPv6 headers.
• Simpler IPv6 IPv6
64-bit memory word
header.
• Fixed 40 byte
IPv6 header.
• Lets look at
the
differences…
IPv6 Version
IPv4
• IPv4 Version contains 4.
• IPv6 Version contains 6.
• Version 5?- Internet Stream Protocol
(ST2)
IPv6
IPv4 Internet Header Length
IPv4
• IPv4 Internet Header Length (IHL) 1
• Length of IPv4 header in 32-bit 2
words including any Options or 3
Padding. 4
• IPv6 5
• IHL for IPv6 is not needed. ?
• IPv6 header is fixed at 40 bytes.
IPv6
8 bytes
8 bytes
40 bytes = 8 bytes
8 bytes
8 bytes
IPv6 Traffic Class
IPv6
7 6 5 4 3 2 1 0
IP Precedence Unsused
DiffServ Code Point (DSCP) IP ECN
IPv6 Flow Label
11001011000101100
10110010111000111
IPv6
IPv6 Payload Length
IPv4 Header Data (Payload)
• IPv4 Total Length – Number of bytes
of the IPv4 header (options) + data. IPv4
• IPv6 Payload Length – Number of
bytes of the payload.
• Does not include the main IPv6
header.
• Includes extension headers + data
IPv6
Payload
IPv6 Extension
IPv6 Header Header (Optional) Data
IPv6 No Fragmentation
• Common values:
• 6 = TCP IPv6
• 17 = UDP
• 58 = ICMPv6
• 88 = EIGRP IPv6 Next Data
• 89 = OSPF Header Header (Protocol: TCP, UDP, ICMPv6, etc.)
IPv6 Hop Limit
IPv6
IPv4 Header Checksum
• Because it’s
not in IPv6, IPv6
the UDP
checksum is
now
mandatory.
IPv6 Extension Header
2001:0DB8:AAAA:1111:0000:0000:0000:0100
2001:DB8:1000::1
Rule 2: Double Colon :: Choices
RFC 5952
2001 : DB8 :: 1234 : 0 : 0 : 5678
or
… RFC 5952 states that the longest string of zeroes must be replaced
with the :: and if they are equal then the first string of 0’s should use
the :: representation.
IPv4: Subnet Mask
and Prefix Length
Prefix Subnet
Binary Mask Length Mask
11111111 00000000 00000000 00000000 /8 255.0.0.0
11111111 10000000 00000000 00000000 /9 255.128.0.0
11111111 11000000 00000000 00000000 /10 255.192.0.0
11111111 11100000 00000000 00000000 /11 255.224.0.0
11111111 11110000 00000000 00000000 /12 255.240.0.0
IPv4 Network portion
Host
11111111 portion
11111000 00000000 00000000 /13 255.248.0.0
Prefix 11111111 11111100 00000000 00000000 /14 255.252.0.0
11111111 11111110 00000000 00000000 /15 255.254.0.0
11111111 11111111 00000000 00000000 /16 255.255.0.0
11111111 11111111 10000000 00000000 /17 255.255.128.0
• IPv4, the prefix, the network 32 11111111 11111111 11000000
bits 00000000 /18 255.255.192.0
11111111 11111111 11100000 00000000 /19 255.255.224.0
portion of the address, can 11111111 11111111 11110000 00000000 /20 255.255.240.0
be identified by: 11111111 11111111 11111000 00000000 /21 255.255.248.0
11111111 11111111 11111100 00000000 /22 255.255.252.0
• Dotted decimal subnet 11111111 11111111 11111110 00000000 /23 255.255.254.0
mask 11111111 11111111 11111111 00000000 /24 255.255.255.0
11111111 11111111 11111111 10000000 /25
• Prefix length 255.255.255.128
• The number of bits in the 11111111 11111111 11111111 11000000 /26
255.255.255.192
prefix or network portion of 11111111 11111111 11111111 11100000 /27
the address. 255.255.255.224
11111111 11111111 11111111 11110000 /28
255.255.255.240
11111111 11111111 11111111 11111000 /29
255.255.255.248
11111111 11111111 11111111 11111100 /30
255.255.255.252
11111111 11111111 11111111 11111110 /31
255.255.255.254
IPv6 Prefix Length
18,446,744,073,709,600,000
/ 315,360,000,000,000
= 58,494 years
48
IPv6 over Ethernet
49
IPv6 Address Types…. Road Map
IPv6
IP Address Types
Global Unicast Address
GUA
IPv6 Internet
Range:
001
2000::/64 thru 3fff:fff:fff:fff::/64
32 bits
128 bits
/48 /64
16 bits 16 bits 16 bits 16 bits 16 bits 16 bits 16 bits 16 bits
3 + 1 = 4 (/64) : 4
2001:0DB8:CAFE:0001:0000:0000:0000:0100/64
2001:DB8:CAFE:1::100/64
Subnetting IPv6
/64
2001:DB8:0000:0000:0000:0000:0000:0000
64-bit Interface ID
/60 = 16 /64’s
/56 = 256 /64’s
/52 = 4,096 /64’s
/32 = 65,536 /48’s /48 = 65,536 /64’s (Many sites will get this prefix length)
Hexadecimal 00 03 6B E9 D4 80
Step 1: Split the MAC address
Binary 0000 0000 0000 0011 0110 1011 1110 1001 1101 0100 1000 0000
Binary 0000 0010 0000 0011 0110 1011 1111 1111 1111 1110 1110 1001 1101 0100 1000 0000
Binary 02 03 6B FF FE E9 D4 80
Link-Local Unicast Range
First 10 bits
1111 1110 10xx xxxx Remaining 54 bits 64-bit Interface ID
Link-local Unicast
IPv6
Link-Local Unicast Range
Link-Local Communications
PC> ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix :
Link-local IPv6 Address . . . . :
fe80::50a5:8a35:a5bb:66e1
IPv4 Address. . . . . . . . . . : 192.168.1.101
Subnet Mask . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . : 192.168.1.1
• IPv6 is automatically enabled with Windows, MAC and Linux operating systems.
• Windows XP and Windows Server 2003 Generates the local link address through the
process EUI-64.
• Windows Vista® or Windows Server® 2008 by default generate random interface IDs
for non-temporary autoconfigured IPv6 addresses, including public and link-local
addresses, rather than EUI-64-based interface IDs
• Can communicate with other devices on the link, including the router.
An Important Role in IPv6
Routing Protocol
Messaging
From: Link-local
ICMPv6 Router From: Link-local or
To: Multicast
Solicitation unspecified address
To: Multicast
From: Link-local ICMPv6 Router I will use
To: Multicast Advertisement your link-
local as my
default
gateway,
• Used as a source IPv6 address before a device gets one
dynamically (SLAAC and DHCPv6).
• Router’s link-local address is used by devices as the default
gateway.
• Routers exchange routing messages.
• Router use the link-local address as the next-hop address in the
routing table: via link-local address.
Loopback Addresses
• Loopback Address
• ::1/128
• Used by a node to send an IPv6 packet to itself, typically
when testing the TCP/IP stack
• Same functionality as IPv4 loopback 127.0.0.1
• Not routable.
• Unspecified Address
• :: (all-0s)
• Indicates the absence or anonymity of an IPv6 address
(RS source address)
• Used as a source IPv6 address during duplicate address
detection process
Multicast
Addresses
• Multicast Addresses - Used to
send a single packet to multiple
destinations simultaneously (one-
to-many).
• Assigned Multicast Address –
• FF02::/8 – Multicast addresses
with link-local scope
Multicast Addresses
• Anycast Address
• A unicast address that is assigned to more than one
interface (typically different devices).
ICMPv6
Internet Control Message Protocol for IPv6
Next
All ICMPv6 IPv6 Main Header ICMPv6
Data
messages Header 58 Header
ICMPv6 Messages
Next
IPv6 Header Header = ICMPv6 Message
58
0 8 16 24 31
Type Code Checksum
Message Body
Code Values
0 - No route to destination
0 8 16 24 31 1 - Communication with destination
Type = 1 Code Checksum administratively prohibited
2 - Beyond scope of source
Unused address
3 - Address unreachable
As much of invoking packet as possible without the 4 - Port unreachable
ICMPv6 packet exceeding the minimum IPv6 MTU. 5 - Source address failed
ingress/egress policy
6 - Reject route to destination
0 8 16 24 31
Type = 2 Code = 0 Checksum
MTU of the next hop link
2
ICMPv6 Packet Too Big
Use MTU 1350
3
IPv6 Packet
MTU 1350
Error Message: Time Exceeded
IPv6
0 8 16 24 31
Type = 3 Code = 0 Checksum
Unused
?
Next Next
IPv6 Main Header Extension Header TCP
Header Data
Header 138 6 Header
• Type 4
• Generated when a receiving device finds a problem with a field
in the main IPv6 header such as the Next Header field – packet
is discarded.
ICMPv6
Echo Request and Echo Reply
Type 128 = Echo Request
Type 129 = Echo Reply
0 8 16 24 31
Type = 128/129 Code = 0 Checksum
Identifier Sequence Number
Data
• Redirect Message
Similar to ICMPv4 redirect message
Router-to-Device messaging
Dynamic Address Allocation
in IPv4
DHCPv4 Server
1
I need IPv4
addressing
information.
Here is everything
you need.
Dynamic Address Allocation
in IPv6
To all IPv6 routers: I might not be
I need IPv6 address needed.
information.
DHCPv6 Server
To all IPv6 devices: ICMPv6 Router Advertisement
Let me tell you how
to do this … 1. SLAAC
2. SLAAC with
Stateless DHCPv6
3. Stateful DHCPv6
SLAAC
(Stateless Address Autoconfiguration)
RA Message Options
2 1 Neighbor
Know
My IPv6!
Neighbor Neighbor Cache IPv6, what
Here is the
Advertisement Solicitation is the
MAC?
MAC?
2001:DB8:CAFE:1::200/64 2001:DB8:CAFE:1::100/64
FF02::1:FF00:200 (Solicited Node Multicast)
MAC Address MAC Address
PC2 00-1B-24-04-A2-1E 00-21-9B-D9-C6-44 PC1
1
PC1> ping 2001:DB8:CAFE:1::200
4 3 Neighbor Cache 2 5
Neighbor Neighbor <empty until step 5>
Advertisement Solicitation
PC1
Neighbor Cache
IPv6 Address MAC Address
2001:DB8:ACAD:1::10 0021.9bd9.c644 IPv6 - 2001:DB8:ACAD:1::10
?
MAC - 0021.9bd9.c644
• Neighbor Cache – Maps IPv6 addresses with Ethernet MAC addresses
• Similar to ARP Cache for IPv4
• 5 States (2 noticeable and 3 transitory):
• Reachable: Packets have recently been received providing confirmation that
this device is reachable.
• Stale: A certain time period has elapsed since a packet has been received from
this address.
• Transitory States: INCOMPLETE, DELAY, PROBE
Neighbor Cache
Windows
C:\> netsh interface ipv6 show neighbor
CONMUTACIÓN Y RUTEO I
Exterior
Gateway
Interior Gateway Protocols Protocols
Distance Vector Link State Path Vector
Distance Vector Routing Link State Routing Path Vector
Protocols Protocols
IPv4 RIPv2 EIGRP OSPFv2 IS-IS BGP-4
RIPng EIGRP for OSPFv3 * IS-IS for BGP-4 for
IPv6 IPv6 IPv6 IPv6 or
MP-BGP
* OSPFv3 supports routing both IPv4 and IPv6.
Traditional
OSPFv2 for IPv4 OSPFv3 for IPv6 OSPFv3 Address Families
OSPF version OSPFv2 OSPFv3 OSPFv3
Advertised IPv4 networks IPv6 prefixes IPv4 networks and IPv6 prefixes
routes
Link-state Yes Yes Yes
LSAs OSPFv3 renames two LSA types and defines two additional LSA types that do
not exist in OSPFv2.
OSPFv3 Header Comparison
Comparing OSPFv2 and
OSPFv3 LSAs
OSPFv2 LSAs OSPFv3 LSAs
Type Name LS Type Code Name
1 Router LSA 0x2001 Router LSA
2 Network LSA 0x2002 Network LSA
3 Network Summary LSA 0x2003 Inter-Area Prefix LSA
4 ASBR Summary LSA 0x2004 Inter-Area Router LSA
5 AS-External LSA 0x4005 AS-External LSA
6 Group Membership LSA 0x2006 Group Membership LSA
7 NSSA External LSA 0x2007 Type-7 LSA
0x2008 Link LSA
0x2009 Intra-Area Prefix LSA
Comparing OSPFv2 and
Traditional OSPFv3
IPv4 Network
R1 IPv6 Network
R2
2001:DB8:CAFE:1::/64 Area 0
192.168.1.0/24
2001:DB8:77:: G0/0 2001:DB8:CAFE:2::/64 2001:DB8:CAFE:3::/64 2001:DB8:CAFE:4::/64
/64 FE80::1 :1/.1 FE80::2 FE80::3
S0/0/1 S0/0/0 S0/0/1
S0/0/0 S0/0/1 G0/0
:2/.2 :2/.2 :2/.2
ISP R1 :1/.1 R2 :1/.1 R3 :1/.1
192.168.77.0/24 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24
R1(config)# ipv6 route ::/0 2001:db8:77::1
R1(config)# ipv6 unicast-routing Required
R1(config)# ipv6 router ospf 2 OSPF process-id does not need to must match other routers
R1(config-rtr)# router-id 1.1.1.6 Uses same process as OSPFv2 for
R1(config-rtr)# passive-interface gig 0/0 determining the 32-bit router-id; required
R1(config-rtr)# default-information originate command if there is no IPv4 address
R1(config-rtr)# exit
R1(config)# interface gigabitethernet 0/0
R1(config-if)# ipv6 ospf 2 area 0
R1(config-if)# exit OSPF for IPv6 is enabled on the interface,
R1(config)# interface serial 0/0/0 no network command
R1(config-if)# ipv6 ospf 2 area 0
OSPFv3 Configuration
2001:DB8:CAFE:1::/64 Area 0
192.168.1.0/24
2001:DB8:77:: G0/0 2001:DB8:CAFE:2::/64 2001:DB8:CAFE:3::/64 2001:DB8:CAFE:4::/64
/64 FE80::1 :1/.1 FE80::2 FE80::3
S0/0/1 S0/0/0 S0/0/1
S0/0/0 S0/0/1 G0/0
:2/.2 :2/.2 :2/.2
ISP R1 :1/.1 R2 :1/.1 R3 :1/.1
192.168.77.0/24 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24
R2(config)# ipv6 unicast-routing
R2(config)# ipv6 router ospf 2
R2(config-rtr)# router-id 2.2.2.6
R2(config-rtr)# exit
R2(config)# interface serial 0/0/0
R2(config-if)# ipv6 ospf 2 area 0
R2(config-if)# exit
*Aug 1 02:42:29.015: %OSPFv3-5-ADJCHG: Process 2, Nbr 1.1.1.6 on Serial0/0/0
from LOADING to FULL, Loading Done
R2(config)# interface serial 0/0/1
R2(config-if)# ipv6 ospf 2 area 0
R2(config-if)#
OSPFv3 Configuration
2001:DB8:CAFE:1::/64 Area 0
192.168.1.0/24
2001:DB8:77:: G0/0 2001:DB8:CAFE:2::/64 2001:DB8:CAFE:3::/64 2001:DB8:CAFE:4::/64
/64 FE80::1 :1/.1 FE80::2 FE80::3
S0/0/1 S0/0/0 S0/0/1
S0/0/0 S0/0/1 G0/0
:2/.2 :2/.2 :2/.2
ISP R1 :1/.1 R2 :1/.1 R3 :1/.1
192.168.77.0/24 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24
R3(config)# ipv6 unicast-routing
R3(config)# ipv6 router ospf 2
R3(config-rtr)# router-id 3.3.3.6
R3(config-rtr)# passive-interface gigabitethernet 0/0
R3(config-rtr)# exit
R3(config)# interface serial 0/0/1
R3(config-if)# ipv6 ospf 2 area 0
*Jul 2 19:17:36.335: %OSPFv3-5-ADJCHG: Process 2, Nbr 2.2.2.6 on Serial0/0/1
from LOADING to FULL, Loading Done
R3(config-if)# exit
R3(config)# interface gigabitethernet 0/0
R3(config-if)# ipv6 ospf 2 area 0
OSPFv3 Neighbor Adjacencies
2001:DB8:CAFE:1::/64 Area 0
192.168.1.0/24
2001:DB8:77:: G0/0 2001:DB8:CAFE:2::/64 2001:DB8:CAFE:3::/64 2001:DB8:CAFE:4::/64
/64 FE80::1 :1/.1 FE80::2 FE80::3
S0/0/1 S0/0/0 S0/0/1
S0/0/0 S0/0/1 G0/0
:2/.2 :2/.2 :2/.2
ISP R1 :1/.1 R2 :1/.1 R3 :1/.1
192.168.77.0/24 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24
2001:DB8:CAFE:1::/64 Area 0
192.168.1.0/24
2001:DB8:77:: G0/0 2001:DB8:CAFE:2::/64 2001:DB8:CAFE:3::/64 2001:DB8:CAFE:4::/64
/64 FE80::1 :1/.1 FE80::2 FE80::3
S0/0/1 S0/0/0 S0/0/1
S0/0/0 S0/0/1 G0/0
:2/.2 :2/.2 :2/.2
ISP R1 :1/.1 R2 :1/.1 R3 :1/.1
192.168.77.0/24 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24
Since IPv4 and IPv6 are not compatible with each other we
need some coexistence strategies. One technique that we can
use is tunneling. Basically it means that we encapsulate IPv6
packets into IPv4 packets (or the other way around) so that it
can be routed.
Configure IPv6 Address
Cisco Routers
Configure IPv6 Address
Brocade Routers
Configure OSPFv3
Brocade Routers
Configure OSPFv3
Cisco Routers
Configure Tunnel 6to4
Cisco Routers
Configure OSPFv3 over
Tunnel 6to4 Cisco Routers
Configure OSPFv3 over
Tunnel 6to4 Cisco Routers
Verify Connectivity
6to4 Tunnel - Homework
CONMUTACION Y RUTEO I
Class 1.
Configuration of IPv4 Address
Multivendor Routers
Alberto Arellano A. Ing. Msc.
aarellano@espoch.edu.ec
CCNA – CCNP - CCSP 1
An IP Router …
A device with more than one
link-layer interface (breaks
broadcast domains)
Different IP addresses (from
different subnets) on different
interfaces
Receives packets on one
interface, and forwards them
(usually out of another interface)
to get them one hop closer to
their destination
Maintains forwarding tables
(FIB) and routing information
base (RIB)
Router Components
Regardless of their function, vendor, size or complexity, all router
models are essentially computers and require:
Operating systems (OS)
FastEthernet
DSL
Cable
ISDN
Routers Market share
Ethernet Switch
Market share
Routers Core
Routers Core Capacity
Access Routers
NOS (Network Operating System)
The term network operating system is used to refer to a specialised operating
system for a network device such as a router, switch or firewall.
• login: root
• root@% cli
• root> configure
• root# set system host-name Juniper_1
• root# set system root-authentication plain-text-password
• root# commit
Configue IPv4 Address Juniper Routers
root@Juniper_1# set interfaces em0 unit 0 family inet address 10.20.3.2 /24
root@Juniper_1# set interfaces em1 unit 0 family inet address 10.20.5.2/24
root@Juniper_1# set interfaces em2 unit 0 family inet address 10.20.8.1/24
root@Juniper_1# set interfaces em3 unit 0 family inet address 10.20.35.1/24
root@Juniper_1# commit
4. Show interfaces
configuration
Configue IPv4 Address Juniper Routers
6. Configure ip address on, em0, em1, em2 and em3 interfaces JunOS_2
root@Juniper_1# set interfaces em0 unit 0 family inet address 10.20.10.2 /24
root@Juniper_1# set interfaces em1 unit 0 family inet address 10.20.8.2/24
root@Juniper_1# set interfaces em2 unit 0 family inet address 10.20.12.2/24
root@Juniper_1# set interfaces em3 unit 0 family inet address 10.20.36.1/24
root@Juniper_1# commit
7. Show interfaces
configuration
Configue IPv4 Address Juniper Routers
34
Verify the Routing Table
Juniper Router
192.168.10.0/24 10.1.1.0/24
Verify the Routing Table
Cisco Router
192.168.10.0/24
Verify the Routing Table
Brocade Router
192.168.10.0/24 10.1.1.0/24
Homework: Configure IPv4
Address HPE & Cisco IOSxr
192.168.10.0/24 10.1.1.0/24
CONMUTACIÓN Y RUTEO I
Tema 8. RIPng
Tema 3. Configuration of
IPV6 Address
Alberto Arellano A. Ing. Msc.
aarellano@espoch.edu.ec
CCNA – CCNP - CCSP
1
Lab. Routers Juniper, CISCO & Brocade
with IPv6
Configue IPv6 Address Juniper Routers
root@JunOS_1# set interfaces lo0 unit 100 family inet6 address feee::10:10:10:1/128
root@JunOS_1# set interfaces em0 unit 0 family inet6 address 2001:1:2:2::1/64
root@JunOS_1# set interfaces em1 unit 0 family inet6 address 2001:1:2:4::1/64
root@JunOS_1# set interfaces em2 unit 0 family inet6 address 2001:1:2:1::1/64
root@JunOS_1# commit
2. Show interfaces
configuration
Configue IPv6 Address Juniper Routers
Tema 4.
IP Routing
Alberto Arellano A. Ing. Msc.
aarellano@espoch.edu.ec
CCNA – CCNP - CCSP
1
What is a Router?
physical layer:
bit-level reception
decentralized switching:
data link layer:
e.g., Ethernet given datagram dest., lookup output
port using forwarding table in input
port memory
goal: complete input port processing
at ‘line speed’
queuing: if datagrams arrive faster
than forwarding rate into switch fabric
Switching Fabric
The switching fabric is at the heart of a router.
Through it the packets are actually moved from
an input port to an output port.
Switching Fabric Functions
• Transfer packet from input buffer to appropriate output
buffer
• Switching rate: rate at which packets can be transfer from
inputs to outputs
• often measured as multiple of input/output line rate
• N inputs: switching rate N times line rate desirable
2T
A router needs a buffer size: B 2T C
2T is the two-way propagation delay (or just 250ms)
C is capacity of bottleneck link
e.g., C = 10 Gps link:
2.5 Gbit buffer
Recent recommendation:
with N flows(Typical backbone link has > 20,000
flows),buffering equal to
RTT. C
a a
b b
c c
Processor
Forwarding Table
Prefix Output Link
f 0 a f
00 b
01 c
1 d
10 e
1100 f
1101 g
1110 h
i 1111 i i
Router
Example: 00 P5
01 P4
Prefixes: 10 P1
P1 : 10*
11 P2
P2 : 11*
000
P3 : 11001* 00000 P6
P4 : 1* 001 P3
00001
P5 : 0* 010
P6 : 1000000* 00010 011
00011
:
100
:
11111 101
Assume that the stride for the root of some tree is 2; 110
And that for the root’s left child is 5; 111
And that for the root’s right child is 3.
Router
Input Links Switch Output Links
a 1100 a
b b
c c
Processor
1100
Forwarding Table
f f Prefix
0
00
01
Output Link
a
b
c
f
Compressed 1 d
1-Bit Trie Algorithm 10 e
1100 f
1101 g
1110 h
i 1111 i i
Router
Input Links Switch Output Links
a 1100 a
b b
c c
Processor
Forwarding Table
Prefix Output Link
f 0 a f
00 b
01 c
1 d
10 e
Centralized 1100 f
1101 g
Switching 1110 h
i 1111 i i
Router
Input Links Switch Output Links
a a
b b
c c
Processor
Forwarding Table
Prefix Output Link
f 00 0 a f
00 b
01 c
1 d
10 e
Decentralized 1100 f
1101 g
Switching 1110 h
i 1111 i i
Forwarding
Forwarding means to place the packet in its route to its
destination. Forwarding requires a host or a router to have a
routing table. When a host has a packet to send or when a
router has received a packet to be forwarded, it looks at this
table to find the route to the final destination.
Techniques for
Forwarding Packets
Source Routing
Packet carries path
Table of virtual circuits
Connection routed through network to setup
state
Packets forwarded using connection state
Table of global addresses (IP)
Routers keep next hop for destination
Packets carry destination address
Source Routing
List entire path in packet
Driving directions
IPv4
LSSR – Lose Source Routing options
IPv6
RH0 – Type 0 Routing Header extension
Virtual Circuits/Tag
Switching
Use the telephone model virtual circuits
Each flow is identified by a Virtual Circuits Identifier (VCI).
Connection setup phase, Signaling
Use other means to route setup request
ID/port
Each packet carries connection ID
Sent from source with 1
st hop connection ID
Router processing
Lookup flow ID – simple table lookup
Packet 5 7
2 2
1,5 3,7 2
2
1
R3 Receiver
3
4 6
2,2 3,6
Forwarding with
Classfull Address
Forwarding with
Classless Address
IP Routing
Network topology
Network load
Datagram length
IP routing software:
Normally does not consider most of these factors
shortest paths
Processing of an IP
packet/datagram
Host route
Destination address is an interface address (e.g., 10.0.1.2/32)
Default route
Used when no network or host route matches
The router that is listed as the next hop of the default route is the
default gateway.
Loopback address
Routing table for the loopback address (127.0.0.1)
Connected Routes
Static Routes
Routing table lookup:
Longest Prefix Match
Longest Prefix Match: Search for the 128.143.71.21
routing table entry that
= has the longest
match with the prefix of the destination IP
address
Destination addressNext hop
10.0.0.0/8 R1
1. Search for a match on all 32 bits 128.143.0.0/16 R2
2. Search for a match for 31 bits 128.143.64.0/20 R3
128.143.192.0/20 R3
….. 128.143.71.0/24 R4
32. Search for a match on 0 bits 128.143.71.55/32 R3
0.0.0.0/0 (default) R5
ICMP messages
Routing table
manipulations with ICMP
When a router detects that an IP
datagram should have gone to a
different router, the router (here R1)
forwards the IP datagram to
the correct router (R2)
sends an ICMP redirect
message to the host
Host uses ICMP message to update
its routing table
Routing Component
Three important routing elements :
algorithm
database
protocol
router
Routing Metrics
How do we decide that one route is better
than another?
Solution : using a metric as a measurement
to compare routes
Metrics may be: distance, throughput,
delay, error rate, and cost.
Today, IP supports Delay, Throughput,
Reliability and Cost (DTRC).
Routing Protocol determine the best path
based on the route with the lowest cost.
Hop Count = Distance
A hop is defined as a passage through
one router
2 hops
1 hop 1 hop
R1 R2
1 hop 1 hop
R3
Routing Algorithm Types
Unicast vs Multicast
Static vs Dynamic
Source routing vs Hop-by-hop
Distance vector vs Link state
54
Routing Algorithm:
Unicast
In unicasting, the router forwards the received
packet through only one of its interfaces (1
source 1 destination)
Routing Algorithm:
Multicast
In multicasting, the router may forward the
received packet through several of its interfaces
Routing Algorithm:
Static Route
Manually configuration routing table
Can’t react dynamically to network change such as router’s
crash
Work well with small network or simple topology
Unix hosts use command route to add an entry
Cisco Router use command ip route to add an entry
Juniper Routers use command set routing-options static route
to add entry.
point to point
connection
route to this
way only, no need
for update
Routing Algorithm:
Static Route Linux
Routing Algorithm:
Dynamic Route
Network protocol adjusts automatically for topology
or traffic changes
A local 0 B local 0
Letters represent
Node names
A B
1
6
From D Link Cost D E From E Link Cost
D local 0 E local 0
Operation of Distance
Vector Routing (2)
From A Link Cost From B Link Cost
A local 0 B local 0
A 1 1
B=0, A=1
A B
1
6
From D Link Cost D E From E Link Cost
D local 0 E local 0
A 3 1
Operation of Distance
Vector Routing (3)
From A Link Cost From B Link Cost
A local 0 B local 0
B 1 1 A 1 1
D 3 1 A=0, B=1, D=1
A B
1
C=0, B=1, A=2
2 From C Link Cost
C local
C 0
B 2 1
3 4 A 2 2
6
From D Link Cost D E From E Link Cost
D local 0 E local 0
E=0, B=1, A=2,
A 3 1 D=1 B 4 1
A 4 2
D 6 1
Operation of Distance
Vector Routing (4)
From A Link Cost From B Link Cost
A local 0 B local 0
B 1 1 A 1 1
D 3 1 B=0, A=1, D=2, D 1 2
C=1, E=1 C 2 1
A B E 5 1
1
6
From D Link Cost D E From E Link Cost
D local 0 E local 0
E=0, B=1, A=2,
A 3 1 D=1, C=1 B 4 1
B 3 2 A 4 2
E 6 1 D 6 1
C 5 1
Operation of Distance
Vector Routing (5)
From A Link Cost From B Link Cost
A local 0 B local 0
B 1 1 A 1 1
D 3 1 D 1 2
C 1 2 C 2 1
E 1 2 A B E 5 1
1
These do not alter 2 From C Link Cost
routing tables further C
C local 0
Thus, no new 3 4
B 2 1
A 2 2
updates generated E 5 1
D 5 2
5
6
From D Link Cost D E From E Link Cost
D local 0 E local 0
A 3 1 B 4 1
B 3 2 A 4 2
E 6 1 D 6 1
C 6 2 C 5 1
Link 6 fails 5
6
From D Link Cost D E
D local 0
A 3 1 D’s routing table
B 6 inf immediately
E 6 inf
C 6 inf after link 6 fails
Drawbacks of Distance Vector
Routing: Counting to “Infinity” (2)
A local 0
B 3 3
D 3 1
C 3 3
E 3 2 A B
1
D transmits its 2
C
updated DV
D=0, A=1, B=4, 3 4
E=3, C=4
6
From D Link Cost D E
D local 0
A 3 1
B 3 4
E 3 3
C 3 4 D updates its routing table
Drawbacks of Distance Vector
Routing: Counting to “Infinity” (3)
A transmits its 2
C
updated DV
3 4
6
From D Link Cost D E
D local 0
A 3 1
B
E
3
3
4
3
We are in an
C 3 4
infinite loop!
Drawbacks of Distance Vector
Routing: Bouncing Effect (1)
2
C
Routes towards C
3 4 From Link Cost
AC 1 2
BC 1 1
5 CC local 0
DC 3 3
6 EC 4 2
From D Link Cost D E From E Link Cost
D local 0 E local 0
A 3 1 A 5 2
B 3 2 B 4 1
C 3 3 C 4 2
E 6 1 D 6 1
Drawbacks of Distance Vector
Routing: Bouncing Effect (2)
All links except 5 have
From A Link Cost unit cost, link 5 cost = 10 From B Link Cost
B’s routing table
A local 0 B local 0 immediately after
B 1 1 A 1 1
C 1 2 C 2 inf link 2 fails
D 3 1 D 1 2
E 3 2 A B E 4 1
1
Link 2 fails
A=0, B=1, C=2, 2
D=1,E=2 C
Routes towards C
A transmits its DV 3 4 From Link Cost
before B does AC 1 2
BC 2 inf
5 CC local 0
DC 3 3
6 EC 4 2
From D Link Cost D E From E Link Cost
2
C
Routes towards C
3 4 From Link Cost
AC 1 2
BC 1 3
A’s DV produces 5 CC local 0
no change at D DC 3 3
6 EC 4 2
From D Link Cost D E From E Link Cost
D local 0 E local 0
A 3 1 A 6 2
B 3 2 B 4 1
C 3 3 C 4 2
E 6 1 D 6 1
Drawbacks of Distance Vector
Routing: Bouncing Effect (4)
All links except 5 have unit
From A Link Cost cost, link 5 cost = 10 From B Link Cost
A local 0 B local 0
B 1 1 A 1 1
C 1 4 C 1 3
D 3 1 D 1 2
E 3 2 A B E 4 1
1
Further DV exchanges 2
produce no change in C
Routes towards C
routing tables! Both 3 4 From Link Cost
routing and distances AC 1 4
have (temporarily) Loop! BC 1 3
stabilized 5 CC local 0
DC 3 3
6 EC 4 4
From D Link Cost D E From E Link Cost
D local 0 E local 0
A 3 1 A 6 2
B 3 2 B 4 1
C 3 3 C 4 4
E 6 1 D 6 1
80
R2 SPF Tree
81
R3 SPF Tree
82
R4 SPF Tree
83
R5 SPF Tree
84
Link-State Routing Process
1. Each router learns about its own links, its own directly connected networks.
(Interface is “up”)
2. Each router is responsible for meeting its neighbors on directly connected
networks. (OSPF Hello packets)
3. Each router builds a link-state packet (LSP) containing the state of each
directly connected link. (neighbor ID, link type, and bandwidth)
4. Each router floods the LSP to all neighbors, who then store all LSPs
received in a database.
Neighbors then flood the LSPs to their neighbors until all routers in the
area have received the LSPs.
5. Each router uses the database to construct a complete map of the topology
and computes the best path to each destination network.
The SPF algorithm is used to construct the map of the topology and to
determine the best path to each network. (Road map)
All routers will have a common map or tree of the topology, but each
router will independently determine the best path to each network within
that topology.
Step 1: Learning About
Directly Connected
Networks
Step 1: Each router learns about its own links, its own directly
connected networks.
Interface configured with an IP address/subnet mask.
Link 4
• Network: 10.4.0.0/16
Link states - Information about the state of a • IP address: 10.4.0.1
router’s links • Type of network: Serial
• Cost of that link: 20
This information includes interface’s: • Neighbors: R4
IP address/mask
Type of network
Ethernet (broadcast) or serial point-to-point
link
Cost of that link
Any neighbor routers on that link
Step 1
Initially:
Router unaware of any neighbor routers on the
link.
Learns of neighbor when receives a Hello
packet from the adjacent neighbor.
Hello, I’m
R2
Hello, I’m R1
Hello, I’m
Step 2: R3
Sending Hello
Packets to
Neighbors Hello, I’m
R4
Hello, I’m R1
& still here
Step 2: Sending
Hello, I’m R3 &
Hello Packets to still here
Neighbors
Hello packets
“Keepalive” function
Stops receiving Hello packets from a neighbor, that
neighbor is considered unreachable and the
adjacency is broken.
Step 3: Building
the Link-State
Packet
Step 4: Each router floods the LSP to all neighbors, who then store all
LSPs received in a database.
Each router floods its link-state information to all other link-state routers.
When a router receives an LSP from a neighboring router, sends that
LSP out all other interfaces, except the interface that received the LSP.
Flooding effect of LSPs throughout the routing area.
Link-state routing protocols calculate the SPF algorithm after the flooding is
complete.
Step 4: Flooding Link-State
Packets to Neighbors
Step 5:
Constructing a
Link-State
Database
Step 5 (Final Step):
Each router uses the
database to construct a
complete map of the
topology and computes
the best path to each
destination network.
Each router in the routing area can now use the SPF
algorithm to construct the SPF trees that you saw earlier.
Step 5: Constructing a
Link-State Database
The SPF algorithm begins by processing the following LSP information from R3:
Connected to neighbor R1 on network 10.3.0.0/16, cost of 5
Connected to neighbor R4 on network 10.7.0.0/16, cost of 10
Has a network 10.6.0.0/16, cost of 2
R1 Processes the LSPs from R4
Red: New
information
for tree.
The SPF algorithm begins by processing the following LSP information from R4:
Connected to neighbor R1 on network 10.4.0.0/16, cost of 20
Connected to neighbor R3 on network 10.7.0.0/16, cost of 10
Connected to neighbor R5 on network 10.10.0.0/16, cost of 10
Has a network 10.8.0.0/16, cost of 2
R1 Processes the LSPs from R5
Red: New
information
for tree.
The SPF algorithm begins by processing the following LSP information from R5:
Connected to neighbor R2 on network 10.9.0.0/16, cost of 10
Connected to neighbor R4 on network 10.10.0.0/16, cost of 10
Has a network 10.11.0.0/16, cost of 2
SPF Tree
Using the SPF tree, SPF algorithm results in the shortest path
to each network.
Note: Only the LANs are shown in the table, but SPF can
20
Determining the
Shortest Path
Determining the
Shortest Path
2
5
10
10
108
Network 10.9.0.0/16
via R2 Serial 0/0/0
at a cost of 30
10
Determining the 20
Shortest Path
109
Determining the
Shortest Path
5
10
10
Network 10.10.0.0/16
via R3 Serial 0/0/1
at a cost of 25
110
Network 10.11.0.0/16 via
R3 Serial 0/0/1 at a
Determining the cost of 27
Shortest Path
5 2
10
10
111
Determining the
Shortest Path
These paths listed previously can now be added to the routing table.
The routing table will also include
Directly connected networks
Routes from any other sources, such as static routes.
Packets will now be forwarded according to these entries in the routing
table.
Advantages of Link-State
Routing Protocols
• LS routing protocols exchange link-states, and can therefore use the
Builds a SPF algorithm to build an SPF tree of the network.
Topological Map • Using the SPF tree, each router can determine the shortest path to
every network.
• When receiving an LSP, LS protocols immediately flood the LSP out all
interfaces except for the interface from which the LSP was received.
Fast Convergence • In contrast, RIP processes each message, updates the routing table,
then flood to the next neighbour.
• After the initial flooding of LSPs, link-state routing protocols only send
Event-driven
out an LSP when there is a change in the topology.
Updates • The LSP contains only the information regarding the affected link.
PC1
PC2
Verify Connectivity
Homework # 1
Homework # 2
CONMUTACION Y RUTEO I
More secure since they are not advertised over the network.
More efficient since they use less bandwidth than dynamic routing
protocols.
No CPU cycles are used to calculate and communicate routes.
Predictable as the path a static route uses to send data always the same.
Static Routing
Disadvantages
Initial configuration and
maintenance is time-
consuming.
Configuration is error-
prone, especially in large
networks.
Administrator
intervention is required
to maintain changing
route information.
Does not scale well with
growing networks;
maintenance becomes
cumbersome.
Requires complete
knowledge of the whole
network for proper
implementation.
Static Routing Versus
Dynamic Routing
Dynamic Routing Static Routing
Configuration Generally independent of the
Increases with network size
Complexity network size
.2
No need to use a dynamic
.1 routing protocol with R1 to
reach 172.16.3.0/24.
exist.
A common use is when connecting a company's
.2
.1
Summary Static Route
I have four static routes to reach
the remote networks 172.20.0.0/16
- 172.23.0.0/16.
172.21.0.0/16
172.20.0.0/16 10.0.0.0/24
.2 R1
172.22.0.0/16
172.23.0.0/16
Private WAN
172.16.1.0 /30
172.16.1.0 /30
S0/0/0 S0/0/0
.2 .1
10.0.0.0 /8
Branch UIO
S0/0/1 S0/0/1
.242 .226
.241 .225
ISP
.241 .225
ISP
6.0
next-hop.)
exit-interface: Outgoing or exit interface
Types of Standard Static
Routes
Next Hop Static Route
ip route network-add subnet ip-address
23
Configure Static Routes on
Cisco_1
Display Static Routes on
Cisco_1
Configure Static Routes on
Brocade_1
Display Static Routes on
Brocade_1
Configure Static Routes on
Brocade_2
Display Static Routes on
Brocade_2
Configure Static Routes on
JunOS_R1
Parameter Description
Static Route
Default Route
Internet Access through NAT
(Network Address Translation)
82.102.142.204
Tema 7. Dynamic
Routing & RIPv2
Alberto Arellano A. Ing. Msc.
aarellano@espoch.edu.ec
CCNA – CCNP - CCSP
1
Dynamic Routing Protocol
Operation
networks.
When a router detects a topology change the routing protocol can
5
CNT BGP TELCONET
An autonomous system
(AS), is a collection of routers
under a common
administration.
• Company ’ s internal
network
• An ISP’s network.
AS-1
BGP
EIGRP
Static Route
ISP-2 AS-3
OSPF Default Static Route IS-IS
Single customer
Distance vector
Routes are advertised as vectors
Exit interface
neighbors.
Does not know if another path would actually be faster.
Standard Protocol
decision!
Link-State Protocol
Operation
Link-state protocols work
best in situations where
The network design is
hierarchical, usually
occurring in large networks.
172.16.0.0/16
Major Classful
Network
Classful routing protocols do not send subnet mask information in their routing
updates:
Only RIPv1 and IGRP are classful.
Created when network addresses were allocated based on classes (class A, B,
or C).
Cannot provide variable length subnet masks (VLSMs) and classless
interdomain routing (CIDR).
Create problems in discontiguous networks.
R1 Forwards a Classful Update to R2
172.16.1.0/24 192.168.1.0/30 192.168.2.0/30 172.16.2.0/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0
Routing update:
My 30 seconds are up. 172.16.0.0
I’m sending an update
to my RIP neighbor(s).
Discontiguous Networks
172.16.1.0/24 192.168.1.0/30 192.168.2.0/30 172.16.2.0/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0
Routing update:
My 30 seconds are up.
I’m sending an update 172.16.1.0/24
to my RIP neighbor(s).
R2# show ip route | begin Gateway
Gateway of last resort is not set
Routing update:
My 30 seconds are up.
172.16.2.0/24 I’m sending an update
to my RIP neighbor(s).
protocols.
Two different routing protocols might choose different paths to
For example:
56 Kbps
27
Routing Protocol Metrics
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:24, Serial0/0/0
C 192.168.2.0/24 is directly connected, Serial0/0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
C 192.168.4.0/24 is directly connected, Serial0/0/1
R 192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:26, Serial0/0/1
R 192.168.6.0/24 [120/1] via 192.168.2.1, 00:00:24, Serial0/0/0
[120/1] via 192.168.4.1, 00:00:26, Serial0/0/1
R 192.168.7.0/24 [120/1] via 192.168.4.1, 00:00:26, Serial0/0/1
R 192.168.8.0/24 [120/2] via 192.168.4.1, 00:00:26, Serial0/0/1
30
Routing Information
Protocol ver. 1 (RIPv1)
summarization.
Secure: Supports an authentication mechanism to
Supports VLSM
Supports CIDR
Supports Summarization
Secure
RIP Summary
IGRP
The Interior Gateway Routing Protocol (IGRP) was
the first proprietary IPv4 routing protocol developed by
Cisco in 1984.
IGRP Features:
No hop limit
Easy to understand
the calculation.
Routing updates are broadcast every 90 seconds, by
default.
EIGRP
In 1992, Enhanced IGRP (EIGRP) replaced IGRP.
EIGRP also supports VLSM and CIDR, increases
Rapid convergence
IPX, Appletalk)
IGRP versus EIGRP
Supports VLSM
Supports CIDR
Supports Summarization
Supports Authentication
RIPv2 Topology
192.168.3.0/24
Example
42
GNS3 Cloud object
192.168.3.0/24
The cloud object was in fact a direct usage of the emulator capabilities to
connect to external networks
43
Configure Mikrotik
GUI Access
192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1
192.168.2.0/30 192.168.4.0/30
Wastes Resources
Security Risk
The passive-interface
Stops routing updates out the specified interface.
The network that the specified interface belongs to is still
advertised in routing updates that are sent out other interfaces.
Should be configured on interfaces which do not connect to
other RIP routers.
Configuring a Passive
Interface on Cisco
192.168.3.0/24
Routing update:
192.168.1.0/24
192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1
192.168.2.0/30 192.168.4.0/30
Net2Plan
Netflow
Link performance parameters
R1 R2
Y1
Red1 Red2
= Client Server
= Server Client
>>
• Application type
• Flow Size (UP, DOWN)
• Number of requests per Flow
• Number of users per Application
Application Types
APLICACIÓN TRANSPORTE
HTTP/ HTTPS TCP
SMTP/POP/IMAP TCP
DNS TCP/UDP
FTP/FTPS TCP
SSH TCP
SNMP UDP
H.323 UDP
SIP/RTP UDP
SQL/ORACLE TCP
SKYPE UDP
Header Size / Protocols
LAYER PROTOCOL HEADER SIZE (Bytes)
TRANSPORT TCP 20
UDP 8
IPv4 20 – 60
IPv6 40
NETWORK ICMP 8
ARP 28
NDP 8
OSPF 24
EIGRP 20
Header Size / Protocols
LAYER PROTOCOL HEADER SIZE (Bytes)
Ethernet 18
802.1Q 22
802.1ad (Q-in-Q) 26
HDLC Std 4
HDLC Cisco 6
DATA
LINK PPP 6
Frame Relay IETF 2
Frame Relay Cisco 4
ATM 5
MPLS 4
MPLS TE 8
MPLS TE VPN 12
Calculation of Load of the Links
User Traffic (Tu) / Application = ∗# ∗#
= +
= ∗# ∗#
PROTOCOL
Network Traffic (Tsc) Static Routing
Traffic generated by the
network for proper operation, Dynamic
Routing
depends on the protocol used
LDP - MPLS
Calculation of Load of the Links
Static Routing =
Dynamic Routing
(Interior Gateway Protocol) RIPv1-RIPv2-RIPng
The entire route table is sent between the
neighbors every 30 seconds
= ∗ ∗
SRT = Size Routing Table (Bytes)
ENCAPSULATION
N = number of minutes the network is
UDP – RIP – IP - Ethernet
monitored, usually 60 minutes.
Calculation of Load of the Links
= ∗ ∗ ∗
EIGRP
HELLO TIME
• Link < T1 60 seconds
Dynamic Routing
• Link > T1 5 seconds
(Interior Gateway Protocol)
= ∗ ∗ ∗
IS-IS
HELLO TIME
• Point-to-Point 10 seconds
Dynamic Routing
(Interior Gateway Protocol)
= ∗ ∗ ∗
X2,Y2 X3, Y3
R3
Xi Traffic UP in 10 minutes
Yi Traffic DOWN in 10 minutes
T1 T2 T3 T4 T5 T6
R1-R2 U U U U U U O/D R1 R2 R3
R1-R3 U U U U U U Red3
R2-R3 U U U U U U R1 0 6X1 6X2
T1+T2+T3+T4+T5+T6= 60 MINUTOS
R2 6Y1 0 6X3
R3 6Y2 6Y3 0
Link Demand Traffic - No link failures
R1 R2
X1, Y1 Red2
Red1
Convergent Routing
X2,Y2 X3, Y3
R3
T1 T2 T3 T4 T5 T6
LINK TRAFFIC DEMAND
R1-R2 U U U U U U Red3 R1 - R2 6X1+6Y1+6Tsc
R1-R3 U U U U U U
R2-R3 U U U U U U R1 – R3 6X2+6Y2+6Tsc
T1+T2+T3+T4+T5+T6= 60 MINUTOS R2 – R3 6X3+6Y3+6Tsc
Link Demand Traffic - Link failures
R1 R2
X1, Y1
Red1 Red2
Convergent T1 T2 T3 T4 T5 T6
Routing R1-R2 U D U D U U
X2,Y2 X3, Y3
R1-R3 U U U U U U
R2-R3 U U U U U U
R3
T1+T2+T3+T4+T5+T6= 60 MINUTOS
applications
applications
R6 – R1 210280+1664160+52560 = 1927000
R3 – R2 478440+3250240+52560 = 3781240
R5 – R1 144544+1125536+52560 = 1322640
R1 – R2 594864+4462736+52560 = 5110160
8. Calculate Link Load (%) & Service time
LINK TL (%)
R4 – R1 (1965640*8)/50000000 = 31,45%
R6 – R1 (1927000*8)/100000000 = 15,42%
R3 – R2 (3781240*8)/50000000 = 60,5%
R5 – R1 (1322640*8)/50000000 = 21,16%
R1 – R2 (5110160*8)/100000000 = 40,88%
OSPF is:
Classless
RFC 2328 defines the OSPF metric as an arbitrary value called cost.
Cisco uses bandwidth to calculate the OSPF cost metric .
Quickly
propagates
network Works well in small
changes and large network
sizes and supports
areas
Supports
Message Digest
5 (MD5)
authentication
OSPF Operation
To create and maintain routing information, OSPF routers complete the following
generic link-state routing process, to reach a state of convergence:
5
OSPF Packet Format
224.0.0.5
224.0.0.6
Destination MAC address is also a multicast address:
01-00-5E-00-00-05
01-00-5E-00-00-06
OSPF Packet Format
OSPF Packet Format
OSPF Packet Types
Hello, I’m
R2
Hello, I’m
Hello, I’m R3
R1
OSPF Hello Message
Format
OSPF Timers
Hello Intervals
Hello, I’m
R2
Hello, I’m
Hello, I’m R3
R1
Hello, I’m
Hello, I’m R3
R1
networks
DR is responsible for updating all other OSPF routers.
Cisco
OSPF Cost = 108/bandwidth in
bps
Juniper
cost = reference-bandwidth /
interface bandwidth
What’s my
Router ID?
What’s my
Router ID?
A router is known to OSPF by the OSPF router ID number.
LSDBs use the OSPF router ID to differentiate one router from the next
Cisco routers derive the router ID based on three criteria and with the following
precedence:
1. IP address configured with the OSPF router-id command.
2. Highest IP address of any of its loopback interfaces.
3. Highest active IP address of any of its physical interfaces.
Define the Router ID
Cisco Assign a specific router ID to the router.
Router(config)# router ospf process-id
Router(config-router)# router-id ip-address
Mikrotik Assign a
Specific router ID to
the router.
Define the Networks
Cisco
Router(config)# router ospf process-id
Router(config-router)# network network-address wildcard-mask area area-id
Juniper.
root@JunOs_1# set protocols ospf area 0.0.0.0 interface em0
2
Configure Cisco_2
2
Configure Brocade_1
Configure Juniper_1
Configure Juniper_2
Configure Mikrotik_1
2
Configure Mikrotik_1
3
Configure Mikrotik_1
4
Verifying OSPF
Neighbors
Lists of
OSPF
neighbors
in the
order they
were
learned. The amount of time remaining
before declaring the neighbor down. The local interface to
reach this neighbor.
CISCO
interface fast 0/1
ip ospf hello-interval 2
ip ospf dead-interval 8
JUNIPER
set protocols ospf area 0 interface em0 hello-interval 2
set protocols ospf area 0 interface em0 dead-interval 8
Homework
OSPF&Default Route
Load Balancing with OSPF
If the router receives and installs multiple paths with the same
administrative distance and cost to a destination, load-balancing can
occur.
The number of paths used is limited by the number of entries the
routing protocol puts in the routing table. Four entries is the default
for most IP routing protocols with the exception of Border Gateway
Protocol (BGP), where one entry is the default. 16 different paths
configured is the maximum number.
maximun-paths 6
Load Balancing with OSPF
Juniper Routers
By default, when there are multiple equal-cost paths to the same destination for
the active route, Junos OS uses a hash algorithm to choose one of the next-
hop addresses to install in the forwarding table. Can be configured Junos OS,
for the active route, all next-hop addresses for a destination are installed in the
forwarding table. This feature is called per-packet load balancing
Load Balancing with OSPF
Cisco Routers
1. Configure IP Address
2. Configure router-id
3. Configure OSPF proccess
4. Verify OSPF routing table
Configure OSPF on
Cisco Routers
Configure OSPF on
Cisco Routers
Verify OSPF Routing Table
Verify OSPF Routing Table
Verify Connectivity
Verify Connectivity
Homework. Balancing with
OSPF Huawei Routers
1. Configure IP Address
2. Configure router-id
3. Configure OSPF proccess
4. Verify OSPF routing table
Load Balancing with OSPF
Juniper Routers
1. Configure IP Address
2. Configure router-id
3. Configure OSPF proccess
4. Verify OSPF routing table
Load Balancing with OSPF
Juniper Routers
Load Balancing with OSPF
Juniper Routers
Load Balancing with OSPF
Juniper Routers
Verify OSPF Routing Table
Verify OSPF Routing Table
Verify Connectivity
Verify Connectivity
Routing Policy
1. Define Routing Policy
set policy-options policy-statement BalanceoCarga then load-balance per-packet
2. Export Policy
set routing-options forwarding-table export BalanceoCarga
CONMUTACIÓN Y RUTEO I
Algorithm
• Routing protocols use algorithms to I will use the EIGRP I will use the EIGRP
determine the best path to various DUAL algorithm to DUAL algorithm to
destinations. identify what the best identify what the best
routes are. routes are.
EIGRP Features
peers.
Note:
Authentication does not encrypt the EIGRP routing updates.
EIGRP Packet
Frame Payload
Hello packets are used to discover & form adjacencies with neighbors.
Multicasted to:
IPv4: 224.0.0.10
IPv6: FF02::A
Hello packets are always sent unreliably.
Therefore Hello packets do not require acknowledgment.
Hello Packets
EIGRP uses
triggered
updates
Update Packets
Contains only the routing information needed (a change occurs)
packets).
Unreliable unicast.
EIGRP Packet Types – Query and
Reply Packets
IP external routes are routes which are imported into EIGRP through
redistribution of a default route or other routing protocols.
Initial Route Discovery
DUAL Algorithm
J. J. Garcia-Luna-Aceves
IP EIGRP Topology Table List of all routes learned from each EIGRP
neighbor and identifies successor routes
Destination 1 FD / AD via each neighbor
and feasible successor routes.
Routes manually
summarized.
• Advertised distance: How far the destination is away for your neighbor.
• Feasible distance: The total distance to the destination.
R4 R5
The path with the lowest feasible distance will be the successor (R2)
so now we answered the first question.
R1#show running-config
<Output omitted>
!
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
!
interface Serial0/0/0
ip address 192.168.10.6 255.255.255.252
clock rate 64000
!
interface Serial0/0/1
ip address 192.168.10.10 255.255.255.252
R1#show running-config
<Output omitted>
! R2#show running-config
<Output omitted>
interface GigabitEthernet0/0 !
ip address 172.16.1.1 255.255.255.0 interface GigabitEthernet0/0
! ip address 172.16.2.1 255.255.255.0
interface Serial0/0/0 !
ip address 172.16.3.1 255.255.255.252 interface Serial0/0/0
clock rate 64000 ip address 172.16.3.2 255.255.255.252
! !
interface Serial0/0/1 interface Serial0/0/1
ip address 192.168.10.5 255.255.255.252 ip address 192.168.10.9 255.255.255.252
clock rate 64000
!
interface Serial0/1/0
ip address 209.165.200.225 255.255.255.224
router eigrp
Command
R1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# router ?
bgp Border Gateway Protocol (BGP)
eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
isis ISO IS-IS
iso-igrp IGRP for OSI networks
mobile Mobile routes
odr On Demand stub Routes
ospf Open Shortest Path First (OSPF)
ospfv3 OSPFv3
rip Routing Information Protocol (RIP)
R1(config)#router eigrp 1
R1(config-router)#
Process ID
1 and 65,535
EIGRP Router ID
RID: 2.2.2.2
The network command in EIGRP has the same function as in other IGP
routing protocols:
What does it do?
Any interface on this router that matches the network address in the
All interfaces
belonging to Including the wildcard
the classful mask would only
172.16.0.0/16 advertise that subnet.
address are
enabled for For example, to
EIGRP configure only the
subnet 192.168.10.8 /30
R1(config)# router eigrp 1
R1(config-router)# network 192.168.10.0
on the S0/0/1 interface.
R1(config-router)# network 172.16.0.0
R1(config-router)#
R2(config)# router eigrp 1
R2(config-router)# network 172.16.0.0
R2(config-router)#
*Feb 28 17:51:42.543: %DUAL-5-NBRCHANGE: EIGRP-IPv4
1: Neighbor 172.16.3.1 (Serial0/0/0) is up: new
adjacency
R2(config-router)#
network Command
The local
Neighbor’s interface Seconds remaining
IPv4 receiving before declaring
address EIGRP Hello neighbor down.
packets. Reset to hold time
when Hello is
received.
Verifying EIGRP
What if the ping is successful and EIGRP still does not see the router
as a neighbor?
Are both routers configured with the same EIGRP process ID?
statements?
Is the passive-interface command inappropriately configured,
R1#
Verify the R1
Routing Table
EIGRP uses the following values in its composite metric to calculate the preferred path
to a network:
Bandwidth: The lowest bandwidth between source and destination.
Delay: The cumulative interface delay along the path
Reliability: Worst reliability between source and destination, based on keepalives.
Load: Worst load on a link between source and destination, based on the packet
rate and the configured bandwidth of the interface.
Note: Although MTU is included in the routing table updates, it is not a routing metric
used by EIGRP or IGRP.
EIGRP Metrics
By default:
K1 and K3 are set to 1,
The result is that only the bandwidth and delay values are used in
the computation of the default composite metric.
Examining the Metric
Values
R1# show interface serial 0/0/0
Serial0/0/0 is up, line protocol is up
Hardware is GT96K Serial
Description: Link to R2
Internet address is 172.16.3.1/30
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
<output omitted>
delay
Bandwidth
R1# show interface serial 0/0/0
<output omitted>
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
<output omitted>
The bandwidth metric (1544 Kbps) is a static value used by some routing
protocols such as EIGRP and OSPF to calculate their routing metric.
Kilobits per second (Kbps).
Most serial interfaces use the default bandwidth value of 1544 Kbps
The value of the bandwidth might or might not reflect the actual physical
bandwidth of the interface.
Modifying the bandwidth value does not change the actual bandwidth
of the link.
Should reflect actual bandwidth of the link.
Delay
R1# show interface serial 0/0/0
<output omitted>
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
<output omitted>
The router does not actually track how long packets are
Delay
Media
In usec
100 microseconds for Fast Gigabit Ethernet 10
Ethernet interfaces. Fast Ethernet 100
56 Kbps 20,000
Reliability – Optional Metric
R1# show interface serial 0/0/0
<output omitted>
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
<output omitted>
calculation.
Load – Optional Metric
R2 192.168.1.0/24
Using the default values for K1 and K3, you can simplify this calculation
to:
slowest bandwidth 107
+ cumulative sum of all the delays
∑
------------------------------------------------
10
EIGRP route metric
BW = 9,765
+
Delay = 2,001
(Slowest BW + Sum of
Delays) * 256
EIGRP Load Balancing
R1 Topology Table
R1(config)# router eigrp 100 Network Neighbor AD FD
R1(config-router)# network 172.16.1.0 0.0.0.255
R1(config-router)# network 192.168.1.0 172.16.2.0/24 R2 20 40
R1(config-router)# network 192.168.2.0 R3 20 40
R1(config-router)# network 192.168.3.0
R1(config-router)# network 192.168.4.0 R4 20 40
R1(config-router)# maximum–paths 3
R1(config-router)# R5 20 40
Unequal Cost Load
Balancing
EIGRP can also balance traffic across multiple routes that have
different metrics.
Referred to as unequal-cost load balancing.
C1(config)#router eigrp 10
C1(config-router)#variance 5
EIGRP Unequal-Cost
Load Balancing
EIGRP
for IPv6
Update messages Partial & bounded updates Partial & bounded updates
Note:
• IPv6 link-local addresses are in the FE80::/10 range.
• The /10 indicates that the first 10 bits are 1111 1110 10xx xxxx, which results in the
first hextet having a range of:
• 1111 1110 1000 0000 (FE80) to 1111 1110 1011 1111 (FEBF).
F E 8 0 F E B F
EIGRP for IPv6 Topology
R1#show running-config
!
interface GigabitEthernet0/0
ipv6 address 2001:DB8:CAFE:1::1/64
!
interface Serial0/0/0
ipv6 address 2001:DB8:CAFE:A001::1/64
clock rate 64000
!
interface Serial0/0/1
ipv6 address 2001:DB8:CAFE:A003::1/64
R2#show running-config
!
interface GigabitEthernet0/0
ipv6 address 2001:DB8:CAFÉ:2::1/64
!
interface Serial0/0/0
ipv6 address 2001:DB8:CAFE:A001::2/64
!
interface Serial0/0/1
ipv6 address 2001:DB8:CAFE:A002::1/64
clock rate 64000
!
interface Serial0/1/0
ipv6 address 2001:DB8:FEED:1::1/64
R3#show running-config
!
interface GigabitEthernet0/0
ipv6 address 2001:DB8:CAFE:3::1/64
!
interface Serial0/0/0
ipv6 address 2001:DB8:CAFE:A003::2/64
clock rate 64000
!
interface Serial0/0/1
ipv6 address 2001:DB8:CAFE:A002::2/64
IPv6 routing protocols use link-local
addresses to exchange routing
messages.
By default, Cisco routers use EUI-
64 to automatically create a link-
local address.
Static link-local addresses make it FE80::1
easier to remember and identify the
router.
R1(config)# interface s 0/0/0
R1(config-if)# ipv6 address fe80::1 ?
link-local Use link-local address
81
Static link-local addresses make
it easier to remember and
identify the router.
Link-local addresses only need
to be unique on the link. FE80::1
3.0.0.0
1.0.0.0
Amount of
time since
Neighbor’s IPv6 Local Seconds remaining this neighbor
Link-local Address Interface before declaring was added to
receiving neighbor down. the neighbor
EIGRP for table.
IPv6 Hello The current hold time
packets and is reset to the
maximum hold time
whenever a Hello
packet is received.
Verifying EIGRP for IPv6:
show ipv6 protocols
R1#show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "ND"
IPv6 Routing Protocol is "eigrp 2"
EIGRP-IPv6 Protocol for AS(2) 1 Routing protocol and Process ID (AS Number)
Metric weight K1=1, K2=0, K3=1, K4=0, K5=0 2 K values used in composite metric
NSF-aware route hold timer is 240
Router-ID: 1.0.0.0 3 EIGRP Router ID
Topology : 0 (base)
Active Timer: 3 min
Distance: internal 90 external 170 4 EIGRP Administrative Distances
Maximum path: 16
Maximum hopcount 100
Maximum metric variance 1
C 2001:DB8:CAFE:1::/64 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:DB8:CAFE:1::1/128 [0/0]
via GigabitEthernet0/0, receive
D 2001:DB8:CAFE:2::/64 [90/3524096] Notice link-local
via FE80::3, Serial0/0/1 addresses used as
D 2001:DB8:CAFE:3::/64 [90/2170112] next-hop addresses.
via FE80::3, Serial0/0/1
C 2001:DB8:CAFE:A001::/64 [0/0] Routing messages
via Serial0/0/0, directly connected
come from the link-
L 2001:DB8:CAFE:A001::1/128 [0/0]
via Serial0/0/0, receive
local address of the
D 2001:DB8:CAFE:A002::/64 [90/3523840] neighboring routers
via FE80::3, Serial0/0/1
C 2001:DB8:CAFE:A003::/64 [0/0]
via Serial0/0/1, directly connected
L 2001:DB8:CAFE:A003::1/128 [0/0]
via Serial0/0/1, receive
L FF00::/8 [0/0]
via Null0, receive
R1#
CONMUTACIÓN Y RUTEO I
CIDR
https://bgp.he.net/
AUTONOMOUS SYSTEM REPORT
AUTONOMOUS SYSTEM
STATS (2016)
https://as24904.kwaoo.net/as-stats/top.php
AUTONOMOUS SYSTEM
STATS (2017)
AUTONOMOUS SYSTEM
STATS (2018)
BGP Table - 2016
http://bgp.potaroo.net/
BGP Table - 2017
BGP Table - 2018
BGP Table - 2019
https://www.internetexchangemap.com/ 17
IXP - Ecuador
As of April 2018, there are 20 autonomous systems (AS) directly
connected to NAP.EC (http://aeprovi.org.ec/es/) and in the routing
table there are prefixes of 79 different autonomous systems (AS).
18
Comparison with Other
Scalable Routing Protocols
19
When to use BGP and when
not to use BGP
Use BGP when the effects of BGP are well understood and one
of the following conditions exist:
The AS allows packets to transit through it to reach another
AS (transit AS).
The AS has multiple connections to other AS’s.
The flow of traffic entering or exiting the AS must be
manipulated.
This is policy based routing and based on attributes.
When to use BGP and when
not to use BGP
Do not use BGP if you have one or more of the following conditions:
A single connection to the Internet or another AS
No concern for routing policy or routing selection
A lack of memory or processing power on your routers to handle
constant BGP updates
A limited understanding of route filtering and BGP path selection
process
Low bandwidth between AS’s
BGP Internal & External
1
BGP Characteristics
BGP updates are carried using TCP on port 179.
• In contrast:
• RIP updates use UDP port 520
• EIGRP uses EIGRP’s RTP
• OSPF does not use a Layer 4 protocol but uses OSPF
mechanisms for reliability (OSPF ACKs)
Because BGP requires TCP:
• IP connectivity must exist between BGP peers.
• TCP connections must also be negotiated between them before
updates can be exchanged.
BGP inherits those reliable, connection-oriented properties from
TCP.
BGP assumes that its communication is reliable and therefore, BGP
does not have to implement any retransmission or error-recovery
mechanisms, like EIGRP or OSPF does.
BGP Neighbor Relationships
External to the AS
BGP Neighbor Relationships
connected.
eBGP Requirements
must be reachable
eBGP neighbors are “usually” directly connected.
eBGP Multihop
eBGP (external BGP) by default requires two routers to be directly
connected to each other in order to establish a neighbor adjacency.
This is because eBGP routers use a TTL =1 for their BGP packets.
When the BGP neighbor is more than one hop away, the TTL will
decrement to 0 and it will be discarded.
When these two routers are not directly connected then we can still
make it work but we’ll have to use multihop. This requirement does
not apply to iBGP because TTL set to 255.
iBGP
AS’s
iBGP Requirements
Open Message
Update Message
Keepalive Message
Notification Message
BGP Message Types
Each BGP Message contains the following header:
Marker: The marker field is used to either authenticate incoming
BGP messages or to detect loss of synchronization between two
BGP peers.
Length: The length field indicates the total BGP message length,
including the header(messages may be between 19 and 4096
bytes long).
BGP OPEN Message
After the TCP session is established, both neighbors send Open
messages which includes a set of parameters that have to be agreed
upon before a full BGP adjacency can be established.This message is
used to establish full connections with peers.
Each neighbor uses this message to identify itself and to specify its BGP
operational parameters including:
BGP version number(defaults to version 4)
refresh.
BGP Keepalive Message
Keepalive messages are sent between peers every 60
seconds (by default) to maintain connections.
The message consist of only a message header (19
bytes).
Hold time is three times the KEEPALIVE timer of 60
seconds, 180 seconds.
If the periodic timer = 0, no keepalives are sent.
Recommended keepalive interval is one-third of the hold
time interval.
BGP Update Message
sent.
Notification messages include an error code, an error
subcode, and data related to the error.
BGP Databases
Neighbor table
List of BGP neighbors
IP routing table
List of best paths to destination networks
Basic BGP Configuration
Requirements
The next step is to gather the parameters needed
to provide the BGP configuration details. For
basic BGP, these details include the following:
The autonomous system numbers (of your own
network and of all remote autonomous systems)
The IP addresses of all the neighbors (peers)
involved
The networks that are to be advertised into BGP
Basic BGP configuration requires the following
main steps:
Step 1. Define the BGP process.
Step 2. Establish the neighbor relationships.
Step 3. Advertise the networks into BGP.
Basic BGP Configuration
Router D:
Does not recognize the sender of the BGP packet (10.1.1.1)
46
eBGP Next Hop
Proccesing
Solution:
Use option next-hop-self
BGP Example 1
R1 Configure IGP - OSPF
R2 Configure IGP - OSPF
R3 Configure IGP - OSPF
BRC-1 Configure IGP -
OSPF
BRC-2 Configure IGP -
OSPF
BRC-3 Configure IGP -
OSPF
BRC-4 Configure IGP -
OSPF
Display routing table on
Brocade Routers
R4 Configure IGP - EIGRP
R5 Configure IGP - EIGRP
R6 Configure IGP - EIGRP
R7 Configure IGP - EIGRP
R8 Configure IGP - EIGRP
R9 Configure IGP - EIGRP
R10 Configure IGP - EIGRP
Display routing table on
Cisco Routers
Configure iBGP & eBGP R1
Configure iBGP R2
Configure iBGP R3
Configure iBGP BRC-1
Configure iBGP BRC-2
Configure iBGP BRC-3
Configure iBGP R6
Configure iBGP R7
Configure iBGP R8
Configure iBGP R9
The status codes are shown at the beginning of each line of output, and
the origin codes are shown at the end of each line.
A row with an asterisk (*) in the first column means that the next-hop
address is valid.
A greater-than sign ( > ) in the second column indicates the best path
for a route selected by BGP. This route is offered to the IP routing table.
Examining the Routing
Table R1
Examining the Routing
Table BRC-4
Examining the Routing
Table R10
Solution: next-hop-self R1
BRC-4
Solution: next-hop-self R4
Ping PC6 (ASN 500) PC1(ASN
800)
Lab. BGP – Homework # 1
Lab. BGP – Homework # 2
R1 HPE
R2,R3 CISCO R4 HPE
BCR-1, BCR-2, BCR-3, R5,R6,R7,R8 CISCO
BCR-4 BROCADE R9, R10 Mikrotik
BGP with IPv6 – MP-BGP
(RFC 4760)
The normal version of BGP (Border Gateway Protocol) only
supported IPv4 unicast prefixes. Nowadays we use MP-BGP
(Multiprotocol BGP) which supports different addresses:
• IPv4 unicast
• IPv4 multicast
• IPv6 unicast
• IPv6 multicast
BGP with IPv6 – MP-BGP
Configure R3, R2 &
R1 - EIGRP
Configure R6, R5 & R4 –
OSPF
Configure R3, R2 iBGP
Configure R1 iBGP&eBGP
Configure R6, R5 iBGP
Configure R4 iBGP&eBGP
Verify R1 iBGP&eBGP
Process
Verify R4 iBGP&eBGP
Process
Verify R3 BGP Routing Table
Verify Connectivity
Lab. M-BGP - Homework
CONMUTACIÓN Y RUTEO I
Timers
Processes
68 – connections to client
Subnet Mask
Default Gateway
Domain Names
IP VoIP Server
…
DHCP Address Allocation
Mechanisms
Dynamic Allocation:
DHCP automatically assigns an IP address from a
pool of addresses.
The address is leased for a limited period of time
assigned to a device.
Software Elements
Client Software :
installed in client machines
configuration
Sever Software :
installed in server machines
DHCPDISCOVER
Broadcast
DHCPOFFER
Unicast
DHCPREQUEST
Broadcast
DHCPACK
Unicast
DHCPREQUEST
Unicast
DHCPACK
Unicast
DHCP transition diagram
Why configure an DHCP
Server?
In an enterprise, DHCP Services are usually provided by
a Windows Server or a UNIX server platform.
They are relatively easy to manage and highly
scalable.
Tasks Command
Define the duration of the DHCP lease {days [hours] [minutes] | infinite}
lease.
Broadcast Unicast
1. Configure IP Address
2. Configure OSPF Routing Protocol and Static Routes
Configure Pool Address
Router ISP
Configure DHCP Relay
R2
Configure DHCP Relay
Juniper_1
Configure DHCP Relay
Brocade_1
CONMUTACIÓN Y RUTEO I
statements.
ACLs control whether a router permits or
denies packets based on criteria in the header
that identifies the:
Source IP address
Destination IP address
Deny web access to users from network B, but permit them to have all
other access."
This is just a simple example. You can configure multiple rules to further
permit or deny services to specific users. You can also filter packets at
the port level using an extended ACL.
Types of ACLs
Standard ACLs
Can permit or deny traffic for Source IP addresses … only!
Extended ACLs
Can permit or deny traffic for:
Protocol type IP (IP, ICMP, EIGRP, OSPF, TCP, UDP, …)
Source IP address
Source TCP or UDP ports
Destination IP address
Destination TCP or UDP ports
Numbered and Named
ACLs
5
Wildcard Mask
mask 255.255.255.255.
255.255.255.255
-255.255.255. 0
0. 0. 0.255
255.255.255.255
-255.255.255.240
0. 0. 0. 15
Decimal Binary
IP Address 192.168.1.1 11000000.10101000.00000001.00000001
The host keyword can be used to substitute for the 0.0.0.0 wildcard
mask.
This mask states that all IPv4 address bits must match or only one
host is matched.
access-list 1 permit host 192.168.1.1
Decimal Binary
IP Address 0.0.0.0 00000000.00000000.00000000.00000000
administrator’s control
Bandwidth of the networks
involved
Ease of configuration
13
Can only permit/deny based on source address.
Will deny traffic to all sites.
14
Can permit/deny based on source,
destination, protocol... Can block before
wasting network bandwidth.
Why here?
OR
How are ACLs Created?
mode.
Define statements of what to
filter.
2. Apply the ACL to an interface.
Enter interface configuration
mode.
Identify the ACL and the
direction to filter.
Create a Standard ACL
RTR(config)# access-list ACL# {permit|deny} { test-conditions }
By default, there is an
implied deny at the
end of all ACLs for
traffic that was not
matched to a
configured entry.
SAME AS
Step 3: Apply the ACL to the interface using the ip access-group command
X
X
R1(config)# access-list 1 deny host 192.168.10.10
R1(config)# access-list 1 permit 192.168.10.0 0.0.0.255
R1(config)# interface s0/0/0
R1(config-if)# ip access-group 1 out
27
Named ACL
Named ACLs
RTR(config)# ip access-list {standard|extended} { NAME }
dropped.
RTR(config {std- | ext-}nacl)# deny {source [source wildcard] | any}
X
R1(config)# ip access-list standard NO_ACCESS
R1(config-std-nacl)# deny host 192.168.11.10
R1(config-std-nacl)# permit any
R1(config-std-nacl)# exit
R1(config)# interface g0/0
R1(config-if)# ip access-group NO_ACCESS out
Commenting ACLs
Example 1 – Commenting a numbered ACL
R1(config)# access-list 1 remark Do not allow Guest workstation through
R1(config)# access-list 1 deny host 192.168.10.10
R1(config)# access-list 1 remark Allow devices from all other 192.168.x.x subnets
R1(config)# access-list 1 permit 192.168.0.0 0.0.255.255
R1(config)# interface s0/0/0
R1(config-if)# ip access-group 1 out
R1(config-if)#
…)
Source port
Destination port
Extended ACLs Syntax
Extended ACLs also filter on Protocol and Destination address.
The choice of Protocol adds
All extended ACLs follow this basic syntax. various other options.
IP 20 (FTP-data)
100- LT
199 TCP 21 (FTP)
GT
UDP any any 23 (TELNET)
EQ
2000 ICMP host host 25 (SMTP)
NEQ
to EIGRP 53 (DNS)
2699
OSPF 80 (HTTP)
Use ? examples.
Extended IP ACLs
Examples
Deny all packets from any source address going specifically to host 10.1.1.1.
Deny all packets from host 10.1.1.1 going to any destination address.
Extended TCP ACLs
Examples
access-list 101 deny tcp any any eq telnet
Same function as last example; except it denies using the keyword telnet.
Extended TCP ACLs
Examples
S0/0/0 S0/0/1
10.1.1.1/30
R1 G0/1
R3
G0/0
192.168.10.0/24 192.168.11.0/24
S1 S2
The established parameter allows only responses to traffic that originates from the
192.168.10.0/24 network to return to that network.
Without the established parameter in the ACL statement, clients could send traffic to a
web server, but not receive traffic returning from the web server.
Applying Extended ACLs to
Interfaces
S0/1/0
S0/0/0 S0/0/1
10.1.1.1/30
R1 G0/1
R3
G0/0
192.168.10.0/24 192.168.11.0/24
S1 S2
R1(config)#interface g0/0
R1(config-if)# ip access-group 103 in
R1(config-if)# ip access-group 104 out
Deny FTP and Permit
Everything Else
S0/1/0
S0/0/0 S0/0/1
10.1.1.1/30
R1 G0/1
R3
G0/0
192.168.10.0/24 192.168.11.0/24
S1 S2 FTP X
S0/0/0 S0/0/1
10.1.1.1/30
R1 G0/1
R3
G0/0
192.168.10.0/24 192.168.11.0/24
S1 S2
SSH X
S0/0/0 S0/0/1
10.1.1.1/30
R1 G0/1
R3
G0/0
192.168.10.0/24 192.168.11.0/24
S1 S2
55
Juniper Filters
1 Create filter
edit firewall
set filter controlwww term 1 from source-address 10.10.20.0/24
set filter controlwww term 1 from destination-address 10.10.12.10/32
set filter controlwww term 1 from protocol icmp
set filter controlwww term 1 then accept
set filter controlwww term 2 from source-address 10.10.20.0/24
set filter controlwww term 2 from destination-address 10.10.12.10/32
set filter controlwww term 2 from protocol tcp
set filter controlwww term 2 from destination-port http
set filter controlwww term 2 then accept
quit
S0/0/0
S0/0/1
:1
:1
R1 R3
G0/0 G0/1
G0/0
:1 :1
:1
2001:DB8:CAFE:10::/64 2001:DB8:CAFE:11::/64 2001:DB8:CAFE:30::/64
S1 S2 S3
PC1 PC2
PC3
Parameter Description
destination-ipv6-address
any Enter any as an abbreviation for the IPv6 prefix ::/0. This matches all addresses.
S0/0/0
:1 S0/0/1
:1
R1 R3
G0/0 G0/1
:1 G0/0
:1 :1
2001:DB8:CAFE:10::/64 2001:DB8:CAFE:11::/64 2001:DB8:CAFE:30::/64
S1 S2 S3 X
PC1 PC2 PC3
S0/0/0
S0/0/1
:1
:1
R1 R3
G0/0 G0/1
:1 G0/0
:1 :1
2001:DB8:CAFE:10::/64 2001:DB8:CAFE:11::/64 2001:DB8:CAFE:30::/64
FTP X S1 S2 S3
S0/0/0
S0/0/1
:1
:1
R1 R3
G0/1
HTTP/HTTPS G0/0
:1 :1 G0/0
:1
2001:DB8:CAFE:10::/64 2001:DB8:CAFE:11::/64 2001:DB8:CAFE:30::/64
X S1 S2 S3
Telnet
PC1 PC2 Telnet from
2001:DB8:CAFE:10::10
PC3
2001:DB8:CAFE:11::11
X PC3
2001:DB8:CAFE:30::12/64
R3(config-ipv6-acl)# remark Deny telnet access to PC2 for all other devices
R3(config-ipv6-acl)# deny tcp any host 2001:db8:cafe:11::11 eq 23
R3(config)#interface g0/0
68
R3(config-if)#ipv6 traffic-filter RESTRICTED-ACCESS in
Verifying IPv6 ACLs
Mbps
Ethernet Protocol
LLC
• Handles communication between upper and lower
layers
• Takes the network protocol data and adds control
information to help deliver the packet to the
destination
Ethernet Protocol
MAC
• Constitutes the lower sublayer of the data link layer
• Implemented by hardware, typically in the computer NIC
• Two primary responsibilities:
• Data encapsulation
• Media access control
Ethernet Operation
MAC Sublayer
Application Application Layer
Header + data
Layer 2:
Data Link
Layer
010010100100100100111010010001101000… Layer 1: Physical
Layer
Data encapsulation
• Frame assembly before transmission and frame disassembly upon
reception of a frame
• MAC layer adds a header and trailer to the network layer PDU
Ethernet Operation
MAC Sublayer
Data encapsulation provides three primary
functions:
Frame delimiting – identifies a group of bits that make
up a frame, synchronization between the transmitting
and receiving nodes
Addressing – each Ethernet header added in the frame
contains the physical address (MAC address) that
enables a frame to be delivered to a destination node
Error detection - each Ethernet frame contains a trailer
with a cyclic redundancy check (CRC) of the frame
contents
Ethernet Operation
MAC Sublayer
Media Access
Control
CSMA/Collision Detection
With today’s intermediate devices (full-duplex switches), collisions do not
occur
Processes utilized by CSMA/CD are really unnecessary
Wireless connections in a LAN environment still have to take collisions into
account
CSMA/Collision Avoidance (CSMA/CA)
Device examines the media for the presence of data signal - if the media is
free, the device sends a notification across the media of its intent to use it
The device then sends the data.
Used by 802.11 wireless networking technologies
Ethernet Operation
MAC Address: Ethernet Identity
• Layer 2 Ethernet MAC address is a 48-bit binary value expressed as
12 hexadecimal digits
IEEE requires a vendor to follow two simple rules:
1. Must use that vendor's assigned OUI as the first 3 bytes
2. All MAC addresses with the same OUI must be assigned a
unique value in the last 3 bytes
Ethernet Operation
Frame Processing
16
Ethernet Frame
Attributes
Ethernet Frame Attributes
Ethernet Encapsulation
Early versions of Ethernet were relatively slow at 10 Mbps
Now operate at 10 Gigabits per second and faster (400Gbps)
Ethernet frame structure adds headers and trailers around the
Layer 3 PDU to encapsulate the message being sent
Ethernet II is
the Ethernet
frame format
used in
TCP/IP
networks.
Ethernet Frame Size
TYPE
12 hexadecimal digits.
MAC Address Format
OUI unique
An Intel MAC address: 00-21-CC-BA-44-C4
IEEE OUI FAQs: http://standards-oui.ieee.org/oui.txt
Unicast MAC Address
A unicast MAC address is the unique
address used when a frame is sent from
a single transmitting device to single
destination device.
Broadcast MAC Address
A unicast MAC address is the unique
address used when a frame is sent from
a single transmitting device to all
destination devices.
Multicast MAC Address
1 2 3 4
A B C D
MAC MAC MAC MAC
00-0A 00-0B 00-0C 00-0D
Switch Process
Learn: Examine Source MAC Address
MAC Address Table
Port MAC Address
Port and Source MAC I don’t have this source
address added 2 1 00-0A
MAC address and the
incoming port in my table
so I will add it.
1 2 3 4
1
1
A B C D
2
MAC MAC MAC MAC
00-0A 00-0B 00-0C 00-0D
1
2
A B C D
2
MAC MAC MAC MAC
00-0A 00-0B 00-0C 00-0D
1 2 3 4
1
1
A B C D
2
MAC MAC MAC MAC
00-0A 00-0B 00-0C 00-0D
3
Destination MAC Source MAC
Type Data FCS
00-0A 00-0D
Switch Process
Forward: Examine Destination MAC Address
MAC Address Table
I know the destination MAC
Port MAC Address
address so I will only
2 1 00-0A forward the frame out port 1.
4 00-0D
1 2 3 4
1
2
A B C D
2
MAC MAC MAC MAC
00-0A 00-0B 00-0C 00-0D
3
Destination MAC Source MAC
Type Data FCS
00-0A 00-0D
Switch Process
Learn: Examine Source MAC Address
MAC Address Table
Port MAC Address
1 00-0A
4 00-0D
1 2 3 4
1
1 2
A B C D
2
MAC MAC MAC MAC
00-0A 00-0B 00-0C 00-0D
3
Destination MAC Source MAC
Type Data FCS
00-0D 00-0A
MAC Address Tables on Connected
Switches
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
A B C
X MAC
00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
X
MAC MAC MAC
00-0A 00-0B 00-0C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
X
MAC MAC MAC
00-0A 00-0B 00-0C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B
X C
X
MAC MAC MAC
00-0A 00-0B 00-0C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
Sending host
Receiving host
Hubs and Collision
Domains
Collision
Sending host
Receiving host
Where are the collision domains?
What would be the duplex settings?
router
hub hub
74
Where are the collision
domains?
Single Collision Domain
router
hub hub
75
What would be the duplex
settings?
Half-duplex
router
hub hub
hub
76
Half-duplex
Where are the collision domains?
What would be the duplex settings?
router
switch switch
77
Where are the collision domains?
What would be the duplex settings?
router
switch switch
78
What would be the duplex
settings?
Half-duplex
router
Full-duplex
switch switch
hub
79
Half-duplex
Where are the collision domains?
What would be the duplex settings?
router
switch switch
80
Where are the collision
domains?
router
switch switch
Collision Domains
81
What would be the
duplex settings?
Half-duplex
router
Full-duplex
switch switch
switch
82
Full-duplex
Duplex and Speed Settings
PC-A
Port 1
Autonegotiation
Half Half
S1 Full-duplex S2
Half-duplex
mode when they are set to 10 or 100 Mb/s, but when set to
1,000 Mb/s, they operate only in full-duplex mode.
Crossover
Auto-MDIX
Destination MAC:
FF-FF-FF-FF-FF-FF
Performs FCS using CRC and discards any frames with errors
Once the entire frame has been read and checked for errors, the switch
then forwards it.
Allows entry and exit at different (asymmetric) bandwidths
Cut Through – Fast
Forward
forwarded
Compromise between low latency and checks
Adaptive cut-through
In this mode, the switch uses cut-through until
ARP Request
Broadcast
A B C D
You can do this but devices can only communicate with each
other that are on the same IP subnet…. Unless you have a
…ROUTER.
Who can A Ping? B ping? C ping? D ping?
A single VLAN (“no VLANs”)
means no segmentation
ARP Request
Wasted
Broadcast
bandwidth
MAC A MAC B MAC C MAC D
aa.aa bb.bb cc.cc dd.dd
192.168.10.10 192.168.10.11 192.168.20.12 192.168.20.13
255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0
ARP Request
Broadcast
A B C D
Configured
for VLAN 20
MAC 192.168.10.1
PCA> ping 192.168.20.12
11.11 255.255.255.0
MAC 192.168.10.1
11.11 255.255.255.0
MAC 192.168.10.1
11.11 255.255.255.0
MAC 192.168.10.1
11.11 255.255.255.0
Security:
Improved by isolating user access to sensitive data and applications.
Cost reduction:
Reduces the need for expensive network upgrades and more efficient
4094.
Support fewer VLAN
User VLANs
Each IP subnet is a separate VLAN
Management VLAN
VLAN to connect to infrastructure devices such a switches
Voice VLAN
VLAN used to connect IP phones
Guest VLAN
For to connect guests and others who do not have access to
Business VLANs
IT VLAN
HR VLAN
Sales VLAN
College
Student VLAN
Faculty VLAN
Guest VLAN
Default VLAN
VLAN 1
Default VLAN
Native VLAN
Un-tagged (If trunking there is no
802.1Q or ISL encapsulation)
CDP, VTP, PAgP, LACP, DTP, BPDUs
S1(config)# vlan 20
S1(config-vlan)# name SALES
S1(config-vlan)# exit
S1(config)# interface range fastethernet 0/13 - 22
S1(config-if-range)# switchport mode access
S1(config-if-range)# switchport access vlan 20
S1(config-if-range)# exit
S1(config)# interface gigabitethernet 0/2
S1(config-if)# switchport mode access
S1(config-if)# switchport access vlan 20
S1(config-if)# end
S1#
S1# show vlan
VLAN 1
192.168.10.254
SSH to
192.168.10.254
Data:
Untagged: Native VLAN
Recommended Option
Switch(config)# interface type mod/num
Switch(config-if)# switchport voice vlan vlan-id
Instructs the IP phone to forward all voice traffic through the specified VLAN.
By default, the Cisco IP phone forwards the voice traffic with an 802.1Q priority of 5.
Creates a special 802.1Q trunk
Negotiated by DTP and CDP
CoS (Class of Service) in 802.1p bits
vvid puts:
Voice packets on voice VLAN
Voice VLAN is configured.
Data packets in Native VLAN
VLAN 1 by default unless modified on the switch
Can configure the data VLAN to be a a VLAN other than Native or Voice
Configuring Voice VLAN
Operation
Voice: 802.1Q trunk
Tagged as voice VLAN 100 CoS in 802.1p bits
Data:
Untagged: Native VLAN
Tagged as VLAN 20
Recommended Option
Switch(config)# interface FastEthernet0/24
Switch(config-if)# switchport voice vlan 100
Switch(config-if)# switchport access vlan 20
interface FastEthernet0/24
switchport voice vlan 100
switchport access vlan 20
spanning-tree portfast
VLAN Trunks
Default VLAN
VLAN 1 Control traffic (STP, DTP, VTP, CDP, …)
User VLAN
VLAN 10 HR – 192.168.10.0/24
The TAG is added by the switch before it goes over a trunk link.
The TAG is removed by the switch at the other end of the trunk link.
VLAN Format TAG
802.1Q
Priority
Used for QoS (802.1p VLAN ID (VID)
standard) specifies how to VLAN identification number
Tag protocol ID expedite transmission of that supports up to 4096
(TPID) Layer 2 frames VLAN IDs
Ethernet is 0x8100.
Canonical Format Identifier (CFI)
Enables Token Ring frames to be
carried across Ethernet links
VLAN Format ISL
InterSwitch Link is Cisco's propriety tagging method and
supported only on Cisco's equipment through Fast & Gigabit
Ethernet links.
Control traffic (CDP, VTP, PAgP, DTP) still transmitted over VLAN 1.
VLAN VLAN
Trunk Trunk
46
Configuring VLAN Trunks
VLANs Fa0/1 VLANs
10, 20 Fa0/1 10, 20
S1 S2
S1# show vlan brief
VLANs VLANs
Fa0/1 Fa0/1 10, 20
10, 20
S1 S2
VLANs VLANs
Fa0/1 Fa0/1 10, 20
10, 20
S1 S2
No trunking information.
Fa 0/1 no longer included in VLAN 10
Configuring VLAN Trunks
VLANs VLANs
Fa0/1 Fa0/1 10, 20
10, 20
S1 S2
S1# show interfaces trunk
VLANs VLANs
Fa0/1 Fa0/1 10, 20
10, 20
S1 S2
S2#show interfaces trunk
51
Configuring the Native VLAN
VLANs VLANs
Fa0/1 Fa0/1 10, 20
10, 20
S1 S2
S1(config)# inter fa 0/1
S1(config-if)# switchport trunk native vlan 200
*Mar 1 01:59:34.927: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered
on FastEthernet0/1 (200), with S2 FastEthernet0/1 (1)
S1(config-if)#
VLAN 200 (Native VLAN) does not need to be created on either switch
but…
It must match on both ends of the trunk!
Control data (CDP, STP, etc.) is still sent across VLAN 1 but is now tagged.
Configuring the Native VLAN
VLANs VLANs
Fa0/1 Fa0/1 10, 20
10, 20
S1 S2
S1# show interfaces trunk
VLANs VLANs
Fa0/1 Fa0/1 10, 20
10, 20
S1 S2
S1(config)# inter fa 0/1
S1(config-if)# switchport trunk allowed vlan 10,20,200
VLANs VLANs
Fa0/1 Fa0/1 10, 20
10, 20
S1 S2
S1# show interfaces trunk
Legacy Inter-VLAN
Routing
Router-on-Stick
Switch SVI
Switch Routed Ports
Legacy Inter-
VLAN
Routing
192.168.10.1
255.255.255.0
A B C D
64
R1# show vlans
<output omitted>
Virtual LAN ID: 10 (IEEE 802.1Q Encapsulation)
<output omitted>
Multilayer switches can perform Layer 2 and Layer 3 functions, replacing the need
for dedicated routers.
Multilayer switches support dynamic routing and inter-VLAN routing.
A switch virtual interface (SVI) exists for VLAN 1 by default.
On a multilayer switch, a logical (layer 3) interface can be configured for any
VLAN.
With a multilayer switch, traffic is routed internal to the switch device.
This routing process is a suitable and scalable solution.
Configure Router On A
Stick: 802.1Q Trunk Link
interface GigabitEthernet 0/0
no shutdown ! Does not show in config
!
interface GigabitEthernet 0/0.2
description VLAN 2
encapsulation dot1Q 2 native
ip address 172.16.1.2 255.255.255.0
172.16.10.100/ 172.16.20.100/ !
24 24 interface GigabitEthernet 0/0.10
description VLAN 10
encapsulation dot1Q 10
interface GigabitEthernet 1/1 ip address 172.16.10.1 255.255.255.0
switchport mode trunk !
interface GigabitEthernet 0/0.20
description VLAN 20
encapsulation dot1Q 20
Router on a stick is very ip address 172.16.20.1 255.255.255.0
simple to implement. !
interface GigabitEthernet 0/0.30
description VLAN 30
encapsulation dot1Q 30
ip address 172.16.30.1 255.255.255.0
!
interface GigabitEthernet 0/0.40
description VLAN 40
encapsulation dot1Q 40
69 ip address 172.16.40.1 255.255.255.0
Routed Ports versus
Switched Virtual Interfaces
Routed Ports – Just like a router, the port has an IP address/mask that
makes it a member of that subnet.
SVI – The switch is a member of that IP subnet/VLAN. All switch ports that
are a member of that VLAN can communicate with the switch
Multilayer Switch Interfaces
Physical Interface
Logical Interface (SVI)
A B C D
A B C D
A B C D
S1
S2 S3
A B C D
Alternative Configuration
SVI VLAN 10 SVI VLAN 20
192.168.10.1 192.168.20.1
255.255.255.0 255.255.255.0
Distribution
Layer Switch
Trunk
Access
Layer Switch
A B C D
If in Layer 3 mode switchport interface command puts the port into Layer 2
mode.
SVI Interfaces
- Logical Interfaces
Core –
Route/Switch
packets quickly
across between
distribution
multilayer switches.
Distribution –
Route between
VLANs/Subnets,
ACLs
Access – Provide
access to end
devices and provide
port security. L3 = Routed Ports, over IP, separate subnets
L2 = SVI, VLANs over Trunks OR individual VLANs
Vlans – Router On Stick
Homework
V2
V3
V2 V3 V2 V3 V2 V3 V2 V3
Extreme Networks
VLANs - Example
Extreme Networks
VLANs - Example
1. Set name on Switch
Extreme Networks
VLANs - Example
2. Remove all ports default VLAN
Extreme Networks
VLANs - Example
3. Create Vlan 2 & Vlan 3
Extreme Networks
VLANs - Example
4. Configure ACCESS ports (untagged) & TRUNK
port (tagged)
Extreme Networks
VLANs - Example
Extreme Networks
VLANs - Example
5. Verify connectivity between PC-1, PC-6 & PC-4
Extreme Networks
VLANs - Example
6. Configure Routing Intervlan Multilayer
VLANs
CISCO & ExtremeOS
Configure EXOS-1
Configure EXOS-2
Configure EXOS-3
Configure CISCO-1 &
CISCO-2
Check Routing Intervlan
Configure R1
Configure R2
Check connectivity
PC11-PC9
Huawei
VLANs - Example
Create VLANs, Configure Access
Port & Trunk Port – SW1
Create VLANs, Configure Access
Port & Trunk Port – SW2
Create VLANs, Configure Access
Port & Trunk Port – SW3
Display Info VLANs
Display Info VLANs
Configure PC1 & PC5
Verify PING PC1 PC5
Configure VLANIF (SVI) – SW1
Configure VLANIF (SVI) – SW1
Private Vlans
In general VLAN is a concept of segregating a physical network, so
that separate broadcast domains can be created. Private VLANs
(PVANs) will split the primary VLAN domain into multiple isolated
broadcast sub-domains. It’s like the nesting concept – creating
VLANs inside a VLAN
Private Vlans
The private-VLAN feature addresses two problems that service
providers face when using VLANs:
Host Ports:
• Isolated Port (I-Port): Connects to the regular host that resides on
isolated VLAN. This port communicates only with P-Ports.
• Community Port (C-Port): Connects to the regular host that resides on
community VLAN. This port communicates with P-Ports and ports on the
same community VLAN.
Private VLANs Ports Type
Hardware Switches
Private VLANs Configuration
Private VLANs Configuration
1. Configuring private VLANs requires us to change the VTP
mode to Transparent
5. Add Ports to Vlan Community 200 and 300 and Vlan 250
Isolated
Private VLANs Configuration
Private VLANs Configuration
Private VLANs Configuration
Private VLANs Configuration
Private VLANs Configuration
6. Add Ports Vlan 250 Isolated
Private Vlans – Trunk Ports
Private Vlans – Trunk Ports
Private Vlans – Trunk Ports
Private Vlans – Trunk Ports
Private Vlans – Trunk Ports
Huawei – MUX VLAN
7
Spanning Tree Algorithm
STP executes an algorithm
called Spanning Tree
Algorithm (STA).
STA chooses a
Path Cost
Bridge ID
Without the
Extended
System ID
Bridge ID with
the Extended
System ID
Bridge ID (BID)
0x8000.
Usually expressed in decimal format
A 6-byte MAC address
Bridges use the concept of cost to evaluate how close they are to
other bridges.
Used to create the loop-free topology .
Originally, 802.1D defined cost as 1000/bandwidth of the link in
Mbps.
Cost of 10 Mbps link = 100
IEEE modified the most to use a non-linear scale with the new values of:
4 Mbps 250 (cost)
10 Mbps 100 (cost) • You can change the path cost by
16 Mbps 62 (cost) modifying the cost of a port.
45 Mbps 39 (cost) • Exercise caution when you do this!
100 Mbps 19 (cost) • BID and Path Cost are used to develop
155 Mbps 14 (cost) a loop-free topology .
622 Mbps 6 (cost) • Coming very soon!
1 Gbps 4 (cost)
10 Gbps 2 (cost)
Five-Step STP Decision
Sequence
When creating a loop-free topology, STP always uses the
same five-step decision sequence:
STP Convergence
Step 1 Elect one Root Bridge
Step 2 Elect Root Ports
Step 3 Elect Designated Ports
Who wins?
My BID is
32769.0001.C945.A573 Who wins?
My BID is My BID is
32769.0005.5E0D.9315 32769.0060.47B0.5850
My BID is My BID is
32769.0003.E461.46EC 32769.0001.964E.7EBB
I win!
BPDUs
BPDUs
sent/relayed BPDU
every two
seconds.
BPDU BPDU
BPDU BPDU
20
My BID is
32768.0001.C945.A573 Who wins?
I’m the root!
My BID is
My BID is 32768.0060.47B0.5850
32768.0005.5E0D.9315 I’m the root!
I’m the root!
My BID is
My BID is
32768.0003.E461.46EC
32768.0001.964E.7EBB
I’m the root!
I’m the root! I win!
I will select
STP Convergence
one Root
Step 1 Elect one Root Bridge
Port that is
Step 2 Elect Root Ports
closest,
Step 3 Elect Designated Ports
best path to
the root
bridge.
Now that the Root War has been won, switches move on to selecting
Root Ports.
A bridge’s Root Port is the port closest to the Root Bridge.
Bridges use the cost to determine closeness.
Every non-Root Bridge will select one Root Port!
Specifically, bridges track the Root Path Cost, the cumulative cost of
all links to the Root Bridge.
Determining (Electing) the
Root Port
Root Bridge, Access2 sends out BPDUs, containing a Root Path Cost of 0.
Access1, Distribution1, and Distribution2 receives these BPDUs and adds the Path
Cost of the FastEthernet interface to the Root Path Cost contained in the BPDU.
Access1, Distribution1, and Distribution2 add Root Path Cost 0 PLUS its Path
(port) cost of 19 = 19.
This value is used internally and used in BPDUs to other switches.
Path Cost
BPDU BPDU
Cost=0+19=19 Cost=0+19=19
19
19
Root Bridge
0
0
BPDU 19 0 BPDU
Cost=0
Cost=0+19=19
Difference Path Cost and Root Path Cost Root Path Cost
Path Cost: • Cumulative cost to the Root Bridge.
The value assigned to each port. • This is the value transmitted in the BPDU.
Added to BPDUs received on that port to • Calculated by adding the receiving port’s
Path Cost to the valued contained in the
calculate Root Path Cost. BPDU.
Path Cost
BPDU BPDU
Cost=0+19=19 Cost=0+19=19
19
19
Root Bridge
0
0
BPDU 19 0 BPDU
Cost=0
Cost=0+19=19
What are the Path Costs for Root
Bridge Access2?
Path Cost
Access2# show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.964E.7EBB
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15
sec
27
What are the Path Costs for
Distribution1?
Path Cost
Distribution1# show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.964E.7EBB
Cost 19
Port 3(FastEthernet0/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15
sec
Path Cost
Path Cost
BPDU
BPDU
Cost=4+19=23
Cost=4+19=23
19
19
BPDU
BPDU
Cost=19 0
Cost=19
0
19 0
Root Bridge
Distribution 1 and Distribution 2 receive the BPDUs from Access 1, and adds the
Path Cost of 4 to those interfaces, giving a Root Path Cost of 23.
However, both of these switches already have an “internal” Root Path Cost of 19
that was received on another interface. (Fa0/3 for each with a Root Path Cost of 19.)
Distribution 1 and Distribution 2 use the better BPDU of 19 when sending out their
BPDUs to other switches.
BPDU
BPDU
Cost=4+19=23
Cost=4+19=23
19
19
BPDU
BPDU
Cost=19 0
Cost=19
0
19 0
Root Bridge
Distribution 1 now sends BPDUs with its Root Path Cost out other interfaces (Best BPDU).
Again, STP costs are incremented as BPDUs are received on a port, not as they are sent out a
port.
Path Cost
BPDU
Cost=4+19=23
BPDU
BPDU
Cost=19+19=38
Cost=19
19
23 23
19
0 Root Bridge
19
0
19
BPDU
0
Cost=4+19=23
Final Results
Ports show BPDU Received Root Path Cost + Path Cost = Root Path Cost of Interface, after
the “best” BPDU is received on that port from the neighboring switch.
This is the cost of reaching the Root Bridge from this interface towards the neighboring switch.
Now let’s see how this is used!
Path Cost
19+4=23 19+4=23
23+4=27 23+4=27
19+19=38 19+19=38
19 19+4=23
19+4=23 19
19+4=23 19+4=23
0
19 0
0 Root Bridge
show
spanning-tree
Which port is the Root Port?
Core# show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.964E.7EBB
Cost 4
Port 25(GigabitEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
23 19
23 23 0
19 0
0 Root Bridge
41
Elect Root Ports: (Review)
Ports show Root Path Cost of Interface, after the “best” BPDU is received on that
port from the neighboring switch.
This is the cost of reaching the Root Bridge from this interface towards the
neighboring switch.
Distribution 1 “thought process”
Path Cost
If I go through
Core it costs
27.
If I go
through D2
it costs 38.
If I go
through A1 it
costs 23.
If I go through
A2 it costs 19.
This is the best
path to the
Root!
Elect Root Ports:
This is from the switch’s perspective.
Switch, “What is my cost to the Root Bridge?”
Later we will look at Designated Ports, which is from the Segment’s perspective.
If I go
through Core
it costs 27.
If I go
through D2
it costs 38.
If I go
through A1
it costs 23.
If I go through
A2 it costs 19.
This is the best
path to the
Root!
Elect Root Ports
Every non-Root bridge must select one Root Port.
A bridge’s Root Port is the port closest to the Root Bridge.
Bridges use the Root Path Cost to determine closeness.
? ?
23 23
27 27
38 38
19 23
23 19 RP
RP
23 23 0
19 RP 0
0 Root Bridge
Elect Root Ports Five-Step decision Sequence
Core switch has two equal Root Path Costs to Step 1 - Lowest BID
the Root Bridge. Step 2 - Lowest Path Cost to Root Bridge
In this case we need to look at the five-step Step 3 - Lowest Sender BID
decision process. Step 4 - Lowest Port Priority
Step 5 - Lowest Port ID
? ?
23 23
27 27
38 38
19 23
23 19 RP
RP
23 23 0
19 RP 0
0 Root Bridge
Elect Root Ports Five-Step decision Sequence
• Distribution 1 switch has a lower Sender BID Step 1 - Lowest BID
than Distribution 2. Step 2 - Lowest Path Cost to Root Bridge
• Core chooses the Root Port of G 0/1. Step 3 - Lowest Sender BID
Step 4 - Lowest Port Priority
Step 5 - Lowest Port ID
? ?
RP 23 23
My BID is My BID is
32769.0005.5E0D.9315 32769.0060.47B0.5850
Lower BID 27
27
38 38
19 23
23 19 RP
RP
23 23 0
19 RP 0
0 Root Bridge
Elect Designated Ports
STP Convergence
Step 1 Elect one Root Bridge
Step 2 Elect Root Ports
Step 3 Elect Designated Ports
The loop prevention part of STP becomes evident during this step, electing
designated ports.
A Designated Port functions as the single bridge port that both sends and
receives traffic to and from that segment and the Root Bridge.
Each segment in a bridged network has one Designated Port, chosen
based on cumulative Root Path Cost to the Root Bridge.
The switch containing the Designated Port is referred to as the Designated
Bridge for that segment.
To locate Designated Ports, lets take a look at each segment.
• Segment’s perspective: From a device on this segment, “Which switch
should I go through to reach the Root Bridge?”
Root Path Cost, the cumulative cost of all links to the Root Bridge.
Obviously, the segment has not ability to make this decision, so the
perspective and the decision is that of the switches on that segment.
• A Designated Port is elected for every segment.
• The Designated Port is the only port that sends and receives traffic to/from that segment to the
Root Bridge, the best port towards the root bridge.
• Note: The Root Path Cost shows the Sent Root Path Cost.
• This is the advertised cost in the BPDU, by this switch out that interface, i.e. this is the cost of
reaching the Root Bridge through me!
RP 23 23
19 19
19 19
19 19
19 19 RP
RP
19 19 0
19 RP 0
0 Root Bridge
• A Designated Port is elected for every segment.
• Segment’s perspective: From a device on this segment, “Which switch should I go through to
reach the Root Bridge?”
• “I’ll decide using the advertised Root Path Cost from each switch!”
RP 23 23
? ?
19 19
?
19 19
19 19
19 RP ? ? 19 RP
? ?
19 19 0
19 RP ? 0
Root Bridge
0
Segment’s perspective:
• Access 2 has a Root Path Cost = 0 (after all it is the Root Bridge) and Access 1 has a Root
Path Cost = 19.
• Because Access 2 has the lower Root Path Cost it becomes the Designated Port for that
segment.
RP 23 23
19 19
My19 designated
What is my
port
best
willpath
be 19
0
to the2Root
via Access Bridge,
(Fa0/5). It’s 19
the
19
19
via Access
best path, 1 or 0Path,
lowest Root via
19 19 RP
RP to the Root
Access
Bridge.
2?
19 19 0
19 RP ? DP 0
Root Bridge
0
Segment’s perspective:
• The same occurs between Access 2 and Distribution ,1 and Access 2 and Distribution 2
switches.
• Because Access 2 has the lower Root Path Cost it becomes the Designated Port for those
segments.
RP 23 23
19 19
19 19
19 19
19 RP
? 19 RP
?
19 19 DP 0 DP
19 RP DP 0
0 Root Bridge
51
Segment’s perspective: Five-Step decision Sequence
• Segment between Distribution 1 and Access 1 Step 1 - Lowest BID
has two equal Root Path Costs of 19. Step 2 - Lowest Path Cost to Root Bridge
• Using the Lowest Sender ID (first two steps are Step 3 - Lowest Sender BID
equal), Access 1 becomes the best path and Step 4 - Lowest Port Priority
the Designated Port. Step 5 - Lowest Port ID
RP 23 23
32769.0005.5E0D.9315
19 19
DP 19 19 DP 0 DP
32769.0003.E461.46EC 19 RP DP 0
0 Root Bridge
Lower BID
Segment’s perspective: Five-Step decision Sequence
• Segment between Distrib. 1 and Distrib. 2 has Step 1 - Lowest BID
two equal Root Path Costs of 19. Step 2 - Lowest Path Cost to Root Bridge
• Using the Lowest Sender ID (first two steps are Step 3 - Lowest Sender BID
equal), Distribution 1 becomes the best path Step 4 - Lowest Port Priority
and the Designated Port. Step 5 - Lowest Port ID
RP 23 23
32769.0005.5E0D.9315 32769.0060.47B0.5850
19
Lower BID
DP
19
?
19 19
19 19
19 RP 19 RP
DP
19 19 DP 0 DP
19 RP DP 0
0 Root Bridge
53
Segment’s perspective: Five-Step decision Sequence
• Segment between Access 1 and Distrib. 2 has Step 1 - Lowest BID
two equal Root Path Costs of 19. Step 2 - Lowest Path Cost to Root Bridge
• Using the Lowest Sender ID (first two steps are Step 3 - Lowest Sender BID
equal), Access 1 becomes the best path and Step 4 - Lowest Port Priority
the Designated Port. Step 5 - Lowest Port ID
RP 23 23
32769.0060.47B0.5850
19 19
DP
19 19
19
19
19
RP ? 19 RP
32769.0003.E461.46EC DP
19 DP 19 DP 0 DP
Lower BID 19 RP DP 0
0 Root Bridge
54
Segment’s perspective:
• Because Distribution 1 has the lower Root Path Cost it becomes the Designated Port for that
segment.
• Because Distribution 2 has the lower Root Path Cost it becomes the Designated Port for that
segment.
Five-Step decision
Sequence
Step 1 - Lowest BID
Step 2 - Lowest Path Cost to
Root Bridge
RP 23 23 Step 3 - Lowest Sender BID
? ? Step 4 - Lowest Port Priority
Step 5 - Lowest Port ID
DP DP
19 19
DP
19 19
19 19
19 RP 19 RP
DP
19 19 DP 0 DP
DP
19 RP DP 0
0 Root Bridge
Segment’s perspective:
• All other ports, those ports that are not Root Ports or Designated Ports, become Non-
Designated Ports.
• Non-Designated Ports are put in blocking mode.
• This is the loop prevention part of STP.
RP 23 23
X
NDP
DP
19 19 DP
X
DP NDP
19 19
NDP
X 19
RP
19
X
NDP 19 RP
19
DP
19 19 DP 0 DP
DP
19 RP DP 0
0 Root Bridge
Core# show spanning-tree
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/1 Root FWD 4 128.25 P2p
Gi0/2 Altn BLK 4 128.26 P2p
Distribution1# show spanning-tree
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/3 Root FWD 19 128.3 P2p
Fa0/5 Desg FWD 19 128.5 P2p
Gi0/1 Desg FWD 4 128.25 P2p
Gi0/2 Altn BLK 4 128.26 P2p
Distribution2# show spanning-tree
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/3 Root FWD 19 128.3 P2p
Fa0/5 Altn BLK 19 128.5 P2p
Gi0/1 Altn BLK 4 128.25 P2p
Gi0/2 Desg FWD 4 128.26 P2p
Access1# show spanning-tree
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/5 Root FWD 19 128.5 P2p
Gi1/1 Desg FWD 4 128.25 P2p
Gi1/2 Desg FWD 4 128.26 P2p
Access2# show spanning-tree
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/5
Rick Graziani Desg FWD 19 128.5 57 P2p
graziani@cabrillo.edu
Five-Step decision Sequence
Port Step 1 - Lowest BID
Step 2 - Lowest Path Cost to Root Bridge
Cost/Port ID Step 3 - Lowest Sender BID
Step 4 - Lowest Port Priority
Step 5 - Lowest Port ID
0/2
0/1
If the path cost and bridge IDs are equal (as in the case of parallel
links), the switch goes to the port priority as a tiebreaker.
This is the sender’s Port priority + Port ID
Lowest port priority wins (all ports set to 128).
If all ports have the same priority, the port with the lowest port number
forwards frames.
STP Convergence:
Summary
Recall that switches go through three steps for their initial
convergence:
STP Convergence
Step 1 Elect one Root Bridge
Step 2 Elect Root Ports
Step 3 Elect Designated Ports
Building active topology. Thinks port can be selected root or designated port.
Returns to blocking (NDP) if cannot become root or designated port.
Learning Receive and send Updating Table None sent/received Forward delay 15 sec
Building bridging table. Switch can now learn source MAC Addresses but is not
formally receiving frames in order to forward them.
Forwarding Receive and send Updating Table Sent and received Continuous if up and no
loop detected
Rick Graziani 60
Sending/Receiving
graziani@cabrillo.edu data, no loops detected. Port is either a root or designated port.
STP Timers
61
Switch(config)# spanning-tree vlan 1 priority priority
Current Root
Bridge
Modify the topology so that the Core switch is the root bridge and
Distribution1 is the secondary root bridge for VLAN 1.
STP Example
STP Example – SW-1
STP Example – SW-2
STP Example – SW-3
STP Example – SW-4
STP Example – SW-5
STP Example – SW-5
PVST
Per-VLAN Spanning Tree (PVST) maintains a spanning tree instance
for each VLAN configured in the network. It uses ISL Trunking and
allows a VLAN trunk to be forwarding for some VLANs while blocking
for other VLANs.
PVST
Configure SW-1,SW-2,
SW-2 & SW-4
Verify Root Bridge each
VLAN
Verify Root Bridge each
VLAN
Verify Root Bridge each
VLAN
Verify Root Bridge each
VLAN
Verify Root Bridge each
VLAN
Verify Root Bridge each
VLAN
Verify Root Bridge each
VLAN
Verify Root Bridge each
VLAN
CONMUTACIÓN Y RUTEO I
Take a look at the picture above. I have two switches and two
computers connected to the switches. The computers are connected
with 1000 Mbit interfaces while the link between the switches is only
100 Mbit. If one of the computers would send traffic that exceeds 100
Mbit of bandwidth we”ll have congestion and traffic will be dropped.
In the picture above I have added a couple of extra links. The problem with
this setup is that we have a loop so spanning tree would block 3 out of 4
links. Link Agreggation solves this problem because it will create a single
virtual link out of these physical links
By combining 4x 1000 Mbit I now have a 4000 Mbit link. Spanning tree sees this
link as one logical link so there are no loops! Link Agreggation will do load
balancing among the different links that we have and it takes care of
redundancy. Once one of the links fails it will keep working and use the links that
we have left.
There’s a maximum to the number of links you can use: 8 physical interfaces
EtherChannel
EtherChannel is a link aggregation technology developed by Cisco,
which provides fault-tolerant high-speed links between Switches,
Routers, and Servers.
EtherChannel bundles individual
Ethernet links into a single logical link
that provides bandwidth up to 1600
Mbps (Fast EtherChannel, full
duplex) , 16 Gbps (Gigabit
EtherChannel) or 160Gpbs (10
Gigabit EtherChannel) between two
switches.