MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL...

84
MUM EUROPE 2017

Transcript of MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL...

Page 1: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

MUM EUROPE

2017

MIKROTIK TRAFFIC GENERATOR STUDY

CASE

JOSE MANUEL ROMANj o s e r o m a n f i b e r c l i c o m + 3 4 6 5 2 2 4 1 4 3 1

M A D R I D P R A G U E

bull (2016 ndashNow) CEO FiberCLI

bull (2015 ndashNow) CTO WISP

17 years experience at IT industry Mikrotik Certified Consultant and Trainer MTCNA MTCRE MTCTCE

MTCUME MTCWE MTCIPv6E MTCINE CISACISSP Master ITIL

bull (2008 ndashNow) Security Consultant and Analyst

bull (2000 ndash2007) Networking Security and ITIL Teacher

JOSE MANUEL ROMANJ O S E r o m a n f i b e r c l i c o m + 3 4 6 5 2 2 4 1 4 3 1

M A D R I D P R A G U E

bull (2016 MUM Middle East) -System integration and analysis

bull (2016 MUM Spain) - Integracioacuten de MikroTik con cabeceras de fibra oacuteptica

bull (2016 MUM Europe) -Securing and testing with MikroTik

bull (2015 MUM Spain) -Pruebas de seguridad y configuracioacuten con Mikrotik

My previous presentations at MUM

COMPANY PROFILE

PROJECT BASEDbull Fiber optic installation outdor and

indoor (Hotel and Office Building)

bull Wireless installation Rural area and

City

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

CONSULTANTbull Mikrotik Products

bull Licensed Antennas

bull Ipv4 Brocker

bull Advanced monitoring integrations

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

TRAININGbull Official Mikrotik Training Partner

with three different languages and

modules (English Indonesia and

Spanish)

bull Courses on premises of companies in

Europe and middle east

bull Specialized in IPv6

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

AGENDA

Traffic Generator Introduction Special Use Case Example

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 2: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

MIKROTIK TRAFFIC GENERATOR STUDY

CASE

JOSE MANUEL ROMANj o s e r o m a n f i b e r c l i c o m + 3 4 6 5 2 2 4 1 4 3 1

M A D R I D P R A G U E

bull (2016 ndashNow) CEO FiberCLI

bull (2015 ndashNow) CTO WISP

17 years experience at IT industry Mikrotik Certified Consultant and Trainer MTCNA MTCRE MTCTCE

MTCUME MTCWE MTCIPv6E MTCINE CISACISSP Master ITIL

bull (2008 ndashNow) Security Consultant and Analyst

bull (2000 ndash2007) Networking Security and ITIL Teacher

JOSE MANUEL ROMANJ O S E r o m a n f i b e r c l i c o m + 3 4 6 5 2 2 4 1 4 3 1

M A D R I D P R A G U E

bull (2016 MUM Middle East) -System integration and analysis

bull (2016 MUM Spain) - Integracioacuten de MikroTik con cabeceras de fibra oacuteptica

bull (2016 MUM Europe) -Securing and testing with MikroTik

bull (2015 MUM Spain) -Pruebas de seguridad y configuracioacuten con Mikrotik

My previous presentations at MUM

COMPANY PROFILE

PROJECT BASEDbull Fiber optic installation outdor and

indoor (Hotel and Office Building)

bull Wireless installation Rural area and

City

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

CONSULTANTbull Mikrotik Products

bull Licensed Antennas

bull Ipv4 Brocker

bull Advanced monitoring integrations

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

TRAININGbull Official Mikrotik Training Partner

with three different languages and

modules (English Indonesia and

Spanish)

bull Courses on premises of companies in

Europe and middle east

bull Specialized in IPv6

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

AGENDA

Traffic Generator Introduction Special Use Case Example

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 3: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

JOSE MANUEL ROMANj o s e r o m a n f i b e r c l i c o m + 3 4 6 5 2 2 4 1 4 3 1

M A D R I D P R A G U E

bull (2016 ndashNow) CEO FiberCLI

bull (2015 ndashNow) CTO WISP

17 years experience at IT industry Mikrotik Certified Consultant and Trainer MTCNA MTCRE MTCTCE

MTCUME MTCWE MTCIPv6E MTCINE CISACISSP Master ITIL

bull (2008 ndashNow) Security Consultant and Analyst

bull (2000 ndash2007) Networking Security and ITIL Teacher

JOSE MANUEL ROMANJ O S E r o m a n f i b e r c l i c o m + 3 4 6 5 2 2 4 1 4 3 1

