HELP! ccr2004_1g_12s_2xs how to limit traffic in a bridged interface?

Hi colleagues, I have a CCR2004_1G_12S_2XS with RouterOS 7.16.2 and the scenario described in the image. I need to limit the total traffic on port SFP28_1 and I've tried several ways using Queue without success. Is there a way to limit the bandwidth of that interface?
My IPS provides two gateways in two different subnets, xxx.100.197.56/29 and xxx.100.197.176/28, connected to port SFP28-1.
On port SFP28-2, another router with IPs xxx.0.197.179-184 accesses the internet through gateway xxx.100.197.177 via the bridge.
On SFP1, another router with IP xxx.100.186.178 accesses the internet through gateway xxx.100.197.177 via the bridge.
The CCR2004, from SFP5 to SFP12, has eight LANs configured with IPs 192.168.10.1 to 192.168.80.1, each in a different VLAN. The SFP28-1 interface is configured with IP addresses xxx.100.197.58-62 and accesses the internet through the gateway xxx.100.197.57. The firewall is configured with src-nat to addresses.

SFP28-1, SFP28-2, SFP1, SFP2, and SFP3 are connected via a bridge.

My provider has configured an unlimited connection with on-demand billing, so I need to limit the traffic on the SFP28-1 interface to account for service costs.

thank you, regards.

Good day, what I would need is some clarity and more information.

/export file=anynameyouwish ( minus router serial number, any public WANIP information, keys, dhcp lease lists )

So I understand you have a ROUTER that you want to use as ROUTER not a switch right ??
You have connections to other routers, but this is confusing.
This router is the main router connected to the internet>>
No clue what free IPs, are, didnt know they cost money.

YOu need a network diagram to detail the connections and the vlans travelling between devices.

Lastly, the Title makes one think the Router is somehow limiting traffic, but the text seems to indicate you want to learn how to limit traffic??

I edited the post to give you details; if you know how, please help me.

This is one of the few cases the bridge use-ip-firewall=yes setting is required. This forces the bridged traffic to traverse the firewall chains, which are also used for traffic queue handling, then apply queues to the IP addresses.

As the CCR2004 does not have a hardware switch chip all of the processing is handled by the CPU, you will almost certainly not get 25Gbps throughput as you cannot use fastpath together with queues.

Okay, thank you very much, I understand. Could you help me with some tips on how to do it from Winbox?

Could you clarify the IP address reserved for the router plugged into sfp-sfplus1? It doesn't look like it belongs to the two ranges. And if it was a typo, and the address was xxx.100.197.178, then it doesn't match your picture, in your picture it says the address is from the 1st subnet (xxx.100.197.56/29).

The CCR2004's SFP28-1 interface is configured with IP addresses xxx.197.100.58-62 and gateway xxx.197.100.57 on the xxx.100.197.56/29 subnet.
Another router is connected to the SFP28-2 interface with IP addresses xxx.197.100.179-186 and gateway xxx.197.100.177 on the xxx.100.197.176/28 subnet.
Another router is connected to the SFP-SFPlus1 interface with IP address xxx.197.100.178 and gateway xxx.197.100.177 on the xxx.100.197.176/28 subnet.
All three interfaces are bridged.

I need to limit global traffic, specifically on the sfp28-1 interface.

Thanks for the clarification. So, both of the other routers are in the xxx.100.197.176/28.

  1. First, you'll need to pull sfp28-1 out of the bridge red-bridge. The red-bridge can keep sfp28-2, sfp-sfpplus1, sfp-sfpplus2, sfp-sfpplus3 as member. The port sfp28-1 will be a stand-alone, none-slave, port.

  2. Next, you will move all of the setups related to the xxx.100.197.56/29 subnet from of the red-bridge to sfp28-1, things like:

    • IP address assignments related to xxx.100.197.56/29
    • Routes related to addresses in xxx.100.197.56/29
    • SRCNAT rules related to addresses in xxx.100.197.56/29
    • Interface list membership, such as WAN list membership

    If they were referencing red-bridge, then they should now reference sfp28-1 instead. sfp28-1 is the WAN interface, red-bridge is no longer the WAN interface when it comes to everything related to the xxx.100.197.56/29 subnet.

  3. Verify that the router and clients in the yellow-bridge / yellow-ports have normal internet connectivity, using the right gateway and public facing IP addresses (in the xxx.100.197.56/29 subnet) after those changes.


