SlideShare a Scribd company logo
1 of 114
Download to read offline
1
Layer 2 Switching
ī‰Ÿ Switching breaks up large collision domains into
smaller ones
ī‰Ÿ Collision domain is a network segment with two or
more devices sharing the same bandwidth.
ī‰Ÿ A hub network is a typical example of this type of
technology
ī‰Ÿ Each port on a switch is actually its own collision
domain, you can make a much better Ethernet LAN
network just by replacing your hubs with switches
2
Switching Services
ī‰Ÿ Unlike bridges that use software to create and manage
a filter table, switches use Application Specific
Integrated Circuits (ASICs)
ī‰Ÿ Layer 2 switches and bridges are faster than routers
because they donā€™t take up time looking at the Network
layer header information.
ī‰Ÿ They look at the frameā€™s hardware addresses before
deciding to either forward the frame or drop it.
ī‰Ÿ layer 2 switching so efficient is that no modification to
the data packet takes place
3
How Switches and Bridges
Learn Addresses
Bridges and switches learn in the following ways:
ā€¢ Reading the source MAC address of each
received frame or datagram
ā€¢ Recording the port on which the MAC address
was received.
In this way, the bridge or switch learns which addresses
belong to the devices connected to each port.
4
Ethernet Access with Hubs
5
Ethernet Access with Switches
6
ā‘Address learning
ā‘Forward/filter decision
ā‘Loop avoidance
Ethernet Switches and Bridges
Switch Features
ā‘ There are three conditions in which a switch will flood a
frame out on all ports except to the port on which the
frame came in, as follows:
ī‘Unknown unicast address
ī‘Broadcast frame
ī‘Multicast frame
8
MAC Address Table
ā€¢ Initial MAC address table is empty.
9
Learning Addresses
ā€¢ Station A sends a frame to station C.
ā€¢ Switch caches the MAC address of station A to port E0 by
learning the source address of data frames.
ā€¢ The frame from station A to station C is flooded out to all
ports except port E0 (unknown unicasts are flooded). 10
Learning Addresses (Cont.)
ā€¢ Station D sends a frame to station C.
ā€¢ Switch caches the MAC address of station D to port E3 by
learning the source address of data frames.
ā€¢ The frame from station D to station C is flooded out to all ports
except port E3 (unknown unicasts are flooded). 11
Filtering Frames
ā€¢ Station A sends a frame to station C.
ā€¢ Destination is known; frame is not flooded.
12
ā€¢ Station D sends a broadcast or multicast frame.
ā€¢ Broadcast and multicast frames are flooded to all ports
other than the originating port.
Broadcast and Multicast
Frames
13
Forward/Filter Decision
ā‘ When a frame arrives at a switch interface, the destination
hardware address is compared to the forward/ filter MAC
database.
ā‘ If the destination hardware address is known and listed in the
database, the frame is sent out only the correct exit interface
ā‘ If the destination hardware address is not listed in the MAC
database, then the frame is flooded out all active interfaces
except the interface the frame was received on.
ā‘ If a host or server sends a broadcast on the LAN, the switch will
flood the frame out all active ports except the source port.
14
Learning Mac Address
15
Learning Mac Address
16
Learning Mac Address
17
Learning Mac Address
18
Learning Mac Address
19
Learning Mac Address
20
Learning Mac Address
21
Forward/Filter PC3 to PC1
22
Forward/Filter PC3 to PC2
23
Loop Avoidance
ā€¢ Redundant links between
switches are a good idea
because they help
prevent complete network
failures in the event one
link stops working
ā€¢ However, they often
cause more problems
because frames can be
flooded down all
redundant links
simultaneously
ā€¢ This creates network
loops
24
Network Broadcast Loops
ā‘ A manufacturing floor PC sent a
network broadcast to request a
boot loader
ā‘ The broadcast was first received
by switch sw1 on port 2/1
ā‘ The topology is redundantly
connected; therefore, switch
sw2 receives the broadcast
frame as well on port 2/1
ā‘ Switch sw2 is also receiving a
copy of the broadcast frame
forwarded to the LAN segment
from port 2/2 of switch sw1.
ā‘ In a small fraction of the time,
we have four packets. The
problem grows exponentially
until the network bandwidth is
saturated
25
Multiple Frame Copies
26
27
Overview
ā‘Redundancy in a network is extremely important
because redundancy allows networks to be fault
tolerant.
ā‘Redundant topologies based on switches and bridges
are subject to broadcast storms, multiple frame
transmissions, and MAC address database instability.
ā‘Therefore network redundancy requires careful
planning and monitoring to function properly.
ā‘The Spanning-Tree Protocol is used in switched
networks to create a loop free network 28
ā€¢ Provides a loop-free redundant network topology by
placing certain ports in the blocking state.
Spanning-Tree Protocol
29
Spanning Tree Protocol
ā‘Spanning Tree Protocol resides in Data link Layer
ā‘Ethernet bridges and switches can implement the IEEE 802.1D
Spanning-Tree Protocol and use the spanning-tree algorithm to
construct a loop free network.
30
ā€¢ Spanning-tree transits each port through several different states:
Spanning-Tree Port States
Disabled
31
Selecting the Root Bridge
ā‘The first decision that all switches in the network make, is to identify the
root bridge.
ā‘When a switch is turned on, the spanning-tree algorithm is used to
identify the root bridge. BPDUs are sent out with the Bridge ID (BID).
ā‘The BID consists of a bridge priority that defaults to 32768 and the switch
base MAC address.
ā‘When a switch first starts up, it assumes it is the root switch and sends
BPDUs. These BPDUs contain BID.
ā‘All bridges see these and decide that the bridge with the smallest BID
value will be the root bridge.
ā‘A network administrator may want to influence the decision by setting
the switch priority to a smaller value than the default.
32
Spanning Tree Protocol Terms
ā‘BPDU Bridge Protocol Data Unit (BPDU) - All the switches exchange information to use in the
selection of the root switch
ā‘Bridge ID - The bridge ID is how STP keeps track of all the switches in the network. It is determined by
a combination of the bridge priority (32,768 by default on all Cisco switches) and the base MAC address.
ā‘Root Bridge -The bridge with the lowest bridge ID becomes the root bridge in the network.
ā‘Nonroot bridge - These are all bridges that are not the root bridge.
ā‘Root port - The root port is always the link directly connected to the root bridge or the shortest path
to the root bridge. If more than one link connects to the root bridge, then a port cost is determined by
checking the bandwidth of each link.
ā‘Designated port - A designated port is one that has been determined as having the best (lowest)
cost. A designated port will be marked as a forwarding port
ā‘Nondesignated Port - A nondesignated port is one with a higher cost than the designated port.
Nondesignated ports are put in blocking mode
ā‘Forwarding Port - A forwarding port forwards frames
ā‘Blocked Port - A blocked port is the port that will not forward frames, in order to prevent loops 33
ā€¢ Bpdu = Bridge Protocol Data Unit
(default = sent every two seconds)
ā€¢ Root bridge = Bridge with the lowest bridge ID
ā€¢ Bridge ID =
ā€¢ In the example, which switch has the lowest bridge ID?
Spanning-Tree Protocol
Root Bridge Selection
34
ā€¢ One root bridge per network
ā€¢ One root port per nonroot bridge
ā€¢ One designated port per segment
ā€¢ Nondesignated ports are unused
Spanning-Tree Operation
35
Selecting the Root Port
ī‘The STP cost is an accumulated total path cost based on the rated
bandwidth of each of the links
ī‘This information is then used internally to select the root port for that
device
36
ā€¢ One root bridge per network
ā€¢ One root port per nonroot bridge
ā€¢ One designated port per segment
ā€¢ Nondesignated ports are unused
Spanning-Tree Operation
37
Switching Methods
1. Cut-Through (Fast Forward)
The frame is forwarded through the switch before the entire frame is
received. At a minimum the frame destination address must be read
before the frame can be forwarded. This mode decreases the latency of
the transmission, but also reduces error detection.
2. Fragment-Free (Modified Cut-Through)
Fragment-free switching filters out collision fragments before forwarding
begins. Collision fragments are the majority of packet errors. In
Fragment-Free mode, the switch checks the first 64 bytes of a frame.
3. Store-and-Forward
The entire frame is received before any forwarding takes place. Filters
are applied before the frame is forwarded. Most reliable and also most
latency especially when frames are large.
38
Switching Methods
39
40
Physical Startup of the Catalyst
Switch
ā‘Switches are dedicated, specialized computers, which contain a CPU,
RAM, and an operating system.
ā‘Switches usually have several ports for the purpose of connecting
hosts, as well as specialized ports for the purpose of management.
ā‘A switch can be managed by connecting to the console port to view
and make changes to the configuration.
ā‘Switches typically have no power switch to turn them on and off.
They simply connect or disconnect from a power source.
41
Switch LED Indicators
ā‘The front panel of a switch has several lights to help monitor system
activity and performance. These lights are called light-emitting diodes
(LEDs). The switch has the following LEDs:
o System LED
o Remote Power Supply (RPS) LED
o Port Mode LED
o Port Status LEDs
ā‘The System LED shows whether the system is receiving power and
functioning correctly.
ā‘The RPS LED indicates whether or not the remote power supply is in use.
ā‘The Mode LEDs indicate the current state of the Mode button.
ā‘The Port Status LEDs have different meanings, depending on the current
value of the Mode LED.
42
Verifying Port LEDs During Switch
POST
ā‘Once the power cable is connected, the switch initiates a
series of tests called the power-on self test (POST).
ā‘POST runs automatically to verify that the switch functions
correctly.
ā‘The System LED indicates the success or failure of POST.
43
Switch Command Modes
ā‘Switches have several command modes.
ā‘The default mode is User EXEC mode, which ends in a greater-
than character (>).
ā‘The commands available in User EXEC mode are limited to
those that change terminal settings, perform basic tests, and
display system information.
ā‘The enable command is used to change from User EXEC mode
to Privileged EXEC mode, which ends in a pound-sign character
(#).
ā‘The configure command allows other command modes to be
accessed. 44
Show Commands in User-Exec Mode
45
Tasks
ī‰ŸSetting the passwords (Password must be between 4
and 8 characters)
ī‰ŸSetting the hostname
ī‰ŸConfiguring the IP address and subnet
mask
ī‰ŸErasing the switch configurations
46
Setting Switch Hostname
Setting Passwords on Lines
47
Switch Configuration
ā‘ There are two reasons to set the IP address information on the switch:
ī‰Ÿ To manage the switch via Telnet or other management software
ī‰Ÿ To configure the switch with different VLANs and other network functions
ī‰Ÿ See the default IP configuration = show IP command
Configure IP Address
sw1(config-if)#interface vlan 1
sw1(config-if)#ip address 10.0.0.1 255.0.0.0
sw1(config-if)#no shut
sw1(config-if)#exit
sw1(config)ip default-gateway 10.0.0.254
48
Configuring Interface Descriptions
ā‘ You can administratively set a name for each interface on the
switches
SW1#config t
Enter configuration commands, one per line. End with CNTL/Z
SW1(config)#int e0/1
SW1(config-if)#description Finance_VLAN
SW1(config-if)#int f0/26
SW1(config-if)#description trunk_to_Building_4
SW1(config-if)#
ā‘ Setting Port Security
Sw1(config-if)#switchport port-security mac-address mac-address
ī‘ Now only this one MAC address is allowed on this switch port
49
Switch Configuration
Connect two machine to a switch
To view the MAC table
sw1#show mac-address-table dynamic
Sw1#sh spanning-tree
Sw1(config)#spanning-tree vlan 1 priority ?
Sw1(config)#spanning-tree vlan 1 priority 4096
Erase the configuration
50
51
VLANā€™s
ā‘ A VLAN is a logical grouping of network users and
resources connected to administratively defined ports
on a switch.
ā‘ Ability to create smaller broadcast domains within a
layer 2 switched internetwork by assigning different
ports on the switch to different subnetworks.
ā‘ Frames broadcast onto the network are only switched
between the ports logically grouped within the same
VLAN
ā‘ By default, no hosts in a specific VLAN can communicate
with any other hosts that are members of another VLAN,
ā‘ For Inter VLAN communication you need routers
52
VLANs
ā‘VLAN implementation combines Layer 2 switching and Layer 3 routing
technologies to limit both collision domains and broadcast domains.
ā‘VLANs can also be used to provide security by creating the VLAN
groups according to function and by using routers to communicate
between VLANs.
ā‘A physical port association is used to implement VLAN assignment.
ā‘Communication between VLANs can occur only through the router.
ā‘This limits the size of the broadcast domains and uses the router to
determine whether one VLAN can talk to another VLAN.
ā‘NOTE: This is the only way a switch can break up a broadcast domain!
53
A VLAN = A Broadcast Domain = Logical Network (Subnet)
VLAN Overview
ā€¢ Segmentation
ā€¢ Flexibility
ā€¢ Security
54
History
ā‘11 Hosts are connected to the switch
ā‘All From same Broadcast domain
ā‘Need to divide them in separate logical segment
ā‘High broadcast traffic reasons
ā‘ ARP
ā‘ DHCP
ā‘ SAP
ā‘ XWindows
ā‘ NetBIOS
55
Definition
ā‘ Logically Defined community of interest that limits a
Broadcast domain
ā‘ LAN are created on the software of Switch
ā‘ All devices in a VLAN are members of the same
broadcast domain and receive all broadcasts
ā‘ The broadcasts, by default, are filtered from all ports
on a switch that are not members of the same VLAN.
56
Security
ā‘ A Flat internetworkā€™s security used to be tackled by connecting
hubs and switches together with routers
ā‘ This arrangement is ineffective because
ā‘ Anyone connecting physical network could access network resources
located on that physical LAN
ā‘ Can observe the network traffic by plugging network analyzer into the
HUB
ā‘ Users could join a workgroup by just plugging their workstations into
the existing hub
ā‘ By creating VLANā€™s administrators have control over each port and
user
57
How VLANs Simplify Network
Management
ā‘ If we need to break the broadcast domain we need to connect a
router
ā‘ By using VLANā€™s we can divide Broadcast domain at Layer-2
ā‘ A group of users needing high security can be put into a VLAN so
that no users outside of the VLAN can communicate with them.
ā‘ As a logical grouping of users by function, VLANs can be
considered independent from their physical locations.
58
VLAN Memberships
ā‘ VLAN created based on port is known as Static VLAN.
ā‘ VLAN assigned based on hardware addresses into a
database, is called a dynamic VLAN
59
VLAN Membership Modes
60
Static VLANs
ā‘Most secure
ā‘Easy to set up and monitor
ā‘Works well in a network where the movement
of users within the network is controlled
61
Dynamic VLANs
ā‘ A dynamic VLAN determines a nodeā€™s VLAN assignment
automatically
ā‘ Using intelligent management software, you can base
VLAN assignments on hardware (MAC) addresses.
ā‘ Dynamic VLAN need VLAN Management Policy Server
(VMPS) server
62
LAB ā€“ Creating VLAN
ā‘ Connect two computers on a switch
ā‘ Ping and see both are able to communicate
ā‘ Create two vlans and configure static VLANā€™s so both ports are on separate VLANā€™s
ā‘ Test the communication between PCā€™s
port1 port5
To see the existing VLAN
#Show vlan
To create VLAN
#vlan database
Switch(vlan)#vlan 2 name red
Switch(vlan)#vlan 3 name blue
Assigning ports to VLAN
Sw(config)# int fastEthernet 0/1
Sw(config-if)#switch mode access
Sw(config-if)#switchport access vlan2
63
LAB ā€“ Deleting VLAN
port1 port5
To delete VLAN
Sw(config)# no vlan 2
Sw(config)# no vlan 3
To bring port back to VLAN 1
Sw(config-if)#switchport mode acces
Sw(config-if)#switch port access vlan1
For a Range
Sw(config)#int range fastethernet 0/1 - 5
Sw(config-if)#switch port access vlan1
64
ā‘VLANs can span across multiple switches.
ā‘Trunks carry traffic for multiple VLANs.
ā‘Trunks use special encapsulation to distinguish between
different VLANs.
VLAN Operation
65
Types of Links
ā‘ Access links
ā‘ This type of link is only part of one VLAN
ā‘ Itā€™s referred to as the native VLAN of the port.
ā‘ Any device attached to an access link is unaware of a VLAN
ā‘ Switches remove any VLAN information from the frame before
itā€™s sent to an access-link device.
ā‘ Trunk links
ā‘ Trunks can carry multiple VLANs
ā‘ These carry the traffic of multiple VLANs
ā‘ A trunk link is a 100- or 1000Mbps point-to-point link between
two switches, between a switch and router.
66
Access links
67
Trunk links
68
Frame Tagging
ī‰Ÿ Can create VLANs to span more than one connected switch
ī‰Ÿ Hosts are unaware of VLAN
ī‰Ÿ When host A Create a data unit and reaches switch, the switch adds a
Frame tagging to identify the VLAN
ī‰Ÿ Frame tagging is a method to identify the packet belongs to a particular
VLAN
ī‰Ÿ Each switch that the frame reaches must first identify the VLAN ID from
the frame tag
ī‰Ÿ It finds out what to do with the frame by looking at the information in the
filter table
ī‰Ÿ Once the frame reaches an exit to an access link matching the frameā€™s
VLAN ID, the switch removes the VLAN identifier
69
Frame Tagging Methods
ā‘ There are two frame tagging methods
ī‰Ÿ Inter-Switch Link (ISL)
ī‰Ÿ IEEE 802.1Q
ā‘ Inter-Switch Link (ISL)
ī‰Ÿ proprietary to Cisco switches
ī‰Ÿ used for Fast Ethernet and Gigabit Ethernet links only
ā‘ IEEE 802.1Q
ī‰Ÿ Created by the IEEE as a standard method of frame
tagging
ī‰Ÿ it actually inserts a field into the frame to identify the
VLAN
ī‰Ÿ If youā€™re trunking between a Cisco switched link and a
different brand of switch, you have to use 802.1Q for the
trunk to work.
70
ā‘ Performed with
ASIC
ā‘ ISL header not
seen by client
ā‘ Effective between
switches, and
between routers and
switches
ISL trunks enable VLANs across a backbone.
ISL Tagging
71
LAB-Creating Trunk
Create two VLAN's on each
switches
#vlan database
sw(vlan)#vlan 2 name red
sw(vlan)#vlan 3 name blue
sw(vlan)#exit
sw#config t
sw(config)#int fastethernet 0/1
sw(config-if)#switch-portaccess vlan
2
sw(config)#int fastethernet 0/4
sw(config-if)#switch-portaccess vlan
3
To see Interface status
#show interface status
10.0.0.3
10.0.0.4
1 2 3 4
1 2 3 4
10.0.0.1
10.0.0.2
24 12
Trunk Port Configuration
sw#config t
sw(config)#int fastethernet 0/24
sw(config-if)#switchport trunk
encapsulation dot1q
sw(config-if)#switchport mode trunk
* 2950 Only dot1q Encapsulation
72
Assigning Access Ports to a
VLAN
Switch(config)#interface gigabitethernet 1/1
ā€¢ Enters interface configuration mode
Switch(config-if)#switchport mode access
ā€¢ Configures the interface as an access port
Switch(config-if)#switchport access vlan 3
ā€¢ Assigns the access port to a VLAN
73
Verifying the VLAN
Configuration
Switch#show vlan [id | name] [vlan_num | vlan_name]
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/5, Fa0/7
Fa0/8, Fa0/9, Fa0/11, Fa0/12
Gi0/1, Gi0/2
2 VLAN0002 active
51 VLAN0051 active
52 VLAN0052 active
ā€¦
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
51 enet 100051 1500 - - - - - 0 0
52 enet 100052 1500 - - - - - 0 0
ā€¦
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
74
Verifying the VLAN Port
Configuration
Switch#show running-config interface {fastethernet |
gigabitethernet} slot/port
ā€¢ Displays the running configuration of the interface
Switch#show interfaces [{fastethernet | gigabitethernet}
slot/port] switchport
ā€¢ Displays the switch port configuration of the interface
Switch#show mac-address-table interface interface-id [vlan
vlan-id] [ | {begin | exclude | include} expression]
ā€¢ Displays the MAC address table information for the specified
interface in the specified VLAN
75
ā‘A messaging system that advertises VLAN configuration information
ā‘Maintains VLAN configuration consistency throughout a common
administrative domain
ā‘Sends advertisements on trunk ports only
VTP Protocol Features
VLAN Trunking Protocol (VTP)
ā‘Benefits of VTP
ā‘Consistent VLAN configuration across all switches in
the network
ā‘Accurate tracking and monitoring of VLANs
ā‘Dynamic reporting of added VLANs to all switches in
the VTP domain
77
ā€¢ Forwards
advertisements
ā€¢ Synchronizes
ā€¢ Not saved in
NVRAM
ā€¢ Creates VLANs
ā€¢ Modifies VLANs
ā€¢ Deletes VLANs
ā€¢ Sends/forwards
advertisements
ā€¢ Synchronizes
ā€¢ Saved in NVRAM
ā€¢ Creates VLANs
ā€¢ Modifies VLANs
ā€¢ Deletes VLANs
ā€¢ Forwards
advertisements
ā€¢ Does not
synchronize
ā€¢ Saved in NVRAM
VTP Modes
78
VTP Operation
ā€¢ VTP advertisements are sent as multicast frames.
ā€¢ VTP servers and clients are synchronized to the latest update identified
revision number.
ā€¢ VTP advertisements are sent every 5 minutes or when there is a change.
79
VTP Pruning
ā€¢ VTP pruning provides a way for you to preserve
bandwidth by configuring it to reduce the amount of
broadcasts, multicasts, and unicast packets.
ā€¢ If Switch A doesnā€™t have any ports configured for VLAN
5, and a broadcast is sent throughout VLAN 5, that
broadcast would not traverse the trunk link to Switch A.
ā€¢ By default, VTP pruning is disabled on all switches.
ā€¢ Pruning is enabled for the entire domain
80
ā€¢ Increases available bandwidth by reducing unnecessary flooded traffic
ā€¢ Example: Station A sends broadcast, and broadcast is flooded only toward
any switch with ports assigned to the red VLAN
VTP Pruning
81
VTP Configuration Guidelines
ā€“ Configure the following:
ā€¢ VTP domain name
ā€¢ VTP mode (server mode is the default)
ā€¢ VTP pruning
ā€¢ VTP password
Switch(config)#vtp mode server
Switch(config)#vtp domain gates
SwitchA#sh vtp status
82
wg_sw_1900#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
wg_sw_1900(config)#vtp transparent
wg_sw_1900(config)#vtp domain switchlab
wg_sw_1900(config)#vtp [server | transparent | client] [domain
domain-name] [trap {enable | disable}] [password password]
[pruning {enable | disable}]
Creating a VTP Domain
Catalyst 1900
Catalyst 2950
wg_sw_2950#vlan database
wg_sw_2950(vlan)#vtp [ server | client | transparent ]
wg_sw_2950(vlan)#vtp domain domain-name
wg_sw_2950(vlan)#vtp password password
wg_sw_2950(vlan)#vtp pruning
83
Verifying the VTP
Configuration
Switch#show vtp status
Switch#show vtp status
VTP Version : 2
Configuration Revision : 247
Maximum VLANs supported locally : 1005
Number of existing VLANs : 33
VTP Operating Mode : Client
VTP Domain Name : Lab_Network
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x45 0x52 0xB6 0xFD 0x63 0xC8 0x49 0x80
Configuration last modified by 0.0.0.0 at 8-12-99 15:04:49
Switch#
84
Verifying the VTP
Configuration (Cont.)
Switch#show vtp counters
Switch#show vtp counters
VTP statistics:
Summary advertisements received : 7
Subset advertisements received : 5
Request advertisements received : 0
Summary advertisements transmitted : 997
Subset advertisements transmitted : 13
Request advertisements transmitted : 3
Number of config revision errors : 0
Number of config digest errors : 0
Number of V1 summary errors : 0
VTP pruning statistics:
Trunk Join Transmitted Join Received Summary advts received from
non-pruning-capable device
---------------- ---------------- ---------------- ---------------------------
Fa5/8 43071 42766 5
85
VLAN to VLAN
ā‘If you want to connect between two
VLANs you need a layer 3 device
86
Router on Stick
10.0.0.3
20.0.0.3
1 2 3 4
1 2 3 4
10.0.0.2
20.0.0.2
24 12
Create two VLAN's on each
switches
#vlan database
sw(vlan)#vlan 2 name red
sw(vlan)#vlan 3 name blue
sw(vlan)#exit
sw#config t
sw(config)#int fastethernet 0/1
sw(config-if)#switch-portaccess vlan 2
sw(config)#int fastethernet 0/4
sw(config-if)#switch-portaccess vlan 3
To see Interface status
#show interface status
Trunk Port Configuration
sw#config t
sw(config)#int fastethernet 0/24
sw(config-if)#switchport trunk
encapsulation dot1q
sw(config-if)#switchport mode trunk
Router Configuration
R1#config t
R1(config)#int fastethernet 0/0.1
R1(config-if)#encapsulation dot1q 2
R1(config-if)#ip address 10..0.0.1 255.0.0.0
R1(config-if# No shut
R1(config-Iif)# EXIT
R1(config)#int fastethernet 0/0.2
R1(config-if)# encapsulation dot1q 3
R1(config-if)#ip address 20..0.0.1 255.0.0.0
R1(config-if# No shut
Router-Switch Port to be made as Trunk
sw(config)#int fastethernet 0/9
sw(config-if)#switchport trunk enacapsulation
dot1q
sw(config-if)#switchport mode trunk
10.0.0.1
20.0.0.1
FA0/0
9
87
Fig. 3 NAT (TI1332EU02TI_0003 New Address Concepts, 7)
88
New Addressing Concepts
Problems with IPv4
Shortage of IPv4 addresses
Allocation of the last IPv4 addresses was for the year 2005
Address classes were replaced by usage of CIDR, but this is not sufficient
Short term solution
NAT: Network Address Translator
Long term solution
IPv6 = IPng (IP next generation)
Provides an extended address range
Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5)
89
NAT: Network Address Translator
NAT
Translates between local addresses and public ones
Many private hosts share few global addresses
Public Network
Uses public addresses
Public addresses are
globally unique
Private Network
Uses private address range
(local addresses)
Local addresses may not
be used externally
Fig. 4 How does NAT work? (TI1332EU02TI_0003 New Address Concepts, 9)
90
NAT Addressing Terms
ā‘ Inside Local
ī‘ The term ā€œinsideā€ refers to an address used for a host inside an
enterprise. It is the actual IP address assigned to a host in the
private enterprise network.
ā‘ Inside Global
ī‘ NAT uses an inside global address to represent the inside host as
the packet is sent through the outside network, typically the
Internet.
ī‘ A NAT router changes the source IP address of a packet sent by an
inside host from an inside local address to an inside global address
as the packet goes from the inside to the outside network.
91
Inside/Outside
92
Inside/Outside
93
NAT Addressing Terms
ā‘ Outside Global
ī‘ The term ā€œoutsideā€ refers to an address used for a host outside
an enterprise, the Internet.
ī‘ An outside global is the actual IP address assigned to a host
that resides in the outside network, typically the Internet.
ā‘ Outside Local
ī‘ NAT uses an outside local address to represent the outside
host as the packet is sent through the private network.
ī‘ This address is outside private, outside host with a private
address
94
Network Address Translation
ā€¢ An IP address is either local or global.
ā€¢ Local IP addresses are seen in the inside network.
95
Types Of NAT
ā‘There are different types of NAT that can
be used, which are
ī‘Static NAT
ī‘Dynamic NAT
ī‘Overloading NAT with PAT (NAPT)
96
Static NAT
ā‘ Static NAT - Mapping an unregistered IP address to a registered IP
address on a one-to-one basis. Particularly useful when a device
needs to be accessible from outside the network.
ā‘ In static NAT, the computer with the IP address of 192.168.32.10
will always translate to 213.18.123.110.
97
Dynamic NAT
ā‘ Dynamic NAT - Maps an unregistered IP address to a registered IP
address from a group of registered IP addresses.
ā‘ In dynamic NAT, the computer with the IP address 192.168.32.10
will translate to the first available address in the range from
213.18.123.100 to 213.18.123.150.
98
Overloading NAT with PAT (NAPT)
ā‘ Overloading - A form of dynamic NAT that maps multiple
unregistered IP addresses to a single registered IP address by using
different ports. This is known also as PAT (Port Address Translation),
single address NAT or port-level multiplexed NAT.
ā‘ In overloading, each computer on the private network is translated to
the same IP address (213.18.123.100), but with a different port
number assignment..
99
Static NAT Configuration
ā€¢ For each interface you need to configure INSIDE or OUTSIDE
Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5)
E0
B
A 10.0.0.1
S0
200.0.0.1
C
Internet
10.0.0.2
10.0.0.3
10.0.0.254
R1(config)#Int fastethernet 0/0
R1(config-if)# IP NAT inside
R1(config-if)##Int s 0/0
R1(config-if)# IP NAT outside
R1(config-if)# Exit
R1(config)# ip NAT inside source static 10.0.0.1 200.0.0.1
To see the table
R1(config)#show ip nat translations
R1(config)#show ip nat statistics
100
INSIDE/OUTSIDE
101
Dynamic NAT
ā‘ Dynamic NAT sets up a pool of possible inside global
addresses and defines criteria for the set of inside
local IP addresses whose traffic should be translated
with NAT.
ā‘ The dynamic entry in the NAT table stays in there as
long as traffic flows occasionally.
ā‘ If a new packet arrives, and it needs a NAT entry, but
all the pooled IP addresses are in use, the router
simply discards the packet.
Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5)
102
Dynamic NAT
ā‘ Instead of creating static IP, create a pool of IP
Address, Specify a range
ā‘ Create an access list and permit hosts
ā‘ Link Access list to the Pool
Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5)
103
Dynamic NAT Configuration
ā€¢ For each interface you need to configure INSIDE or OUTSIDE
S0
200.0.0.1/200.0.0.254
Internet
E0
B
A 10.0.0.1
C
10.0.0.2
10.0.0.3
10.0.0.254
Create an Access List
R1(config)# Access-list 1 permit 10.0.0.0 0.255.255.255
Configure NAT dynamic Pool
R1(config)# IP NAT pool pool1 200.0.0.1 200.0.0.254 netmask 255.255.255.0
Link Access List to Pool
R1(config)# IP NAT inside source list 1 pool pool1
104
PAT
ā‘ Overloading an inside global address
ā‘ NAT overload only one global IP shared among all hosts
Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5)
E0
B
A 10.0.0.1
C
10.0.0.2
10.0.0.3
10.0.0.254 200.0.0.1
Internet
Shared Global IP
200.0.0.1:1025
200.0.0.1:1026
200.0.0.1:1027
105
PAT
106
PAT
107
PAT
108
PAT
109
PAT
110
PAT
111
PAT
112
Configuration
113
PAT LAB
R1#config t
R1(config)# int e 0
R1(config-if)# ip nat insde
R1(config)# int s 0
R1(config-if)# ip nat outside
R1(config)#access-list 1 permit 192.168.10.0 0.0.0.255
R1(config)#ip nat inside source list 1 interface s 0 overload
ī‘ To see host to host ping configure static or
dynamic routing
To check translation
#sh ip nat translations
S0
S0
E0
E0
192.168.10.2
A B
200.0.0.2
192.168.10.1
200.0.0.1
192.168.20.2
192.168.20.1
R2#config t
R2(config)# int e 0
R2(config-if)# ip nat insde
R2(config)# int s 0
R2(config-if)# ip nat outside
R2(config)#access-list 1 permit 192.168.20.0 0.0.0.255
R2(config)#ip nat inside source list 1 interface s 0 overload
ī‘ To see host to host ping configure static or
dynamic routing
To check translation
#sh ip nat translations 114

