I made a following setup:
"Setup with Juniper router" uses Juniper router and
"Setup with Cisco router" uses Cisco router. Both computers sent data(Iperf sends 1470 byte datagrams) for 300 seconds at 9Mbps. As you can see, in case of Cisco router and switch, the difference is 0.3%(actually I did multiple tests with different bandwidth values and test lengths and difference was always 0.3%). In case of Juniper router, the difference between Cisco switch interface traffic counters and Juniper router interface traffic counters were 1.2% - 1.3%.
While in case of Juniper router and Cisco switch this 1.2% - 1.3% difference makes sense because Juniper router probably counts only up to IP header and switch includes L2 header as well, but what might cause this 0.3% difference in case of Cisco router and Cisco switch?