예: 트래픽 클래스 맵 구성
이 예에서는 Type 5 FPC를 갖춘 T4000 라우터의 트래픽 클래스 맵 구성을 보여줍니다. Junos OS Release 17.2부터 시작하는 이 예는 MPC가 있는 MX 시리즈 라우터에서도 유효합니다. 예제는 다음 섹션에서 정리되어 있습니다.
요구 사항
이 예에서는 다음과 같은 하드웨어 및 소프트웨어 구성 요소를 사용합니다.
Junos OS 릴리스 14.2 이상에서 실행되는 T4000 라우터 1개
CE(One Customer Edge) 라우터
트래픽 클래스 맵을 구성하기 전에 다음 사항을 확인해야 합니다.
T4000 라우터에 Type 5 FPC를 설치했습니다.
CE 라우터를 T4000 라우터에 연결했습니다.
개요 및 토폴로지
이 예에서는 CE 라우터에 연결된 T4000 라우터의 트래픽 클래스 맵 구성을 보여줍니다. 이 예의 토폴로지에는 CE 라우터에 연결된 Type 5 FPC를 갖춘 T4000 라우터가 있습니다.

그림 1에서와 같이, CE 라우터는 T4000 라우터의 xe-4/0/0 및 xe-4/0/1 인터페이스로 트래픽을 전달합니다.
트래픽 클래스 맵은 Type 5 FPC가 있는 T4000 라우터에서 구성되어야 하며 인터페이스 xe-4/0/0 및 인터페이스 xe-4/0/1과 연계하여 사용자 정의 구성에 따라 패킷의 우선 순위를 지정하고 분류할 수 있어야 합니다. 수신 초과 구독이 발생하면 T4000 라우터는 사용자 정의 트래픽 클래스 맵을 사용하여 패킷을 처리합니다.
이 예에서는 다음 트래픽 클래스 맵을 CoS 코드 포인트와 함께 생성하고 이러한 코드 포인트를 트래픽 클래스와 연결하는 방법을 보여줍니다.
코드 포인트 000 001, 010 011 및 100 101이 있는 IPv4 우선 순위 트래픽 클래스 맵입니다. 이들 코드를 각각 실시간 네트워크 제어 및 best-effort 트래픽 클래스에 매핑합니다.
코드 포인트 000 001, 010 011 및 100 101이 있는 MPLS EXP 트래픽 클래스 맵입니다. 이들 코드를 각각 실시간 네트워크 제어 및 best-effort 트래픽 클래스에 매핑합니다.
코드 포인트 000 001, 010 011 및 100 101이 있는 IEEE 802.1 트래픽 클래스 맵입니다. 이들 코드를 각각 실시간 네트워크 제어 및 best-effort 트래픽 클래스에 매핑합니다.
코드 포인트 100001 100010 100011, 010011 010100 010101, 101001 101010 101011 DSCP 트래픽 클래스맵입니다. 이들 코드를 각각 실시간 네트워크 제어 및 best-effort 트래픽 클래스에 매핑합니다.
코드 포인트 0000 0001 1000 1001, 0010 0011 1010 1010 1011, 0100 0101 1100 1101이 있는 IEEE 802.1ad 트래픽 클래스 맵입니다. 이들 코드를 각각 실시간 네트워크 제어 및 best-effort 트래픽 클래스에 매핑합니다.
트래픽 클래스 맵 IPv4 우선 순위, MPLS EXP 및 IEEE 802.1은 인터페이스 xe-4/0/0과 연결됩니다. 트래픽 클래스는 DSCP 및 IEEE 802.1ad를 인터페이스 xe-4/0/1과 연결합니다.
구성
트래픽 클래스 맵을 구성하려면 다음 작업을 수행합니다.
CLI 빠른 구성
이 예제를 신속하게 구성하려면 다음 명령을 복사하고, 텍스트 파일에 붙여넣고, 줄 바꿈을 제거하고, 네트워크 구성에 필요한 세부 정보를 변경한 다음, 계층 수준에서 CLI [edit]
에 명령을 붙여넣습니다.
[edit] set interfaces xe-4/0/0 unit 0 family inet address 198.51.100.0/24 set interfaces xe-4/0/1 vlan-tagging set interfaces xe-4/0/1 unit 0 vlan-id 111 set interfaces xe-4/0/1 unit 0 family inet address 198.51.100.1/24 set class-of-service traffic-class-map inet-precedence inetp traffic-class real-time code-points [ 000 001 ] set class-of-service traffic-class-map inet-precedence inetp traffic-class network-control code-points [ 010 011 ] set class-of-service traffic-class-map inet-precedence inetp traffic-class best-effort code-points [ 100 101 ] set class-of-service traffic-class-map exp mpls_exp traffic-class real-time code-points [ 000 001 ] set class-of-service traffic-class-map exp mpls_exp traffic-class network-control code-points [ 010 011 ] set class-of-service traffic-class-map exp mpls_exp traffic-class best-effort code-points [ 100 101 ] set class-of-service traffic-class-map ieee-802.1 802.1p traffic-class real-time code-points [ 000 001 ] set class-of-service traffic-class-map ieee-802.1 802.1p traffic-class network-control code-points [ 010 011 ] set class-of-service traffic-class-map ieee-802.1 802.1p traffic-class best-effort code-points [ 100 101 ] set class-of-service traffic-class-map dscp dscp_v4 traffic-class real-time code-points [ 100001 100010 100011 ] set class-of-service traffic-class-map dscp dscp_v4 traffic-class network-control code-points [ 010011 010100 010101 ] set class-of-service traffic-class-map dscp dscp_v4 traffic-class best-effort code-points [ 101001 101010 101011 ] set class-of-service traffic-class-map ieee-802.1ad 802.1ad traffic-class real-time code-points [ 0000 0001 1000 1001 ] set class-of-service traffic-class-map ieee-802.1ad 802.1ad traffic-class network-control code-points [ 0010 0011 1010 1011 ] set class-of-service traffic-class-map ieee-802.1ad 802.1ad traffic-class best-effort code-points [ 0100 0101 1100 1101 ] set interfaces xe-4/0/0 traffic-class-map inet-precedence inetp set interfaces xe-4/0/0 traffic-class-map exp mpls_exp set interfaces xe-4/0/0 traffic-class-map ieee-802.1 802.1p vlan-tag inner set interfaces xe-4/0/1 traffic-class-map dscp dscp_v4 set interfaces xe-4/0/1 traffic-class-map ieee-802.1ad 802.1ad vlan-tag inner
인터페이스 구성
단계별 절차
인터페이스를 구성합니다. 이러한 인터페이스는 트래픽 클래스 맵과 연결되어야 합니다.
인터페이스 xe-4/0/0을 논리적 인터페이스로 구성하고, 프로토콜 제품군으로 inet을 구성하며, 198.51.100.0/24를 IP 주소로 구성합니다.
[edit] user@host#set interfaces xe-4/0/0 unit 0 family inet address 198.51.100.0/24
인터페이스 xe-4/0/1을 논리적 인터페이스로 구성하고, 프로토콜 제품군으로 inet을 구성하며, 198.51.100.1/24를 IP 주소로 구성합니다. 또한 VLAN 태깅을 활성화하고 인터페이스에서 VLAN 태깅된 프레임을 수신하고 전송하도록 VLAN ID(예: 111)를 구성합니다.
[edit] user@host#set interfaces xe-4/0/1 vlan-tagging user@host#set interfaces xe-4/0/1 unit 0 vlan-id 111 user@host#set interfaces xe-4/0/1 unit 0 family inet address 198.51.100.1/24
코드 포인트에 대한 트래픽 클래스 맵 구성 및 트래픽 클래스에 코드 포인트 매핑
단계별 절차
코드 포인트를 기반으로 트래픽 클래스 맵을 구성하고 트래픽 클래스와 맵을 연결하여 패킷 포워딩 엔진에 들어오는 트래픽을 우선 순위화하고 분류할 수 있습니다.
IPv4 우선 순위 트래픽 클래스 맵을 생성하고 코드 포인트 000 001, 010 011 및 100 101을 각각 실시간, 네트워크 제어 및 best-effort 트래픽 클래스에 매핑합니다.
[edit class-of-service] user@host# set traffic-class-map inet-precedence inetp traffic-class real-time code-points [ 000 001 ] user@host# set traffic-class-map inet-precedence inetp traffic-class network-control code-points [ 010 011 ] user@host# set traffic-class-map inet-precedence inetp traffic-class best-effort code-points [ 100 101 ]
mpls_exp MPLS EXP 트래픽 클래스 맵을 생성하고 코드 포인트 000 001, 010 011 및 100 101을 각각 실시간, 네트워크 제어 및 best-effort 트래픽 클래스에 매핑합니다.
[edit class-of-service] user@host# set traffic-class-map exp mpls_exp traffic-class real-time code-points [ 000 001 ] user@host# set traffic-class-map exp mpls_exp traffic-class network-control code-points [ 010 011 ] user@host# set traffic-class-map exp mpls_exp traffic-class best-effort code-points [ 100 101 ]
IEEE 802.1 트래픽 클래스 맵 802.1p를 생성하고 코드 포인트 000 001, 010 011 및 100 101을 각각 실시간 네트워크 제어 및 best-effort 트래픽 클래스에 매핑합니다.
[edit class-of-service] user@host# set traffic-class-map ieee-802.1 802.1p traffic-class real-time code-points [ 000 001 ] user@host# set traffic-class-map ieee-802.1 802.1p traffic-class network-control code-points [ 010 011 ] user@host# set traffic-class-map ieee-802.1 802.1p traffic-class best-effort code-points [ 100 101 ]
DSCP 트래픽 클래스 맵 dscp_v4 생성하고 코드 포인트를 100010 100011 100001, 010011 010100 010101, 101010 101001 101011 실시간 네트워크 제어 및 best-effort 트래픽 클래스에 매핑합니다.
[edit class-of-service] user@host# set traffic-class-map dscp dscp_v4 traffic-class real-time code-points [ 100001 100010 100011 ] user@host# set traffic-class-map dscp dscp_v4 traffic-class network-control code-points [ 010011 010100 010101 ] user@host# set traffic-class-map dscp dscp_v4 traffic-class best-effort code-points [ 101001 101010 101011 ]
IEEE802.1ad 트래픽 클래스 맵 802.1ad를 생성하고 코드 포인트 0000 0001 1000 1001,0010 0011 1010 1011, 0100 0101 1100 1101을 실시간 네트워크 제어 및 best-effort 트래픽 클래스에 각각 적용했습니다.
[edit class-of-service] user@host# set traffic-class-map ieee-802.1ad 802.1ad traffic-class real-time code-points [ 0000 0001 1000 1001 ] user@host# set traffic-class-map ieee-802.1ad 802.1ad traffic-class network-control code-points [ 0010 0011 1010 1011 ] user@host# set traffic-class-map ieee-802.1ad 802.1ad traffic-class best-effort code-points [ 0100 0101 1100 1101 ]
트래픽 클래스 맵과 인터페이스 연결
단계별 절차
구성된 트래픽 클래스 맵을 입력 트래픽에 우선 순위를 지정하고 분류할 인터페이스와 연결해야 합니다.
트래픽 클래스는 inetp, mpls_exp 및 802.1p를 인터페이스 xe-4/0/0과 연결합니다.
[edit class-of-service] user@host# set interfaces xe-4/0/0 traffic-class-map inet-precedence inetp user@host# set interfaces xe-4/0/0 traffic-class-map exp mpls_exp user@host# set interfaces xe-4/0/0 traffic-class-map ieee-802.1 802.1p vlan-tag inner
dscp_v4 및 802.1ad 트래픽 클래스 맵을 인터페이스 xe-4/0/1과 연결합니다.
[edit class-of-service] user@host# set interfaces xe-4/0/1 traffic-class-map dscp dscp_v4 user@host# set interfaces xe-4/0/1 traffic-class-map ieee-802.1ad 802.1ad vlan-tag inner
결과
interfaces { xe-4/0/0 { unit 0 { family inet { address 198.51.100.0/24; } } } xe-4/0/1 { vlan-tagging; unit 0 { vlan-id 111; family inet { address 198.51.100.1/24; } } } } class-of-service { traffic-class-map { inet-precedence inetp { traffic-class real-time code-points [ 000 001 ]; traffic-class network-control code-points [ 010 011 ]; traffic-class best-effort code-points [ 100 101 ]; } dscp dscp_v4 { traffic-class real-time code-points [ 100001 100010 100011 ]; traffic-class network-control code-points [ 010011 010100 010101 ]; traffic-class best-effort code-points [ 101001 101010 101011 ]; } exp mpls_exp { traffic-class real-time code-points [ 000 001 ]; traffic-class network-control code-points [ 010 011 ]; traffic-class best-effort code-points [ 100 101 ]; } ieee-802.1 802.1p { traffic-class real-time code-points [ 000 001 ]; traffic-class network-control code-points [ 010 011 ]; traffic-class best-effort code-points [ 100 101 ]; } ieee-802.1ad 802.1ad { traffic-class real-time code-points [ 0000 0001 1000 1001 ]; traffic-class network-control code-points [ 0010 0011 1010 1011 ]; traffic-class best-effort code-points [ 0100 0101 1100 1101 ]; } } interfaces { xe-4/0/0 { traffic-class-map { inet-precedence inetp; exp mpls_exp; ieee-802.1 802.1p vlan-tag inner; } } xe-4/0/1 { traffic-class-map { dscp dscp_v4; ieee-802.1ad 802.1ad vlan-tag inner; } } } }
확인
입력 트래픽 클래스에 대한 코드 포인트 매핑 검증
목적
트래픽 클래스 맵의 코드 지점이 해당 트래픽 클래스에 매핑되는지 확인합니다.
작업
운영 모드에서 명령을 입력합니다 show class-of-service traffic-class-map
.
user@host> show class-of-service traffic-class-map Traffic-class-map: inetp, Code-point type: inet-precedence, Index: 43854 Code point Traffic class 000 real-time 001 real-time 010 network-control 011 network-control 100 best-effort 101 best-effort Traffic-class-map: dscp_v4, Code-point type: dscp, Index: 37469 Code point Traffic class 010011 network-control 010100 network-control 010101 network-control 100001 real-time 100010 real-time 100011 real-time 101001 best-effort 101010 best-effort 101011 best-effort Traffic-class-map: mpls_exp, Code-point type: exp, Index: 39622 Code point Traffic class 000 real-time 001 real-time 010 network-control 011 network-control 100 best-effort 101 best-effort Traffic-class-map: 802.1p, Code-point type: ieee-802.1, Index: 13605 Code point Traffic class 000 real-time 001 real-time 010 network-control 011 network-control 100 best-effort 101 best-effort Traffic-class-map: 802.1ad, Code-point type: ieee-802.1ad, Index: 13677 Code point Traffic class 0000 real-time 0001 real-time 0010 network-control 0011 network-control 0100 best-effort 0101 best-effort 1000 real-time 1001 real-time 1010 network-control 1011 network-control 1100 best-effort 1101 best-effort
의미
출력 필드를 Traffic-class-map
표시하고 Code-point type
구성된 트래픽 클래스 맵과 코드 포인트 정보 유형을 각각 나타냅니다.
필드 Code point
와 Traffic class
코드 포인트와 트래픽 클래스 간의 매핑을 보여줍니다.
트래픽 클래스 맵에 대한 인터페이스 매핑 검증
목적
구성된 인터페이스가 해당 트래픽 클래스 맵에 매핑되는지 확인합니다.
작업
운영 모드에서 명령을 입력합니다 show class-of-service forwarding-table traffic-class-map mapping
.
user@host> show class-of-service forwarding-table traffic-class-map mapping Interface Index Table Index Table type xe-4/0/0 162 43854 INET-Precedence 39622 MPLS EXP 13605 IEEE-802.1 xe-4/0/1 163 37469 DSCP 13677 IEEE-802.1AD
의미
결과물은 다음을 보여줍니다.
인터페이스
xe-4/0/0
는 트래픽 클래스 맵INET-Precedence
,MPLS EXP
및IEEE-802.1
.인터페이스
xe-4/0/1
는 트래픽 클래스 맵DSCP
및IEEE-802.1AD
.
인터페이스에서 트래픽 클래스 정보 검증
목적
구성된 트래픽 클래스 맵을 기반으로 패킷 정보를 확인합니다.
작업
운영 모드에서 및 show interfaces xe-4/0/1 extensive
명령을 입력 show interfaces xe-4/0/0 extensive
합니다.
user@host> show interfaces xe-4/0/0 extensive Physical interface: xe-4/0/0, Enabled, Physical link is Up Interface index: 162, SNMP ifIndex: 541, Generation: 165 Link-level type: Ethernet, MTU: 1518, MRU: 0, LAN-PHY mode, Speed: 10Gbps, BPDU Error: None, MAC-REWRITE Error: None, Loopback: None, Source filtering: Disabled, Flow control: Enabled ... Preclassifier statistics: Traffic Class Received Packets Transmitted Packets Dropped Packets real-time 3000 3000 0 network-control 2000 2000 0 best-effort 2000 1000 1000 Interface transmit statistics: Enabled ... user@host> show interfaces xe-4/0/1 extensive Physical interface: xe-4/0/1, Enabled, Physical link is Up Interface index: 163, SNMP ifIndex: 525, Generation: 166 Link-level type: Ethernet, MTU: 1518, MRU: 0, LAN-PHY mode, Speed: 10Gbps, BPDU Error: None, MAC-REWRITE Error: None, Loopback: None, Source filtering: Disabled, Flow control: Enabled ... Preclassifier statistics: Traffic Class Received Packets Transmitted Packets Dropped Packets real-time 2000 2000 0 network-control 1000 1000 0 best-effort 1000 600 400 Interface transmit statistics: Enabled ...
의미
Preclassifier statistics
필드는 구성된 트래픽 클래스 맵 각각에 대해 수신, 전송 및 드롭된 패킷에 대한 정보를 보여줍니다.