More Related Content

Similar to ccna-day4-switching_1234567890123456.pdf

Switched networks (LAN Switching ā€“ Switches)
Switched networks (LAN Switching ā€“ Switches)Switched networks (LAN Switching ā€“ Switches)
Switched networks (LAN Switching ā€“ Switches)Fleurati
Ā 
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutions
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutionsSwitching vla ns_secugenius_harksh_mikemclain_secugenius security solutions
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutionsMike McLain
Ā 
Net essentials6e ch7
Net essentials6e ch7Net essentials6e ch7
Net essentials6e ch7APSU
Ā 
Overview of Spanning Tree Protocol
Overview of Spanning Tree ProtocolOverview of Spanning Tree Protocol
Overview of Spanning Tree ProtocolArash Foroughi
Ā 
Day 4 LAYER 2 SWITCHING
Day 4 LAYER 2 SWITCHINGDay 4 LAYER 2 SWITCHING
Day 4 LAYER 2 SWITCHINGanilinvns
Ā 
LAYER 2 SWITCHING
LAYER 2 SWITCHINGLAYER 2 SWITCHING
LAYER 2 SWITCHINGanilinvns
Ā 
Spanning tree protocol (stp)
Spanning tree protocol (stp)Spanning tree protocol (stp)
Spanning tree protocol (stp)RaghulR21
Ā 
Networking devices
Networking devicesNetworking devices
Networking devicesrehnuma rusha
Ā 
Network Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking DevicesNetwork Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking DevicesAalok Shah
Ā 
Networking interview questions and answers
Networking interview questions and answersNetworking interview questions and answers
Networking interview questions and answersAmit Tiwari
Ā 
Switching Concepts presentation
Switching Concepts presentationSwitching Concepts presentation
Switching Concepts presentationzameer Abbas
Ā 
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdfsadoyah492
Ā 
Packet Switching Technique in Computer Network
Packet Switching Technique in Computer NetworkPacket Switching Technique in Computer Network
Packet Switching Technique in Computer NetworkNiharikaDubey17
Ā 
Acn Experiment No 2
Acn Experiment No 2Acn Experiment No 2
Acn Experiment No 2Garima Singh
Ā 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.pptSelvakanmani S
Ā 
Networking hardware-objectives-identify-major-hardware4986
Networking hardware-objectives-identify-major-hardware4986Networking hardware-objectives-identify-major-hardware4986
Networking hardware-objectives-identify-major-hardware4986sherifmeetme
Ā 
Expl sw chapter_02_switches_part_1
Expl sw chapter_02_switches_part_1Expl sw chapter_02_switches_part_1
Expl sw chapter_02_switches_part_1aghacrom
Ā 
Basics of Computer Network Device
Basics of Computer Network DeviceBasics of Computer Network Device
Basics of Computer Network DeviceRubal Sagwal
Ā 