Next, we'll handle the red-bridge and the xxx.100.197.176/28 subnet:

  1. We assign this /32 IP address entry to the interface sfp28-1:

    /ip address
    add address=xxx.100.197.190/32 interface=`sfp28-1` network=xxx.100.197.177
    

    Here we assign the address xxx.100.197.190 from the end of the available range to the CCR2004 on sfp28-1. The network address chosen is xxx.100.197.177 which is the address of the gateway.

  2. Add 12 published=yes ARP entries on sfp28-1 for the addresses xxx.100.197.178 - xxx.100.197.189:

    /ip arp
    add address=xxx.100.197.178 interface=sfp28-1 published=yes
    add address=xxx.100.197.179 interface=sfp28-1 published=yes
    add address=xxx.100.197.180 interface=sfp28-1 published=yes
    # ...
    add address=xxx.100.197.188 interface=sfp28-1 published=yes
    add address=xxx.100.197.189 interface=sfp28-1 published=yes
    
  3. Remove any current IP address and static route assignment on the red-bridge interface.

  4. Assign this IP address entry on the red-bridge interface for the CCR2004:

    /ip address
    add address=xxx.100.197.190/28 interface=red-bridge network=xxx.100.197.176
    

    Note that here we give the router the address xxx.100.197.190 too, although the router already has the same address on sfp28-1 , that's not a problem.

  5. Add static published ARP entry for xxx.100.197.177 (the ISP gateway) on this red-bridge interface:

    /ip arp
    add address=xxx.100.197.177 interface=red-bridge published=yes
    

    Note the interface here, it's red-bridge not sfp28-1 !

  6. The two routers connected to sfp28-2 and sfp-sfpplus1 of the red-bridge keeps their current static address and gateway assignment, no changes needed.


  1. Make sure that the firewall do not perform any SRCNAT / masquerade for src-address=xxx.100.197.176/28 when out-interface=sfp28-1 at all!

  2. Configure firewall if needed to allow forwarding to / from the xxx.100.197.176/28 subnet.

  3. You can now limit the outgoing traffic on the sfp28-1 as you wish. Additional traffic shaping can also be performed for the red-bridge and its subnet.

Dear, thank you so much for your help. I tried the changes, but they didn't work. Perhaps the problem is in "Configure firewall if needed to allow forwarding to / from the xxx.100.197.176/28 subnet." I'm not sure what I should do or how.

Hi sorry for the delay, I missed your reply.

It's difficult to say without seeing your current configuration. If possible, export your configuration into a file with:

/export hide-sensitive file=config

Then download config.rsc to your computer, open it with a text editor and censor the private information like keys, MAC addresses, public IP addresses, etc...

Then paste the censored content here in a reply, between these:

```routeros
paste your content here
````

for review.


Hi, sorry for my delay too, here's what you requested.

```

2025-11-14 17:40:14 by RouterOS 7.20.2

software id = JIUX-VISN

model = CCR2004-1G-12S+2XS

serial number =

