Junos OS CoS 프로세스를 통한 기본 패킷 플로우 구성
그림 1 과 그림 2 는 Junos OS CoS 기능의 구성 요소를 보여주며, 이들이 상호 작용하는 시퀀스를 보여줍니다.
![CoS Classifier, Queues, and Scheduler](/documentation/us/en/software/junos/cos/images/g016701.gif)
![Packet Flow Through CoS- Configurable Components](/documentation/us/en/software/junos/cos/images/g017213.gif)
다음 구성은 CoS 프로세스를 통한 패킷 플로우를 보여줍니다.
분류자 정의
패킷 헤더에서 CoS 값을 신뢰하는 경우 동작 집계 분류를 사용하여 해당 값을 포워딩 클래스에 매핑하고 우선순위를 삭제할 수 있습니다. 예를 들어:
[edit class-of-service] classifiers { exp exp_classifier { forwarding-class data-queue { loss-priority high code-points 001; loss-priority low code-points 000; } forwarding-class nc-queue { loss-priority high code-points 111; loss-priority low code-points 110; } forwarding-class video-queue { loss-priority high code-points 011; loss-priority low code-points 010; } forwarding-class voice-queue { loss-priority high code-points 101; loss-priority low code-points 100; } }
패킷 헤더에서 CoS 값을 신뢰하지 않는 경우 보다 복잡한 멀티필드 분류를 사용하여 수신 트래픽을 포워딩 클래스로 매핑하고 우선순위를 삭제할 수 있습니다. 예를 들어:
[edit firewall] family inet { filter classify { term sip { from { protocol [ udp tcp ]; port 5060; } then { forwarding-class nc-queue; loss-priority low; accept; } } } }
더 보기
인터페이스의 수신 패킷에 분류자 적용
계층 수준에서 논리 인터페이스 [edit class-of-service interfaces]
에 동작 집계 분류자를 적용합니다. 예를 들어:
[edit class-of-service] interfaces { so-* { unit 0 { classifiers { exp exp_classifier; } } } t3-* { unit 0 { classifiers { exp exp_classifier; } } } }
계층 수준에서 논리 인터페이스 [edit interfaces]
에 입력 필터로 멀티필드 분류자를 적용합니다. 예를 들어:
[edit interfaces] fe-0/0/2 { unit 0 { family inet { filter { input classify; } address 10.12.0.13/30; } } }
트래픽을 제한하고 혼잡을 제어하는 폴리서 정의
트래픽 플로우를 속도 제한해야 하는 경우 과도한 트래픽(하드 폴리싱)을 폐기하거나 초과 트래픽을 다른 포워딩 클래스 및/또는 손실 우선순위(소프트 폴리싱)로 재할당하여 폴리시에를 정의하고 폴리서를 해당 트래픽 플로우에 대한 방화벽 필터에 적용합니다. 예를 들어:
[edit firewall] policer be-lp { if-exceeding { bandwidth-limit 10m; burst-size-limit 62500; } then loss-priority high; } family inet { filter be-lp { term t1 { from { protocol tcp; port 80; } then policer be-lp; then loss-priority low; then accept; } } }
더 보기
드롭 프로파일 정의
드롭 프로파일을 사용하여 지연 버퍼 점유 범위에서 드롭 확률을 정의하여 RED(Random Early Detection) 프로세스를 지원합니다.
[edit class-of-service] drop-profiles { be-red { fill-level 20 drop-probability 25; fill-level 30 drop-probability 50; fill-level 40 drop-probability 75; fill-level 50 drop-probability 100; } }
더 보기
각 포워딩 클래스를 대기열에 할당
각 포워딩 클래스에 차별화된 서비스를 제공하려면 각 포워딩 클래스를 자체 출력 대기열에 할당합니다. 예를 들어:
[edit class-of-service] forwarding-classes { queue 0 data-queue; queue 1 video-queue; queue 2 voice-queue; queue 3 nc-queue; }
더 보기
스케줄러 정의
각 포워딩 클래스에 대한 스케줄러 특성을 정의합니다. 예를 들어:
[edit class-of-service] schedulers { # data-scheduler { buffer-size percent 50; drop-profile-map loss-priority high protocol any drop-profile be-red; priority low; transmit-rate percent 50; } nc-scheduler { buffer-size percent 5; priority high; transmit-rate percent 5; } video-scheduler { buffer-size percent 25; priority strict-high; transmit-rate percent 25; } voice-scheduler { buffer-size percent 20; priority high; transmit-rate percent 20; } }
더 보기
스케줄러 맵 정의
스케줄러 맵을 사용하여 스케줄러를 포워딩 클래스로 매핑합니다. 예를 들어:
[edit class-of-service] scheduler-maps { sched1 { forwarding-class data-queue scheduler data-scheduler; forwarding-class nc-queue scheduler nc-scheduler; forwarding-class video-queue scheduler video-scheduler; forwarding-class voice-queue scheduler voice-scheduler; } }
더 보기
CoS 헤더 재작성 규칙 정의
규칙을 다시 작성하여 나가는 패킷의 CoS 비트 패턴을 재정의합니다. 예를 들어:
[edit class-of-service] rewrite-rules { inet-precedence inet-rewrite { forwarding-class data-queue { loss-priority high code-point 001; loss-priority low code-point 000; } forwarding-class nc-queue { loss-priority high code-point 111; loss-priority low code-point 110; } forwarding-class video-queue { loss-priority high code-point 101; loss-priority low code-point 100; } forwarding-class voice-queue { loss-priority high code-point 011; loss-priority low code-point 010; } } }
더 보기
송신 인터페이스에 스케줄러 맵 및 규칙 재작성 적용
[edit class-of-service] interfaces { ge-* { scheduler-map sched1; unit * { rewrite-rules { inet-precedence inet-rewrite; } } } }