Similar to ccna-day4-switching_1234567890123456.pdf (20)

Switched networks (LAN Switching ā€“ Switches)
Switched networks (LAN Switching ā€“ Switches)Switched networks (LAN Switching ā€“ Switches)
Switched networks (LAN Switching ā€“ Switches)
Ā 
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutions
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutionsSwitching vla ns_secugenius_harksh_mikemclain_secugenius security solutions
Switching vla ns_secugenius_harksh_mikemclain_secugenius security solutions
Ā 
Net essentials6e ch7
Net essentials6e ch7Net essentials6e ch7
Net essentials6e ch7
Ā 
Overview of Spanning Tree Protocol
Overview of Spanning Tree ProtocolOverview of Spanning Tree Protocol
Overview of Spanning Tree Protocol
Ā 
Day 4 LAYER 2 SWITCHING
Day 4 LAYER 2 SWITCHINGDay 4 LAYER 2 SWITCHING
Day 4 LAYER 2 SWITCHING
Ā 
LAYER 2 SWITCHING
LAYER 2 SWITCHINGLAYER 2 SWITCHING
LAYER 2 SWITCHING
Ā 
27 Switching.pptx
27 Switching.pptx27 Switching.pptx
27 Switching.pptx
Ā 
Spanning tree protocol (stp)
Spanning tree protocol (stp)Spanning tree protocol (stp)
Spanning tree protocol (stp)
Ā 
Networking devices
Networking devicesNetworking devices
Networking devices
Ā 
Network Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking DevicesNetwork Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking Devices
Ā 
Networking interview questions and answers
Networking interview questions and answersNetworking interview questions and answers
Networking interview questions and answers
Ā 
Switching Concepts presentation
Switching Concepts presentationSwitching Concepts presentation
Switching Concepts presentation
Ā 
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
Ā 
Packet Switching Technique in Computer Network
Packet Switching Technique in Computer NetworkPacket Switching Technique in Computer Network
Packet Switching Technique in Computer Network
Ā 
Frame relay
Frame relayFrame relay
Frame relay
Ā 
Acn Experiment No 2
Acn Experiment No 2Acn Experiment No 2
Acn Experiment No 2
Ā 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
Ā 
Networking hardware-objectives-identify-major-hardware4986
Networking hardware-objectives-identify-major-hardware4986Networking hardware-objectives-identify-major-hardware4986
Networking hardware-objectives-identify-major-hardware4986
Ā 
Expl sw chapter_02_switches_part_1
Expl sw chapter_02_switches_part_1Expl sw chapter_02_switches_part_1
Expl sw chapter_02_switches_part_1
Ā 
Basics of Computer Network Device
Basics of Computer Network DeviceBasics of Computer Network Device
Basics of Computer Network Device
Ā 