M A D R I D P R A G U E

bull (2016 MUM Middle East) -System integration and analysis

bull (2016 MUM Spain) - Integracioacuten de MikroTik con cabeceras de fibra oacuteptica

bull (2016 MUM Europe) -Securing and testing with MikroTik

bull (2015 MUM Spain) -Pruebas de seguridad y configuracioacuten con Mikrotik

My previous presentations at MUM

COMPANY PROFILE

PROJECT BASEDbull Fiber optic installation outdor and

indoor (Hotel and Office Building)

bull Wireless installation Rural area and

City

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

CONSULTANTbull Mikrotik Products

bull Licensed Antennas

bull Ipv4 Brocker

bull Advanced monitoring integrations

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

TRAININGbull Official Mikrotik Training Partner

with three different languages and

modules (English Indonesia and

Spanish)

bull Courses on premises of companies in

Europe and middle east

bull Specialized in IPv6

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

AGENDA

Traffic Generator Introduction Special Use Case Example

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 4: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

JOSE MANUEL ROMANJ O S E r o m a n f i b e r c l i c o m + 3 4 6 5 2 2 4 1 4 3 1

M A D R I D P R A G U E

bull (2016 MUM Middle East) -System integration and analysis

bull (2016 MUM Spain) - Integracioacuten de MikroTik con cabeceras de fibra oacuteptica

bull (2016 MUM Europe) -Securing and testing with MikroTik

bull (2015 MUM Spain) -Pruebas de seguridad y configuracioacuten con Mikrotik

My previous presentations at MUM

COMPANY PROFILE

PROJECT BASEDbull Fiber optic installation outdor and

indoor (Hotel and Office Building)

bull Wireless installation Rural area and

City

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

CONSULTANTbull Mikrotik Products

bull Licensed Antennas

bull Ipv4 Brocker

bull Advanced monitoring integrations

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

TRAININGbull Official Mikrotik Training Partner

with three different languages and

modules (English Indonesia and

Spanish)

bull Courses on premises of companies in

Europe and middle east

bull Specialized in IPv6

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

AGENDA

Traffic Generator Introduction Special Use Case Example

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 5: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

COMPANY PROFILE

PROJECT BASEDbull Fiber optic installation outdor and

indoor (Hotel and Office Building)

bull Wireless installation Rural area and

City

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

CONSULTANTbull Mikrotik Products

bull Licensed Antennas

bull Ipv4 Brocker

bull Advanced monitoring integrations

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

TRAININGbull Official Mikrotik Training Partner

with three different languages and

modules (English Indonesia and

Spanish)

bull Courses on premises of companies in

Europe and middle east

bull Specialized in IPv6

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

AGENDA

Traffic Generator Introduction Special Use Case Example

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 6: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

PROJECT BASEDbull Fiber optic installation outdor and

indoor (Hotel and Office Building)

bull Wireless installation Rural area and

City

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

CONSULTANTbull Mikrotik Products

bull Licensed Antennas

bull Ipv4 Brocker

bull Advanced monitoring integrations

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

TRAININGbull Official Mikrotik Training Partner

with three different languages and

modules (English Indonesia and

Spanish)

bull Courses on premises of companies in

Europe and middle east

bull Specialized in IPv6

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

AGENDA

Traffic Generator Introduction Special Use Case Example

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 7: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

CONSULTANTbull Mikrotik Products

bull Licensed Antennas

bull Ipv4 Brocker

bull Advanced monitoring integrations

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

TRAININGbull Official Mikrotik Training Partner

with three different languages and

modules (English Indonesia and

Spanish)

bull Courses on premises of companies in

Europe and middle east

bull Specialized in IPv6

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

AGENDA

Traffic Generator Introduction Special Use Case Example

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 8: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

TRAININGbull Official Mikrotik Training Partner

with three different languages and

modules (English Indonesia and

Spanish)

bull Courses on premises of companies in

Europe and middle east

bull Specialized in IPv6

b u s i n e s s i n q u i r i e S h e l l o f i b e r c l i c o m

AGENDA

Traffic Generator Introduction Special Use Case Example

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 9: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

AGENDA

Traffic Generator Introduction Special Use Case Example

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 10: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Objetive

The goal of this presentation is to explain the operation of the traffic generator

11

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 11: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Problem

What to do when I need to test or audit whether a router or a system is working correctly

12

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 12: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Symptoms

