--- id: 1777334914-ICRP aliases: - Switch Interfaces tags: [] --- # Switch Interfaces ## Show interface To see all the [[Switch]] interfaces in the CLI use ```cisco SW1>en SW1#show ip interface bief ``` [[Router]] interfaces have the shutdown command applied by default - will be in the administratively down/down state by default Switch interfaces do Not have the shutdown command applied by default - will be in the up/up stateif connected to another device - Or in the down/down state if not connected to another device also you can use another command for switches ```cisco SW1#show interface status Port Name Status Vlan Duplex Speed Type ``` Port - The physical interface on the switch Name - Optional description configured by the admin Status - connected notconnect ,disabled or err-disabled Vlan - The VLAN the port belongs to Duplex How data flows:full, half , auto (ex: a-full) πŸš€ Speed Port speed in Mbps or Gbps (ex: a-100) 🧬 Type Physical interface type (ex: 10/100BaseTX) ## Configuring interface speed and duplex For the speed ```cisco SW1#conf t SW1(config)#interface f0/1 SW1(config)#speed ? SW1(config)#speed 100 ``` For the duplex ```cisco SW1(config)#duplex ? SW1(config)#duplex full ``` For the description (Name) ```cisco SW1(config)#description ## to R1 ## ``` ## Configure a range of interface You can configure a range of interface with the command ```cisco SW1(config)#interface range f0/5 - 12 SW1(config-if-range)#description ## not in use ## //disable all the interface at once SW1(config-if-range)#shutdown ``` you can do this to multiple range ```cisco SW1(config)#interface range f0/5 - 6, f0/9 - 12 ``` ## Full / Half Duplex **Half duplex** : The device cannot send and receive data at the same time. if it is receiving a frame, it must wait before sendig a frame. - Devices attached to a hub must operate in half duplex **Full duplex** : The device can send and receive data at the same time it does not have to wait. - Devices attached to a switch can operate in full duplex ### CSMA/CD Carrier Sense Multiple Access with Collision Detection - Before sendig frames, devices 'listen' to the collision domain until they detect that other devices are not sending - if a collision does occur, the device sends a jamming signal to inform the other devices that a collision happened - Each device will wait a random period of time before sending frames again. - The process repeats. ## Speed/Duplex Autonegotiation - Interfaces that can run at different speeds (10/100 or 10/100/1000) have default settings of speed uto and duplex auto - Interfaces 'advertise' their capabilities to the neighboring device, and they negociate the best spedd and duplex settings they are both capable of. - What of autonegotiation is disabled on the device connected to the switch? - **Speed**: the switch will try to sense the speed that the other device is operating at. if it fails to sense the speed, it will use the slowest supported spedd (ie. 10 Mbps on a 10/100/1000 interface) - **Duplex**: if the speed is 10 or 100 Mbps, the switch will use half duplex. if the speed is 1000 Mbps or greater, use full duplex ## Interface Errors you can see errors with the command ```cisco SW1#show interfaces f0/2 ``` ### Traffic Stats ```cisco 5 minute input rate 1000 bits/sec, 10 packets/sec 5 minute output rate 2000 bits/sec, 20 packets/sec 1000 packets input, 800000 bytes 1200 packets output, 900000 byte ``` input rate β†’ traffic coming into the switch port output rate β†’ traffic leaving the port packets / bytes β†’ total traffic count ### The Error Counters ```cisco 10 input errors, 2 CRC, 3 frame, 0 overrun, 0 ignored , 0 runts, 0 giants 5 output errors, 2 collisions, 1 late collision ``` #### Input Errors (incoming traffic issues) - Total count of all incoming errors - CRC (Cyclic Redundancy Check) in the Ethernet [[FCS trailer]] - frame errors - overrun - Runts: Frames that are smaller than the minimum frame size (64 bytes) - Giants: Frames that are larger than the maxium frame size (1518 bytes) - ignored #### Output Errors (outgoing traffic issues) - Total outgoing packet errors - collisions / Occur in half-duplex mode only late collisions / Collisions detected after first 64 bytes If you remember only one thing for the CCNA, remember this: πŸ‘‰ **Duplex mismatch = CRC errors + late collisions** It’s one of the most common exam and real-world issues. **The errors can be the same with a router** ## Review - Interface speed and duplex - speed and duplex autonegotiation - Interface status - Interface counters & error