The commands used for configuring the switch ports ip address and to enable the interface
SW1>enable
SW1#configure terminal
SW1(config)#interface fastethernet 0/1
SW1(config-if)#ip address 192.168.100.1 255.255.255.0
SW1(config-if)#no shutdown
Command to configure trunking on the switch
SW1>enable
SW1#configure terminal
SW1(config)#interface fastethernet
0/11 (here 0/11 is the port number)
SW1(config-if)#switchport mode
trunk
UUse the "show interface trunk" command to determine the trunking status of a link and VLAN status. This command lists port, its mode, encapsulation and whether it is trunking enabled.
The following commands are used for configuring the switch ports.
SSet the port speed to 100 mbps, and inter-switch communication to full-duplex on Switch 2950 of ports fa 0/2
2950>enable
2950#configure terminal
2950(config)#interface fastethernet
0/2
2950(config-if)#duplex full
2950(config-if)#speed 100
The MAC address table of a switch would be empty to begin with. However, it builds the MAC table learning from the frames that arrive at its ports by adding the MAC address and the corresponding port that it had arrived to the MAC table.
The syntax for setting port speed on an IOS switch is:
speed { 10 | 100 | auto }
For setting the speed to 10mbps on module 1 port 5, the command is
speed 10
Similarly, to set the duplex mode on a switch:
dduplex { auto | full | half}
For setting the duplex to half, use the command: duplex half
The command: Switch(config)# port-channel load-balance src-ip
Will configure load balancing on EtherChannel switch links using source IP address. Note that the load balancing can be done based on source IP, destination IP, both source and destination IP (XOR), source and destination MAC addresses or TCP/UDP port numbers
The command : Switch#show etherchannel summary
Shows each port in the channel along with the status flag.
To find out which interface associated with a given MAC address, use the "show mac-address-table" command. It shows the learned MAC addresses and their associated interfaces.
If no matching MAC entry is found in the MAC table of a switch, the frame will be broadcast to all other ports except the port through which it had arrived.
UUse the "show interface trunk" command to determine the trunking status of a link and VLAN status. This command lists port, its mode, encapsulation and whether it is trunking enabled.
The command "ip default-gateway <defaultgatewayadd>" in global configuration mode can be used to set the default gateway on a Cisco switch/router.
Switches forward packets based on the physical address (such as MAC address) whereas, routers forward packets based on logical address (such as IP address). A frame's MAC address doesn't change when being forwarded through a switch.
The MAC address table of a switch would be empty to begin with. However, it builds the MAC table learning from the frames that arrive at its ports by adding the MAC address and the corresponding port that it had arrived to the MAC table. In this case, there is no MAC entry for interface Fa0/10. Therefore, a new entry will be added to the MAC table with the MAC (of00a0.2a38.f23a) address of HostC.
YYou can use "show controllers serial [port number]" to see if the interface detects a DCE or DTE cable.
The following are the Cisco recommended Access Layer switches:
Catalyst 2950: For less than 50 users 10/100BaseT; 100BaseFX or 1000Base-X uplinks
Catalyst 3550: For less than 50 users 10/100BaseT; 1000Base-X uplinks;Advanced QOS, Inline power
Catalyst 4000/4500: For 250+ users 10/100/1000Base-T; 1000Base-X uplinks; Advanced QOS, Inline power.
Note that Catalyst 4000/4500 Supervisor III and IV support Cisco IOS.
AAn interface can be manually shut down by the administrator by issuing "shutdown" command. In such case, the command "show interfaces" displays the status as 'administratively down'.
The command "no switchport" enables a switch port for layer 3 operation. On the other hand, the command "switchport" enables a switch port for layer 2 operation.
Debug commands are useful to observe the switch responses in real time. To disable a debug command use "no debug" command. Using "no debug all" or "undebug all" command can disable all currently running debug commands.