Module 1-6
Module 1-6
The following example shows the configuration for the interfaces on R1.
R1(config)# interface gigabitethernet 0/0/0
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# ipv6 address 2001:db8:acad:1::1/64
R1(config-if)# description Link to LAN 1
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface gigabitethernet 0/0/1
R1(config-if)# ip address 192.168.11.1 255.255.255.0
R1(config-if)# ipv6 address 2001:db8:acad:2::1/64
R1(config-if)# description Link to LAN 2
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface serial 0/0/0
R1(config-if)# ip address 209.165.200.225 255.255.255.252
R1(config-if)# ipv6 address 2001:db8:acad:3::225/64
R1(config-if)# description Link to R2
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
Syntax Checker - Configure Router Interfaces
In this Syntax Checker activity, you will configure R2 with its IPv4 and IPv6
interfaces.
Configure GigabitEthernet 0/0/0.
Use g0/0/0 to enter interface configuration mode.
Configure the IPv4 address 10.1.1.1 and subnet
mask 255.255.255.0.
Configure the IPv6 address 2001:db8:acad:4::1/64.
Describe the link as Link to LAN 3.
Activate the interface.
Router(config)#
MODULE – 2
Switching in Networking
The concept of switching and forwarding frames is universal in networking
and telecommunications. Various types of switches are used in LANs, WANs,
and in the public switched telephone network (PSTN).
The decision on how a switch forwards traffic is made based on the flow of
that traffic. There are two terms associated with frames entering and leaving
an interface:
Ingress - This is used to describe the port where a frame enters the
device.
Egress - This is used to describe the port that frames will use when
leaving the device.
A LAN switch maintains a table that is referenced when forwarding traffic
through the switch. The only intelligence of a LAN switch is its ability to use
its table to forward traffic. A LAN switch forwards traffic based on the ingress
port and the destination MAC address of an Ethernet frame. With a LAN
switch, there is only one master switching table that describes a strict
association between MAC addresses and ports; therefore, an Ethernet frame
with a given destination address always exits the same egress port,
regardless of the ingress port it enters.
Alleviate Network Congestion
LAN switches have special characteristics that help them alleviate network
congestion. By default, interconnected switch ports attempt to establish a
link in full-duplex, therefore eliminating collision domains. Each full-duplex
port of the switch provides the full bandwidth to the device or devices that
are connected to that port. Full-duplex connections have dramatically
increased LAN network performance, and are required for 1 Gbps Ethernet
speeds and higher.
Switches interconnect LAN segments, use a MAC address table to determine
egress ports, and can lessen or eliminate collisions entirely. Characteristics of
switches that alleviate network congestion include the following:
Fast port speeds - Ethernet switch port speeds vary by model and
purpose. For instance, most access layer switches support 100 Mbps
and 1 Gbps port speeds. Distribution layer switches support 100 Mbps,
1 Gbps, and 10 Gbps port speeds and core layer and data center
switches may support 100 Gbps, 40 Gbps, and 10 Gbps port speeds.
Switches with faster port speeds cost more but can reduce congestion.
Fast internal switching - Switches use a fast internal bus or shared
memory to provide high performance.
Large frame buffers - Switches use large memory buffers to
temporarily store more received frames before having to start dropping
them. This enables ingress traffic from a faster port (e.g., 1 Gbps) to be
forwarded to a slower (e.g., 100 Mbps) egress port without losing
frames.
High port density - A high port density switch lowers overall costs
because it reduces the number of switches required. For instance, if 96
access ports were required, it would be less expensive to buy two 48-
port switches instead of four 24-port switches. High port density
switches also help keep traffic local, which helps alleviate congestion.
MODULE - 3
VLANs allow an administrator to segment networks based on factors such as
function, team, or application, without regard for the physical location of the users
or devices. Each VLAN is considered a separate logical network. Devices within a
VLAN act as if they are in their own independent network, even if they share a
common infrastructure with other VLANs. Any switch port can belong to a VLAN.
Unicast, broadcast, and multicast packets are forwarded and flooded only to
end devices within the VLAN where the packets are sourced. Packets
destined for devices that do not belong to the VLAN must be forwarded
through a device that supports routing.
Multiple IP subnets can exist on a switched network, without the use of
multiple VLANs. However, the devices will be in the same Layer 2 broadcast
domain. This means that any Layer 2 broadcasts, such as an ARP request,
will be received by all devices on the switched network, even by those not
intended to receive the broadcast.
A VLAN creates a logical broadcast domain that can span multiple physical
LAN segments. VLANs improve network performance by separating large
broadcast domains into smaller ones. If a device in one VLAN sends a
broadcast Ethernet frame, all devices in the VLAN receive the frame, but
devices in other VLANs do not.
Using VLANs, network administrators can implement access and security
policies according to specific groupings of users. Each switch port can be
assigned to only one VLAN (except for a port connected to an IP phone or to
another switch).
Default VLAN
The default VLAN on a Cisco switch is VLAN 1. Therefore, all switch ports are
on VLAN 1 unless it is explicitly configured to be on another VLAN. By
default, all Layer 2 control traffic is associated with VLAN 1.
Important facts to remember about VLAN 1 include the following:
All ports are assigned to VLAN 1 by default.
The native VLAN is VLAN 1 by default.
The management VLAN is VLAN 1 by default.
VLAN 1 cannot be renamed or deleted.
For instance, in the show VLAN brief output, all ports are currently assigned
to the default VLAN 1. No native VLAN is explicitly assigned and no other
VLANs are active; therefore, the network is designed with the native VLAN
the same as the management VLAN. This is considered a security risk.
Native VLAN
User traffic from a VLAN must be tagged with its VLAN ID when it is sent to
another switch. Trunk ports are used between switches to support the
transmission of tagged traffic. Specifically, an 802.1Q trunk port inserts a 4-
byte tag in the Ethernet frame header to identify the VLAN to which the
frame belongs.
A switch may also have to send untagged traffic across a trunk link.
Untagged traffic is generated by a switch and may also come from legacy
devices. The 802.1Q trunk port places untagged traffic on the native VLAN.
The native VLAN on a Cisco switch is VLAN 1 (i.e., default VLAN).
It is a best practice to configure the native VLAN as an unused VLAN, distinct
from VLAN 1 and other VLANs. In fact, it is not unusual to dedicate a fixed
VLAN to serve the role of the native VLAN for all trunk ports in the switched
domain.
Defining VLAN Trunks
VLANs would not be very useful without VLAN trunks. VLAN trunks allow all
VLAN traffic to propagate between switches. This enables devices connected
to different switches but in the same VLAN to communicate without going
through a router.
A trunk is a point-to-point link between two network devices that carries
more than one VLAN. A VLAN trunk extends VLANs across an entire network.
Cisco supports IEEE 802.1Q for coordinating trunks on Fast Ethernet, Gigabit
Ethernet, and 10-Gigabit Ethernet interfaces.
A VLAN trunk does not belong to a specific VLAN. Instead, it is a conduit for
multiple VLANs between switches and routers. A trunk could also be used
between a network device and server or another device that is equipped with
an appropriate 802.1Q-capable NIC. By default, on a Cisco Catalyst switch,
all VLANs are supported on a trunk port.
In the figure, the highlighted links between switches S1 and S2, and S1 and
S3 are configured to transmit traffic coming from VLANs 10, 20, 30, and 99
Network with VLANs
VLANs are associated with and configured on individual switch ports. Devices
attached to those ports have no concept of VLANs. However, these devices
are configured with IP addressing and are members of a specific IP network.
This is where the connection between VLAN and IP network is apparent. A
VLAN is the equivalent to an IP network (or subnet). VLANs are configured on
the switch, whereas IP addressing is configured on the device.
Click Play in the animation to see that the same network has now been
segmented using two VLANs. Faculty devices are assigned to VLAN 10 and
student devices are assigned to VLAN 20. When a broadcast frame is sent
from the faculty computer, PC1, to switch S2, the switch forwards that
broadcast frame only to those switch ports configured to support VLAN 10.
Native VLANs and 802.1Q Tagging
The IEEE 802.1Q standard specifies a native VLAN for trunk links, which
defaults to VLAN 1. When an untagged frame arrives on a trunk port it is
assigned to the native VLAN. Management frames that are sent between
switches is an example of traffic that is typically untagged. If the link
between two switches is a trunk, the switch sends the untagged traffic on
the native VLAN.
Tagged Frames on the Native VLAN
Some devices that support trunking add a VLAN tag to native VLAN traffic.
Control traffic sent on the native VLAN should not be tagged. If an 802.1Q
trunk port receives a tagged frame with the VLAN ID that is the same as the
native VLAN, it drops the frame. Consequently, when configuring a switch
port on a Cisco switch, configure devices so that they do not send tagged
frames on the native VLAN. Devices from other vendors that support tagged
frames on the native VLAN include IP phones, servers, routers, and non-Cisco
switches.
Untagged Frames on the Native VLAN
When a Cisco switch trunk port receives untagged frames (which are unusual
in a well-designed network), it forwards those frames to the native VLAN. If
there are no devices associated with the native VLAN (which is not unusual)
and there are no other trunk ports (which is not unusual), then the frame is
dropped. The default native VLAN is VLAN 1. When configuring an 802.1Q
trunk port, a default Port VLAN ID (PVID) is assigned the value of the native
VLAN ID. All untagged traffic coming in or out of the 802.1Q port is forwarded
based on the PVID value. For example, if VLAN 99 is configured as the native
VLAN, the PVID is 99 and all untagged traffic is forwarded to VLAN 99. If the
native VLAN has not been reconfigured, the PVID value is set to VLAN 1.
VLAN Creation Commands
When configuring normal range VLANs, the configuration details are stored in
flash memory on the switch in a file called vlan.dat. Flash memory is
persistent and does not require the copy running-config startup-
config command. However, because other details are often configured on a
Cisco switch at the same time that VLANs are created, it is good practice to
save running configuration changes to the startup configuration.
VLAN Port Assignment Commands
After creating a VLAN, the next step is to assign ports to the VLAN.
The table displays the syntax for defining a port to be an access port and
assigning it to a VLAN. The switchport mode access command is optional,
but strongly recommended as a security best practice. With this command,
the interface changes to strictly access mode. Access mode indicates that
the port belongs to a single VLAN and will not negotiate to become a trunk
link.
MODULE – 4
The ‘router-on-a-stick’ inter-VLAN routing method overcomes the limitation of the legacy inter-
VLAN routing method. It only requires one physical Ethernet interface to route traffic between
multiple VLANs on a network.
A Cisco IOS router Ethernet interface is configured as an 802.1Q trunk and connected to a
trunk port on a Layer 2 switch. Specifically, the router interface is configured using
subinterfaces to identify routable VLANs.
The configured subinterfaces are software-based virtual interfaces. Each is associated with a
single physical Ethernet interface. Subinterfaces are configured in software on a router. Each
subinterface is independently configured with an IP address and VLAN assignment.
Subinterfaces are configured for different subnets that correspond to their VLAN assignment.
This facilitates logical routing.
When VLAN-tagged traffic enters the router interface, it is forwarded to the VLAN subinterface.
After a routing decision is made based on the destination IP network address, the router
determines the exit interface for the traffic. If the exit interface is configured as an 802.Q
subinterface, the data frames are VLAN-tagged with the new VLAN and sent back out the
physical interface.
First, the VLANs are created and named. VLANs are only created after you exit out of VLAN
subconfiguration mode.
S1(config)# vlan 10
S1(config-vlan)# exit
S1(config)# vlan 20
S1(config-vlan)# exit
S1(config)# vlan 99
S1(config-vlan)# exit
S1(config)#
S2(config)# vlan 10
S2(config-vlan)# exit
S2(config)# vlan 20
S2(config-vlan)# exit
S2(config)# vlan 99
S2(config-vlan)# exit
S2(config)#
S2(config-if)# no shut
S2(config-if)# exit
S2(config-if)# no shut
S2(config-if)# exit
S2(config-if)# no shut
S2(config-if)# exit
S2(config-if)# end
R1 Subinterface Configuration
R1(config)# interface G0/0/1.10
R1(config-subif)# description Default Gateway for VLAN 10
R1(config-subif)# encapsulation dot1Q 10
R1(config-subif)# ip add 192.168.10.1 255.255.255.0
R1(config-subif)# exit
R1(config)#
R1(config)# interface G0/0/1.20
R1(config-subif)# description Default Gateway for VLAN 20
R1(config-subif)# encapsulation dot1Q 20
R1(config-subif)# ip add 192.168.20.1 255.255.255.0
R1(config-subif)# exit
R1(config)#
R1(config)# interface G0/0/1.99
R1(config-subif)# description Default Gateway for VLAN 99
R1(config-subif)# encapsulation dot1Q 99
R1(config-subif)# ip add 192.168.99.1 255.255.255.0
R1(config-subif)# exit
R1(config)#
R1(config)# interface G0/0/1
R1(config-if)# description Trunk link to S1
R1(config-if)# no shut
R1(config-if)# end
R1#
*Sep 15 19:08:47.015: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/1,
changed state to down
*Sep 15 19:08:50.071: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/1,
changed state to up
*Sep 15 19:08:51.071: %LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/0/1, changed state to up
R1#
Bridge Priority
The default priority value for all Cisco switches is the decimal value 32768.
The range is 0 to 61440 in increments of 4096. A lower bridge priority is
preferable. A bridge priority of 0 takes precedence over all other bridge
priorities.
Extended System ID
The extended system ID value is a decimal value added to the bridge priority
value in the BID to identify the VLAN for this BPDU.
Early implementations of IEEE 802.1D were designed for networks that did
not use VLANs. There was a single common spanning tree across all
switches. For this reason, in older switches, the extended system ID was not
included in the BPDUs. As VLANs became common for network infrastructure
segmentation, 802.1D was enhanced to include support for VLANs, which
required that the 12-bit VLAN ID be included in the BPDU frame. VLAN
information is included in the BPDU frame through the use of the extended
system ID.
The extended system ID allows later implementations of STP to have
different root bridges for different sets of VLANs. This can allow for
redundant, non-forwarding links in a STP topology for one set of VLANs to be
used by a different set of VLANs using a different root bridge.
MAC address
When two switches are configured with the same priority and have the same
extended system ID, the switch having the MAC address with the lowest
value, expressed in hexadecimal, will have the lower BID.
Determine the Root Path Cost
When the root bridge has been elected for a given spanning tree instance,
the STA starts the process of determining the best paths to the root bridge
from all destinations in the broadcast domain. The path information, known
as the internal root path cost, is determined by the sum of all the individual
port costs along the path from the switch to the root bridge.
Note: The BPDU includes the root path cost. This is the cost of the path from
the sending switch to the root bridge.
When a switch receives the BPDU, it adds the ingress port cost of the
segment to determine its internal root path cost.
The default port costs are defined by the speed at which the port operates.
The table shows the default port costs suggested by IEEE. Cisco switches by
default use the values as defined by the IEEE 802.1D standard, also known
as the short path cost, for both STP and RSTP. However, the IEEE standard
suggests using the values defined in the IEEE-802.1w, also known as long
path cost, when using 10 Gbps links and faster.
Per-VLAN Spanning Tree
Up until now, we have discussed STP in an environment where there is only
one VLAN. However, STP can be configured to operate in an environment
with multiple VLANs.
In Per-VLAN Spanning Tree (PVST) versions of STP, there is a root bridge
elected for each spanning tree instance. This makes it possible to have
different root bridges for different sets of VLANs. STP operates a separate
instance of STP for each individual VLAN. If all ports on all switches are
members of VLAN 1, then there is only one spanning tree instance.
PortFast and BPDU Guard
When a device is connected to a switch port or when a switch powers up, the
switch port goes through both the listening and learning states, each time
waiting for the Forward Delay timer to expire. This delay is 15 seconds for
each state, listening and learning, for a total of 30 seconds. This delay can
present a problem for DHCP clients trying to discover a DHCP server. DHCP
messages from the connected host will not be forwarded for the 30 seconds
of Forward Delay timers and the DHCP process may timeout. The result is
that an IPv4 client will not receive a valid IPv4 address.
Note: Although this may occur with clients sending ICMPv6 Router
Solicitation messages, the router will continue to send ICMPv6 Router
Advertisement messages so the device will know how to obtain its address
information.
When a switch port is configured with PortFast, that port transitions from
blocking to forwarding state immediately, bypassing the usual 802.1D STP
transition states (the listening and learning states) and avoiding a 30 second
delay. You can use PortFast on access ports to allow devices connected to
these ports, such as DHCP clients, to access the network immediately, rather
than waiting for IEEE 802.1D STP to converge on each VLAN. Because the
purpose of PortFast is to minimize the time that access ports must wait for
spanning tree to converge, it should only be used on access ports. If you
enable PortFast on a port connecting to another switch, you risk creating a
spanning tree loop. PortFast is only for use on switch ports that connect to
end devices.
MODULE – 6
EtherChannel Operation
Link Aggregation
There are scenarios in which more bandwidth or redundancy between
devices is needed than what can be provided by a single link. Multiple links
could be connected between devices to increase bandwidth. However,
Spanning Tree Protocol (STP), which is enabled on Layer 2 devices like Cisco
switches by default, will block redundant links to prevent switching loops, as
shown in the figure.
A link aggregation technology is needed that allows redundant links between
devices that will not be blocked by STP. That technology is known as
EtherChannel.
EtherChannel is a link aggregation technology that groups multiple physical
Ethernet links together into one single logical link. It is used to provide fault-
tolerance, load sharing, increased bandwidth, and redundancy between
switches, routers, and servers.
EtherChannel technology makes it possible to combine the number of
physical links between the switches to increase the overall speed of switch-
to-switch communication.
Advantages of EtherChannel
EtherChannel technology has many advantages, including the following:
Most configuration tasks can be done on the EtherChannel interface
instead of on each individual port, ensuring configuration consistency
throughout the links.
EtherChannel relies on existing switch ports. There is no need to
upgrade the link to a faster and more expensive connection to have
more bandwidth.
Load balancing takes place between links that are part of the same
EtherChannel. Depending on the hardware platform, one or more load-
balancing methods can be implemented. These methods include
source MAC and destination MAC load balancing, or source IP and
destination IP load balancing, across the physical links.
EtherChannel creates an aggregation that is seen as one logical link.
When several EtherChannel bundles exist between two switches, STP
may block one of the bundles to prevent switching loops. When STP
blocks one of the redundant links, it blocks the entire EtherChannel.
This blocks all the ports belonging to that EtherChannel link. Where
there is only one EtherChannel link, all physical links in the
EtherChannel are active because STP sees only one (logical) link.
EtherChannel provides redundancy because the overall link is seen as
one logical connection. Additionally, the loss of one physical link within
the channel does not create a change in the topology. Therefore, a
spanning tree recalculation is not required. Assuming at least one
physical link is present; the EtherChannel remains functional, even if
its overall throughput decreases because of a lost link within the
EtherChannel.
Implementation Restrictions
EtherChannel implementation on the catalyst 2960 switch has certain
implementation restrictions, including the following:
Interface types cannot be mixed. For example, Fast Ethernet and
Gigabit Ethernet cannot be mixed within a single EtherChannel.
Currently each EtherChannel can consist of up to eight compatibly-
configured Ethernet ports. EtherChannel provides full-duplex
bandwidth up to 800 Mbps (Fast EtherChannel) or 8 Gbps (Gigabit
EtherChannel) between one switch and another switch or host.
The Cisco Catalyst 2960 Layer 2 switch currently supports up to six
EtherChannels. However, as new IOSs are developed and platforms
change, some cards and platforms may support increased numbers of
ports within an EtherChannel link, as well as support an increased
number of Gigabit EtherChannels.
The individual EtherChannel group member port configuration must be
consistent on both devices. If the physical ports of one side are
configured as trunks, the physical ports of the other side must also be
configured as trunks within the same native VLAN. Additionally, all
ports in each EtherChannel link must be configured as Layer 2 ports.
Each EtherChannel has a logical port channel interface, as shown in
the figure. A configuration applied to the port channel interface affects
all physical interfaces that are assigned to that interface.
PAgP Operation
PAgP (pronounced “Pag - P”) is a Cisco-proprietary protocol that aids in the
automatic creation of EtherChannel links. When an EtherChannel link is
configured using PAgP, PAgP packets are sent between EtherChannel-capable
ports to negotiate the forming of a channel. When PAgP identifies matched
Ethernet links, it groups the links into an EtherChannel. The EtherChannel is
then added to the spanning tree as a single port.
When enabled, PAgP also manages the EtherChannel. PAgP packets are sent
every 30 seconds. PAgP checks for configuration consistency and manages
link additions and failures between two switches. It ensures that when an
EtherChannel is created, all ports have the same type of configuration.
Note: In EtherChannel, it is mandatory that all ports have the same speed,
duplex setting, and VLAN information. Any port-channel modification after
the creation of the channel also changes the aggregated channel ports.
PAgP helps create the EtherChannel link by detecting the configuration of
each side and ensuring that links are compatible so that the EtherChannel
link can be enabled when needed. The modes for PAgP as follows:
On - This mode forces the interface to channel without PAgP. Interfaces
configured in the on mode do not exchange PAgP packets.
PAgP desirable - This PAgP mode places an interface in an active
negotiating state in which the interface initiates negotiations with
other interfaces by sending PAgP packets.
PAgP auto - This PAgP mode places an interface in a passive
negotiating state in which the interface responds to the PAgP packets
that it receives but does not initiate PAgP negotiation.
The modes must be compatible on each side. If one side is configured to be
in auto mode, it is placed in a passive state, waiting for the other side to
initiate the EtherChannel negotiation. If the other side is also set to auto, the
negotiation never starts and the EtherChannel does not form. If all modes
are disabled by using the no command, or if no mode is configured, then the
EtherChannel is disabled.
The on mode manually places the interface in an EtherChannel, without any
negotiation. It works only if the other side is also set to on. If the other side is
set to negotiate parameters through PAgP, no EtherChannel forms, because
the side that is set to on mode does not negotiate.
No negotiation between the two switches means there is no checking to
make sure that all the links in the EtherChannel are terminating on the other
side, or that there is PAgP compatibility on the other switch.
Configuration Guidelines
Now that you know what EtherChannel is, this topic explains how to
configure it. The following guidelines and restrictions are useful for
configuring EtherChannel:
EtherChannel support - All Ethernet interfaces must support
EtherChannel with no requirement that interfaces be physically
contiguous.
Speed and duplex - Configure all interfaces in an EtherChannel to
operate at the same speed and in the same duplex mode.
VLAN match - All interfaces in the EtherChannel bundle must be
assigned to the same VLAN or be configured as a trunk (shown in the
figure).
Range of VLANs - An EtherChannel supports the same allowed range
of VLANs on all the interfaces in a trunking EtherChannel. If the
allowed range of VLANs is not the same, the interfaces do not form an
EtherChannel, even when they are set to auto or desirable mode.