Está en la página 1de 47

QoS Practice Labs

RSVP Resource Reservation Protocol


1. Kin thc c bn RSVP l giao thc ca Internet Engineering Task Force (IETF). c dng trong m hnh Integrated Services (IntServ). RSVP thit lp phin bo hiu cho cc thit b trn ng truyn ginh ti nguyn cho nhng lung ng dng cn c m bo cht lng dch v theo1 chiu t ngun n ch. L giao thc soft state, t ng cp nht tnh trng v thay i ng truyn khi c li xy ra. c h tr trn router, phn mm gi in thoi (Cisco phones, Microsoft NetMeeting) v ng dng trong k thut iu phi lu lng MPLS Traffic Engineering. 2. Mc ch - M phng qu trnh thit lp phin ginh bng thng ca giao thc RSVP. - Xem v hiu cch hot ng ca phin thit lp. - S dng phn mm Wireshark phn tch cc loi gi tin RSVP. 3. Thit b v phn mm h tr - Ci phn mm Wireshark phn ch gi tin. - Ci card Loopback trn PC tng ng PC1. - Ci phn mm GNS3 ( s dng bt k thit b router). 4. Lnh cu hnh a. Lnh cu hnh RSVP Cho php RSVP trn giao din ca router Router(config)# interface serial/fastethenet [interface-number] Router(config-if) # ip rsvp bandwidth [interface-kbps] [single-flow-kbps] lp phin RSVP) Router(config) # ip rsvp sender session-ip-address sender-ip-address [ tcp | udp | ipprotocol ] session- dport sender-sport previous-hop-ip-address previous-hop-interface [bandwidth] [burst-size]. Cu hnh router l RSVP Reservation ( thay mt PC2 cho php hay khng cho php phin ginh bng thng t R1) -1Rita2610 Cu hnh router l RSVP Sender ( thay mt PC1 thit

QoS Practice Labs Router(config) # ip rsvp reservation session-ip-address sender-ip-address [tcp | udp | ip-protocol] session-dport sender-sport next-hop-ip-address next-hop-interface ff rate [bandwidth] [burst-size]. b. Kim tra cu hnh RSVP show ip rsvp interface [interface- number] show ip rsvp installed [interface- number] show ip rsvp neighbor [interface- number] show ip rsvp sender [interface- number] show ip rsvp request [interface- number] show ip rsvp reservation [interface- number] 5. M hnh mng Hin th cc thng tin bng thng RSVP trn giao din Hin th thng tin RSVP cu hnh Hin th RSVP neighbors Hin th thng tin RSVP sender Hin thi thng tin RSVP request Hin th thng tin RSVP reservation

RSVP Sender W o rk
.1 172.32.0.0/16 .2
W o rk p la c e W o rk p la c e
p la c e

W o rk p la c e

RSVP Reservationkr W o rk W o
p la c e
Work place

p la c e

Fa0/0

R 1

R1 R 2

S1/0
R 3

.1
Work place

RSVP Router
R3

S1/0 place
Work

Work

.1

.2
plaWce o r k p la c e

R 1

R3 R 2

R 3

Fa0/0 192.168.1.0/24

50.0.0.0/8 R2 S1/0
R1

W o rk p la c e

S1/1

R3 70.0.0.0/8 R2 R1

.2
R 1

R2 R 2

.1
R 3

.2
W o rk p la c e W o rk p la c e

R 1

R 2

R 3

R 1

PC1 Loopback 6. Nhim v thc hnh - Gn a ch cc thit b trong m hnh trn. - Cu hnh giao thc nh tuyn tnh trn router. - Cho php RSVP trn tt c cc cng ca 3 router. Router(config-if) # ip rsvp bandwidth - Cu hnh R1 l RSVP-Sender thay th PC1 gi thng ip Path. Sender(config) # ip rsvp sender 192.168.1.2 172.32.0.2 tcp 0 0 172.32.0.2 Fa0/0 10 5 - Cu hnh R3 l RSVP-Reservation thay th PC2 gi thng ip Resv.

PC2

R 2

R 3

Reservation(config) # ip rsvp reservation 192.168.1.2 172.32.0.2 tcp 0 0 192.168.1.2 Fa0/0 ff rate 10 5 - Kim tra cu hnh -2Rita2610

QoS Practice Labs + Thng tin RSVP trn giao din router.

Active reservation for traffic flowing in one direction : 10Kbps of bandwidth.

+ Xem thng tin lu lng u tin ti R1 : TCP (172.32.0.2 - 192.168.1.2). Gi tr trng s ca RSVP ti giao din s dng Weight Fair Queueing l 6.

-3Rita2610

QoS Practice Labs

+ Hin th thng tin ca router RSVP-Sender, RSVP-Reservation.

+ Xem thng tin v chiu thit lp t RSVP-Sender n RSVP-Reservation.

+ Xem thng tin trn router lng ging. -4Rita2610

QoS Practice Labs

+ Thng k s lng gi tin RSVP c gi cho n thi im ny.

7. S dng phn mm WireShark phn tch cc thng ip RSVP

-5Rita2610

QoS Practice Labs

nh dng gi tin RSVP


RSVP Message Header Fields
4 4 8 16 16 8 8 32 15 1 16

bits

Version

Flags Type

Checksum

Length

Reserved

Send TTL

Message ID

Reserved

MF

Fragment offset

cur flags = 0

a label for all fragments of one message

the byte offset of the fragment in the message

MF flag is set on for all fragments of a message except the last fragment. Value
1 2 3 4 5 6 7

Message Type Path Reservation-request Path-error Reservation-request error Path-teardown Reservation-teardown Reservation-request acknowledgment

Descriptions Store the path state in each node and route reservation-request messages in the reverse direction Request for guarantee QoS for the session. Using Path state or Reservation state to specify Errors (Admission failure, Bandwidth unavailable, Service not supported, Bad flow specification, Ambiguous path). Remove the reservation. Path-teardown messages delete the path state. Reservation-request teardown messages delete the reservation state Appears when reservation-confirmation object in a reservation-request message. -6rita2610@yahoo.com

QoS Practice Labs RSVP Object Fields


16 8 8 Variable<=65528 bytes bits

Length Class-num C-Type


Object class (name) Object type

Object contents

Objects Null Session RSVP Hop Time Value Style Flow Specification Filter Specification Sender Template Sender TSPEC Adspec Error Specification Policy Data Scope Reservation Confirmation

Types of messages anywhere in a obj. sequence objects all RSVP messages all RSVP messages Path Reservation Reservation-request Reservation-request Reservation-request Path Path Path Path-error Reservation-request error Path Reservation-request Reservation-request Reservation-request Reservation-request ack

Contents Class-Num : 0, C-Type : ignored. The receiver will ignored this object contents Specify a session, contain IP destination address and possibly a destination port. IP address of the RSVP-capable node. The refresh period and the state TTL The reservation style and style-specific information. Specify flow that define desired QoS. Specify the sessions that should receive the desired QoS. Identify a sender, contain sender IP address and perhaps some additional demultiplexing information. The traffic characteristics of a senders data stream. Advertising data. Specify an error. Information about local policy to decide permit an associated reservation. Specify the scope for forwarding a reservation-request message IP address of a receiver that requested a confirmation -7Rita2610

QoS Practice Labs

RSVP Header

Path message

Object Fields

-8Rita2610

QoS Practice Labs

RESV message

-9rita2610@yahoo.com

QoS Practice Labs

Path tear message

- 10 rita2610@yahoo.com

QoS Practice Labs

RESV tear message

- 11 rita2610@yahoo.com

QoS Practice Labs

First In First Out Queuing Weight Fair Queuing


1. Kin thc c bn c im FIFO Queuing : L hng i c bn v c h tr trn tt c cc thit b cng nh trong tt c cc phin bn h iu hnh ca router Cisco. L k thut hng i mc nh trn nhng giao din ca router c bng thng >= 2Mbps. Hot ng theo c ch vo trc phc v trc, vo sau phc v sau. Nhng gi tin ca lu lng khng c phn lp trc khi vo hng i v b nh rt khi s lng gi tin vt qu kch thc hng i. c im Weight Fair Queuing (WFQ) : L mt h thng bao gm nhiu hng i v c h tr trn tt c cc thit b cng nh trong tt c cc phin bn h iu hnh ca router Cisco. L k thut hng i mc nh trn nhng giao din ca router c bng thng <= 2Mbps. Nhng gi tin ca lu lng c phn lp t ng trc khi vo tng hng i, nhng hng i ny c th phn bit da theo lung lu lng. Mi lung lu lng c xem l 1 conversation c nhn bit thng qua cc tham s a ch ngun, a ch ch, s cng, s giao thc, gi tr TOS trong header ca gi tin. Lu lng c u tin da vo gi tr trng s. WFQ s dng 2 thng s nh rt gi tin : kch thc hng i v thng s ngng nh rt trc nghn. 2. Mc ch - S dng lnh show hin th thng tin hng i FIFO v WFQ. - Cu hnh FIFO v WFQ trn giao din ca router. - Xem v hiu cch hot ng ca FIFO v WFQ. 3. Thit b v phn mm h tr - Ci card Loopback trn PC tng ng PC1. - Ci phn mm GNS3 ( s dng bt k thit b router). 4. Lnh cu hnh a. Cu hnh FIFO + Cho php FIFO trn giao din Serial. - 12 rita2610@yahoo.com