/interface bridge
add name=WAN_SILICA
/interface ethernet
set [ find default-name=ether1 ] name=ether1_ADMIN
set [ find default-name=sfp-sfpplus1 ] advertise=
1G-baseT-half,1G-baseT-full,1G-baseX name=sfp-sfpplus1_TORRE
rx-flow-control=on
set [ find default-name=sfp-sfpplus2 ] name=sfp-sfpplus2_CAB_SUR_BACKUP
set [ find default-name=sfp-sfpplus3 ] disabled=yes name=sfp-sfpplus3_LIBRE
set [ find default-name=sfp-sfpplus4 ] name=sfp-sfpplus4_A_GE1_OLT_NORTE
set [ find default-name=sfp-sfpplus5 ] name=sfp-sfpplus5_A_GE2_OLT_NORTE
set [ find default-name=sfp-sfpplus6 ] name=sfp-sfpplus6_A_GE3_OLT_NORTE
set [ find default-name=sfp-sfpplus7 ] name=sfp-sfpplus7_A_GE4_OLT_NORTE
set [ find default-name=sfp-sfpplus8 ] name=sfp-sfpplus8_LIBRE
set [ find default-name=sfp-sfpplus9 ] name=sfp-sfpplus9_LIBRE
set [ find default-name=sfp-sfpplus10 ] name=sfp-sfpplus10_LIBRE
set [ find default-name=sfp-sfpplus11 ] name=sfp-sfpplus11_LIBRE
set [ find default-name=sfp-sfpplus12 ] name=sfp-sfpplus12_ADMIN_OLT
set [ find default-name=sfp28-1 ] name=sfp28-1_SILICA
set [ find default-name=sfp28-2 ] name=sfp28-2_CAB_SUR
/interface vlan
add interface=sfp-sfpplus4_A_GE1_OLT_NORTE name=VLAN_1010_OLT1_GPON1 vlan-id=
1010
add interface=sfp-sfpplus4_A_GE1_OLT_NORTE name=VLAN_1020_OLT1_GPON2 vlan-id=
1020
add interface=sfp-sfpplus5_A_GE2_OLT_NORTE name=VLAN_1030_OLT1_GPON3 vlan-id=
1030
add interface=sfp-sfpplus5_A_GE2_OLT_NORTE name=VLAN_1040_OLT1_GPON4 vlan-id=
1040
add interface=sfp-sfpplus6_A_GE3_OLT_NORTE name=VLAN_1050_OLT1_GPON5 vlan-id=
1050
add interface=sfp-sfpplus6_A_GE3_OLT_NORTE name=VLAN_1060_OLT1_GPON6 vlan-id=
1060
add interface=sfp-sfpplus7_A_GE4_OLT_NORTE name=VLAN_1070_OLT1_GPON7 vlan-id=
1070
add interface=sfp-sfpplus7_A_GE4_OLT_NORTE name=VLAN_1080_OLT1_GPON8 vlan-id=
1080
/interface ethernet switch
set 1 name=switch2
set 2 name=switch3
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/ip pool
add name=dhcp_vlan:500 ranges=192.168.72.2-192.168.75.254
add name=dhcp_vlan_1050 ranges=192.168.50.50-192.168.50.254
add name=dhcp_vlan_1060 ranges=192.168.60.50-192.168.60.254
add name=dhcp_vlan_1030 ranges=192.168.30.50-192.168.30.200
add name=dhcp_vlan_1070 ranges=192.168.70.100-192.168.70.254
add name=dhcp_vlan_1010 ranges=192.168.10.50-192.168.10.254
add name=dhcp_ether1_admin ranges=192.168.22.2-192.168.22.254
add name=dhcp_vlan_1080 ranges=192.168.80.50-192.168.80.200
add name=dhcp_vlan_1040 ranges=192.168.40.50-192.168.40.200
add name=dhcp_vlan_1020 ranges=192.168.20.50-192.168.20.200
/ip dhcp-server
add address-pool=dhcp_vlan_1050 interface=VLAN_1050_OLT1_GPON5 name=
DHCP_GPON5
add address-pool=dhcp_vlan_1060 interface=VLAN_1060_OLT1_GPON6 name=
DHCP_GPON6
add address-pool=dhcp_vlan_1030 interface=VLAN_1030_OLT1_GPON3 name=
DHCP_GPON3
add address-pool=dhcp_vlan_1070 interface=VLAN_1070_OLT1_GPON7 name=
DHCP_GPON7
add address-pool=dhcp_vlan_1010 interface=VLAN_1010_OLT1_GPON1 name=
DHCP_GPON1

Interface not running

add address-pool=dhcp_ether1_admin interface=ether1_ADMIN name=dhcp1
add address-pool=dhcp_vlan_1080 interface=VLAN_1080_OLT1_GPON8 name=
DHCP_GPON8
add address-pool=dhcp_vlan_1040 interface=VLAN_1040_OLT1_GPON4 name=
DHCP_GPON4
add address-pool=dhcp_vlan_1020 interface=VLAN_1020_OLT1_GPON2 name=
DHCP_GPON2
/ip smb users
set [ find default=yes ] disabled=yes
/port
set 0 name=serial0
set 1 name=serial1
/routing bgp instance
add as=65000 name=bgp-instance-1 router-id=10.33.32.58
/routing bgp template
set default as=65000 disabled=no output.network=to-bgp routing-table=main
/routing ospf instance
add disabled=no name=default-v2
/routing ospf area
add disabled=yes instance=default-v2 name=backbone-v2
/interface bridge port
add bridge=WAN_SILICA interface=sfp28-1_SILICA
add bridge=WAN_SILICA interface=sfp28-2_CAB_SUR
add bridge=WAN_SILICA interface=sfp-sfpplus1_TORRE
/ip firewall connection tracking
set udp-timeout=10s
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192 soft-max-neighbor-entries=8191
/interface ovpn-server server
add auth=sha1,md5 mac-address=FE:6E:7A:2E:9B:85 name=ovpn-server1
/ip address
add address=192.168.254.1/24 interface=sfp-sfpplus12_ADMIN_OLT network=
192.168.254.0
add address=xxx.100.197.58/29 interface=sfp28-1_SILICA network=xxx.100.197.56
add address=192.168.72.1/22 interface=sfp-sfpplus4_A_GE1_OLT_NORTE network=
192.168.72.0
add address=192.168.50.1/24 interface=VLAN_1050_OLT1_GPON5 network=
192.168.50.0
add address=192.168.60.1/24 interface=VLAN_1060_OLT1_GPON6 network=
192.168.60.0
add address=xxx.100.197.59/29 interface=sfp28-1_SILICA network=xxx.100.197.56
add address=xxx.100.197.60/29 interface=sfp28-1_SILICA network=xxx.100.197.56
add address=xxx.100.197.61/29 interface=sfp28-1_SILICA network=xxx.100.197.56
add address=xxx.100.197.62/29 interface=sfp28-1_SILICA network=xxx.100.197.56
add address=192.168.30.1/24 interface=VLAN_1030_OLT1_GPON3 network=
192.168.30.0
add address=192.168.70.1/24 interface=VLAN_1070_OLT1_GPON7 network=
192.168.70.0
add address=192.168.10.1/24 interface=VLAN_1010_OLT1_GPON1 network=
192.168.10.0
add address=192.168.22.1/24 interface=ether1_ADMIN network=192.168.22.0
add address=192.168.80.1/24 interface=VLAN_1080_OLT1_GPON8 network=
192.168.80.0
add address=192.168.40.1/24 interface=VLAN_1040_OLT1_GPON4 network=
192.168.40.0
add address=192.168.20.1/24 interface=VLAN_1020_OLT1_GPON2 network=
192.168.20.0
add address=10.100.100.1/24 interface=sfp-sfpplus2_CAB_SUR_BACKUP network=
10.100.100.0
add address=xxx.100.197.190 disabled=yes interface=sfp28-1_SILICA network=
xxx.100.197.190
add address=xxx.100.197.190/28 disabled=yes interface=WAN_SILICA network=
xxx.100.197.176
/ip arp
add address=xxx.100.197.177 comment=swap disabled=yes interface=WAN_SILICA
published=yes
add address=xxx.100.197.178 comment=swap disabled=yes interface=sfp28-1_SILICA
published=yes
add address=xxx.100.197.179 comment=swap disabled=yes interface=sfp28-1_SILICA
published=yes
add address=xxx.100.197.180 comment=swap disabled=yes interface=sfp28-1_SILICA
published=yes
add address=xxx.100.197.181 comment=swap disabled=yes interface=sfp28-1_SILICA
published=yes
add address=xxx.100.197.182 comment=swap disabled=yes interface=sfp28-1_SILICA
published=yes
add address=xxx.100.197.183 comment=swap disabled=yes interface=sfp28-1_SILICA
published=yes
add address=xxx.100.197.184 comment=swap disabled=yes interface=sfp28-1_SILICA
published=yes
add address=xxx.100.197.185 comment=swap disabled=yes interface=sfp28-1_SILICA
published=yes
add address=xxx.100.197.186 comment=swap disabled=yes interface=sfp28-1_SILICA
published=yes
/ip service
set ftp disabled=yes
set ssh disabled=yes
set telnet disabled=yes
set api-ssl disabled=yes
/ip smb shares
set [ find default=yes ] directory=/pub
/ppp profile
set *0 dns-server=8.8.8.8 local-address=192.168.40.1 remote-address=*3
wins-server=4.4.4.4
/routing bfd configuration
add disabled=no interfaces=all min-rx=200ms min-tx=200ms multiplier=5
/routing bgp connection
add disabled=yes instance=bgp-instance-1 local.address=10.33.32.58 .role=ibgp
name=WAN_SILICABGP output.default-originate=never .filter-chain=to-bgp
remote.address=10.33.32.57/30 routing-table=main
/routing filter rule
add chain=to-bgp rule="if (dst in xxx.100.197.176/28) { accept }"
add chain=to-bgp rule="if (dst in xxx.100.197.56/29) { accept }"
/system clock
set time-zone-name=America/Argentina/Cordoba
/system leds
set 0 interface=sfp28-1_SILICA leds=sfp28-1-led1
set 1 interface=sfp28-1_SILICA leds=sfp28-1-led2 type=interface-status
set 2 interface=sfp28-2_CAB_SUR leds=sfp28-2-led1
set 3 interface=sfp28-2_CAB_SUR leds=sfp28-2-led2 type=interface-status
set 4 interface=sfp-sfpplus1_TORRE leds=sfp-sfpplus1-led1
set 5 interface=sfp-sfpplus1_TORRE leds=sfp-sfpplus1-led2 type=
interface-status
set 6 interface=sfp-sfpplus2_CAB_SUR_BACKUP leds=sfp-sfpplus2-led2 type=
interface-status
set 7 interface=sfp-sfpplus2_CAB_SUR_BACKUP leds=sfp-sfpplus2-led1
set 8 interface=sfp-sfpplus4_A_GE1_OLT_NORTE leds=sfp-sfpplus4-led1
set 9 interface=sfp-sfpplus5_A_GE2_OLT_NORTE leds=sfp-sfpplus5-led1
set 10 interface=sfp-sfpplus6_A_GE3_OLT_NORTE leds=sfp-sfpplus6-led1
set 11 interface=sfp-sfpplus7_A_GE4_OLT_NORTE leds=sfp-sfpplus7-led1
set 12 interface=sfp-sfpplus4_A_GE1_OLT_NORTE leds=sfp-sfpplus4-led2 type=
interface-status
set 13 interface=sfp-sfpplus5_A_GE2_OLT_NORTE leds=sfp-sfpplus5-led2 type=
interface-status
set 14 interface=sfp-sfpplus6_A_GE3_OLT_NORTE leds=sfp-sfpplus6-led2 type=
interface-status
set 15 interface=sfp-sfpplus7_A_GE4_OLT_NORTE leds=sfp-sfpplus7-led2 type=
interface-status
/system resource irq rps
set *1 disabled=yes
set *2 disabled=yes
set *3 disabled=yes
set *4 disabled=yes
set *5 disabled=yes
set *6 disabled=yes
set *7 disabled=yes
set *8 disabled=yes
set *9 disabled=yes
set *A disabled=yes
set *B disabled=yes
set *C disabled=yes
set *D disabled=yes
/system routerboard settings
set enter-setup-on=delete-key

````

forgotten 

:sleepy_face: