Dell Networking SONiC: VLAN을 생성하여 트렁크 및 액세스 스위치 포트에 할당하는 방법

Summary: 이 문서에서는 VLAN을 생성하여 트렁크 및 액세스 스위치 포트에 할당하는 방법에 대해 설명합니다. 이 문서에서는 Dell SONiC 4.1을 실행하는 스위치를 사용합니다.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

개념을 설명하기 위해 표준 인터페이스 명명을 사용하고 있습니다. Dell Networking S-Series: 문서를 참조하십시오. 기본 인터페이스 구성 - SONiC 4.0 을 참조하십시오. 인터페이스 이름 지정에 관한 자세한 내용


목차

  1. 소개
  2. VLAN 생성
  3. VLAN 범위 생성
  4. 인터페이스를 액세스 포트로 구성
  5. 인터페이스를 트렁크 포트로 구성
  6. 인터페이스에서 VLAN 제거
  7. IP 주소 및 MTU 구성


 

소개

VLAN(가상 Local Area Network)은 논리적 인터페이스입니다. 이를 통해 디바이스 그룹이 물리적 위치에 관계없이 동일한 네트워크에 있는 것처럼 통신할 수 있습니다.
물리적 인터페이스 및 PortChannel은 VLAN의 멤버일 수 있습니다. VLAN 범위는 1-4094입니다.

염두에 두어야 할 부분

  • 예약된 VLAN

Dell Enterprise SONiC은 다양한 프로토콜을 사용할 수 있도록 128개의 VLAN을 예약합니다. 이는 4.0 이상에서 구현되었습니다. 기본적으로 SONiC 4.0에 예약된 VLAN 범위는 3967-4094입니다. 예약된 VLAN 범위를 변경할 수 있습니다.

예약된 VLAN에 대한 자세한 내용은 Dell Networking Enterprise SONiC 예약된 VLAN 문서를 참조하십시오.

  • 스위치 프로필
    • Dell SONiC의 기본 스위치 프로필은 L3이며 VLAN이 없습니다. VLAN에 포트를 할당하기 전에 VLAN을 생성해야 합니다.
    • L2 프로파일에는 기본 VLAN 1이 있으며 모든 포트는 기본적으로 이 VLAN 1에 할당됩니다.

L2 및 L3 스위치 프로필에 대한 자세한 내용은 Dell Networking SONiC 운영 체제 L2 및 L3 스위치 프로필 문서를 참조하십시오.

 

VLAN 생성

구성 구문

구성

설명

admin@DELLSONiC:~$ sonic-cli

Dell 관리 프레임워크 CLI를 도입합니다.

DELLSONiC# configure terminal

구성 모드 진입

DELLSONiC(config)# interface Vlan <Vlan ID>

VLAN 생성

DELLSONiC(config)# no interface Vlan <Vlan ID> 

VLAN을 제거합니다.


VLAN 범위 생성
 

구성

설명

DELLSONiC# configure terminal

구성 모드 진입

DELLSONiC(config)# interface range create Vlan <Vlan ID-Vlan ID>

VLAN 범위 생성

DELLSONiC(config)# no interface Vlan <Vlan ID-Vlan ID>

VLAN 범위를 제거합니다.



샘플 구성
스위치에서 VLAN 10을 구성해 보겠습니다.
 

admin@DELLSONiC:~$ sonic-cli 
DELLSONiC# configure terminal 
DELLSONiC(config)# interface Vlan 10 
DELLSONiC(config-if-Vlan10)# end


아래 명령을 사용하여 VLAN이 생성되었는지 확인합니다.

show Vlan 


샘플 출력

DELLSONiC# show Vlan
Q: A - Access (Untagged), T - Tagged
NUM        Status      Q Ports            Autostate   Dynamic
10         Inactive                       Enable


 

VLAN 범위 생성

구성

설명

DELLSONiC# configure terminal

구성 모드 진입

DELLSONiC(config)# interface range create Vlan <Vlan ID-Vlan ID>

VLAN 범위 생성

DELLSONiC(config)# no interface Vlan <Vlan ID-Vlan ID>

VLAN 범위를 제거합니다.


샘플 구성

VLAN 30-40 범위를 만들 수 있습니다.

admin@sonic:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# interface range create Vlan 30-40
DELLSONiC(config-if-range-vl**)# exit
DELLSONiC(config)# exit
DELLSONiC# show Vlan
Q: A - Access (Untagged), T - Tagged
NUM        Status      Q Ports            Autostate   Dynamic
30         Inactive                        Enable
31         Inactive                        Enable
32         Inactive                        Enable
33         Inactive                        Enable
34         Inactive                        Enable
35         Inactive                        Enable
36         Inactive                        Enable
37         Inactive                        Enable
38         Inactive                        Enable
39         Inactive                        Enable
40         Inactive                        Enable
DELLSONiC#

 
VLAN 30-40을 제거할 수 있습니다.