QoS Practice Labs Router(config)#interface serial [interfacel-number] Router(config-if)# no fair-queue + iu chnh s lng ti a gi tin cha trong hng i Router(config-if)# hold-queue <buffer> in | out in | out : Input / Output queue b. Cu hnh WFQ + Cho php WFQ trn giao din Fast/E. Router(config)# interface Fast/E [interface-number] Router(config-if)# fair-queue [threshold] [max-dynamic-queue][max-reservable-queue] * threshold : ngng nh rt trc nghn, mc nh l 64 * max-dynamic-queue : s lng ti a hng i trong h thng, thng s chn la : 16, 32, 64, 128, 256, 512, 1024, mc nh l 256. * max-reservable-queue : s lng ti a hng i khai bo u tin, thng s chn la t 0 n 1000, mc nh 0. + iu chnh s lng ti a gi tin cha trong hng i Router(config-if)# hold-queue <max-limit> in | out in | out : Input / Output queue c. Kim tra cu hnh show running-config show interface interface show queueing fair interface show queue interface 5. M hnh mng Xem lai cc thng tin cu hnh. Hin th thng tin v thng k ca hng i Hin th thng s WFQ. Hin th ni dung hng i .

- 13 rita2610@yahoo.com

QoS Practice Labs


W o rk p la c e

R1
W ork pla ce

W o rk p la c e

.1

100.0.0.0/8
R 1 R 2 R 3

.2 S1/0

W o rk p la c e
W rk o pla ce

R2
R 2 R 3

W o rk p la c e

.1

.1 190.168.0.0/16 .2
W o rk p la c e W o rk p la c e

R 1

R 2

R 3

S1/0

R 1

Fa2/0

Fa2/0

172.32.0.0/1 6 .2
W o rk p la c e W o rk p la c e

Weight Fair Queue FIFO FIFO

PC1 - Loopback Note : Default Queuing : Interface FastEthernet - FIFO Queuing. Interface Serial - Weight Fair Queuing 6. Nhim v thc hnh - Gn a ch cho tt c thit b da trn m hnh - Cu hnh giao thc RIP trn tt c router. * S dng lnh Show xem thng tin hng i FIFO trn giao din Fa2/0 ca R1

R 1

R 2

R 3

R 1

R 2

R 3

PC2

- 14 rita2610@yahoo.com

QoS Practice Labs

- iu chnh kch thc FIFO, mc nh l 40.

* S dng lnh Show xem thng tin hng i WFQ trn giao din S1/0 ca R1.

- 15 rita2610@yahoo.com

QoS Practice Labs

- Xem li thng tin cu hnh bng lnh show running-config

- Xem tt c hng i WFQ trn cc giao din router.

- 16 rita2610@yahoo.com

QoS Practice Labs

- iu chnh kch thc ca h thng hng i WFQ, mc nh l 1000.

- 17 rita2610@yahoo.com

QoS Practice Labs + T PC1 dng lnh ping kim tra lu lng ping t PC1 n giao din FastEthernet ca R2. Ti R1 dng lnh show queueing interface s1/0 xem thng tin hng i ca lu lng ping, gi tr trng s l 32384.

* Cu hnh FIFO trn giao din S1/0

- 18 rita2610@yahoo.com

QoS Practice Labs

- 19 rita2610@yahoo.com

QoS Practice Labs * Cu hnh WFQ trn giao din Fa2/0

- 20 rita2610@yahoo.com

QoS Practice Labs

Priority Queuing
1. Kin thc c bn Priority Queuing (PQ) c h tr hu ht cc thit b router v cc phin bn h iu hnh router 10.0 v sau. PQ bao gm 4 hng i vi mc u tin c gim dn : Cao (High), Trung bnh (Medium), Va (Normal), Thp (Low). Nhng gi tin c phn lp vo trong 4 hng i da vo mc u tin ca ngi dng v b nh rt khi s lng gi tin vt qu kch thc hng i. Cc hng i c mc u tin thp hn hng i High, c bit l Low s ri vo tnh trng Starvation, c ngha l cc gi tin nhng hng i ny s khng c phc v v c th b nh rt vi s lng ln. 2. Mc ch - Thit lp tng loi lu lng. - Cu hnh PQ cho cc lu lng vi mc u tin. - Xem v hiu cch hot ng ca PQ. 3. Thit b v phn mm h tr - S dng cp cho ni 2 PC. - PC1 : Ci card loopback tng ng PC1. Ci phn mm GNS3 ( s dng thit b router thch hp). 4. Lnh cu hnh a. Phn loi lu lng vi 4 mc u tin Phn loi da trn cc c tnh ca gi tin Router(config) # priority-list list-number protocol protocol-name { high | medium | normal | low} queue-keyword keyword-value Fragment gt/lt <size> list <acl> tcp/udp <port> IP packets with non-zero fragment offset ( Match fragments) Based on packet size (including L2 frame)( Match packets based on their size) ACL classification (standard or extended) TCP or UDP port number (Match packets based on their source or destination TCP/UDP port number)

