githubEdit

arrow-up-arrow-downSwitches Interfaces

Network topology

This is a single LAN, 192.168.1.0/24, witch one router, R1, two switches, SW1 and SW2 and for PCs, PC1, PC2, PC2 and PC4.

Commands

circle-info

To see the interfaces of the switch, you use this command: show ip interface brief

  • 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 state if connected to another device OR in the down/down state if not connected to another device

circle-info

To see the status of the interfaces, use the command: show interfaces status

Auto means they are able to negotiate with the device they are connected to and use the fastest speed both devices are capable of.

circle-info

Configuring interface speed and duplex

circle-info

Configure interfaces based on a range

Full/Half Duplex

  • Half Duplex means that the device cannot send and receive data at the same time. If it is receiving a frame, it must wait before sending a frame.

  • Full Duplex means that the device can send and receive data at the same time. It does not have to wait.

In modern networks that use switches, all devices can use full duplex on their interfaces.

Ethernet hubs

This device was around before the network switch. The hub is much simpler than a switch, in fact it is simply a repeater.

  • Any frame it receives, it floods like a switch does with a broadcast or unknown unicast frame.

  • If PC1 wants to send a frame to PC2, it will pass through the Ethernet Hub and flood the frame to PC2 and PC3.

  • PC3 will not receive it, because the destination MAC address of the frame is not the same as the PC3 MAC address.

  • PC2 will receive it, because the destination MAC address of the frame is the same as the PC2 MAC address.

If 2 PCs try to send frames at the same time, the hub will not send one first and then send the other after, it simply tries to flood both at the same time, and this will result in a collision on the interface, and PC2 will not receive either frame intact.

  • All devices connected to a hub are part of what is called a collision domain. The frames they send could collide with frames any of the other devices connected to the hub send. To deal with collisions in a half-duplex situation like this, Ethernet devices uses a mechanism called 'CSMA/CD'.

CSMA/CD

circle-info

This stands for Carrier Sense Multiple Access with Collision Detection

It describes how devices avoid collisions in a half-duplex situation, and how they react if collisions do occur.

  • Before sending frames, devices listen to the collision domain until they detect that other devices are not sending frames.

  • If a collision does occur, the device sends a jamming signal to inform the other devices that a collision happen.

  • Each device will wait a random period of time before sending frames again.

  • The process repeats.

Collision domains

Switches are more sophisticated than hubs. Hubs are simple repeaters which operate at Layer 1, repeating whatever signal they receive. Switches operate at Layer 2, using Layer 2 addressing, MAC addresses, to send frames to specific hosts. They also will not try to send two frames to the same host at once. So this network, which was one collision domain when connected to a hub, is now a triple collision domain.

  • Because of the improved functionality of switches over hubs, these devices can now operate in full duplex, meaning they do not have to worry about whether or not other devices are sending data at the same time, they can send data freely.

  • Although problems like collisions still do occur, they are rare and usually are a sign of a problem, like a misconfiguration, rather than a regular occurrence like in a half-duplex network.

Speed/Duplex Autonegotiation

Interfaces that can run at different speeds (10/100 or 10/100/1000) have default settings of speed auto and duplex auto.

  • Interfaces advertise their capabilities to the neighboring device, and they negotiate the best speed and duplex settings they are both capable of.

If autonegotiation is disabled on the device, this is how the switch will respond:

  • 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 speed.

  • DUPLEX

    • If the speed is 10 or 100 Mbps, the switch will use half duplex.

    • If the speed is 1000Mbps or greater, use full duplex.

Interface Errors

Error
Definition

Runts

Frames that are smaller than the minimum frame size. (64 bytes)

Giants

Frames that are larger than the maximum frame size (1518 bytes)

CRC

Frames that failed the CRC check (in the Ethernet FCS trailer)

Frame

Frames that have an incorrect format (due to an error)

Input errors

Total of various counters, such as the above four

Output errors

Frames the switch tried to send, but failed due to an error

Last updated