We have a complex configuration and we have no idea how to test it

13

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 13: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Solution

Traffic generator

14

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 14: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

TRAFFIC GENERATORINTRODUCTION

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 15: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

WHAT IS TRAFFIC

GENERATOR

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 16: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Traffic Generator is a tool that allows to evaluate performance of DUT (Device Under Test) or SUT (System Under Test)

ldquoldquohttpswikimikrotikcomwikiManualToolsTraffic_Generator

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 17: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

WHATrsquoS TRAFFIC GENERATOR CAN

DO

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 18: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

ldquo

ldquo

Traffic Generator tool can generate and send RAW packets over specific ports It also collects latency and jitter values txrx rates counts lost packets and

detects Out-of-Order (OOO) packets

Traffic Generator can be used similar to bandwidth test tool as well as generate packets that will be routed back to packet generator for advanced

status collection

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 19: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

DEVICE UNDER TEST

TRAFFIC GENERATOR

Test performance of device or system before migrate to production

infrastructure such as

bull PPS (Packet Per Second)

bull Throughput Bandwidth

bull CPU

bull Hardware Encryption

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 20: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Test performance of link (wired or wireless) between sites

bull Latency

bull Packet loss

bull Jitter

bull Bandwidth

SITE 1 SITE 2

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 21: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

DEVICE UNDER TEST

TRAFFIC GENERATOR TRAFFIC GENERATOR TRAFFIC GENERATOR

Polices (firewall or qos) test performance of device

bull Creating ldquofabricatedrdquopackets

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 22: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

EXAMPLE

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 23: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

CASE 1

Simple Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 24: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

DEVICE UNDER TESTTRAFFIC GENERATOR

1010024

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 25: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

ip addressadd address=1010124 interface=ether1 network=10100

ip addressadd address=1010224 interface=ether1 network=10100

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 26: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

PORT TEMPLATE STREAM

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 27: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

tool traffic-generator portadd interface=ether1 name=port1

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 28: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

tool traffic-generator packet-templateadd name=template-1 port=port1 ip-dst=10102 ip-src=10101

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 29: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

tool traffic-generator streamadd name=stream-1 packet-size=1500 tx-template=template-1

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 30: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

WHY TXRX TRAFFICrsquoS NOT EQUAL

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 31: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Because we only send (tx) traffic to the destination address as above DUTSUT only

receive traffic without sending the packet back

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 32: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

We change the template in the ldquoIPrdquo section like this

Ip address ether1 on Traffic-Generator device

Ip address ether1 on DUTSUT device

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 33: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

CASE 2

Multi-Port Traffic Generator

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 34: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

DEVICE UNDER TESTTRAFFIC GENERATOR

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 35: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

ip addressadd address=1010224 interface=ether1 network=10100add address=1020224 interface=ether2 network=10200add address=1030224 interface=ether3 network=10300

ip addressadd address=1010124 interface=ether1 network=10100add address=1020124 interface=ether2 network=10200add address=1030124 interface=ether3 network=10300

ipv6 addressadd address=200110101 interface=ether1add address=200110201 interface=ether2add address=200110301 interface=ether3

ipv6 addressadd address=200110102 interface=ether1add address=200110202 interface=ether2add address=200110302 interface=ether3

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 36: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

TEMPLATES START

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 37: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

TRAFFIC GENERATOR

DEVICE UNDER TEST

PORT 1 PORT 2 PORT 3

PORT 1 PORT 2 PORT 3

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 38: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

tool traffic-generator packet-templateadd header-stack=macipipv6udp ip-dst=10201 ip-gateway=10102 ipv6-dst=20011021128 ipv6-gateway=20011012 name=port1-to-port2add header-stack=macipipv6tcp ip-dst=10301 ip-gateway=10102 ipv6-dst=20011031128 ipv6-gateway=20011012 name=port1-to-port3add header-stack=macipipv6raw ip-dst=10101 ip-gateway=10202 ipv6-dst=20011011128 ipv6-gateway=20011022 name=port2-to-port1add header-stack=macipv6ipudp ip-dst=10301 ip-gateway=10202 ipv6-dst=20011031128 ipv6-gateway=20011022 name=port2-to-port3add header-stack=macipv6iptcp ip-dst=10101 ip-gateway=10302 ipv6-dst=20011011128 ipv6-gateway=20011032 name=port3-to-port1add header-stack=macipv6ipraw ip-dst=10201 ip-gateway=10302 ipv6-dst=20011021128 ipv6-gateway=20011032 name=port3-to-port2

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 39: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

CASE 3

Fabricated Packets test

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 40: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

In this case we wil l try a queue tree configuration that prioritizes voice traffic QoS router has

mangle rules and queue tree l imitations

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 41: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

101000024

1000024

1010024

2000010

1010100

101000100

DUT

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 42: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

In this secenario we wil l generates three diferentpackets

bull Tw o p a c ke t s ge n e ra t e d b y ( I P - P H O N E _ S I M U L ATO R ) s p e c i f i e d l i ke R T P a n d S I P p a c ke t s

bull O n e p a c ke t ge n e ra t e d b y ( I N T R U D E R ) ra n d o m p a c ke t l i ke s p o o f i n g

SCENARIO

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 43: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

ip addressadd address=101010024 interface=ether1 network=10100

IP-PHONE_SIMULATOR

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 44: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

bull RTP CALL vo ice audio data wi l l be marked by DSCP va lue of 46 DSCP va lue of 46 resul ts in a ToS byte va lue of 184 EF=0xB8

bull SIP CALL s igna l ing messages wi l l be marked by DSCP va lue of 26A DSCP va lue of 26 resu l ts in a ToS byte va lue of 104 AF31=0x68 (=104)75

CREATE FABRICATED VOIP TRAFIC

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 45: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

tool traffic-generator packet-templateadd ip-dscp=184 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_RTP udp-dst-port=16384-32767add ip-dscp=104 ip-dst=101000100 ip-gateway=10101 ip-protocol=udp name=VOIP_SIP udp-dst-port=50605061

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 46: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

INTRUDER

ip addressadd address=200001024 interface=ether1 network=200000

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 47: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

bull Create random RAW packet in Traff ic -Generator

CREATE FABRICATED RANDOM TRAFIC

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 48: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

tool traffic-generator packet-templateadd header-stack=macipraw ip-dst=101000100 ip-gateway=200001 name=spooftool traffic-generator stream add name=stream-1 packet-size=1500 tx-template=spoof

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 49: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

DUTSUT

ip addressadd address=101000124 comment=VOIP SERVER interface=ether2 network=1010000add address=1000124 comment=INTERNET interface=ether1 network=10000add address=1010124 comment=CLIENT interface=ether3 network=10100

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 50: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

bull Create two mangle for VOIP and one mangle for rest of packets dest inated to VOIP Server

bull Create three queue -treebull One parent queue ( PBX_Traff ic )bull One queue for rest packets (REST)bull One queue for VOIP packets (VOIP)

CREATE MANGLE AND QUEUE TREE

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 51: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

ip firewall mangleadd action=mark-packet chain=prerouting comment=VOIP RULES dscp=46 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting dscp=26 dst-address=101000100 new-packet-mark=voip-packets passthrough=noadd action=mark-packet chain=prerouting comment=REST RULES dst-address=101000100 new-packet-mark=rest-packets passthrough=no

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 52: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

queue treeadd name=PBX_Traffic parent=globaladd limit-at=5M max-limit=10M name=REST packet-mark=rest-packets parent=PBX_Trafficadd limit-at=1M max-limit=1M name=VOIP packet-mark=voip-packets parent=PBX_Traffic priority=1

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 53: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

LAUNCH SIMULATION

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 54: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

bull Launch t raff ic -generator f rom ldquo INTRUDERrdquo with packets 20 mbps

bull Launch t raff ic -generator f rom ldquo IP -PHONE_SIMULATORrdquo with 120 kbps t raff ic

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 55: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

INTRUDER

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 56: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

IP-PHONE SIMULATOR

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 57: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

DUT

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 58: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

CASE 4

Testing wireless

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 59: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Station

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 60: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

AP

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 61: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Traffic generator

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 62: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Stats

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 63: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Stats

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 64: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

CASE 5

Injecting pcap

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 65: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

What is pcap

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 66: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

How can I generate pcapcaptures

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 67: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Inject pcap

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 68: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Inject pcap

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 69: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Inject pcap

Conclusion

Grazie milleJose romanfiberc l i com

Page 70: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Conclusion

Grazie milleJose romanfiberc l i com

Page 71: MUM EUROPEmum.mikrotik.com/presentations/EU17/presentation_4081... · 2017-03-31 · JOSE MANUEL ROMAN J O S E . r o m a n @ f i b e r c l i . c o m + 3 4 6 5 2 2 4 1 4 3 1 M A D

Grazie milleJose romanfiberc l i com