Phn loi da trn giao din ca router - 21 rita2610@yahoo.com

QoS Practice Labs Router(config)# priority-list list-number interface intf { high | medium | normal | low} Phn loi cc lu lng cn li vo hng i mc nh Router(config)# priority-list list-number default { high | medium | normal | low} b. iu chnh kch thc ca tng hng i Router(config)#priority-list list-number queue-limit high medium normal low Gi tr mc nh : High ( 20 ), Medium ( 40 ), Normal ( 60 ), Low ( 80 ) c. Ch nh PQ trn giao din ca router Router(config)# interface serial/fastethenet [interface-number] Router(config-if)# priority-group list d. Kim tra cu hnh show interface interface show queueing [ priority | custom | fair | random-detect] interface debug priority 5. M hnh mng Hin th thng tin trn giao din router. Hin th cc thng s hng i. Xem tnh trng hin ti ca PQ

Telnet+HTTP
W o rk p la c e
W ork pla ce

W o rk p la c e

.1

100.0.0.0/8
R 1 R 2 R 3

.2 S1/0

W o rk p la c e
W rk o pla ce

W o rk p la c e

.1 10.0.0.0/8 .2

R 1

Fa2/0

R 2 R1

R 3

S1/0

R 1

R 2 R2

R 3

.1 20.0.0.0/8 .2
W o rk p la c e W o rk p la c e

Fa2/0

W o rk p la c e

W o rk p la c e

Priority Queue
R 1 R 2 R 3

PC1 Remote Desktop FTP Server 6. Nhim v thc hnh

High (size = 2 ) : Telnet, Remote Desktop Medium (size = 4): HTTP Normal (size = 6): FTP, other traffic Low (size = 8) : PING

R 1

R 2

R 3

PC2 Loopback

- Gn a ch cho tt c thit b da trn m hnh - Cu hnh giao thc RIP trn tt c router. - Cu hnh PQ trn giao din S1/0 ca R2 vi chnh sch u tin nh trn m hnh mng. - 22 rita2610@yahoo.com

QoS Practice Labs a. Cu hnh tng lu lng vi 4 mc u tin HIGH : Telnet, Remote Desktop R1(config) # priority-list 1 protocol ip high tcp 3389 R1(config) # priority-list 1 protocol ip high tcp telnet MEDIUM : http R1(config) # priority-list 1 protocol ip medium tcp www NORMAL : ftp + other traffics R1(config) # priority-list 1 protocol ip normal tcp ftp R1(config) # priority-list 1 protocol ip normal tcp ftp-data R1(config) # priority-list 1 default normal (default) LOW : PING R1(config) # access-list 100 permit icmp any any echo R1(config) # priority-list 1 protocol ip low list 100 b. Ch nh PQ trn giao din S1/0 ca R2 R1(config) # int S1/0 R1(config-if) # priority-group 1 c. Kim tra cu hnh + Kim tra chnh sch cu hnh.

- 23 rita2610@yahoo.com

QoS Practice Labs

+ Xem tng s lng gi tin c phn lp vo tng hng i ti giao din S1/0 ca R2.

+ S dng lnh debug, xem tnh trng hin ti v cch hot ng ca PQ.

- 24 rita2610@yahoo.com

QoS Practice Labs

- 25 rita2610@yahoo.com

QoS Practice Labs

d. Gii hn s lng gi tin trong tng hng i R1(config) # priority-list 1 queue-limit 2 4 6 8

- 26 rita2610@yahoo.com

QoS Practice Labs

- 27 rita2610@yahoo.com

QoS Practice Labs

