In real networks, VLANs are the most likely feature
to be configured on a switch. Almost every network uses them, and there is no
reasonable dynamic way to assign specific ports to specific VLANs. So you
simply need to configure the switch to know which ports are in which VLANs.
You can also configure VTP and trunking. VTP is on
by default, and trunking negotiation is attempted on all ports by default. So,
although you might not be required to configure either VTP or trunking in a
real network you should certainly be ready to configure VTP and trunking for
the exams.
Command
|
Description
|
Vlan database
|
EXEC command that puts the user in VLAN
configuration mode.
|
vtp {domain domain-name | password password
| pruning | v2-mode | {server | client | transparent}}
|
Defines VTP parameters in VLAN configuration mode.
|
vlan vlan-id [name vlan-name]
|
VLAN database configuration command that creates
and names a VLAN.
|
switchport mode {access | dynamic {auto |
desirable} | trunk} Interface subcommand that configures the interface for
trunking. switchport trunk {{allowed vlan vlan-list} | {native vlan vlan-id}
| {pruning vlan vlan-list}}
|
Interface subcommand that refines the list of allowed
VLANs, defines the 802.1Q native VLAN, and limits the range of VLANs for
which pruning can occur.
|
switchport access vlan vlan-id
|
Interface subcommand that statically configures
the interface into that one VLAN.
|
show interfaces [interface-id | vlan vlan-id]
[switchport | trunk]
|
Displays trunk status.
|
show vlan [brief | id vlan-id | name vlan-name
| summary]
|
EXEC command that lists information about the
VLAN.
|
show vlan [vlan]
|
Displays VLAN information.
|
show vtp status
|
Lists VTP configuration and status information.
|
show spanning-tree vlan vlan-id
|
EXEC command that lists information about the
spanning tree for a particular VLAN.
|
Switches like Cisco Catalyst 3560 or Cisco Catalyst
3750 are Layer 3 switches (L3), which means that they can be used as a routers.
As you already know, if we have two devices in different VLANs we must have L3
device which will do interVLAN routing.
Here is an example of configuring Cisco Catalyst
3560 switch with interVLAN capabilities:
CiscoTests-3560#sh runBuilding
configuration...Current
configuration : 8459 bytes!version
12.2no
service padservice
timestamps debug uptimeservice
timestamps log uptimeno
service password-encryption!hostname
CiscoTests-3560!enable
secret 5 $1$I6Rl$2H9uCxhfFZ5844trhNwo71!no aaa
new-modelip
subnet-zeroip
routing!...!interface
FastEthernet0/4description
Port for Agentswitchport
access vlan 10switchport
mode accessspeed
100duplex
fullspanning-tree
portfast!interface
FastEthernet0/5description
Port for Agentswitchport
access vlan 10switchport
mode accessspeed
100duplex
fullspanning-tree
portfast!interface
FastEthernet0/6description
Port for Agentswitchport
access vlan 10switchport
mode accessspeed
100duplex
fullspanning-tree
portfast!...!interface
FastEthernet0/39description
Port for Serverswitchport
access vlan 20switchport
mode accessspeed
100duplex
fullspanning-tree
portfast!interface
FastEthernet0/40description Port for Serverswitchport access vlan 20switchport mode accessspeed 100duplex fullspanning-tree portfast!...!interface FastEthernet0/48description Link_to_R2811-GWno switchportip address 172.16.252.253 255.255.255.128!...!interface Vlan1no ip addressshutdown!interface Vlan10description Agent's VLANip address 10.2.0.126 255.255.255.128no ip route-cache cefno ip route-cache!interface Vlan20description Server's VLANip address 10.2.0.254 255.255.255.128no ip route-cache cefno ip route-cache!ip classlessip route 0.0.0.0 0.0.0.0 172.16.252.254
No comments:
Post a Comment