LAB: CẤU HÌNH QUALITY OF SERVICE (QoS) -

LAB: CẤU HÌNH QUALITY OF SERVICE (QoS) -

LAB: CẤU HÌNH QUALITY OF SERVICE (QoS) -

LAB: CẤU HÌNH QUALITY OF SERVICE (QoS) -

LAB: CẤU HÌNH QUALITY OF SERVICE (QoS) -
LAB: CẤU HÌNH QUALITY OF SERVICE (QoS) -
(028) 35124257 - 0933 427 079

LAB: CẤU HÌNH QUALITY OF SERVICE (QoS)

 

Mô tả:

  1. ISPR1 và ISPR2 là 2 Router của ISP ABC.
  2. R11, R12 là hai Router của khách hàng A nằm ở hai chi nhánh khác nhau kết nối với nhau qua hệ thống mạng của ISP ABC.
  3. Subnet của khách hàng A là: 100.100.0.0/16
  4. R21, R22 là hai Router của khách hàng B nằm ở hai chi nhánh khác nhau kết nối với nhau qua hệ thống mạng của ISP ABC.
  5. Subnet của khách hàng B là: 200.200.0.0/16
  6. Khách hàng A thuê đường truyền 256Kbps. Nếu khách hàng A truyền vượt quá tốc độ, drop traffic của A.
  7. Cấu hình trên Router R11, R12để đảm bảo traffic luôn đến ISP là 256Kbps. Trong trường hợp có nghẽn sảy ra, R11, R12 lưu tạm thời traffic trong cache.
  8. Khách hàng B thuê đường truyền 1Mbps. Nếu khách hàng B truyền vượt quá tốc độ, drop traffic của B.
  9. Cấu hình trên Router R21, R22 để đảm bảo traffic đến ISP luôn là 1Mbps. Trong trường hợp có nghẽn sảy ra, R21, R22 lưu tam thời traffic trong cache.
  1. Yêu cầu:
    1. Cấu hình IP theo sơ đồ trên.
    2. Cấu hình định tuyến OSPF để mạng trên liên thông. Kiểm tra bằng cách ping các Router đến tất cả subnet.
    3. Cấu hình QoS thỏa mãn yêu cầu trên.

 

Hướng dẫn:

2a: Cấu hình IP:

            Trên R11,12:

            R11(config)# interface fastEthernet 0/0

            R11(config-if)# ip add 100.100.0.11 255.255.255.128

            R11(config)# interface Serial 0/0

            R11(config-if)# ip add 10.10.1.11 255.255.255.0

 

            R12(config)# interface fastEthernet 0/0

            R12(config-if)# ip add 100.100.128.12 255.255.255.128

            R12(config)# interface Serial 0/0

            R12(config-if)# ip add 10.10.2.12 255.255.255.0

 

            Trên R21,22:

            R21(config)# interface fastEthernet 0/0

            R21(config-if)# ip add 200.200.0.21 255.255.255.128

            R21(config)# interface Serial 0/0

            R21(config-if)# ip add 20.20.1.21 255.255.255.0

 

            R22(config)# interface fastEthernet 0/0

            R22(config-if)# ip add 200.200.128.22 255.255.255.128

            R22(config)# interface Serial 0/0

            R22(config-if)# ip add 20.20.2.22 255.255.255.0

 

            Trên ISP ABC:

            ISPR1(config)# interface fastEthernet 0/0

            ISPR1(config-if)# ip address 12.12.12.1 255.255.255.0

            ISPR1(config)# interface Serial 0/0

            ISPR1(config-if)# ip address 10.10.1.1 255.255.255.0

            ISPR1(config)# interface Serial 0/1

            ISPR1(config-if)# ip address 20.20.1.1 255.255.255.0

 

            ISPR2(config)# interface fastEthernet 0/0

            ISPR2(config-if)# ip address 12.12.12.2 255.255.255.0

            ISPR2(config)# interface Serial 0/0

            ISPR2(config-if)# ip address 10.10.2.2 255.255.255.0

            ISPR2(config)# interface Serial 0/1

            ISPR2(config-if)# ip address 20.20.2.2 255.255.255.0

 