Custom Queuing
1. Kin thc c bn Custom Queuing (CQ) c h tr hu ht cc thit b router v cc phin bn h iu hnh router 10.0 v sau. PQ bao gm 17 hng i vi kch thc mc nh l 20. Hng i 0 l hng i h thng, hng i 1-16 c khai bo bi ngi dng v mc u tin da vo thng s byte. Nhng gi tin c ch nh vo trong 16 hng i da vo mc u tin ca ngi dng v b nh rt khi s lng gi tin vt qu kch thc hng i. 16 hng i c phc v theo nguyn tc xoay vng theo th t (Round-robin fashion). 2. Mc tiu - Thit lp tng loi lu lng. - Cu hnh CQ cho cc lu lng vi mc u tin. - Xem v hiu cch hot ng ca CQ. 3. Thit b v phn mm h tr - S dng cp cho ni 2 PC. - PC1 : Ci card loopback tng ng PC1. Ci phn mm GNS3 ( s dng thit b router thch hp). 4. Lnh cu hnh a. Phn loi lu lng vi ti a 16 hng i Phn loi da trn cc c tnh ca gi tin Router(config)# queue-list list-number protocol protocol-name queue-number queuekeyword keyword-value Phn loi da trn giao din ca router Router(config)# queue-list list-number interface incoming-intf queue-number Phn loi cc lu lng cn li vo hng i mc nh Router(config)# queue-list list-number default queue-number Note : All traffic that is not specifically classified is put into Queue 1. b. iu chnh kch thc ca tng hng i Router(config)# queue-list list queue queue-number byte-count byte-count byte-count : s lng byte tng hng i s c phc v xoay vng, mc nh 1500 bytes. - 28 rita2610@yahoo.com

QoS Practice Labs Router(config)# queue-list list queue queue-number limit limit limit : s lng ti a gi tin cha trong tng hng i, mc nh 20 gi. c. Ch nh PQ trn giao din ca router Router(config)# interface serial/fastethenet [interface-number] Router(config-if)# custom-queue list-number d. Kim tra cu hnh show interface interface show queueing [ priority | custom | fair | random-detect] interface debug custom-queue 5. M hnh mng Hin th thng tin trn giao din router. Hin th cc thng s hng i. Xem tnh trng hin ti ca CQ

HTTP
.1 10.0.0.0/8
W o rk p la c e W o rk p la c e
W o rk p la c e
W ork p lace

W o rk p la c e

.1

100.0.0.0/8
R 1 R 2 R 3

.2 S1/0

W o rk p la c e
W rk o p ce la

W o rk p la c e

.1

R 1

Fa2/0

R 2 R1

R 3

S1/0

R 1

R R2 2

R 3

Fa2/0

20.0.0.0/8 .2
W o rk p la c e W o rk p la c e

.2

R 1

R 2

R 3

PC1 Remote Desktop

Custom Queuing Queue 1 (size = 10 ) : Remote Desktop (10000 bytes) Queue 2 (size = 25) : HTTP (5000 bytes) Queue 3 (size = 4) : Ping (500 bytes) Queue 16 (size = 20 ) : default (1500 bytes)

R 1

R 2

R 3

PC2 Loopback

- 29 rita2610@yahoo.com

QoS Practice Labs

6. Nhim v thc hnh - Gn a ch cho tt c thit b da trn m hnh - Cu hnh giao thc RIP trn tt c router. - Cu hnh PQ trn giao din S1/0 ca R2 vi chnh sch u tin nh trn m hnh mng. a. Cu hnh khai bo hng i, phn lp tng lu lng tng ng vi hng i : Queue 1 : Remote Desktop (10000 bytes per cycle) R1(config) # queue-list 1 protocol ip 1 tcp 3389 R1(config) # queue-list 1 queue 1 byte-count 10000 Queue 2 : HTTP (5000 bytes per cycle) R1(config) # queue-list 1 protocol ip 2 tcp www R1(config) # queue-list 1 queue 2 byte-count 5000 Queue 3 : PING (1000 bytes per cycle) R1(config) # access-list 100 permit icmp any any echo R1(config) # queue-list 1 protocol ip 3 list 100 R1(config) # queue-list 1 queue 3 byte-count 500 Queue 16 : lu lng cn li (1500 bytes per cycle) R1(config)# queue-list 1 default 16 b. Ch nh PQ trn giao din S1/0 ca R2 R1(config) # int S1/0 R1(config-if) # Custom-queue-list 1 c. Kim tra cu hnh + Kim tra thng tin cu hnh

- 30 rita2610@yahoo.com

QoS Practice Labs

+ Xem tnh trng hin ti v hot ng ca hng i, s lng gi tin c sp xp vo hng i

- 31 rita2610@yahoo.com

QoS Practice Labs

