cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
562
Views
0
Helpful
12
Replies

classify voice traffic from PSTN to cos=5

Sascha Monteiro
Level 6
Level 6

Hi,

I have a customer with a "single subnet", voice and data on the native vlan. I configured the switchports for the phones for dot1p. But I want to send the Voice traffic coming from PSTN (E1-PRI) on COS=5. this is a little part of my config:

class-map VOIP-RTP

match ip precedence 5

policy-map VOIP-out

class VOIP-RTP

set cos 5

int fa0/0.1

service-policy output VOIP-out

dial-peer voice 1 voip

ip precedence 5

if I do a show policy-map int fa0/0.1 then I see that the class is matched, but the COS is not set!(that counter stays on 0)

So the voice traffic is send on tos=5 on L3, but I also want cos=5 on L2.

If we do this with voice and data on different subnets/vlans(not native) it's working good...

Has someone a idea? I appriciate any help.

Regards,

Sascha Monteiro

12 Replies 12

sdrennan
Level 1
Level 1

Have you actually put an analyser on the network to check the 802.1 Headers. I have seen the counter stay at 0 but the packets were marked. Let me know what the Analyser states

Ok,

We don't have an analyzer, we have to use one from another department..... :-(

Thanks.

Sascha

jtvedte
Level 1
Level 1

Have you turned IP CEF on?

John

PS - What IOS are you using...?

Yes, ip cef is on.(without you can't set service-policy on the interface)

We are using 12.2(3), but have the same problem on a 12.1(5)YD4

Sascha

1) Interesting traffic must be CEF switched if you want mark it with 'set cos' under MQC

you can see it by 'sh int fx/x switching'

It seems to be a bug

CSCdv44860

asapun
Level 1
Level 1

Your config looks OK.

Does you Fast Ethernet port support 802.1Q/ISL?

As yo might know set cos is supported only with IEEE 802.1Q/ISL interfaces.

router: int fa0/0.2

encapsulation dot1q 2

switch: int fa0/1

switchport trunk encapsulation dot1q

switchport mode trunk

b.t.w. what should I see with sh int fx/x switching ?

Thanks,

Sascha

Why don't you paste the config, so we can look at it.

List the:

class-maps

policy-map and

ethernet subinterface config.

Cheers

Here is part of the config;

!

class-map match-all L3-to-L2_VOIP-RTP

match ip precedence 5

class-map match-all L3-to_L2_VOIP-Cntrl

match ip dscp 26

!

!

policy-map output-L3-toL2

class L3-to-L2_VOIP-RTP

set cos 5

class L3-to_L2_VOIP-Cntrl

set cos 3

!

interface FastEthernet0/0.2

encapsulation dot1Q 2

ip address 10.10.50.211 255.255.255.0

ip policy route-map output-L3-toL2

service-policy output output-L3-toL2

!

!

dial-peer voice 3 voip

destination-pattern 356475...

translate-outgoing calling 1

session target ipv4:10.10.50.1

dtmf-relay h245-alphanumeric

codec g711ulaw

ip precedence 5

!

-----------

And when I look if they are set:

sh policy-map int fa0/0.2

FastEthernet0/0.2

Service-policy output: output-L3-toL2

Class-map: L3-to-L2_VOIP-RTP (match-all)

9808 packets, 3619143 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: ip precedence 5

QoS Set

cos 5

Packets marked 0

Class-map: L3-to_L2_VOIP-Cntrl (match-all)

0 packets, 0 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: ip dscp 26

QoS Set

cos 3

Packets marked 0

Class-map: class-default

73173 packets, 4685304 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: any

------------------

You see, the packets are matched on the class-map, but it looks like they are not set to 5!

Thanks for your help.

Sascha

By the way, CEF/Fast switched traffic counters not correctly shown in 'sh policy-map int ..'

'set cos' works for CEF-switched traffic only

And .. how can we see correct counter for packets marked with cos=5 ? This is question for TAC ;)

Hint: try 'ip route-cache policy' in configuration of FastEthernet0/0 and after that 'sh policy-map int f0/0.x'

First:

I don't see that you've created access lists, such as

access-list 100 permit udp any any

access-list 102 permit udp any any range 16384 32767

access-list 102 permit ip any any dscp ef

access-list 102 permit ip any any precedence critical

access-list 104 permit udp any any eq 2427

access-list 104 permit udp any eq 2427 any

access-list 104 permit ip any any dscp af31

access-list 104 permit ip any any precedence flash

access-list 105 permit tcp any any eq 1720

access-list 105 permit tcp any eq 1720 any

access-list 105 permit tcp any any range 11000 11999

access-list 105 permit tcp any range 11000 11999 any

access-list 105 permit ip any any dscp af31

access-list 105 permit ip any any precedence flash

access-list 106 permit tcp any any eq 2748

access-list 106 permit tcp any eq 2748 any

access-list 106 permit ip any any precedence critical

access-list 106 permit ip any any dscp ef

access-list 107 permit udp any range 16384 32767 any

access-list 107 permit ip any any precedence critical

access-list 107 permit ip any any dscp ef

access-list 108 permit ip any any

access-list 108 permit tcp any any

access-list 108 permit udp any any

You have to define what port groups each protocol uses, such as Voice traffic, Skinny, H.323 and/or MGCP.

Then you have to map the access list to the class-map and match the input interface.

Such as:

class-map match-all L3-to-L2_VOIP-RTP

match access-group 102

match access-group 106

match access-group 106

match input-interface FastEthernet0/0.2

match cos 3

Let me know if this helps.

Hi, I see 2x match access-group 106....Wich should be the other?

No, I dont have access-lists, because I am matching on IP-precedence 5 that I have set on the dial-peer.

That should work, I think.

Thanks,

Sascha

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: