Vous êtes sur la page 1sur 10

Lab 16-1: CAR

Cu hnh cho s thc t sau

gii thch s b v s trn


i vi s ny th ta thy Access Switch s ni n cc user trong mng v n ni
theo ng trunk ln core, v cc gi trn ng trunk c ta mark cos phn phi
gia Access-Switch v Core-Switch
Gia R1 v R2 ta s dng CAR
Show run
R1
!
hostname R1
!
enable password cisco
!
memory-size iomem 10
ip subnet-zero
no ip domain lookup
voice call carrier capacity active
mta receive maximum-recipients 0
interface Loopback1
ip address 11.1.1.1 255.255.255.0
!
interface Ethernet0/0
ip address 192.168.1.1 255.255.255.0
rate-limit input access-group 101 8000 1500 2000 conform-action set-dscp-transmit 20
exceed-action set-dscp-transmit 0
half-duplex
!
interface Serial0/0
no ip address
encapsulation frame-relay
no fair-queue
clockrate 64000
!
interface Serial0/0.122 point-to-point
ip address 172.16.1.1 255.255.255.0
rate-limit output dscp 0 8000 1500 2000 conform-action transmit exceed-action drop
frame-relay interface-dlci 122
!
interface Serial0/1

no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 172.16.1.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
!
ip classless
ip http server
!
access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255
line con 0
logging synchronous
end
R2
!
hostname R2
memory-size iomem 10
ip subnet-zero
no ip domain-lookup
!
call rsvp-sync
!
interface Ethernet0/0
ip address 172.16.3.1 255.255.255.0
rate-limit input access-group 101 8000 1500 2000 conform-action set-dscp-transmit 8
exceed-action set-dscp-transmit 0
half-duplex
!
interface Serial0/0
no ip address
encapsulation frame-relay
frame-relay lmi-type cisco
!
interface Serial0/0.221 point-to-point
ip address 172.16.1.2 255.255.255.0
rate-limit output dscp 0 8000 1500 2000 conform-action transmit exceed-action drop
frame-relay interface-dlci 221
!
router ospf 1
log-adjacency-changes
network 172.16.1.0 0.0.0.255 area 0
network 172.16.3.0 0.0.0.255 area 0
!

ip classless
ip http server
ip pim bidir-enable
!
access-list 101 permit ip 172.16.2.0 0.0.0.255 192.168.1.0 0.0.0.255
dial-peer cor custom
line con 0
logging synchronous
line aux 0
line vty 0 4
!
no scheduler allocate
end
Core
!
hostname Core
enable password cisco
ip subnet-zero
ip routing
no ip domain-lookup
mls qos
class-map match-all cuong
match access-group name cuong
class-map match-all van
policy-map cuong
class cuong
set ip dscp 40
class class-default
trust cos
spanning-tree mode pvst
spanning-tree extend system-id
!
mac access-list extended cuong
permit host 000d.87fa.716b any
!
interface Port-channel1
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
duplex full

speed 100
channel-group 1 mode auto
channel-protocol pagp
!
interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
duplex full
speed 100
channel-group 1 mode auto
channel-protocol pagp
!
interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
duplex full
speed 100
channel-group 1 mode auto
channel-protocol pagp
!
interface FastEthernet0/4
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
duplex full
speed 100
channel-group 1 mode auto
channel-protocol pagp
!
interface FastEthernet0/5
no switchport
ip address 172.16.3.2 255.255.255.0
!
interface FastEthernet0/6
no ip address
!
interface FastEthernet0/7
no ip address
!
interface FastEthernet0/8
switchport access vlan 2
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address