d. Gii hn s lng gi tin trong hng i tng ng vi loi lu lng R1(config) # queue-list 1 queue 1 limit 10 R1(config) # queue-list 1 queue 2 limit 25 R1(config) # queue-list 1 queue 3 limit 4

- 32 rita2610@yahoo.com

QoS Practice Labs

- 33 rita2610@yahoo.com

QoS Practice Labs

Modular QoS CLI (MQC)


Classification Class-based Marking Class-based Low-latency Queuing
1. Kin thc c bn K thut Modular QoS CLI ( Modular Quality of Service Command Line Interface ) chia thnh 2 bc : * Phn lp ( Classification ) : To lp tng ng tng lu lng. * Chnh sch lu lng ( Traffic Policy ) : p dng mt hoc nhng k thut QoS bao gm : Class-based Weighted Fair Queuing, Class-based Low-latency Queuing, Class-based Policing,... Phin bn h iu hnh h tr + Class-based Marking : chnh sch nh du cc gi tin da vo gi tr trng header ca lp 2,3,4. Cc gi tr bao gm : IP precedence, DSCP, QoS group, MPLS experimental bits, ATM CLP bit, Frame Relay DE bit, 802.1Q/ISL cos/priority. K thut c ch nh trn giao din vo hoc ra ca gi tin. + Class-based Low-latency Queuing : lu lng c phn lp vo hng i. Hng i u tin da vo vic m bo bng thng c khai bo. C hai ch u tin tng ng 2 kiu hng i : u tin bng thng v c phc v trc ( priority queue ) v m bo bng thng (WFQ). 2. Mc ch - Thit lp tng loi lu lng. - Cu hnh, xem, hiu hot ng ca Class-based Marking v Class-based Low-latency Queuing. 3. Thit b v phn mm h tr - S dng cp cho ni 2 PC. - PC1 : Ci card loopback tng ng PC1. Ci phn mm GNS3 ( s dng loi router thch hp). 4. Lnh cu hnh a. Cu hnh phn lp s dng lnh class-map LLQ(config)#class-map [class-name] LLQ(config-cmap)#match < Classification Options > - 34 rita2610@yahoo.com

QoS Practice Labs Classification Options Access lists IP precedence DSCP Input interface QoS group Source / Destination MAC address IEEE 802.1Q/ISL CoS MPLS experimental bits Frame Relay DE bit Commands Router (config-cmap)#match access-group [ACL-ID] Router(config-cmap)# match ip precedence precedence [prec [prec [prec]]] (4 IP Precedence values) Router(config-cmap)#match ip dscp dscp [dscp ...] (8 DSCP values) Router(config-cmap)# match input-interface intf Router(config-cmap)# match ip qos-group qos-group Router(config-cmap)# match source-address mac mac-address Router(config-cmap)# match destination-address mac mac-address Router(config-cmap)# match cos cos [cos [cos [cos ]]] (4 CoS/Priority values) Router(config-cmap)# match mpls experimental exp [exp ...] (8 MPLS experimental values) Router(config-cmap)# match fr-de (match all frames with the FR DE bit set )

RTP port - a UDP Port Router(config-cmap)# match ip rtp starting-port port-range Range Router(config-cmap)# match not condition Another class map, ( The not keyword inverts the condition ) negation or any keyword router(config-cmap)# match class-map class-map router(config-cmap)# match any ( match all packets ) b. Cu hnh chnh sch lu lng s dng lnh policy-map Router(config)#policy-map [policy-name] Router(config-pmap)#class [class-name] Router(config-pmap-c)# < PHB mechanism >

PHB Mechanisms Class-based Weighted Fair Queuing Class-based Low-latency Queuing Class-based Policing Class-based Shaping Class-based Marking Class-based Marking

QoS functions guarantee bandwidth within the CB-WFQ system guarantee bandwidth and provide low latency to timecritical traffic performs rate limiting by traffic policing performs rate limiting by traffic shaping performs packet and frame marking

Marking(config)#policy-map [policy-name] - 35 rita2610@yahoo.com

QoS Practice Labs Marking(config-pmap)#class [class-name] Marking(config-pmap-c)#set dscp [dscp] Class-based Low-latency Queuing LLQ(config)#policy-map [policy-name] LLQ(config-pmap)#class [class-name] LLQ(config-pmap-c)#priority percent [%] LLQ(config-pmap-c)#priority [kbits/s] LLQ(config-pmap)#class [class-name] LLQ(config-pmap-c)#bandwidth percent [%] LLQ(config-pmap-c)#bandwidth [kbits/s] c. Ch nh chnh sch trn giao din ca router Router(config)#interface serial/fastethenet [interface-number] Router(config-if)#service-policy {input | output} [policy-map-name] d. Kim tra cu hnh show interface interface show queueing show queueing fair show queue interface

- 36 rita2610@yahoo.com

QoS Practice Labs 5. M hnh mng

20.0.0..0/8
W o rk p la c e W o rk p la c e

Netflow -PC2 W o rk W o rk
.1
Fa2/0
R 1 p la c e p la c e

.2

LLQ R2 Telnet : 35% (Priority)


Work place

R1 R 2

R 3

PC1 Loopback

R 1

R 2

R 3

S1/0

.1

Classification

Marking

Work

100.0.0.0/8
place R2 R3

HTTP : 50 kbits/s Netflow : 15 kbits/s RIP : 10 kbits/s Ping : 8 kb/s Default : fair-queue

Telnet HTTP RIP Netflow Ping AF21 AF31 CS6 CS2 CS1R1

S1/0p l a c e
R 1

W o rk

.2 R2 R 2

W o rk p la c e

Classification
Work LLQ place

R 3

S1/1
Work

.1

200.0.0.0/24
place R2 R1 R3

S1/0

W o rk p la c e

.2 R3 R 2

W o rk p la c e

10.0.0.0/8
W o rk p la c e

.1

.2

W o rk p la c e

R 1

R 3

Fa2/0
R 1 R 2 R 3

Telnet+HTTP 6. Nhim v thc hnh - Gn a ch cho tt c thit b da trn m hnh - Cu hnh giao thc RIP trn tt c router. - Cu hnh p dng Class-based Marking v Class-based Low-latency Queuing R1 : Cu hnh chnh sch lu lng Class-based Marking vi tn Marking-IN-1 Phn lp : s dng Access Control List + To danh sch Access Control Lists cho tng loi lu lng. R1(config)# access-list 100 permit tcp any any eq telnet R1(config)# access-list 101 permit tcp any any eq www R1(config)# access-list 102 permit udp any any eq 9996 R1(config)# access-list 103 permit icmp any any echo + To lp lu lng tng ng vi Access Control Lists. * Class Telnet : - 37 rita2610@yahoo.com

PC2

QoS Practice Labs R1(config)# class-map telnet R1(config-cmap)# match access-group 100 * Class HTTP : R1(config)# class-map http R1(config-cmap)# match access-group 101 * Class Netflow : R1(config)# class-map netflow R1(config-cmap)# match access-group 102 * Class RIP : R1(config)# class-map ping R1(config-cmap)# match access-group 103 Chnh sch lu lng Class-based Marking vi tn Marking R1(config)# policy-map Marking-IN-1 * Class telnet ( dscp AF21) R1(config-pmap)# class telnet R1(config-pmap-c)# set dscp af21 * Class HTTP ( dscp AF31) R1(config-pmap)# class http R1(config-pmap-c)# set dscp af31 * Class Netflow ( dscp CS21) R1(config-pmap)# class netflow R1(config-pmap-c)# set dscp cs2 * Class Ping R1(config-pmap)# class ping R1(config-pmap-c)# set dscp cs1 + Ch nh Class-based Marking trn giao din vo Fa2/0 ca R1 R1(config)#int fa2/0 R1(config-if)# service-policy input Making-IN-1 R2 : Cu hnh chnh sch lu lng Class-based Low-latency Queuing vi tn LLQ Phn lp : da vo gi tr DSCP c nh du ti R1 * Class Telnet : + nh du cc gi tin vi cc gi tr DSCP nh trn m hnh

- 38 rita2610@yahoo.com

QoS Practice Labs R2(config)# class-map telnet R2(config-cmap)# match ip dscp af21 * Class HTTP : R2(config)# class-map http R2(config-cmap)# match ip dscp af31 * Class RIP : R2(config)# class-map rip R2(config-cmap)# match ip dscp cs6 * Class Netflow : R2(config)# class-map netflow R2(config-cmap)# match ip dscp cs2 * Class Ping : R2(config)# class-map ping R2(config-cmap)# match ip dscp cs1 Chnh sch lu lng Class-based Low-latency Queuing vi tn LLQ-OUT-2 R2(config)# policy-map LLQ-OUT-2 * Class HTTP R2(config-pmap)# class telnet R2(config-pmap-c)# priority percent 35 * Class HTTP, RIP, Netflow, Ping R2(config-pmap)# class http R2(config-pmap-c)# bandwidth 50 R2(config-pmap)# class netflow R2(config-pmap-c)# bandwidth 15 R2(config-pmap)# class rip R2(config-pmap-c)# bandwidth 10 R2(config-pmap)# class ping R2(config-pmap-c)# bandwidth 8 * Nhng lu lng cn li R2(config-pmap)# class class-default R2(config-pmap-c)# fair-queue + Ch nh Class-based Low-latency Queuing trn giao din vo S1/1 ca R2 - 39 rita2610@yahoo.com + Ch nh bng thng nh trn m hnh

