예: IPv6용 DiffServ 구성
구성
이 예는 1분기에 신속한 포워딩과 보장된 포워딩 클래스(af1x)의 하위 집합을 2분기에 할당하고 4개의 포워딩 클래스 모두에 리소스를 배포합니다.
그림 1은 이 장의 사례 연구로 사용되는 3개의 라우터 및 링크의 토폴로지 를 보여줍니다.
이 사례 연구에서 서비스 프로바이더는 두 사이트의 고객 서버 간에 두 애플리케이션에 대해 우선 순위가 높은 패킷을 제공하기로 합의했습니다. 첫 번째 애플리케이션은 고화질 시청각(텔레비전) 패킷 플로우 스트림을 생성하고 두 번째 애플리케이션은 시간에 민감한 대량의 재무 정보를 생성합니다. 모든 경우에 패킷 플로우는 서버에서 서버로 입니다. 서비스 프로바이더는 패킷이 어느 사이트에서나 네트워크에 들어갈 때 적절하게 표시하고, 3개의 라우터에서 이 트래픽에 대해 특별한 대기열과 포워딩 클래스를 구성하며, 이러한 목적을 위해 IPv6용 DiffServ를 사용합니다.
라우터 1 및 3은 고객 대면 인터페이스에서 MF(Multifield) 분류자를 사용하여 우선 순위가 높은 패킷을 감지하고 DSCP(Differentiated Services Code Points)를 적절하게 다시 작성합니다. 베스트 에지 데이터 및 네트워크 제어 패킷은 영향을 받지 않습니다. 세 개의 라우터는 모두 일관된 스케줄러 및 리소스로 구성되어 우선 순위가 높은 패킷을 올바르게 처리합니다.
그림 2는 인터페이스 및 IPv6 주소를 갖춘 IPv6 DiffServ에 대한 전체 토폴로지 를 보여줍니다. RFC 5952에 설명된 IPv4 매핑 IPv6 주소 형식이 사용됩니다.
코어 라우터 라우터 2에서 구성을 시작합니다. 이를 통해 에지 라우터에서 DiffServ가 활성화되면 네트워크를 통해 CoS(Class of Service)가 엔드 투 엔드로 활성화됩니다. 코어에서 MF 분류가 구성되지 않아 코어 라우터 구성이 좀 더 단순합니다.
라우터 2
[edit] class-of-service { classifiers { # Router 2 classifiers. dscp-ipv6 IPv6-classifier { import default; # Uses the DSCP default map. forwarding-class be-DATA-class { loss-priority high code-points 000001; } forwarding-class ef-FIN-class { loss-priority high code-points 101111; } forwarding-class af-AV-class { loss-priority high code-points 001100; } forwarding-class nc-CONTROL-class { loss-priority high code-points 110001; } } } drop-profiles { # Router 2 drop profiles. af-AV-normal { interpolate { fill-level [95 100]; drop-probability [0 100]; } } af-AV-with-PLP { interpolate { fill-level [60 70 80 90 95]; drop-probability [80 90 95 97 100]; } } } forwarding-classes { # Router 2 forwarding classes. queue 0 be-DATA-class; queue 1 ef-FIN-class; queue 2 af-AV-class; queue 3 nc-CONTROL-class; } interfaces { # Router 2 class-of-service interfaces. so-1/0/1 { # Connected to R1. scheduler-map diffserv-cos-map; unit 0 { classifiers { dscp-ipv6 IPv6-classifier; } rewrite-rules { dscp-ipv6 rewrite-IPv6-dscp; } } } so-1/0/2 { # Connected to R3. scheduler-map diffserv-cos-map; unit 0 { classifiers { dscp-ipv6 IPv6-classifier; } rewrite-rules { dscp-ipv6 rewrite-IPv6-dscp; } } } } rewrite-rules rewrite-IPv6-dscps { # Router 2 rewrite rules. forwarding-class be-DATA-class { loss-priority low code points 000000; loss-priority high code points 000001; } forwarding-class ef-FIN-class { loss-priority low code points 101110; loss-priority high code points 101111; } forwarding-class af-AV-class { loss-priority low code points 001010; loss-priority high code points 001100; } forwarding-class nc-CONTROL-class { loss-priority low code points 110000; loss-priority high code points 110001; } } scheduler-maps { # Router 2 scheduler maps. diffserv-cos-map { forwarding-class be-DATA-class scheduler be-DATA-scheduler; forwarding-class ef-FIN-class scheduler ef-FIN-scheduler; forwarding-class af-AV-class scheduler af-AV-scheduler; forwarding-class nc-CONTROL-class scheduler nc-CONTROL-scheduler; } } schedulers { # Router 2 schedulers. be-DATA-scheduler { transmit-rate percent 40; buffer-size percent 40; priority low; } ef-FIN-scheduler { transmit-rate percent 10; buffer-size percent 10; priority high; } af-AV-scheduler { transmit-rate percent 45; buffer-size percent 45; priority high; drop-profile-map loss-priority low protocol any drop-profile af-AV-normal; drop-profile-map loss-priority high protocol any drop-profile af-AV-with-PLP; } nc-CONTROL-scheduler { transmit-rate percent 5; buffer-size percent 5; priority low; } } } interfaces { # R2 interfaces. so-1/0/1 { # Connected to R1. unit 0 { family inet { address 10.0.0.1/24; } family inet6 { address 0:0:FFFF:10.0.0.1/120; } } } so-1/0/2 { # Connected to R3. unit 0 { family inet { address 10.0.1.1/24; } family inet6 { address 0:0:FFFF:10.0.1.1/120; } } } }
에지 라우터인 Router 1과 Router 3에서 구성을 계속하십시오. 이 라우터는 방화벽 필터 기반 MF 분류자를 얻고 마커와 스케줄러에 대한 규칙을 다시 작성하며 코어 대면 인터페이스에서 프로필 삭제를 실행합니다.
라우터 1
[edit] class-of-service { classifiers { # Router 1 classifiers. dscp-ipv6 IPv6-classifier { import default; # Uses the DSCP default map. forwarding-class be-DATA-class { loss-priority high code-points 000001; } forwarding-class ef-FIN-class { loss-priority high code-points 101111; } forwarding-class af-AV-class { loss-priority high code-points 001100; } forwarding-class nc-CONTROL-class { loss-priority high code-points 110001; } } } drop-profiles { # Router 1 drop profiles. af-AV-normal { interpolate { fill-level [95 100]; drop-probability [0 100]; } } af-AV-with-PLP { interpolate { fill-level [60 70 80 90 95]; drop-probability [80 90 95 97 100]; } } } forwarding-classes { # Router 1 forwarding classes. queue 0 be-DATA-class; queue 1 ef-FIN-class; queue 2 af-AV-class; queue 3 nc-CONTROL-class; } interfaces { # Router 1 class-of-service interfaces. so-0/1/1 { # To servers. scheduler-map diffserv-cos-map; unit 0 { classifiers { dscp-ipv6 IPv6-classifier; } rewrite-rules { dscp-ipv6 rewrite-IPv6-dscp; } } } rewrite-rules rewrite-IPv6-dscps { # Router 1 rewrite rules. forwarding-class be-DATA-class { loss-priority low code points 000000; loss-priority high code points 000001; } forwarding-class ef-FIN-class { loss-priority low code points 101110; loss-priority high code points 101111; } forwarding-class af-AV-class { loss-priority low code points 001010; loss-priority high code points 001100; } forwarding-class nc-CONTROL-class { loss-priority low code points 110000; loss-priority high code points 110001; } } scheduler-maps { # Router 1 scheduler map. diffserv-cos-map { forwarding-class be-DATA-class scheduler be-DATA-scheduler; forwarding-class ef-FIN-class scheduler ef-FIN-scheduler; forwarding-class af-AV-class scheduler af-AV-scheduler; forwarding-class nc-CONTROL-class scheduler nc-CONTROL-scheduler; } } schedulers { # Router 1 schedulers. be-DATA-scheduler { transmit-rate percent 40; buffer-size percent 40; priority low; } ef-FIN-scheduler { transmit-rate percent 10; buffer-size percent 10; priority high; } af-AV-scheduler { transmit-rate percent 45; buffer-size percent 45; priority high; drop-profile-map loss-priority low protocol any drop-profile af-AV-normal; drop-profile-map loss-priority high protocol any drop-profile af-AV-with-PLP; } nc-CONTROL-scheduler { transmit-rate percent 5; buffer-size percent 5; priority low; } } } firewall { # Router 1 firewall policer and filter. policer ef-FIN-Policer-Profile { if-exceeding { bandwidth-percent 10; burst-size-limit 2k; } then loss-priority high; } family inet6 { filter mf-classifier { filter-specific; term AV { from { destination-address { 0:0:FFFF:172.16.79.11; } } then { loss-priority low; forwarding-class af-AV-class; } } term Finance { from { destination-address { O:0:FFFF:172.16.79.63; } } then { policer ef-FIN-Policer-Profile; forwarding-class ef-FIN-class; } } term Network-Control { from { traffic-class 192; # 192 is the 110000 traffic class. } then { forwarding-class nc-CONTROL-class; # This is network control traffic. } } term Data { then forwarding-class be-DATA-class; # The rest is data. } } } } interfaces { # Router 1 interfaces. so-0/0/1 { # To servers. unit 0 { family inet { address 192.168.54.1/24; } family inet6 { filter { input mf-classifier; } address 0:0:FFFF:192.168.54.1/120; } } } so-0/1/1 { # Connected to R2. unit 0 { family inet { address 10.0.0.2/24; } family inet6 { address 0:0:FFFF:10.0.0.2/120; } } } } }
라우터 3
[edit] class-of-service { classifiers { # Router 3 classifiers. dscp-ipv6 IPv6-classifier { import default; # Uses the DSCP default map. forwarding-class be-DATA-class { loss-priority high code-points 000001; } forwarding-class ef-FIN-class { loss-priority high code-points 101111; } forwarding-class af-AV-class { loss-priority high code-points 001100; } forwarding-class nc-CONTROL-class { loss-priority high code-points 110001; } } } drop-profiles { # Router 3 drop profiles. af-AV-normal { interpolate { fill-level [95 100]; drop-probability [0 100]; } } af-AV-with-PLP { interpolate { fill-level [60 70 80 90 95]; drop-probability [80 90 95 97 100]; } } } forwarding-classes { # Router 3 forwarding classes. queue 0 be-DATA-class; queue 1 ef-FIN-class; queue 2 af-AV-class; queue 3 nc-CONTROL-class; } interfaces { # Router 3 class-of-service interfaces. so-2/0/1 { # To servers. scheduler-map diffserv-cos-map; unit 0 { classifiers { dscp-ipv6 IPv6-classifier; } rewrite-rules { dscp-ipv6 rewrite-IPv6-dscp; } } } rewrite-rules rewrite-IPv6-dscps { # Router 3 rewrite rules. forwarding-class be-DATA-class { loss-priority low code points 000000; loss-priority high code points 000001; } forwarding-class ef-FIN-class { loss-priority low code points 101110; loss-priority high code points 101111; } forwarding-class af-AV-class { loss-priority low code points 001010; loss-priority high code points 001100; } forwarding-class nc-CONTROL-class { loss-priority low code points 110000; loss-priority high code points 110001; } } scheduler-maps { # Router 3 scheduler map. diffserv-cos-map { forwarding-class be-DATA-class scheduler be-DATA-scheduler; forwarding-class ef-FIN-class scheduler ef-FIN-scheduler; forwarding-class af-AV-class scheduler af-AV-scheduler; forwarding-class nc-CONTROL-class scheduler nc-CONTROL-scheduler; } } schedulers { # Router 3 schedulers. be-DATA-scheduler { transmit-rate percent 40; buffer-size percent 40; priority low; } ef-FIN-scheduler { transmit-rate percent 10; buffer-size percent 10; priority high; } af-AV-scheduler { transmit-rate percent 45; buffer-size percent 45; priority high; drop-profile-map loss-priority low protocol any drop-profile af-AV-normal; drop-profile-map loss-priority high protocol any drop-profile af-AV-with-PLP; } nc-CONTROL-scheduler { transmit-rate percent 5; buffer-size percent 5; priority low; } } firewall { # Router 3 firewall policer and filter. policer ef-FIN-Policer-Profile { if-exceeding { bandwidth-percent 10; burst-size-limit 2k; } then loss-priority high; } family inet6 { filter mf-classifier { filter-specific; term AV { from { destination-address { 0:0:FFFF:172.16.79.11; } } then { loss-priority low; forwarding-class af-AV-class; } } term Finance { from { destination-address { O:0:FFFF:172.16.79.63; } } then { policer ef-FIN-Policer-Profile; forwarding-class ef-FIN-class; } } term Network-Control { from { traffic-class 192; # 192 is the 110000 traffic class. } then { forwarding-class nc-CONTROL-class; # This is network control traffic. } } term Data { then forwarding-class be-DATA-class; # The rest is data. } } } } interfaces { # Router 3 interfaces. so-2/0/0 { # To servers. unit 0 { family inet { address 1172.16.79.1/24; } family inet6 { filter { input mf-classifier; } address 0:0:FFFF:172.16.79.1/120; } } } so-2/0/1 { # to R2 unit 0 { family inet { address 10.0.1.2/24; } family inet6 { address 0:0:FFFF:10.0.1.2/120; } } } } } }
확인
IPv6 DiffServ 구성을 사용하는 CoS가 올바른지 확인하려면 다음 명령을 사용합니다.
show class-of-service classifier type dscp-ipv6
show class-of-service rewrite-rule type dscp-ipv6
show class-of-service interface
show class-of-service forwarding-table classifier mapping
show class-of-service forwarding-table rewrite-rule mapping
show class-of-service scheduler-map
scheduler-map-nameshow class-of-service forwarding-table scheduler-map
다음 섹션은 구성 예와 함께 사용되는 이러한 명령의 출력을 보여줍니다.
DiffServ 분류자
user@R1> show class-of-service classifier type dscp-ipv6 Classifier: dscp-ipv6-default, Code point type: dscp-ipv6, Index: 4 Code point Forwarding class Loss priority 000000 be-DATA-class low 000001 be-DATA-class low 000010 be-DATA-class low 000011 be-DATA-class low 000100 be-DATA-class low 000101 be-DATA-class low 000110 be-DATA-class low 000111 be-DATA-class low 001000 be-DATA-class low 001001 be-DATA-class low 001010 af-AV-class low 001011 be-DATA-class low 001100 af-AV-class high 001101 be-DATA-class low 001110 af-AV-class high 001111 be-DATA-class low 010000 be-DATA-class low 010001 be-DATA-class low 010010 be-DATA-class low 010011 be-DATA-class low 010100 be-DATA-class low 010101 be-DATA-class low 010110 be-DATA-class low 010111 be-DATA-class low 011000 be-DATA-class low 011001 be-DATA-class low 011010 be-DATA-class low 011011 be-DATA-class low 011100 be-DATA-class low 011101 be-DATA-class low 011110 be-DATA-class low 011111 be-DATA-class low 100000 be-DATA-class low 100001 be-DATA-class low 100010 be-DATA-class low 100011 be-DATA-class low 100100 be-DATA-class low 100101 be-DATA-class low 100110 be-DATA-class low 100111 be-DATA-class low 101000 be-DATA-class low 101001 be-DATA-class low 101010 be-DATA-class low 101011 be-DATA-class low 101100 be-DATA-class low 101101 be-DATA-class low 101110 ef-FIN-class low 101111 be-DATA-class low 110000 nc-CONTROL-class low 110001 be-DATA-class low 110010 be-DATA-class low 110011 be-DATA-class low 110100 be-DATA-class low 110101 be-DATA-class low 110110 be-DATA-class low 110111 be-DATA-class low 111000 nc-CONTROL-class low 111001 be-DATA-class low 111010 be-DATA-class low 111011 be-DATA-class low 111100 be-DATA-class low 111101 be-DATA-class low 111110 be-DATA-class low 111111 be-DATA-class low Classifier: IPv6-classifier, Code point type: dscp-ipv6, Index: 18301 Code point Forwarding class Loss priority 000000 be-DATA-class low 000001 be-DATA-class high 000010 be-DATA-class low 000011 be-DATA-class low 000100 be-DATA-class low 000101 be-DATA-class low 000110 be-DATA-class low 000111 be-DATA-class low 001000 be-DATA-class low 001001 be-DATA-class low 001010 af-AV-class low 001011 be-DATA-class low 001100 af-AV-class high 001101 be-DATA-class low 001110 af-AV-class high 001111 be-DATA-class low 010000 be-DATA-class low 010001 be-DATA-class low 010010 be-DATA-class low 010011 be-DATA-class low 010100 be-DATA-class low 010101 be-DATA-class low 010110 be-DATA-class low 010111 be-DATA-class low 011000 be-DATA-class low 011001 be-DATA-class low 011010 be-DATA-class low 011011 be-DATA-class low 011100 be-DATA-class low 011101 be-DATA-class low 011110 be-DATA-class low 011111 be-DATA-class low 100000 be-DATA-class low 100001 be-DATA-class low 100010 be-DATA-class low 100011 be-DATA-class low 100100 be-DATA-class low 100101 be-DATA-class low 100110 be-DATA-class low 100111 be-DATA-class low 101000 be-DATA-class low 101001 be-DATA-class low 101010 be-DATA-class low 101011 be-DATA-class low 101100 be-DATA-class low 101101 be-DATA-class low 101110 ef-FIN-class low 101111 ef-FIN-class high 110000 nc-CONTROL-class low 110001 nc-CONTROL-class high 110010 be-DATA-class low 110011 be-DATA-class low 110100 be-DATA-class low 110101 be-DATA-class low 110110 be-DATA-class low 110111 be-DATA-class low 111000 nc-CONTROL-class low 111001 be-DATA-class low 111010 be-DATA-class low 111011 be-DATA-class low 111100 be-DATA-class low 111101 be-DATA-class low 111110 be-DATA-class low 111111 be-DATA-class low
규칙 재작성
user@R1> show class-of-service rewrite-rule type dscp-ipv6 Rewrite rule: dscp-ipv6-default, Code point type: dscp-ipv6, Index: 20 Forwarding class Loss priority Code point be-DATA-class low 000000 be-DATA-class high 000000 ef-FIN-class low 101110 ef-FIN-class high 101110 af-AV-class low 001010 af-AV-class high 001100 nc-CONTROL-class low 110000 nc-CONTROL-class high 111000 Rewrite rule: rewrite-IPv6-dscp, Code point type: dscp-ipv6, Index: 58077 Forwarding class Loss priority Code point be-DATA-class low 000000 be-DATA-class high 000001 ef-FIN-class low 101110 ef-FIN-class high 101111 af-AV-class low 001010 af-AV-class high 001100 nc-CONTROL-class low 110000 nc-CONTROL-class high 110001
서비스 등급 인터페이스
user@R1> show class-of-service interface ... Physical interface: so-0/0/1, Index: 141 Queues supported: 4, Queues in use: 4 Scheduler map: diffserv-cos-map, Index: -543019056 Logical interface: so-0/0/1.0, Index: 68 Object Name Type Index Rewrite rewrite-IPv6-dscp dscp-ipv6 58077 Rewrite exp-default exp 21 Classifier IPv6-classifier dscp-ipv6 18301 Classifier exp-default exp 5 ... Physical interface: so-0/1/1, Index: 144 Queues supported: 4, Queues in use: 4 Scheduler map: <default>, Index: -113795564 Logical interface: so-0/1/1.0, Index: 69 Object Name Type Index Rewrite exp-default exp 21 Classifier exp-default exp 5 Classifier ipprec-compatibility ip 8
분류자 매핑
user@R1> show class-of-service forwarding-table classifier mapping Table Index/ Interface Index Q num Table type so-0/0/1.0 68 18301 IPv6 DSCP so-0/1/1.0 69 8 IPv4 precedence
규칙 매핑 재작성
user@R1> show class-of-service forwarding-table rewrite-rule mapping Interface Index Table index Type so-0/1/1.0 68 58077 IPv6 DSCP
스케줄러 맵
user@R1> show class-of-service scheduler-map diffserv-cos-map Scheduler map: diffserv-cos-map, Index: 1094596010 Scheduler: be-DATA-scheduler, Forwarding class: be-DATA-class, Index: 14343 Transmit rate: 40 percent, Rate Limit: none, Buffer size: 40 percent, Priority: low Drop profiles: Loss priority Protocol Index Name Low non-TCP 1 <default-drop-profile> Low TCP 1 <default-drop-profile> High non-TCP 1 <default-drop-profile> High TCP 1 <default-drop-profile> Scheduler: ef-FIN-scheduler, Forwarding class: ef-FIN-class, Index: 21707 Transmit rate: 10 percent, Rate Limit: none, Buffer size: 10 percent, Priority: high Drop profiles: Loss priority Protocol Index Name Low non-TCP 1 <default-drop-profile> Low TCP 1 <default-drop-profile> High non-TCP 1 <default-drop-profile> High TCP 1 <default-drop-profile> Scheduler: af-AV-scheduler, Forwarding class: af-AV-class, Index: 51704 Transmit rate: 45 percent, Rate Limit: none, Buffer size: 45 percent, Priority: high Drop profiles: Loss priority Protocol Index Name Low non-TCP 61474 af-AV-normal Low TCP 61474 af-AV-normal High non-TCP 65199 af-AV-with-PLP High TCP 65199 af-AV-with-PLP Scheduler: nc-CONTROL-scheduler, Forwarding class: nc-CONTROL-class, Index: 50404 Transmit rate: 5 percent, Rate Limit: none, Buffer size: 5 percent, Priority: low Drop profiles: Loss priority Protocol Index Name Low non-TCP 1 <default-drop-profile> Low TCP 1 <default-drop-profile> High non-TCP 1 <default-drop-profile> High TCP 1 <default-drop-profile> user@R1> show class-of-service forwarding-table scheduler-map ... Interface: so-0/0/1 (Index: 141, Map index: -543019056, Map type: FINAL, Num of queues: 4): Entry 0 (Scheduler index: 14343, Queue #: 0): Tx rate: 0 Kb (40%), Buffer size: 40 percent Priority low PLP high: 1, PLP low: 1, TCP PLP high: 1, TCP PLP low: 1 Entry 1 (Scheduler index: 21707, Queue #: 1): Tx rate: 0 Kb (10%), Buffer size: 10 percent Priority high PLP high: 1, PLP low: 1, TCP PLP high: 1, TCP PLP low: 1 Entry 2 (Scheduler index: 51704, Queue #: 2): Tx rate: 0 Kb (45%), Buffer size: 45 percent Priority high PLP high: 65199, PLP low: 61474, TCP PLP high: 65199, TCP PLP low: 61474 Entry 3 (Scheduler index: 50404, Queue #: 3): Tx rate: 0 Kb (5%), Buffer size: 5 percent Priority low PLP high: 1, PLP low: 1, TCP PLP high: 1, TCP PLP low: 1 ...