It is important to understand how to access switch ports. The 3560 switch uses the type slot/port command, just like a 2621 router and just like the 3560 switch. For example, Fastethernet 0/3 is 10/100BaseT port 3.
The 3560 switch type slot/port command can be used with either the interface command or the show command. The interface command allows you to set interface specific configurations. The 3560 switch has only one slot: zero (0), just like the 1900.
Network Layout: Work with the saved network that you used to configure devices in lab 8.28.
1. To configure an interface on a 3560 switch, go to global configuration mode and use the interface command as shown.
3560A#config t
3560A(config)#interface fastethernet ?
<0-0> FastEthernet interface number
3560A(config)#interface fastethernet 0?
/
3560A(config)#interface fastethernet 0/?
<0-8> FastEthernet interface number
2. After the 0/configuration command, the above output shows the amount of ports you can configure. The output below shows the completed command.
3560A(config)#interface fastethernet 0/1
3560A(config-if)#
3. There are a couple of interface commands that you can configure on the switch. The commands we are interested in are the duplex command and the port fast command.
3560A(config-if)#duplex ?
auto Enable AUTO duplex configuration
full Force full duplex operation
half Force half-duplex operation
3560A(config-if)#
3560A(config-if)#speed ?
10 Force 10 Mbps operation
100 Force 100 Mbps operation
auto Enable AUTO speed configuration
3560A(config-if)#
4. Since the switch port’s duplex and speed settings are already set to auto by default, you do not need to change the switch port settings. It is recommended that you allow the switch port to auto negotiate speed and duplex settings in most situations. In a rare situation, when it is required to manually set the speed and duplex of a switch port, you can use the following configuration.
3560A(config-if)#speed 100
Duplex will not be set until speed is set to non-auto value
3560A(config-if)#duplex full
|
full duplex - transmission of data in two directions simultaneously. It has a higher throughput than half duplex. There are no collision domains with this setting Both sides must have the capability of being set to full duplex Both sides of the connection must be configured with full duplex Each side transmits and receives at full bandwidth in both directions |
5. Notice in the above command that to run full duplex, you must set the speed to non-auto value.
6. In addition to the duplex and speed commands that can be configured on the switch port, you also can turn on what is called portfast. The portfast command allows a switch port to come up quickly. Typically a switch port waits 50 seconds for spanning-tree to go through its"gotta make sure there are no loops!" cycle. However, if you turn portfast on, then you better be sure you do not create a physical loop on the switch network. A spanning tree loop can severely hurt or bring your network down. Here is how you would enable portfast on a switch port.
3560A(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
host. Connecting hubs, concentrators, switches, bridges, etc... to this
interface when portfast is enabled, can cause temporary bridging loops.
Use with CAUTION
%Portfast has been configured on FastEthernet0/1 but will only
have effect when the interface is in a non-trunking mode.
3560A(config-if)#
7. Notice the message the switch provides when enabling portfast. Although it seems like the command did not take effect, as long as the port is in access mode (discussed in a minute), the port will now be in portfast mode.
8. After you make any changes you want to the interfaces, you can view the different interfaces with the show interface command. The switch output below shows the command used to view a 10/100BaseT interface on the 3560 switch.
3560A(config-if)#ctrl+z
3560A#sh int f0/1
FastEthernet0/1 is down line protocol is down (notconnect)
Hardware is FastEthernet, address is 00b0.5d11.174f (bia 00b0.5d11.174f)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Half-duplex, 100Mb/s, media type is 10/100BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:02, output 00:00:01, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 1000 bits/sec, 1 packets/sec
1097702 packets input, 71821315 bytes, 0 no buffer
Received 488076 broadcasts, 0 runts, 0 giants, 0 throttles
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 3752639 multicast, 0 pause input
0 input packets with dribble condition detected
1590235 packets output, 290473092 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
3560A#
9. In addition to the show interface command, you can use the show running-config command to see the interface configuration as well.
3560A#sh run
[output cut]
interface FastEthernet0/1
duplex full
speed 100
spanning-tree portfast
!
interface FastEthernet0/2
[output cut]
10. You can administratively set a name for each interface on the 3560 switch. Like the hostname, the descriptions are only locally significant. For the 3560 series switch, use the description command. You can use spaces with the description command, but you can use underlines if you need to.
To set the descriptions, you need to be in interface configuration mode. From interface configuration mode, use the description command to describe each interface.
3560A#config t
Enter configuration commands, one per line. End with CTRL/Z
3560A(config)#int fa 0/1
3560A(config-if)#description Research VLAN
3560A(config-if)#int fa 0/8
3560A(config-if)#description trunk to Building 2
3560A(config-if)#
In the configuration example above, we set the description on both port 1 and 8.
11. Once you have configured the descriptions you want on each interface, you can then view the descriptions with either the show interface command, or show running-config command. View the configuration of the Ethernet interface 0/1 by using the show interface ethernet 0/1 command.
3560A#sh int fa 0/1
FastEthernet0/1 is down line protocol is down (notconnect)
Hardware is FastEthernet, address is 00b0.5d11.174f (bia 00b0.5d11.174f)
Description:
Description: Research VLAN
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Half-duplex, 100Mb/s, media type is 10/100BaseTX
(output cut)
12. Use the show running-config command to view the interface configurations as well.
3560A#sh run
interface FastEthernet0/1
description "Research VLAN"
spanning-tree portfast
!
interface FastEthernet0/2
[output cut]
Notice in the above switch output that the sh int fa0/1 command and the show run command both show the description command set on an interface.