7 Layer 2 Switching Flashcards

1
Q

Three distinct functions of layer 2 switching

A

address learning
forward/filter decisions
loop avoidance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Address learning

A

Layer 2 switches remember the source hardware address of each frame received on an interface and enter this information into a MAC database called a forward / filter table. The old name for this table was called Content Addressable Memory (CAM), and the table is still sometimes referred either way.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Forward/filter decisions

A

When a frame is received on an interface, the switch looks at the destination hardware address, then chooses the appropriate exit interface for it in the MAC database. This way, the frame is only forwarded out of the correct destination port.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Loop avoidance

A

If multiple connections between switches are created for redundancy, network loops can occur. Spanning Tree Protocol (STP) is used to prevent network loops while still permitting redundancy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Port Security ?

A

“Port security” on a switch port restricts port access by MAC address. Switches can be configured to allow only certain MAC addresses to associate with the specific port.

config t
int f0/1
switchport mode access
switchport port-security
switchport port-security ?

aging Port-security aging commands
mac-address Secure mac address
maximum Max secure addresses
violation Security violation mode

Most Cisco switches ship with their ports in desirable mode, which means those ports will desire to trunk when they sense another switch has been connected. So first, we need to change the port and make it an access port instead. If we don’t do that, we won’t be able to configure port security on it at all.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You can configure a switch to take one of the following actions when a security violation occurs by using the switchport port-security command:

A

■ Protect: The protect violation mode drops packets with unknown source addresses until you remove enough secure MAC addresses to drop below the maximum value.

■ Restrict: The restrict violation mode also drops packets with unknown source addresses until you remove enough secure MAC addresses to drop below the maximum value. It also generates a log message, causes the security violation counter to increment, and sends an SNMP trap.

■ Shutdown: Shutdown is the default violation mode. The shutdown violation mode puts the interface into an error-disabled state immediately. The entire port is shut down. Also, in this mode, the system generates a log message, sends an SNMP trap, and increments the violation counter. To make the interface usable, you must do a shut/no shut on the interface.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

To set up a switch port to allow only one host per port use command:

A

switchport port-security maximum 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

To make sure the port will shut down if a rule is violated use command:

A

switchport port-security violation shutdown

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The sticky command

A

switchport port-security mac-address sticky
switchport port-security maximum 2
switchport port-security violation shutdown

With the sticky command you can provide static MAC address security without having to type in every MAC address on the network. (Above) The first two MAC addresses coming into the port “stick” to it as static addresses and will be placed in the running-config, but when a third address tries to connect, the port would shut down immediately.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to ensure that only a specific Mac address is allowed on a specific port?

A

switchport port-security
switchport port-security violation restrict
switchport port-security mac-address aa.bb.cc.dd.ee.ff

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What happens when you enable port security ?

A

It defaults to violation shutdown and a sets maximum allowed MAC addresses to 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Loop Avoidance

A

Redundant links between switches are important because they prevent network failures in the event that one link stops working but frames can be flooded down all redundant links simultaneously, creating network loops.

■ If no loop avoidance schemes are put in place, the switches will flood broadcasts endlessly throughout the inter-network. This is sometimes referred to as a broadcast storm.
■ A device can receive multiple copies of the same frame because that frame can arrive from different segments at the same time.
■ A server sends a unicast frame to Router C. Because it’s a unicast frame, Switch A forwards the frame and Switch B provides the same service. This means Router C receives that unicast frame twice, causing additional overhead on the network.

Loops can occur within other loops, and if a broadcast storm were to occur simultaneously, the network wouldn’t be able to perform frame switching at all!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

thrashing the MAC table

A

The MAC address filter table could be confused about the source device’s location because the switch can receive the frame from more than one link. The switch can be constantly updating the MAC filter table with so many source hardware address locations that it will fail to forward a frame! This is called thrashing the MAC table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

If you connect into a switch port and the switch port LED is alternating green and amber:

A

it means the port is experiencing errors. When this happens, check the host NIC or the cabling, possibly even the duplex settings on the port to make sure they match the host setting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Do We Need to Put an IP Address on a Switch?

A

No, Switches have all ports enabled at startup but you might want to since you still need it for in-band management purposes! The only reason we’re going to do that is so we
can manage/administer it remotely; Telnet, SSH, SNMP, etc., all need an IP address in order to communicate with the switch through the network in-band. The IP address is configured under a logical interface, called a management
domain or VLAN. You can use the default VLAN 1 to manage a switched network, but you can opt to use a different VLAN for management.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ip default-gateway command:

A

If you want to manage your switches from outside your LAN, you must set a default gateway on the switches just as you would with a host, and you do this from global config.

config t
ip default-gateway 192.168.10.30

17
Q

What must ports be set to in order to enable port security ?

A

To enable port security on a port, you must first make sure the port is an access port.

switchport mode access
switchport port-security

18
Q

If a port is in Secure-shutdown mode how do you re-enable to port ?

A

To enable the port again:

S1(config-if)# shutdown
S1(config-if)# no shutdown

19
Q

Commands to verify port security:

A

show portsecurity
show port-security interface interface
show running-config