!
interface FastEthernet0/9
no ip address
!
interface FastEthernet0/10
no ip address
!
interface FastEthernet0/11
no ip address
!
interface FastEthernet0/12
no ip address
!
interface FastEthernet0/13
switchport access vlan 2
no ip address
!
interface FastEthernet0/14
switchport access vlan 2
no ip address
interface FastEthernet0/15
switchport access vlan 2
no ip address
!
interface FastEthernet0/16
switchport access vlan 2
no ip address
!
interface FastEthernet0/17
no ip address
!
interface FastEthernet0/18
no ip address
!
interface FastEthernet0/19
no ip address
!
interface FastEthernet0/20
no ip address
!
interface FastEthernet0/21
no ip address
interface FastEthernet0/22
no ip address
!
interface FastEthernet0/23

no ip address
!
interface FastEthernet0/24
no ip address
!
interface GigabitEthernet0/1
no ip address
!
interface GigabitEthernet0/2
no ip address
!
interface Vlan1
ip address 192.168.3.5 255.255.255.0
!
interface Vlan2
ip address 172.16.2.1 255.255.255.0
define interface-range cuong FastEthernet0/1 - 4
!
router ospf 1
log-adjacency-changes
network 172.16.2.0 0.0.0.255 area 0
network 172.16.3.0 0.0.0.255 area 0
!
ip classless
!
monitor session 1 source interface Fa0/1
monitor session 1 destination interface Fa0/4
end
Access
!
hostname Access
!
enable password cisco
!
ip subnet-zero
!
no ip domain-lookup
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
!
interface Port-channel1

switchport mode trunk


flowcontrol send off
!
interface Port-channel2
!
interface FastEthernet0/1
switchport mode trunk
channel-group 1 mode on
!
interface FastEthernet0/2
switchport mode trunk
channel-group 1 mode on
!
interface FastEthernet0/3
switchport mode trunk
channel-group 1 mode on
!
interface FastEthernet0/4
switchport mode trunk
channel-group 1 mode on
!
interface FastEthernet0/5
switchport access vlan 2
switchport mode access
mls qos cos 5
mls qos cos override
!
interface FastEthernet0/6
mls qos cos override
!
interface FastEthernet0/7
mls qos cos 3
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
interface FastEthernet0/14
!

interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
switchport mode trunk
interface Vlan1
ip address 192.168.3.10 255.255.255.0
no ip route-cache
define interface-range cuong FastEthernet0/24
!
ip http server
!
End
Kim tra CoS trn Access Switch
Access#show mls qos interface fastEthernet 0/5
FastEthernet0/5
trust state: not trusted
trust mode: not trusted
COS override: ena
default COS: 5
pass-through: none
trust device: none
Access#show mls qos interface fastEthernet 0/7
FastEthernet0/7
trust state: not trusted
trust mode: not trusted
COS override: dis
default COS: 3
pass-through: none

trust device: none


Kim tra CAR:
Ta s dng lnh ping extend t R1 n R2 cho ta kt qu sau
s dng kch thc gi bnh thng
R1#ping
Protocol [ip]:
Target IP address: 172.16.2.2
Repeat count [5]: 100
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 172.16.2.2, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!
Success rate is 98 percent (98/100), round-trip min/avg/max = 60/62/89 ms
S dng kch thc gi 1500
R1#ping
Protocol [ip]:
Target IP address: 172.16.2.2
Repeat count [5]: 100
Datagram size [100]: 1500
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 100, 1500-byte ICMP Echos to 172.16.2.2, timeout is 2 seconds:
!!!.!!!.!!.!.!!!.!!!.!!.!!!.!!!.!!.!.!!!.!!!.!!.!! !.!!!.!!.!.!!!.!!!.!
!.!!!.!!!.!!.!.!!!.!!!.!!.!!!.
Success rate is 71 percent (71/100), round-trip min/avg/max = 761/765/786 ms
Ki m tra CBWFQ
Core#show access-lists
Extended MAC access list cuong
permit host 000d.87fa.716b any
Core#show access-lists
Extended MAC access list cuong
permit host 000d.87fa.716b any
Core#show class-map
Class Map match-any class-default (id 0)
Match any
Class Map match-all cuong (id 2)
Match access-group name cuong

Core#show policy-map
Policy Map cuong
class cuong
set ip dscp 40
class class-default
trust cos

Vous aimerez peut-être aussi