QnA

switch

Q&A 정리: switch

네트워크 스위치란 무엇인가?

네트워크 스위치는 여러 장치를 연결하고, 받은 데이터를 목적지 장치에만 정확히 전달하는 네트워크 장비다. 우체국이 편지를 받아 수신자 주소를 보고 해당 집에만 배달하는 것과 같다.

A network switch is networking hardware that connects devices on a computer network by using packet switching to receive and forward data to the destination device.

A network switch is a multiport network bridge that uses MAC addresses to forward data at the data link layer (layer 2) of the OSI model. Some switches can also forward data at the network layer (layer 3) by additionally incorporating routing functionality. Such switches are commonly known as layer-3 switches or multilayer switches.


네트워크 스위치와 허브의 차이는?

허브는 받은 데이터를 연결된 모든 장치에 무차별적으로 보내지만, 스위치는 목적지 장치의 주소를 학습해 해당 장치에만 전달한다. 확성기로 전체에 외치는 것(허브)과 전화로 특정 사람에게만 말하는 것(스위치)의 차이다.

Unlike repeater hubs, which broadcast the same data out of each port and let the devices pick out the data addressed to them, a network switch learns the Ethernet addresses of connected devices and then only forwards data to the port connected to the device to which it is addressed.


스위치가 collision domain은 분리하지만 broadcast domain은 분리하지 못하는 이유는?

스위치는 각 포트를 독립된 통신 채널로 만들어 데이터 충돌을 방지한다. 하지만 "전체 공지"에 해당하는 브로드캐스트 메시지는 여전히 모든 포트에 전달되므로, 브로드캐스트 영역은 분리하지 못한다.

An Ethernet switch operates at the data link layer (layer 2) of the OSI model to create a separate collision domain for each switch port. Each device connected to a switch port can transfer data to any of the other ports at any time and the transmissions will not interfere. Because broadcasts are still being forwarded to all connected devices by the switch, the newly formed network segment continues to be a broadcast domain.


라우터의 라우팅 테이블과 스위치의 MAC 주소 테이블을 비교하라

스위치의 MAC 주소 테이블은 "이 장치는 어느 포트에 있다"를 기록해 빠른 전달에 최적화되어 있고, 라우터의 라우팅 테이블은 "이 네트워크로 가려면 어떤 경로를 써야 한다"를 기록해 경로 선택에 최적화되어 있다.

A forwarding information base (FIB), also known as a forwarding table or MAC (address) table, is most commonly used in network bridging, routing, and similar functions to find the proper output network interface controller to which the input interface should forward a packet.

FIBs are optimized for fast lookup of destination addresses and can improve performance of forwarding compared to using the routing information base (RIB) directly. The RIB is optimized for efficient updating by routing protocols and other control plane methods, and contain the full set of routes learned by the router.