DELLSONiC# configure
DELLSONiC(config)# no interface Vlan 30-40
DELLSONiC(config)# end


 

인터페이스를 액세스 포트로 구성합니다.

액세스 포트는 단일 VLAN만 허용합니다. VLAN 트래픽에 대한 액세스는 태그가 지정되지 않습니다.

구성 구문

구성

설명

DELLSONiC# configure

구성 모드 진입

DELLSONiC(config)# interface Ethernet <Number>

인터페이스 구성

DELLSONiC(conf-if-Ethernet/PoX)# switchport access Vlan X

포트를 VLAN의 액세스 포트로 할당합니다.

DELLSONiC(conf-if-Ethernet/PoX)# no switchport access vlan

포트에서 액세스 VLAN을 제거합니다.


샘플 구성
포트 이더넷 1/1을 VLAN 10의 액세스 포트로 할당해야 한다고 가정합니다. 다음은 샘플 구성입니다.

 

DELLSONiC# configure
DELLSONiC(config)# interface Eth 1/1
DELLSONiC(config-if-Eth1/1)# switchport access Vlan 10
DELLSONiC(config-if-Eth1/1)# end
DELLSONiC#


아래 명령을 사용하여 구성을 확인합니다.

show Vlan 

And 

show run interface <interface number>


샘플 출력
 

DELLSONiC# show Vlan
Q: A - Access (Untagged), T - Tagged
NUM        Status      Q Ports            Autostate   Dynamic
10         Inactive    A  Eth1/1           Enable      No
DELLSONiC# show running-configuration interface Eth 1/1
!
interface Eth1/1
mtu 9100
no shutdown
switchport access Vlan 10


 

인터페이스를 트렁크 포트로 구성합니다.

트렁크 포트에는 여러 개의 태그가 지정된 VLAN과 하나의 태그가 지정되지 않은 VLAN(기본 VLAN)이 있을 수 있습니다.

염두에 두어야 할 부분

  • 인터페이스에 할당하기 전에 VLAN을 생성해야 합니다
  • 동일한 VLAN은 한 인터페이스에서 태그 지정 및 태그 미지정 VLAN일 수 없습니다.
  • 인터페이스에는 하나의 액세스 또는 태그가 지정되지 않은 VLAN(기본 VLAN)만 할당할 수 있습니다. 
  • 다음 명령을 사용하여 인터페이스의 기존 VLAN에 VLAN을 추가할 수 있습니다.
 
switchport trunk allowed VLAN add <Vlan id/Range of vlan>
 

주의: switchport trunk allowed VLAN <VLAN id/Range of vlan> 명령은 지정된 VLAN을 사용하여 인터페이스에 존재하는 모든 VLAN을 다시 씁니다. 이 명령을 사용할 때는 주의해야 합니다.

구성 구문

구성

설명

DELLSONiC# configure

구성 모드 진입

DELLSONiC(config)# interface Ethernet/Portchannel <number>

인터페이스 구성

DELLSONiC(conf-if-Ethernet/PoX)# switchport trunk allowed VLAN add <Vlan id/Range of vlan> 

VLAN 또는 VLAN 범위를 트렁크 포트에 허용합니다. VLAN 범위를 지정하려면 1..4094>(-) 또는 (,)로 구분된 개별 VLAN ID와 VLAN ID 범위(예: 20,70-100,142)를 사용합니다<.

DELLSONiC(conf-if-Ethernet/PoX)#switchport trunk allowed Vlan all

모든 VLAN을 허용합니다(선택 사항).

DELLSONiC(conf-if-Ethernet/PoX)#switchport trunk allowed Vlan <Vlan id/Range of vlan>

(선택 사항. 주의해서 사용) 인터페이스의 모든 기존 VLAN 구성을 다시 쓰고 지정된 VLAN/VLAN 범위를 허용합니다. 

DELLSONiC(conf-if-Ethernet/PoX)# switchport access Vlan <Vlan id>

태그가 지정되지 않은 VLAN을 포트(기본 VLAN)에 할당합니다(선택 사항).


샘플 구성
이더넷 1/1 인터페이스에서 VLAN 10 태그가 지정된 VLAN 10과 VLAN 20을 액세스 포트(태그가 지정되지 않은 네이티브 vlan)로 할당해 보겠습니다. 다음은 샘플 구성입니다.

DELLSONiC# configure
DELLSONiC(config)# interface Eth 1/1
DELLSONiC(config-if-Eth1/1)# switchport trunk allowed Vlan add 10
DELLSONiC(config-if-Eth1/1)# switchport access Vlan 20
DELLSONiC(config-if-Eth1/1)# end