Recently uploaded

Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsPooja Nehwal
Ā 
Call Girls Service Kolkata Aishwarya šŸ¤Œ 8250192130 šŸš€ Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya šŸ¤Œ  8250192130 šŸš€ Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya šŸ¤Œ  8250192130 šŸš€ Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya šŸ¤Œ 8250192130 šŸš€ Vip Call Girls Kolkataanamikaraghav4
Ā 
Russian Escorts in lucknow šŸ’— 9719455033 šŸ’„ Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow šŸ’— 9719455033 šŸ’„ Lovely Lasses: Radiant Beauties Shi...Russian Escorts in lucknow šŸ’— 9719455033 šŸ’„ Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow šŸ’— 9719455033 šŸ’„ Lovely Lasses: Radiant Beauties Shi...nagunakhan
Ā 
WhatsApp 9892124323 āœ“Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 āœ“Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 āœ“Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 āœ“Call Girls In Khar ( Mumbai ) secure service - Bandra F...Pooja Nehwal
Ā 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhisoniya singh
Ā 
如何办ē†(AdelaideęƕäøščƁļ¼‰é˜æå¾·čŽ±å¾·å¤§å­¦ęƕäøščÆęˆē»©å•Adelaideå­¦åŽ†č®¤čƁēœŸå®žåÆęŸ„
如何办ē†(AdelaideęƕäøščƁļ¼‰é˜æå¾·čŽ±å¾·å¤§å­¦ęƕäøščÆęˆē»©å•Adelaideå­¦åŽ†č®¤čƁēœŸå®žåÆęŸ„å¦‚ä½•åŠžē†(AdelaideęƕäøščƁļ¼‰é˜æå¾·čŽ±å¾·å¤§å­¦ęƕäøščÆęˆē»©å•Adelaideå­¦åŽ†č®¤čƁēœŸå®žåÆęŸ„
如何办ē†(AdelaideęƕäøščƁļ¼‰é˜æå¾·čŽ±å¾·å¤§å­¦ęƕäøščÆęˆē»©å•Adelaideå­¦åŽ†č®¤čƁēœŸå®žåÆęŸ„awo24iot
Ā 
如何办ē†čØēœå¤§å­¦ęƕäøščƁ(UofSęƕäøščƁļ¼‰ęˆē»©å•ē•™äæ”å­¦åŽ†č®¤čƁ原ē‰ˆäø€ęƔäø€
如何办ē†čØēœå¤§å­¦ęƕäøščƁ(UofSęƕäøščƁļ¼‰ęˆē»©å•ē•™äæ”å­¦åŽ†č®¤čƁ原ē‰ˆäø€ęƔäø€å¦‚何办ē†čØēœå¤§å­¦ęƕäøščƁ(UofSęƕäøščƁļ¼‰ęˆē»©å•ē•™äæ”å­¦åŽ†č®¤čƁ原ē‰ˆäø€ęƔäø€
如何办ē†čØēœå¤§å­¦ęƕäøščƁ(UofSęƕäøščƁļ¼‰ęˆē»©å•ē•™äæ”å­¦åŽ†č®¤čƁ原ē‰ˆäø€ęƔäø€ga6c6bdl
Ā 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
Ā 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
Ā 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...Call Girls in Nagpur High Profile
Ā 
Beautiful Sapna Call Girls CP 9711199012 ā˜Ž Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ā˜Ž Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ā˜Ž Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ā˜Ž Call /Whatsappssapnasaifi408
Ā 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ā‚¹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ā‚¹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ā‚¹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ā‚¹5k To 25k With ...Suhani Kapoor
Ā 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
Ā 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
Ā 
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service GayaGaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service Gayasrsj9000
Ā 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile servicerehmti665
Ā 
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service LucknowAlambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service Lucknowmakika9823
Ā 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...ranjana rawat
Ā 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
Ā 

Recently uploaded (20)

Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Ā 
Call Girls Service Kolkata Aishwarya šŸ¤Œ 8250192130 šŸš€ Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya šŸ¤Œ  8250192130 šŸš€ Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya šŸ¤Œ  8250192130 šŸš€ Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya šŸ¤Œ 8250192130 šŸš€ Vip Call Girls Kolkata
Ā 
Russian Escorts in lucknow šŸ’— 9719455033 šŸ’„ Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow šŸ’— 9719455033 šŸ’„ Lovely Lasses: Radiant Beauties Shi...Russian Escorts in lucknow šŸ’— 9719455033 šŸ’„ Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow šŸ’— 9719455033 šŸ’„ Lovely Lasses: Radiant Beauties Shi...
Ā 
WhatsApp 9892124323 āœ“Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 āœ“Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 āœ“Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 āœ“Call Girls In Khar ( Mumbai ) secure service - Bandra F...
Ā 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
Ā 
如何办ē†(AdelaideęƕäøščƁļ¼‰é˜æå¾·čŽ±å¾·å¤§å­¦ęƕäøščÆęˆē»©å•Adelaideå­¦åŽ†č®¤čƁēœŸå®žåÆęŸ„
如何办ē†(AdelaideęƕäøščƁļ¼‰é˜æå¾·čŽ±å¾·å¤§å­¦ęƕäøščÆęˆē»©å•Adelaideå­¦åŽ†č®¤čƁēœŸå®žåÆęŸ„å¦‚ä½•åŠžē†(AdelaideęƕäøščƁļ¼‰é˜æå¾·čŽ±å¾·å¤§å­¦ęƕäøščÆęˆē»©å•Adelaideå­¦åŽ†č®¤čƁēœŸå®žåÆęŸ„
如何办ē†(AdelaideęƕäøščƁļ¼‰é˜æå¾·čŽ±å¾·å¤§å­¦ęƕäøščÆęˆē»©å•Adelaideå­¦åŽ†č®¤čƁēœŸå®žåÆęŸ„
Ā 
šŸ” 9953056974šŸ” Delhi Call Girls in Ajmeri Gate
šŸ” 9953056974šŸ” Delhi Call Girls in Ajmeri GatešŸ” 9953056974šŸ” Delhi Call Girls in Ajmeri Gate
šŸ” 9953056974šŸ” Delhi Call Girls in Ajmeri Gate
Ā 
如何办ē†čØēœå¤§å­¦ęƕäøščƁ(UofSęƕäøščƁļ¼‰ęˆē»©å•ē•™äæ”å­¦åŽ†č®¤čƁ原ē‰ˆäø€ęƔäø€
如何办ē†čØēœå¤§å­¦ęƕäøščƁ(UofSęƕäøščƁļ¼‰ęˆē»©å•ē•™äæ”å­¦åŽ†č®¤čƁ原ē‰ˆäø€ęƔäø€å¦‚何办ē†čØēœå¤§å­¦ęƕäøščƁ(UofSęƕäøščƁļ¼‰ęˆē»©å•ē•™äæ”å­¦åŽ†č®¤čƁ原ē‰ˆäø€ęƔäø€
如何办ē†čØēœå¤§å­¦ęƕäøščƁ(UofSęƕäøščƁļ¼‰ęˆē»©å•ē•™äæ”å­¦åŽ†č®¤čƁ原ē‰ˆäø€ęƔäø€
Ā 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
Ā 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
Ā 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Ā 
Beautiful Sapna Call Girls CP 9711199012 ā˜Ž Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ā˜Ž Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ā˜Ž Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ā˜Ž Call /Whatsapps
Ā 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ā‚¹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ā‚¹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ā‚¹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ā‚¹5k To 25k With ...
Ā 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Ā 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
Ā 
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service GayaGaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Ā 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile service
Ā 
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service LucknowAlambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
Ā 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
Ā 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
Ā 

ccna-day4-switching_1234567890123456.pdf

  • 1. 1
  • 2. Layer 2 Switching ī‰Ÿ Switching breaks up large collision domains into smaller ones ī‰Ÿ Collision domain is a network segment with two or more devices sharing the same bandwidth. ī‰Ÿ A hub network is a typical example of this type of technology ī‰Ÿ Each port on a switch is actually its own collision domain, you can make a much better Ethernet LAN network just by replacing your hubs with switches 2
  • 3. Switching Services ī‰Ÿ Unlike bridges that use software to create and manage a filter table, switches use Application Specific Integrated Circuits (ASICs) ī‰Ÿ Layer 2 switches and bridges are faster than routers because they donā€™t take up time looking at the Network layer header information. ī‰Ÿ They look at the frameā€™s hardware addresses before deciding to either forward the frame or drop it. ī‰Ÿ layer 2 switching so efficient is that no modification to the data packet takes place 3
  • 4. How Switches and Bridges Learn Addresses Bridges and switches learn in the following ways: ā€¢ Reading the source MAC address of each received frame or datagram ā€¢ Recording the port on which the MAC address was received. In this way, the bridge or switch learns which addresses belong to the devices connected to each port. 4
  • 6. Ethernet Access with Switches 6
  • 7. ā‘Address learning ā‘Forward/filter decision ā‘Loop avoidance Ethernet Switches and Bridges
  • 8. Switch Features ā‘ There are three conditions in which a switch will flood a frame out on all ports except to the port on which the frame came in, as follows: ī‘Unknown unicast address ī‘Broadcast frame ī‘Multicast frame 8
  • 9. MAC Address Table ā€¢ Initial MAC address table is empty. 9
  • 10. Learning Addresses ā€¢ Station A sends a frame to station C. ā€¢ Switch caches the MAC address of station A to port E0 by learning the source address of data frames. ā€¢ The frame from station A to station C is flooded out to all ports except port E0 (unknown unicasts are flooded). 10
  • 11. Learning Addresses (Cont.) ā€¢ Station D sends a frame to station C. ā€¢ Switch caches the MAC address of station D to port E3 by learning the source address of data frames. ā€¢ The frame from station D to station C is flooded out to all ports except port E3 (unknown unicasts are flooded). 11
  • 12. Filtering Frames ā€¢ Station A sends a frame to station C. ā€¢ Destination is known; frame is not flooded. 12
  • 13. ā€¢ Station D sends a broadcast or multicast frame. ā€¢ Broadcast and multicast frames are flooded to all ports other than the originating port. Broadcast and Multicast Frames 13
  • 14. Forward/Filter Decision ā‘ When a frame arrives at a switch interface, the destination hardware address is compared to the forward/ filter MAC database. ā‘ If the destination hardware address is known and listed in the database, the frame is sent out only the correct exit interface ā‘ If the destination hardware address is not listed in the MAC database, then the frame is flooded out all active interfaces except the interface the frame was received on. ā‘ If a host or server sends a broadcast on the LAN, the switch will flood the frame out all active ports except the source port. 14
  • 24. Loop Avoidance ā€¢ Redundant links between switches are a good idea because they help prevent complete network failures in the event one link stops working ā€¢ However, they often cause more problems because frames can be flooded down all redundant links simultaneously ā€¢ This creates network loops 24
  • 25. Network Broadcast Loops ā‘ A manufacturing floor PC sent a network broadcast to request a boot loader ā‘ The broadcast was first received by switch sw1 on port 2/1 ā‘ The topology is redundantly connected; therefore, switch sw2 receives the broadcast frame as well on port 2/1 ā‘ Switch sw2 is also receiving a copy of the broadcast frame forwarded to the LAN segment from port 2/2 of switch sw1. ā‘ In a small fraction of the time, we have four packets. The problem grows exponentially until the network bandwidth is saturated 25
  • 27. 27
  • 28. Overview ā‘Redundancy in a network is extremely important because redundancy allows networks to be fault tolerant. ā‘Redundant topologies based on switches and bridges are subject to broadcast storms, multiple frame transmissions, and MAC address database instability. ā‘Therefore network redundancy requires careful planning and monitoring to function properly. ā‘The Spanning-Tree Protocol is used in switched networks to create a loop free network 28
  • 29. ā€¢ Provides a loop-free redundant network topology by placing certain ports in the blocking state. Spanning-Tree Protocol 29
  • 30. Spanning Tree Protocol ā‘Spanning Tree Protocol resides in Data link Layer ā‘Ethernet bridges and switches can implement the IEEE 802.1D Spanning-Tree Protocol and use the spanning-tree algorithm to construct a loop free network. 30
  • 31. ā€¢ Spanning-tree transits each port through several different states: Spanning-Tree Port States Disabled 31
  • 32. Selecting the Root Bridge ā‘The first decision that all switches in the network make, is to identify the root bridge. ā‘When a switch is turned on, the spanning-tree algorithm is used to identify the root bridge. BPDUs are sent out with the Bridge ID (BID). ā‘The BID consists of a bridge priority that defaults to 32768 and the switch base MAC address. ā‘When a switch first starts up, it assumes it is the root switch and sends BPDUs. These BPDUs contain BID. ā‘All bridges see these and decide that the bridge with the smallest BID value will be the root bridge. ā‘A network administrator may want to influence the decision by setting the switch priority to a smaller value than the default. 32
  • 33. Spanning Tree Protocol Terms ā‘BPDU Bridge Protocol Data Unit (BPDU) - All the switches exchange information to use in the selection of the root switch ā‘Bridge ID - The bridge ID is how STP keeps track of all the switches in the network. It is determined by a combination of the bridge priority (32,768 by default on all Cisco switches) and the base MAC address. ā‘Root Bridge -The bridge with the lowest bridge ID becomes the root bridge in the network. ā‘Nonroot bridge - These are all bridges that are not the root bridge. ā‘Root port - The root port is always the link directly connected to the root bridge or the shortest path to the root bridge. If more than one link connects to the root bridge, then a port cost is determined by checking the bandwidth of each link. ā‘Designated port - A designated port is one that has been determined as having the best (lowest) cost. A designated port will be marked as a forwarding port ā‘Nondesignated Port - A nondesignated port is one with a higher cost than the designated port. Nondesignated ports are put in blocking mode ā‘Forwarding Port - A forwarding port forwards frames ā‘Blocked Port - A blocked port is the port that will not forward frames, in order to prevent loops 33
  • 34. ā€¢ Bpdu = Bridge Protocol Data Unit (default = sent every two seconds) ā€¢ Root bridge = Bridge with the lowest bridge ID ā€¢ Bridge ID = ā€¢ In the example, which switch has the lowest bridge ID? Spanning-Tree Protocol Root Bridge Selection 34
  • 35. ā€¢ One root bridge per network ā€¢ One root port per nonroot bridge ā€¢ One designated port per segment ā€¢ Nondesignated ports are unused Spanning-Tree Operation 35
  • 36. Selecting the Root Port ī‘The STP cost is an accumulated total path cost based on the rated bandwidth of each of the links ī‘This information is then used internally to select the root port for that device 36
  • 37. ā€¢ One root bridge per network ā€¢ One root port per nonroot bridge ā€¢ One designated port per segment ā€¢ Nondesignated ports are unused Spanning-Tree Operation 37
  • 38. Switching Methods 1. Cut-Through (Fast Forward) The frame is forwarded through the switch before the entire frame is received. At a minimum the frame destination address must be read before the frame can be forwarded. This mode decreases the latency of the transmission, but also reduces error detection. 2. Fragment-Free (Modified Cut-Through) Fragment-free switching filters out collision fragments before forwarding begins. Collision fragments are the majority of packet errors. In Fragment-Free mode, the switch checks the first 64 bytes of a frame. 3. Store-and-Forward The entire frame is received before any forwarding takes place. Filters are applied before the frame is forwarded. Most reliable and also most latency especially when frames are large. 38
  • 40. 40
  • 41. Physical Startup of the Catalyst Switch ā‘Switches are dedicated, specialized computers, which contain a CPU, RAM, and an operating system. ā‘Switches usually have several ports for the purpose of connecting hosts, as well as specialized ports for the purpose of management. ā‘A switch can be managed by connecting to the console port to view and make changes to the configuration. ā‘Switches typically have no power switch to turn them on and off. They simply connect or disconnect from a power source. 41
  • 42. Switch LED Indicators ā‘The front panel of a switch has several lights to help monitor system activity and performance. These lights are called light-emitting diodes (LEDs). The switch has the following LEDs: o System LED o Remote Power Supply (RPS) LED o Port Mode LED o Port Status LEDs ā‘The System LED shows whether the system is receiving power and functioning correctly. ā‘The RPS LED indicates whether or not the remote power supply is in use. ā‘The Mode LEDs indicate the current state of the Mode button. ā‘The Port Status LEDs have different meanings, depending on the current value of the Mode LED. 42
  • 43. Verifying Port LEDs During Switch POST ā‘Once the power cable is connected, the switch initiates a series of tests called the power-on self test (POST). ā‘POST runs automatically to verify that the switch functions correctly. ā‘The System LED indicates the success or failure of POST. 43
  • 44. Switch Command Modes ā‘Switches have several command modes. ā‘The default mode is User EXEC mode, which ends in a greater- than character (>). ā‘The commands available in User EXEC mode are limited to those that change terminal settings, perform basic tests, and display system information. ā‘The enable command is used to change from User EXEC mode to Privileged EXEC mode, which ends in a pound-sign character (#). ā‘The configure command allows other command modes to be accessed. 44
  • 45. Show Commands in User-Exec Mode 45
  • 46. Tasks ī‰ŸSetting the passwords (Password must be between 4 and 8 characters) ī‰ŸSetting the hostname ī‰ŸConfiguring the IP address and subnet mask ī‰ŸErasing the switch configurations 46
  • 47. Setting Switch Hostname Setting Passwords on Lines 47
  • 48. Switch Configuration ā‘ There are two reasons to set the IP address information on the switch: ī‰Ÿ To manage the switch via Telnet or other management software ī‰Ÿ To configure the switch with different VLANs and other network functions ī‰Ÿ See the default IP configuration = show IP command Configure IP Address sw1(config-if)#interface vlan 1 sw1(config-if)#ip address 10.0.0.1 255.0.0.0 sw1(config-if)#no shut sw1(config-if)#exit sw1(config)ip default-gateway 10.0.0.254 48
  • 49. Configuring Interface Descriptions ā‘ You can administratively set a name for each interface on the switches SW1#config t Enter configuration commands, one per line. End with CNTL/Z SW1(config)#int e0/1 SW1(config-if)#description Finance_VLAN SW1(config-if)#int f0/26 SW1(config-if)#description trunk_to_Building_4 SW1(config-if)# ā‘ Setting Port Security Sw1(config-if)#switchport port-security mac-address mac-address ī‘ Now only this one MAC address is allowed on this switch port 49
  • 50. Switch Configuration Connect two machine to a switch To view the MAC table sw1#show mac-address-table dynamic Sw1#sh spanning-tree Sw1(config)#spanning-tree vlan 1 priority ? Sw1(config)#spanning-tree vlan 1 priority 4096 Erase the configuration 50
  • 51. 51
  • 52. VLANā€™s ā‘ A VLAN is a logical grouping of network users and resources connected to administratively defined ports on a switch. ā‘ Ability to create smaller broadcast domains within a layer 2 switched internetwork by assigning different ports on the switch to different subnetworks. ā‘ Frames broadcast onto the network are only switched between the ports logically grouped within the same VLAN ā‘ By default, no hosts in a specific VLAN can communicate with any other hosts that are members of another VLAN, ā‘ For Inter VLAN communication you need routers 52
  • 53. VLANs ā‘VLAN implementation combines Layer 2 switching and Layer 3 routing technologies to limit both collision domains and broadcast domains. ā‘VLANs can also be used to provide security by creating the VLAN groups according to function and by using routers to communicate between VLANs. ā‘A physical port association is used to implement VLAN assignment. ā‘Communication between VLANs can occur only through the router. ā‘This limits the size of the broadcast domains and uses the router to determine whether one VLAN can talk to another VLAN. ā‘NOTE: This is the only way a switch can break up a broadcast domain! 53
  • 54. A VLAN = A Broadcast Domain = Logical Network (Subnet) VLAN Overview ā€¢ Segmentation ā€¢ Flexibility ā€¢ Security 54
  • 55. History ā‘11 Hosts are connected to the switch ā‘All From same Broadcast domain ā‘Need to divide them in separate logical segment ā‘High broadcast traffic reasons ā‘ ARP ā‘ DHCP ā‘ SAP ā‘ XWindows ā‘ NetBIOS 55
  • 56. Definition ā‘ Logically Defined community of interest that limits a Broadcast domain ā‘ LAN are created on the software of Switch ā‘ All devices in a VLAN are members of the same broadcast domain and receive all broadcasts ā‘ The broadcasts, by default, are filtered from all ports on a switch that are not members of the same VLAN. 56
  • 57. Security ā‘ A Flat internetworkā€™s security used to be tackled by connecting hubs and switches together with routers ā‘ This arrangement is ineffective because ā‘ Anyone connecting physical network could access network resources located on that physical LAN ā‘ Can observe the network traffic by plugging network analyzer into the HUB ā‘ Users could join a workgroup by just plugging their workstations into the existing hub ā‘ By creating VLANā€™s administrators have control over each port and user 57
  • 58. How VLANs Simplify Network Management ā‘ If we need to break the broadcast domain we need to connect a router ā‘ By using VLANā€™s we can divide Broadcast domain at Layer-2 ā‘ A group of users needing high security can be put into a VLAN so that no users outside of the VLAN can communicate with them. ā‘ As a logical grouping of users by function, VLANs can be considered independent from their physical locations. 58
  • 59. VLAN Memberships ā‘ VLAN created based on port is known as Static VLAN. ā‘ VLAN assigned based on hardware addresses into a database, is called a dynamic VLAN 59
  • 61. Static VLANs ā‘Most secure ā‘Easy to set up and monitor ā‘Works well in a network where the movement of users within the network is controlled 61
  • 62. Dynamic VLANs ā‘ A dynamic VLAN determines a nodeā€™s VLAN assignment automatically ā‘ Using intelligent management software, you can base VLAN assignments on hardware (MAC) addresses. ā‘ Dynamic VLAN need VLAN Management Policy Server (VMPS) server 62
  • 63. LAB ā€“ Creating VLAN ā‘ Connect two computers on a switch ā‘ Ping and see both are able to communicate ā‘ Create two vlans and configure static VLANā€™s so both ports are on separate VLANā€™s ā‘ Test the communication between PCā€™s port1 port5 To see the existing VLAN #Show vlan To create VLAN #vlan database Switch(vlan)#vlan 2 name red Switch(vlan)#vlan 3 name blue Assigning ports to VLAN Sw(config)# int fastEthernet 0/1 Sw(config-if)#switch mode access Sw(config-if)#switchport access vlan2 63
  • 64. LAB ā€“ Deleting VLAN port1 port5 To delete VLAN Sw(config)# no vlan 2 Sw(config)# no vlan 3 To bring port back to VLAN 1 Sw(config-if)#switchport mode acces Sw(config-if)#switch port access vlan1 For a Range Sw(config)#int range fastethernet 0/1 - 5 Sw(config-if)#switch port access vlan1 64
  • 65. ā‘VLANs can span across multiple switches. ā‘Trunks carry traffic for multiple VLANs. ā‘Trunks use special encapsulation to distinguish between different VLANs. VLAN Operation 65
  • 66. Types of Links ā‘ Access links ā‘ This type of link is only part of one VLAN ā‘ Itā€™s referred to as the native VLAN of the port. ā‘ Any device attached to an access link is unaware of a VLAN ā‘ Switches remove any VLAN information from the frame before itā€™s sent to an access-link device. ā‘ Trunk links ā‘ Trunks can carry multiple VLANs ā‘ These carry the traffic of multiple VLANs ā‘ A trunk link is a 100- or 1000Mbps point-to-point link between two switches, between a switch and router. 66
  • 69. Frame Tagging ī‰Ÿ Can create VLANs to span more than one connected switch ī‰Ÿ Hosts are unaware of VLAN ī‰Ÿ When host A Create a data unit and reaches switch, the switch adds a Frame tagging to identify the VLAN ī‰Ÿ Frame tagging is a method to identify the packet belongs to a particular VLAN ī‰Ÿ Each switch that the frame reaches must first identify the VLAN ID from the frame tag ī‰Ÿ It finds out what to do with the frame by looking at the information in the filter table ī‰Ÿ Once the frame reaches an exit to an access link matching the frameā€™s VLAN ID, the switch removes the VLAN identifier 69
  • 70. Frame Tagging Methods ā‘ There are two frame tagging methods ī‰Ÿ Inter-Switch Link (ISL) ī‰Ÿ IEEE 802.1Q ā‘ Inter-Switch Link (ISL) ī‰Ÿ proprietary to Cisco switches ī‰Ÿ used for Fast Ethernet and Gigabit Ethernet links only ā‘ IEEE 802.1Q ī‰Ÿ Created by the IEEE as a standard method of frame tagging ī‰Ÿ it actually inserts a field into the frame to identify the VLAN ī‰Ÿ If youā€™re trunking between a Cisco switched link and a different brand of switch, you have to use 802.1Q for the trunk to work. 70
  • 71. ā‘ Performed with ASIC ā‘ ISL header not seen by client ā‘ Effective between switches, and between routers and switches ISL trunks enable VLANs across a backbone. ISL Tagging 71
  • 72. LAB-Creating Trunk Create two VLAN's on each switches #vlan database sw(vlan)#vlan 2 name red sw(vlan)#vlan 3 name blue sw(vlan)#exit sw#config t sw(config)#int fastethernet 0/1 sw(config-if)#switch-portaccess vlan 2 sw(config)#int fastethernet 0/4 sw(config-if)#switch-portaccess vlan 3 To see Interface status #show interface status 10.0.0.3 10.0.0.4 1 2 3 4 1 2 3 4 10.0.0.1 10.0.0.2 24 12 Trunk Port Configuration sw#config t sw(config)#int fastethernet 0/24 sw(config-if)#switchport trunk encapsulation dot1q sw(config-if)#switchport mode trunk * 2950 Only dot1q Encapsulation 72
  • 73. Assigning Access Ports to a VLAN Switch(config)#interface gigabitethernet 1/1 ā€¢ Enters interface configuration mode Switch(config-if)#switchport mode access ā€¢ Configures the interface as an access port Switch(config-if)#switchport access vlan 3 ā€¢ Assigns the access port to a VLAN 73
  • 74. Verifying the VLAN Configuration Switch#show vlan [id | name] [vlan_num | vlan_name] VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/2, Fa0/5, Fa0/7 Fa0/8, Fa0/9, Fa0/11, Fa0/12 Gi0/1, Gi0/2 2 VLAN0002 active 51 VLAN0051 active 52 VLAN0052 active ā€¦ VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 1 enet 100001 1500 - - - - - 1002 1003 2 enet 100002 1500 - - - - - 0 0 51 enet 100051 1500 - - - - - 0 0 52 enet 100052 1500 - - - - - 0 0 ā€¦ Remote SPAN VLANs ------------------------------------------------------------------------------ Primary Secondary Type Ports ------- --------- ----------------- ------------------------------------------ 74
  • 75. Verifying the VLAN Port Configuration Switch#show running-config interface {fastethernet | gigabitethernet} slot/port ā€¢ Displays the running configuration of the interface Switch#show interfaces [{fastethernet | gigabitethernet} slot/port] switchport ā€¢ Displays the switch port configuration of the interface Switch#show mac-address-table interface interface-id [vlan vlan-id] [ | {begin | exclude | include} expression] ā€¢ Displays the MAC address table information for the specified interface in the specified VLAN 75
  • 76. ā‘A messaging system that advertises VLAN configuration information ā‘Maintains VLAN configuration consistency throughout a common administrative domain ā‘Sends advertisements on trunk ports only VTP Protocol Features
  • 77. VLAN Trunking Protocol (VTP) ā‘Benefits of VTP ā‘Consistent VLAN configuration across all switches in the network ā‘Accurate tracking and monitoring of VLANs ā‘Dynamic reporting of added VLANs to all switches in the VTP domain 77
  • 78. ā€¢ Forwards advertisements ā€¢ Synchronizes ā€¢ Not saved in NVRAM ā€¢ Creates VLANs ā€¢ Modifies VLANs ā€¢ Deletes VLANs ā€¢ Sends/forwards advertisements ā€¢ Synchronizes ā€¢ Saved in NVRAM ā€¢ Creates VLANs ā€¢ Modifies VLANs ā€¢ Deletes VLANs ā€¢ Forwards advertisements ā€¢ Does not synchronize ā€¢ Saved in NVRAM VTP Modes 78
  • 79. VTP Operation ā€¢ VTP advertisements are sent as multicast frames. ā€¢ VTP servers and clients are synchronized to the latest update identified revision number. ā€¢ VTP advertisements are sent every 5 minutes or when there is a change. 79
  • 80. VTP Pruning ā€¢ VTP pruning provides a way for you to preserve bandwidth by configuring it to reduce the amount of broadcasts, multicasts, and unicast packets. ā€¢ If Switch A doesnā€™t have any ports configured for VLAN 5, and a broadcast is sent throughout VLAN 5, that broadcast would not traverse the trunk link to Switch A. ā€¢ By default, VTP pruning is disabled on all switches. ā€¢ Pruning is enabled for the entire domain 80
  • 81. ā€¢ Increases available bandwidth by reducing unnecessary flooded traffic ā€¢ Example: Station A sends broadcast, and broadcast is flooded only toward any switch with ports assigned to the red VLAN VTP Pruning 81
  • 82. VTP Configuration Guidelines ā€“ Configure the following: ā€¢ VTP domain name ā€¢ VTP mode (server mode is the default) ā€¢ VTP pruning ā€¢ VTP password Switch(config)#vtp mode server Switch(config)#vtp domain gates SwitchA#sh vtp status 82
  • 83. wg_sw_1900#configure terminal Enter configuration commands, one per line. End with CNTL/Z wg_sw_1900(config)#vtp transparent wg_sw_1900(config)#vtp domain switchlab wg_sw_1900(config)#vtp [server | transparent | client] [domain domain-name] [trap {enable | disable}] [password password] [pruning {enable | disable}] Creating a VTP Domain Catalyst 1900 Catalyst 2950 wg_sw_2950#vlan database wg_sw_2950(vlan)#vtp [ server | client | transparent ] wg_sw_2950(vlan)#vtp domain domain-name wg_sw_2950(vlan)#vtp password password wg_sw_2950(vlan)#vtp pruning 83
  • 84. Verifying the VTP Configuration Switch#show vtp status Switch#show vtp status VTP Version : 2 Configuration Revision : 247 Maximum VLANs supported locally : 1005 Number of existing VLANs : 33 VTP Operating Mode : Client VTP Domain Name : Lab_Network VTP Pruning Mode : Enabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0x45 0x52 0xB6 0xFD 0x63 0xC8 0x49 0x80 Configuration last modified by 0.0.0.0 at 8-12-99 15:04:49 Switch# 84
  • 85. Verifying the VTP Configuration (Cont.) Switch#show vtp counters Switch#show vtp counters VTP statistics: Summary advertisements received : 7 Subset advertisements received : 5 Request advertisements received : 0 Summary advertisements transmitted : 997 Subset advertisements transmitted : 13 Request advertisements transmitted : 3 Number of config revision errors : 0 Number of config digest errors : 0 Number of V1 summary errors : 0 VTP pruning statistics: Trunk Join Transmitted Join Received Summary advts received from non-pruning-capable device ---------------- ---------------- ---------------- --------------------------- Fa5/8 43071 42766 5 85
  • 86. VLAN to VLAN ā‘If you want to connect between two VLANs you need a layer 3 device 86
  • 87. Router on Stick 10.0.0.3 20.0.0.3 1 2 3 4 1 2 3 4 10.0.0.2 20.0.0.2 24 12 Create two VLAN's on each switches #vlan database sw(vlan)#vlan 2 name red sw(vlan)#vlan 3 name blue sw(vlan)#exit sw#config t sw(config)#int fastethernet 0/1 sw(config-if)#switch-portaccess vlan 2 sw(config)#int fastethernet 0/4 sw(config-if)#switch-portaccess vlan 3 To see Interface status #show interface status Trunk Port Configuration sw#config t sw(config)#int fastethernet 0/24 sw(config-if)#switchport trunk encapsulation dot1q sw(config-if)#switchport mode trunk Router Configuration R1#config t R1(config)#int fastethernet 0/0.1 R1(config-if)#encapsulation dot1q 2 R1(config-if)#ip address 10..0.0.1 255.0.0.0 R1(config-if# No shut R1(config-Iif)# EXIT R1(config)#int fastethernet 0/0.2 R1(config-if)# encapsulation dot1q 3 R1(config-if)#ip address 20..0.0.1 255.0.0.0 R1(config-if# No shut Router-Switch Port to be made as Trunk sw(config)#int fastethernet 0/9 sw(config-if)#switchport trunk enacapsulation dot1q sw(config-if)#switchport mode trunk 10.0.0.1 20.0.0.1 FA0/0 9 87
  • 88. Fig. 3 NAT (TI1332EU02TI_0003 New Address Concepts, 7) 88
  • 89. New Addressing Concepts Problems with IPv4 Shortage of IPv4 addresses Allocation of the last IPv4 addresses was for the year 2005 Address classes were replaced by usage of CIDR, but this is not sufficient Short term solution NAT: Network Address Translator Long term solution IPv6 = IPng (IP next generation) Provides an extended address range Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5) 89
  • 90. NAT: Network Address Translator NAT Translates between local addresses and public ones Many private hosts share few global addresses Public Network Uses public addresses Public addresses are globally unique Private Network Uses private address range (local addresses) Local addresses may not be used externally Fig. 4 How does NAT work? (TI1332EU02TI_0003 New Address Concepts, 9) 90
  • 91. NAT Addressing Terms ā‘ Inside Local ī‘ The term ā€œinsideā€ refers to an address used for a host inside an enterprise. It is the actual IP address assigned to a host in the private enterprise network. ā‘ Inside Global ī‘ NAT uses an inside global address to represent the inside host as the packet is sent through the outside network, typically the Internet. ī‘ A NAT router changes the source IP address of a packet sent by an inside host from an inside local address to an inside global address as the packet goes from the inside to the outside network. 91
  • 94. NAT Addressing Terms ā‘ Outside Global ī‘ The term ā€œoutsideā€ refers to an address used for a host outside an enterprise, the Internet. ī‘ An outside global is the actual IP address assigned to a host that resides in the outside network, typically the Internet. ā‘ Outside Local ī‘ NAT uses an outside local address to represent the outside host as the packet is sent through the private network. ī‘ This address is outside private, outside host with a private address 94
  • 95. Network Address Translation ā€¢ An IP address is either local or global. ā€¢ Local IP addresses are seen in the inside network. 95
  • 96. Types Of NAT ā‘There are different types of NAT that can be used, which are ī‘Static NAT ī‘Dynamic NAT ī‘Overloading NAT with PAT (NAPT) 96
  • 97. Static NAT ā‘ Static NAT - Mapping an unregistered IP address to a registered IP address on a one-to-one basis. Particularly useful when a device needs to be accessible from outside the network. ā‘ In static NAT, the computer with the IP address of 192.168.32.10 will always translate to 213.18.123.110. 97
  • 98. Dynamic NAT ā‘ Dynamic NAT - Maps an unregistered IP address to a registered IP address from a group of registered IP addresses. ā‘ In dynamic NAT, the computer with the IP address 192.168.32.10 will translate to the first available address in the range from 213.18.123.100 to 213.18.123.150. 98
  • 99. Overloading NAT with PAT (NAPT) ā‘ Overloading - A form of dynamic NAT that maps multiple unregistered IP addresses to a single registered IP address by using different ports. This is known also as PAT (Port Address Translation), single address NAT or port-level multiplexed NAT. ā‘ In overloading, each computer on the private network is translated to the same IP address (213.18.123.100), but with a different port number assignment.. 99
  • 100. Static NAT Configuration ā€¢ For each interface you need to configure INSIDE or OUTSIDE Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5) E0 B A 10.0.0.1 S0 200.0.0.1 C Internet 10.0.0.2 10.0.0.3 10.0.0.254 R1(config)#Int fastethernet 0/0 R1(config-if)# IP NAT inside R1(config-if)##Int s 0/0 R1(config-if)# IP NAT outside R1(config-if)# Exit R1(config)# ip NAT inside source static 10.0.0.1 200.0.0.1 To see the table R1(config)#show ip nat translations R1(config)#show ip nat statistics 100
  • 102. Dynamic NAT ā‘ Dynamic NAT sets up a pool of possible inside global addresses and defines criteria for the set of inside local IP addresses whose traffic should be translated with NAT. ā‘ The dynamic entry in the NAT table stays in there as long as traffic flows occasionally. ā‘ If a new packet arrives, and it needs a NAT entry, but all the pooled IP addresses are in use, the router simply discards the packet. Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5) 102
  • 103. Dynamic NAT ā‘ Instead of creating static IP, create a pool of IP Address, Specify a range ā‘ Create an access list and permit hosts ā‘ Link Access list to the Pool Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5) 103
  • 104. Dynamic NAT Configuration ā€¢ For each interface you need to configure INSIDE or OUTSIDE S0 200.0.0.1/200.0.0.254 Internet E0 B A 10.0.0.1 C 10.0.0.2 10.0.0.3 10.0.0.254 Create an Access List R1(config)# Access-list 1 permit 10.0.0.0 0.255.255.255 Configure NAT dynamic Pool R1(config)# IP NAT pool pool1 200.0.0.1 200.0.0.254 netmask 255.255.255.0 Link Access List to Pool R1(config)# IP NAT inside source list 1 pool pool1 104
  • 105. PAT ā‘ Overloading an inside global address ā‘ NAT overload only one global IP shared among all hosts Fig. 2 Address shortage and possible solutions (TI1332EU02TI_0003 New Address Concepts, 5) E0 B A 10.0.0.1 C 10.0.0.2 10.0.0.3 10.0.0.254 200.0.0.1 Internet Shared Global IP 200.0.0.1:1025 200.0.0.1:1026 200.0.0.1:1027 105
  • 114. PAT LAB R1#config t R1(config)# int e 0 R1(config-if)# ip nat insde R1(config)# int s 0 R1(config-if)# ip nat outside R1(config)#access-list 1 permit 192.168.10.0 0.0.0.255 R1(config)#ip nat inside source list 1 interface s 0 overload ī‘ To see host to host ping configure static or dynamic routing To check translation #sh ip nat translations S0 S0 E0 E0 192.168.10.2 A B 200.0.0.2 192.168.10.1 200.0.0.1 192.168.20.2 192.168.20.1 R2#config t R2(config)# int e 0 R2(config-if)# ip nat insde R2(config)# int s 0 R2(config-if)# ip nat outside R2(config)#access-list 1 permit 192.168.20.0 0.0.0.255 R2(config)#ip nat inside source list 1 interface s 0 overload ī‘ To see host to host ping configure static or dynamic routing To check translation #sh ip nat translations 114