No VOIP when PCC enabled

Dear MK enthusiasts,

I’ve got 2 DSL connection, ( 18Mbps / 1Mbps ) on a RB2011UiAS router.

When I use PCC loadbalancing, I lost all my SIP devices.
So I make static route to SIP provider. ( sip provider /24 to xDSL1 ), but strange behaviour, all SIP acounts don’t registered.
I try another approach, I make a mangle to mark routing my VOIP vlan, and put it in a route, but same issues.

When I disabled PCC mangles, all my devices are going on again.

Any idea ?

Thanks

Armel

I forgot code :

/ip firewall mangle
add action=mark-connection chain=input comment=PCC   in-interface=\
    ether6-xDSL1 new-connection-mark=WAN1_conn
add action=mark-connection chain=input   in-interface=ether7-xDSL2 \
    new-connection-mark=WAN2_conn
add action=mark-routing chain=output connection-mark=WAN1_conn   \
    new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn   \
    new-routing-mark=to_WAN2
add chain=prerouting   dst-address=192.168.1.0/24
add chain=prerouting   dst-address=192.168.2.0/24
add action=mark-connection chain=prerouting   dst-address-list=\
    !LAN dst-address-type=!local new-connection-mark=WAN1_conn \
    per-connection-classifier=src-address:2/0
add action=mark-connection chain=prerouting   dst-address-list=\
    !LAN dst-address-type=!local new-connection-mark=WAN2_conn \
    per-connection-classifier=src-address:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_conn disabled=\
    yes new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn disabled=\
    yes new-routing-mark=to_WAN2



/ip route
add check-gateway=ping comment=PCC   distance=3 gateway=\
    192.168.1.254 routing-mark=to_WAN1
add check-gateway=ping comment=PCC   distance=3 gateway=\
    192.168.2.254 routing-mark=to_WAN2
add check-gateway=ping comment="FAILOVER xDSL1" distance=4 gateway=\
    192.168.1.254
add check-gateway=ping comment="FAILOVER xDSL2" distance=5 gateway=\
    192.168.2.254
add check-gateway=ping comment="VOIP WITH xDSL1"   distance=1 \
    dst-address=83.136.161.0/24 gateway=192.168.1.254
add check-gateway=ping comment="VOIP WITH xDSL2 en FAILOVER"   \
    distance=2 dst-address=83.136.161.0/24 gateway=192.168.2.254
add check-gateway=ping comment="VOIP WITH xDSL1"   distance=1 \
    dst-address=83.136.162.0/24 gateway=192.168.1.254
add check-gateway=ping comment="VOIP WITH xDSL2 en FAILOVER"   \
    distance=2 dst-address=83.136.162.0/24 gateway=192.168.2.254
add check-gateway=ping comment="VOIP WITH xDSL1"   distance=1 \
    dst-address=83.136.163.0/24 gateway=192.168.1.254
add check-gateway=ping comment="VOIP WITH xDSL2 en FAILOVER"   \
    distance=2 dst-address=83.136.163.0/24 gateway=192.168.2.254
add check-gateway=ping comment="VOIP WITH xDSL1"   distance=1 \
    dst-address=83.136.164.0/24 gateway=192.168.1.254
add check-gateway=ping comment="VOIP WITH xDSL2 en FAILOVER"   \
    distance=2 dst-address=83.136.164.0/24 gateway=192.168.2.254

Your SIP provider may use more than just a single /24 on their side.
(Suppose the voice gateway they’re having your phones send RTP to is not in the same /24)

When you made a policy route for your voice VLAN, did it use a /24 as the destination, or the entire default route 0.0.0.0/0?

VoIP really doesn’t consume as much bandwidth as everyone thinks it does - there’s not really a need to PCC the phones. I would use a special routing table / route mark just for voice VLAN and construct that table as a primary/backup default gateway behavior for the two ISP connections, but leave everything else in the PCC routing mark table.

(so basically, you’ll have a 3rd routing mark: VOICE which has two default routes with different gateway IPs)

It’s a little more complicated, perhaps, but it’s the best of both worlds.

Thanks for your feedback.

When I make a mangle with my entire voice VLAN, I specify 0.0.0.0/0 as destination for route with my xdsl1 GW.. It’s quite strange that’s not working as well ! I don’t understand why it have strange behaviour just when I make active PCC mangles and routes.

All my VoiP route are distance=1 and PCC routes > 2

Load balance is for all office needs, not just for VoIP. We’ve just 10 VoIP phones, with few mangles and queues to priorize paquets.

It sounds like perhaps the mangle criteria to match the phones is not marking everything correctly.

A route marked packet will follow a route with the same mark even if the route is less specific.
0.0.0.0/0 with same mark should be chosen before even x.x.x.x/32 with no mark
If you have an entire voice-only VLAN, then your mangle table could simply match all packets in-interface voice-vlan, right? Who cares what source/destination IP?

Also - make sure that the packet mark rule(s) for the PCC include criteria to ignore packets that already have marks on them.

Hmm thanks !

I make a mangle with my voice vlan ( juste voip phones on it )

  • prerouting / in interface : voice-vlan / new connection mark : voicevlan-con

  • prerouting / connection-mark : voicevlan-con / new routing mark : voicevlan-routing

  • route : dst 0.0.0.0/0 - gateway : xdsl1 / routing mark : voicevlan-routing

Right no ?

I think I must start again from scratch, I must have a mangle rule with “no Passthrough” before this mangle.

Thanks a lot for your help

What you show here should work, and be able to work no matter what other ‘interesting’ things you’re doing. If you start to go blind on lots of rules, try breaking policies into their own seperate chains and calling the chains with single rules.

Good luck!