다음 명령을 사용하여 구성을 확인합니다.
 

show vlan and show run interface <interface id>


샘플 출력

DELLSONiC# show Vlan
Q: A - Access (Untagged), T - Tagged
NUM        Status      Q Ports            Autostate   Dynamic
10         Inactive    T  Eth1/1           Enable      No
20         Inactive    A  Eth1/1           Enable      No​​
DELLSONiC# show running-configuration interface Eth 1/1
!
interface Eth1/1
mtu 9100
no shutdown
switchport access Vlan 20
switchport trunk allowed Vlan 10
DELLSONiC#


 

인터페이스에서 VLAN을 제거합니다.

구성 구문

구성

설명

DELLSONiC# configure

구성 모드 진입

DELLSONiC(config)# interface Ethernet/Portchannel <number>

인터페이스 구성

DELLSONiC(conf-if-Ethernet/PoX)# switchport trunk allowed Vlan remove <Vlan id/range> 

트렁크 포트에서 VLAN 또는 VLAN 범위를 제거합니다. VLAN 범위를 지정하려면 1..4094>(-) 또는 (,)로 구분된 개별 VLAN ID와 VLAN ID 범위(예: 20,70-100,142)를 사용합니다<.

DELLSONiC(conf-if-Ethernet/PoX)# no switchport access Vlan

트렁크 포트에서 태그가 지정되지 않은(액세스) 항목을 제거합니다.


샘플 구성

DELLSONiC# configure
DELLSONiC(config)# interface Eth 1/1
DELLSONiC(config-if-Eth1/1)# switchport trunk allowed Vlan remove 10
DELLSONiC(config-if-Eth1/1)# no switchport access Vlan
DELLSONiC(config-if-Eth1/1)# end


 

IP 주소 및 MTU를 구성합니다.

기본적으로 VLAN은 레이어 2 이상에 있습니다. IPv4 및 IPv6 주소가 없습니다. IPv4 또는 IPv6 주소를 VLAN에 수동으로 할당할 수 있습니다.

염두에 두어야 할 부분

  • VLAN MTU를 구성하기 전에 먼저 VLAN 멤버에서 MTU를 구성합니다. VLAN의 모든 구성원은 동일한 MTU 값을 가져야 합니다. 태그가 지정된 구성원은 패킷 태그를 설명하기 위해 태그가 지정되지 않은 구성원보다 4바이트 높은 링크 MTU가 있어야 합니다.
  • 인터페이스에서 여러 IPv6 주소를 구성할 수 있습니다.
  • VLAN에서 보조 IP 주소를 구성할 수 있습니다


구성 구문

구성

설명

DELLSONiC# configure

구성 모드 진입

DELLSONiC(config)# interface Vlan <ID>

인터페이스 구성

DELLSONiC(conf-if-VlanX)#ip address <IP address/mask>

IP 주소를 추가합니다.

DELLSONiC(conf-if-VlanX)#no ip address

IP 주소를 제거합니다.

DELLSONiC(conf-if-VlanX)#ipv6 address <ipv6–address/prefix-length>

IPv6 주소 추가

DELLSONiC(conf-if-VlanX)#no ipv6 address

IPv6 주소를 제거합니다.

DELLSONiC(conf-if-VlanX)#mtu <MTU ID>

MTU를 변경합니다(1312에서 9216으로). 기본값: 9100


샘플 구성
 

DELLDELLSONiC# configure
DELLSONiC(config)# interface Vlan 10
DELLSONiC(conf-if-Vlan10)# mtu 1500
DELLSONiC(conf-if-Vlan10)# ip address 10.0.0.1/24
DELLSONiC(conf-if-Vlan10)# ipv6 address a::b/64
DELLSONiC(conf-if-Vlan10)# end


다음 명령을 사용하여 구성을 확인합니다.

show interface vlan <vlan id>


샘플 출력

DELLSONiC# show interface Vlan 10
Vlan10 is up, line protocol is down
Hardware is Vlan, address is 0c:6e:4a:87:00:0a
IPV4 address is 10.0.0.2/24
Mode of IPV4 address assignment: MANUAL
IPV6 address is a::b/64,fe80::e6e:4aff:fe87:a/64
Mode of IPV6 address assignment: MANUAL
IP MTU 1500 bytes
Time since last interface status change: 01:28:39

Affected Products

Enterprise SONiC Distribution, PowerSwitch S6000 ON, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S6100-ON, PowerSwitch Z9100-ON, PowerSwitch Z9264F-ON, PowerSwitch Z9332F-ON
Article Properties
Article Number: 000217901
Article Type: How To
Last Modified: 29 Sept 2023
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.