2b: Cấu hình OSPF cho các Router:

            R11(config)# router ospf 1

            R11(config-router)# network 0.0.0.0 255.255.255.255 are 0

 

            R12(config)# router ospf 1

            R12(config-router)# network 0.0.0.0 255.255.255.255 are 0

 

            R21(config)# router ospf 1

            R21(config-router)# network 0.0.0.0 255.255.255.255 are 0

 

            R22(config)# router ospf 1

            R22(config-router)# network 0.0.0.0 255.255.255.255 are 0

 

            ISPR1(config)# router ospf 1

            ISPR1(config-router)# network 0.0.0.0 255.255.255.255 are 0

 

            ISPR2(config)# router ospf 1

            ISPR2(config-router)# network 0.0.0.0 255.255.255.255 are 0

 

2c: Cấu hình QoS theo yêu cầu đề bài, vì Router của các khách hàng A,B đóng vai trò như 1 gateway, nếu traffic trong mạng của A và B đến ISP lớn hơn băng thông mà A và B đã mua thì các Router này phải cache lại lượng traffic thừa đó. Nếu không khi gởi đến ISP, Router của ISP sẽ drop traffic này. Như vậy sẽ cấu hình “shape” trên các Router của khách hàng A,B và “police” trên các Router của ISP.

 

  ! Cấu hình QoS cho R11

            R11(config)# access-list 1 permit 100.100.0.0 0.0.127.255

            ! mach subnet 100.100.0.0/17

 

            R11(config)# class-map CLASS_100.100.0.0

            R11(config-cmap)# match access-group 1

 

            R11(config)# policy-map POLICY_QOS

            R11(config-pmap)# class CLASS_100.100.0.0

            R11(config-pmap-c)# shape average 256000

            ! đảm bảo tốc độ không vượt quá 256Kbps

 

            R11(config)# interface Serial 0/0

            R11(config-if)# service-policy output POLICY_QOS

            ! apply QoS vào Interface kết nối đến ISP, áp dụng cho traffic hướng đi ra Interface này.

 

  ! Cấu hình QoS cho R12

            R12(config)# access-list 1 permit 100.100.128.0 0.0.127.255

            ! mach subnet 100.100.128.0/17

 

            R12(config)# class-map CLASS_100.100.128.0

            R12(config-cmap)# match access-group 1

 

            R12(config)# policy-map POLICY_QOS

            R12(config-pmap)# class CLASS_100.100.128.0

            R12(config-pmap-c)# shape average 256000

            ! đảm bảo tốc độ không vượt quá 256Kbps

 

            R12(config)# interface Serial 0/0

            R12(config-if)# service-policy output POLICY_QOS

            ! apply QoS vào Interface kết nối đến ISP, áp dụng cho traffic hướng đi ra Interface này.

 

  ! Cấu hình QoS cho R21

            R21(config)# access-list 1 permit 200.200.0.0 0.0.127.255

            ! mach subnet 200.200.0.0/17

 

            R21(config)# class-map CLASS_200.200.0.0

            R21(config-cmap)# match access-group 1

 

            R21(config)# policy-map POLICY_QOS

            R21(config-pmap)# class CLASS_200.200.0.0

            R21(config-pmap-c)# shape average 1000000

            ! đảm bảo tốc độ không vượt quá 1Mbps

 

            R21(config)# interface Serial 0/0

            R21(config-if)# service-policy output POLICY_QOS

            ! apply QoS vào Interface kết nối đến ISP, áp dụng cho traffic hướng đi ra Interface này.

 

  ! Cấu hình QoS cho R22

            R22(config)# access-list 1 permit 200.200.128.0 0.0.127.255

            ! mach subnet 200.200.128.0/17

 

            R22(config)# class-map CLASS_200.200.128.0

            R22(config-cmap)# match access-group 1

 

            R22(config)# policy-map POLICY_QOS

            R22(config-pmap)# class CLASS_200.200.128.0

            R22(config-pmap-c)# shape average 1000000

            ! đảm bảo tốc độ không vượt quá 1Mbps

 

            R22(config)# interface Serial 0/0

            R22(config-if)# service-policy output POLICY_QOS

            ! apply QoS vào Interface kết nối đến ISP, áp dụng cho traffic hướng đi ra Interface này.

 

! Cấu hình QoS cho ISPR1:

            ISPR1(config)# access-list 1 permit 100.100.0.0 0.0.127.255

            ! match subnet 100.100.0.0/17

            ISPR1(config)# access-list 2 permit 200.200.0.0 0.0.127.255

            ! match subnet 200.200.0.0/17

           

            ISPR1(config)# class-map CLASS_A

            ISPR1(config-cmap)# match access-group 1

            ! match traffic subnet 100.100.0.0/17 của khách hàng A

            ISPR1(config)# class-map CLASS_B

            ISPR1(config-cmap)# match access-group 2

            ! match traffic subnet 200.200.0.0/17 của khách hàng B

 

            ISPR1(config)# policy-map POLICY_A

            ISPR1(config-pmap)# class CLASS_A

            ISPR1(config-pmap-c)# policy cir 256000

            ! giới hạn tốc độ của khách hàng A là 256Kbps

            ISPR1(config-pmap)# class CLASS_B

            ISPR1(config-pmap-c)# policy cir 1000000

            ! giới hạn tốc độ của khách hàng B là 1Mbps

            ISPR1(config)# interface Serial 0/0

            ISPR1(config-if)# service-policy input POLICY_A

            ! apply QoS policy vào Interface S0/0 cho traffic từ khách hàng A đến ISP

            ISPR1(config)# interface Serial 0/1

            ISPR1(config-if)# service-policy input POLICY_B

            ! apply QoS policy vào Interface S0/1 cho traffic từ khách hàng B đến ISP

 

! Cấu hình QoS cho ISPR2:

            ISPR2(config)# access-list 1 permit 100.100.128.0 0.0.127.255

            ! match subnet 100.100.128.0/17

            ISPR2(config)# access-list 2 permit 200.200.128.0 0.0.127.255

            ! match subnet 200.200.128.0/17

           

            ISPR2(config)# class-map CLASS_A

            ISPR2(config-cmap)# match access-group 1

            ! match traffic subnet 100.100.128.0/17 của khách hàng A

            ISPR2(config)# class-map CLASS_B

            ISPR2(config-cmap)# match access-group 2

            ! match traffic subnet 200.200.128.0/17 của khách hàng B

 

            ISPR2(config)# policy-map POLICY_A

            ISPR2(config-pmap)# class CLASS_A

            ISPR2(config-pmap-c)# policy cir 256000

            ! giới hạn tốc độ của khách hàng A là 256Kbps

            ISPR2(config-pmap)# class CLASS_B

            ISPR2(config-pmap-c)# policy cir 1000000

            ! giới hạn tốc độ của khách hàng B là 1Mbps

            ISPR2(config)# interface Serial 0/0

            ISPR2(config-if)# service-policy input POLICY_A

            ! apply QoS policy vào Interface S0/0 cho traffic từ khách hàng A đến ISP

            ISPR2(config)# interface Serial 0/1

            ISPR2(config-if)# service-policy input POLICY_B

            ! apply QoS policy vào Interface S0/1 cho traffic từ khách hàng B đến ISP

 

 

Cấu hình đầy đủ:

!R11:

!

configure terminal

!

interface fastEthernet0/0

 ip address 100.100.0.11 255.255.255.128

 no shutdown

!

interface Serial0/0

 ip address 10.10.1.11 255.255.255.0

 clock rate 64000

 no shutdown

!

router ospf 1

 network 0.0.0.0 255.255.255.255 are 0

!

access-list 1 permit 100.100.0.0 0.0.127.255

!

class-map CLASS_100.100.0.0

 match access-group 1

!

policy-map POLICY_QOS

 class CLASS_100.100.0.0

  shape average 256000

!

interface Serial0/0

 service-policy output POLICY_QOS

!

end

 

 

! R12:

!

configure terminal

!

interface fastEthernet0/0

 ip address 100.100.128.12 255.255.255.128

 no shutdown

!

interface Serial0/0

 ip address 10.10.2.12 255.255.255.0

 clock rate 64000

 no shutdown

!

router ospf 1

 network 0.0.0.0 255.255.255.255 are 0

!

access-list 1 permit 100.100.128.0 0.0.127.255

!

class-map CLASS_100.100.128.0

 match access-group 1

!

policy-map POLICY_QOS

 class CLASS_100.100.128.0

  shape average 256000

!

interface Serial0/0

 service-policy output POLICY_QOS

!

end

 

 

!R21:

!

configure terminal

!

interface fastEthernet0/0

 ip address 200.200.0.21 255.255.255.128

 no shutdown

!

interface Serial0/0

 ip address 20.20.1.21 255.255.255.0

 clock rate 64000

 no shutdown

!

router ospf 1

 network 0.0.0.0 255.255.255.255 are 0

!

access-list 1 permit 200.200.0.0 0.0.127.255

!

class-map CLASS_200.200.0.0

 match access-group 1

!

policy-map POLICY_QOS

 class CLASS_200.200.0.0

  shape average 1000000

!

interface Serial0/0

 service-policy output POLICY_QOS

!

end

 

 

!R22:

!

configure terminal

!

interface fastEthernet0/0

 ip address 200.200.128.22 255.255.255.128

 no shutdown

!

interface Serial0/0

 ip address 20.20.2.22 255.255.255.0

 clock rate 64000

 no shutdown

!

router ospf 1

 network 0.0.0.0 255.255.255.255 are 0

!

access-list 1 permit 200.200.128.0 0.0.127.255

!

class-map CLASS_200.200.128.0

 match access-group 1

!

policy-map POLICY_QOS

 class CLASS_200.200.128.0

  shape average 1000000

!

interface Serial0/0

 service-policy output POLICY_QOS

!

end

 

 

!ISPR1:

!

configure terminal

!

interface fastEthernet0/0

 ip address 12.12.12.1 255.255.255.0

 no shutdown

!

interface Serial0/0

 ip address 10.10.1.1 255.255.255.0

 no shutdown

!

interface Serial0/1

 ip address 20.20.1.1 255.255.255.0

 clock rate 64000

 no shutdown

!

router ospf 1

 network 0.0.0.0 255.255.255.255 are 0

!

access-list 1 permit 100.100.0.0 0.0.127.255

!

access-list 2 permit 200.200.0.0 0.0.127.255

!

class-map CLASS_A

 match access-group 1

!

class-map CLASS_B

 match access-group 2

!

policy-map POLICY_A

 class CLASS_A

  policy cir 256000

 class CLASS_B

  policy cir 1000000

!

interface Serial0/0

 service-policy input POLICY_A

!

interface Serial0/1

 service-policy input POLICY_B

!

end

 

 

!ISPR2:

!

configure terminal

!

interface fastEthernet0/0

 ip address 12.12.12.2 255.255.255.0

 no shutdown

!

interface Serial0/0

 ip address 10.10.2.2 255.255.255.0

 clock rate 64000

 no shutdown

!

interface Serial0/1

 ip address 20.20.2.2 255.255.255.0

 clock rate 64000

 no shutdown

!

router ospf 1

 network 0.0.0.0 255.255.255.255 are 0

!

access-list 1 permit 100.100.128.0 0.0.127.255

!

access-list 2 permit 200.200.128.0 0.0.127.255

!

class-map CLASS_A

 match access-group 1

!

class-map CLASS_B

 match access-group 2

!

policy-map POLICY_A

 class CLASS_A

  policy cir 256000

 class CLASS_B

  policy cir 1000000

!

interface Serial0/0

 service-policy input POLICY_A

!

interface Serial0/1

 service-policy input POLICY_B

!

end

 

 

!Kiem tra:

!xem trang thái các interface

#show ip int brief

 

!xem bang neighbor cua OSPF

#show ip ospf neighbor

 

!xem routing table

#show ip route ospf

 

!xem access-list

#show ip access-list

 

!xem class-map

#show class-map

 

!xem policy-map và các thông tin liên quan trên interface

#show policy-map

#show policy-map interface


FORM ĐĂNG KÝ MUA HÀNG
Đặt hàng
icon-cart
0