Default Behavior of Interfaces
Device | Interface Default | When Device is Plugged In |
---|---|---|
Switch | No shutdown command | Goes up/up automatically |
Router | Has shutdown command | Stays admin down/down, must be enabled manually |
π‘ Switch Interfaces
- Active interfaces:
up/up
- Unused interfaces:
down/down
, but not administratively disabled β become active when connected
β Best practice: manually disable all unused interfaces
π΄ Router Interfaces
- Default state:
administratively down/down
β Must be manually brought up (no shutdown
) to work
β No need to disable unused interfaces β already disabled by default
Interface Status Commands
SW1# show ip interface brief // Summary (L1/L2) β works for routers/switches SW1# show interfaces status // Physical info β switch only
Field | Description |
---|---|
Port | Interface ID (e.g. Fa0/1) |
Name | Configured via description |
Status | connected , notconnect , or disabled |
VLAN | Access VLAN or trunk |
Duplex | full , half , auto , a-full (auto-negotiated full duplex) |
Speed | auto , a-100 , etc. |
Type | Port type (e.g. 10/100BaseTX ) |
Manual Interface Configuration
SW1(config)# interface f0/1
SW1(config-if)# speed 10 // 100 | auto
SW1(config-if)# duplex half // full | auto
π‘ Auto-negotiation is default. Only change if issues arise.
Configure Multiple Interfaces
SW1(config)# interface range f0/5 - 6, f0/9 - 12
SW1(config-if-range)# description ## Not in use ##
SW1(config-if-range)# shutdown
SW1(config-if-range)# do show interfaces description
Duplex Modes
Mode | Description |
---|---|
Half Duplex | Send/receive alternately (legacy, used with hubs) |
Full Duplex | Send/receive simultaneously (modern switches) |
Hubs (Layer 1 devices)
- Work as repeaters: broadcast everything
- Cause collisions when multiple devices transmit at once
- All ports on a hub = one collision domain
- Use CSMA/CD (Carrier Sense Multiple Access with Collision Detection):
- Listen β Transmit β Collision? β Notify β Random wait β Retry
- Modern switches eliminate this problem with full-duplex & separate collision domains
Speed/Duplex Auto-Negotiation
- Switch interfaces: default β
speed auto
,duplex auto
- Negotiation logic:
- If connected device also supports auto-negotiation β best mutual setting
- If not:
- Speed: switch tries to match or falls back to slowest
- Duplex: uses half for 10/100 Mbps; full for 1000 Mbps+
π οΈ Avoid duplex mismatch β always keep auto-negotiation enabled on both ends.
Interface Type | Supported Speeds |
---|---|
Ethernet | 10 Mbps |
FastEthernet | 10/100 Mbps |
GigabitEthernet | 10/100/1000 Mbps |
Interface Errors (Check with show interfaces f0/x
)
Error | Description |
---|---|
Runts | Frames < 64 bytes |
Giants | Frames > 1518 bytes |
CRC | Failed checksum (Frame Check Sequence error) |
Frame | Incorrectly formatted frames |
Input errors | Total of all the above (receive side) |
Output errors | Failed outbound frames (transmit side) |
β These counters help troubleshoot cable and port issues on both routers and switches.
π These are personal study notes. Please read theΒ full disclaimerΒ for more information.