09 SwitchConfig
09 SwitchConfig
• Virtual LANs
• Configuring Switches
• Spanning-Tree Protocol
• Network Management (see textbook)
• Power over Ethernet (see textbook)
Virtual LANs
• Recall our discussion of physical versus logical entities:
o "Physical" tends to indicate the actual or literal entity
o "Logical" refers to something more abstract. It can...
Stand in for
Emulate
Serve as a proxy for
o ...its
physical counterpart. In the case of emulating, we might
call such a thing virtual.
Virtual LANs
• A virtual LAN (VLAN) is a group of networked hosts (e.g.,
servers and computers) that are
o Configured as if they were on a LAN ...
o ...even though they may be separated by routers, in actuality.
• This is useful because the network administrator can
group the hosts based on factors other than physical
location, such as the department within an organization.
• There are three main types of VLANs...
Virtual LANs
• Port-based :
o Here,a specific VLAN is associated with a particular set of
ports on a switch.
o For
example, if a single switch were to have 16 ports, you
might have...
VLAN 1: Ports 1-4
VLAN 2: Ports 5-10
VLAN 3: Ports 11-13
o Whileswitches normally form a single broadcast domain,
these VLANs would in fact belong to separate domains.
Virtual LANs
• Tagged-based :
o This
uses Ethernet frames, along with the IEEE 802.1Q
standard
o Here, the Ethernet frame will include a VLAN id
o Thisway, you could actually have more than one VLAN on a
switch port
• Protocol-based :
o Data traffic connects on different ports based on protocol
o Separates data traffic for different networks
Virtual LANs
• Assignment of VLAN membership can be of two types:
o Static assignment : Port-based. Membership happens
at time of port assignment to a VLAN.
o Dynamic assignment :
Port assignment is based on other factors, like MAC address or
username.
This way, location can change, while maintaining VLAN
membership.
Configuring Switches
• With regards to using a switch in GNS3, much will be similar.
• Many of the modes and commands you used to interact
with your Cisco router will also apply to your Cisco switch --
though there will also be some differences because the
switch is a different type of device.
• Most notably, you will be configuring a VLAN, which will
have an IP address.
o On a router, the IP address exists so that it can serve as a gateway
for the LAN
Configuring Switches
o On a switch, the VLAN IP address is so that the switch can communicate
with other VLAN devices.
This is useful if you need to remotely connect to the switch to manage it.
The switch is still functioning at Layer 2. It is not performing any routing.
• Some command examples will follow, with two caveats:
o What we are describing here is in the context of GNS3 and our labs in this
class. However, much will still be relevant in real-life situations dealing with
physical networks and hardware.
o In GNS3, we are not using a proper managed switch. Instead, we are using
an EtherSwitch router that is configured to behave like one.
o As such, some of the commands that you use will be different than what is
presented in the textbook.
Configuring Switches
• In configuration mode, "VLAN" is like a type of interface
that you can configure.
ESW1(config)#interface VLAN 1
• In interface configuration mode, you will use similar
commands as you used on a router
ESW1(config-if)#ip address 192.168.2x.10 255.255.255.0
ESW1(config-if)#no shutdown
• Your switch will also need a default gateway, which will be
your router's local NIC:
ESW1(config)#ip default-gateway 192.168.2x.1
Configuring Switches
• Finally, you will also be able to view configuration
information for VLAN 1:
ESW1#show interface VLAN 1
• In Homework #10, you will start by configuring the first
VLAN, which will be the default for administrative purposes.
• At first, all Ethernet ports will be associated with that one.
You can verify this by running the command show vlan
(On your EtherSwitch router in GNS3: show vlan-switch)
• Moving forward, you can establish other VLANs.
Configuring Switches
• On your EtherSwitch router in GNS3...
o you would enter the correct mode with the command vlan
database, which gives you the prompt ESW1(vlan)#
o There, you can create new VLANs, specified by number and name:
vlan [number] name [VLAN's name]. For example:
vlan 2 name Sales