L2 스위치는 기본적으로 IP address를 갖지 못한다.
그래서 L2 스위치에서 ping을 이용하여 다른 장비로 체크하지도 못하며 ( ping을 받을 주소가 없기 때문에 )
자신 역시 ping으로 테스트 하지 못한다.
네트워크를 디자인 후 스위치의 구성과 스위치의 수도 무시못할 양이 될 경우가 많은데, 이 경우 관리가 굉장히 까다롭다.
스위치를 직접 console 포트로 구성할것인지... 아니면 모든 스위치와 RAS를 연결해야 하는지...
그래서 스위치의 vlan interface를 사용하는 것이다.
Switch(config)# interface vlan 1
위 커맨드를 통해서 vlan 1 의 가상 인터페이스를 생성한다.
이를 SVI라고 부르는데 Switch Virtual Interface의 줄임말이다. 이는 물리적인 인터페이스가 아닌 논리적인 인터페이스로 IP를 할당할 수 있게 해준다. 이를 통해 스위치의 관리와 확인을 편리하게 할 수 있다.
이를 통해 IP를 생성하고, default-gateway를 설정하면 다른 서브넷으로의 접속도 가능하게 해주는 것이다.
추가적으로 L2 switch의 경우 SVI를 하나만 생성 가능하다. 두 개, 세 개의 SVI를 생성하더라도 기존의 SVI는 down 상태로 자동으로 변경된다. 또한 vlan이 없다면 SVI 역시 생성해봐야 소용이 없다. [ 예- vlan 20 이 없는데, interface vlan 20 을 생성해봐야 쓸모없는 인터페이스를 생성한 것이다. vlan 20을 생성하면 인터페이스도 살아난다. ]
아래 내용은 wikipedia에서의 SVI를 정리한 것이다.
A switch virtual interface (SVI) is a VLAN of switch ports represented by one interface to a routing or bridging system. There is no physical interface for the VLAN and the SVI provides the Layer 3 processing for packets from all switch ports associated with the VLAN.
There is one-to-one mapping between a VLAN and SVI, thus only a single SVI can be mapped to a VLAN. In default setting, an SVI is created for the default VLAN (VLAN1) to permit remote switch administration. An SVI cannot be activated unless associated with a physical port.
SVIs are generally configured for a VLAN for the following reasons:
- Allow traffic to be routed between VLANs by providing a default gateway for the VLAN.
- Provide fallback bridging (if required for non-routable protocols).
- Provide Layer 3 IP connectivity to the switch.
- Support bridging configurations and routing protocol.