QoS Practice Labs R2(config)#int S1/1 R2(config-if)# service-policy output LLQ-OUT-2 7. Kim tra cu hnh a. Class-based Marking Show policy-map Marking-IN-1 ti R1

S dng Wireshark kim tra lu lng c nh du.

- 40 rita2610@yahoo.com

QoS Practice Labs

Telnet : AF21

HTTP : AF31

- 41 rita2610@yahoo.com

QoS Practice Labs

b. Class-based Low-latency Queuing.

Netflow: CS2

- 42 rita2610@yahoo.com

QoS Practice Labs

- 43 rita2610@yahoo.com

QoS Practice Labs

- 44 rita2610@yahoo.com

QoS Practice Labs

N TP
1. Mt s m hnh ngh. 2. Yu cu : Da vo m hnh, sinh vin s dng k thut Class-based Markig v Class-based Lowlatency Queuing cu hnh trn thit b router.

- 45 rita2610@yahoo.com

QoS Practice Labs LLQ R1 HTTP : 45% (Priority) Netflow : 2% RIP : 13% Telnet : 15% LLQ R2 Telnet : 35% (Priority) HTTP : 50 kbits/s Netflow : 15 kbits/s RIP : 10 kbits/s Ping : 8 kb/s Default : fair-queue

Classification

Marking

20.0.0..0/8
W o rk p la c e W o rk p la c e

.2

.1
Fa2/0

W o rk p la c e

W o rk p la c e

Classification
Work

R 1

R1 R 2

R 3

PC1 Loopback

R 1

R 2

R 3

Netflow -PC2

S1/0
Work

.1

place

LLQ

100.0.0.0/8
place R2 R1 R3

Telnet HTTP RIP Netflow Ping AF21 AF31 CS6 0 0

S1/0p l a c e
R 1

W o rk

.2 R2 R 2

W o rk p la c e

Marking

Classification

R 3

S1/1

.1

ork WLLQ place

Classification

Telnet HTTP RIP Netflow(R1) Ping AF41 AF21 CS6 CS2 CS1

Work

200.0.0.0/24
place R2 R1 R3

S1/0

W o rk p la c e

.2 R3 R 2

W o rk p la c e

10.0.0.0/8
W o rk p la c e

.1

.2

W o rk p la c e

R 1

R 3

Fa2/0
R 1 R 2 R 3

Telnet+HTTP
Telnet HTTP RIP Netflow Ping AF41 AF21 CS6 CS2 CS1

PC2

- 46 rita2610@yahoo.com

QoS Practice Labs Classification Marking

172.32.0..0/16
W o rk p la c e W o rk p la c e

.2

.1
Fa2/0

W o rk p la c e

W o rk p la c e

Classification LLQ Wo

W o rk p la c e

W o rk p la c e

R 1

R1 R1 R 2
S1/0

R 3

Telnet HTTP RIP Ping AF21 AF31 CS6 0 0

Work place

90.0.0.0/8

LLQ R2 Telnet : 35% (Priority) HTTP : 50 kbits/s RIP (R1) : 10 kbits/s Ping (R1): 8 kb/s RIP (R2) : 20 kbits/s Ping (R2): 16 kb/s Default : fair-queue

R2 R1

R3
S0/0p l a c e
W o rk

10.0.0.0/8

.2 R2 R 2

R 1

R 3

Classification

LLQ

S1/0

.1

Work place
110.0.0.0/8 RIP Ping CS6 0

R2

W o rk p la c e

.2

R3
Work place
200.0.0.0/24

PC1 Loopback

R 1

R 2

R 3

.1

rk place

Wplaocrke
R 1

R4 R 2

RIP Ping CS6 0

Work place
.1

R 3

.1

Work place
Telnet HTTP RIP Ping AF21 AF31 CS6 0 0

R1

Wplaocrke

- 47 rita2610@yahoo.com

R1 R2 R3

Classification Marking

R3 R2 R1
.2 o r k W
p la c e

.2
W o rk p la c e

S1/0

.1

192.168.1.0/24
Fa2/0

W o rk p la c e

.2

W o rk p la c e

R 1

R3 R 2

R 3

Telnet+HTTP
Telnet HTTP RIP Ping AF42 CS5 CS6 AF1 0

R 1

R 2

R 3

PC2

También podría gustarte