Community discussions

MUM Europe 2020
 
raikone51
just joined
Topic Author
Posts: 2
Joined: Sat Mar 09, 2019 11:56 am

ICMP Drop

Mon Mar 11, 2019 7:04 pm

Hello guys, it is possible to permit icmp but dropping 10 percentage of the packets ?
 
kiaunel
Member Candidate
Member Candidate
Posts: 211
Joined: Mon Jul 21, 2014 7:59 pm
Location: Romania

Re: ICMP Drop

Mon Mar 11, 2019 7:28 pm

Think like this :
How can routeros imagine how many packets will receive in future?
If it will receive 100 it will have to drop 10
If it will receive 10 it will have to drop 1
if it will receive 1000 it will have to drop 100
How can some os or you predict this?
 
User avatar
k6ccc
Member
Member
Posts: 481
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)

Re: ICMP Drop

Mon Mar 11, 2019 7:41 pm

Hello guys, it is possible to permit icmp but dropping 10 percentage of the packets ?
As kiaunel said, I don't know of a way to drop a certain percentage of packets. However you can rate limit certain packets to some number. For example 5 packets per second.
add action=accept chain=ICMP comment=\
    "Accept ICMP type 0:0 (Echo reply) and limit to 5 packets / sec" \
    icmp-options=0:0-255 limit=5,5 protocol=icmp
Note that I have a specific ICMP chain that handles almost all events relating to ICMP packets. Hence the reason that the above code is in the ICMP chain and not the Input chain.
add action=jump chain=input comment=\
    "Jump to ICMP chain to prevent being ping flooded." in-interface=\
    E1-p2_Cable_Internet jump-target=ICMP protocol=icmp
What are you trying to accomplish?
RB750Gr3, RB750r2, CRS326-24G-2S (in SwitchOS), CSS326-24G-2S, CSS106-5G-1S, RB260GS
Not sure if I beat them in submission, or they beat me into submission


Jim
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1796
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: ICMP Drop

Tue Mar 12, 2019 12:31 am

You could use the "nth" filter option to drop every nth packet. so for 10% every 10 packet should be dropped.
 
User avatar
k6ccc
Member
Member
Posts: 481
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)

Re: ICMP Drop

Tue Mar 12, 2019 12:36 am

You could use the "nth" filter option to drop every nth packet. so for 10% every 10 packet should be dropped.
Just learned something new. Did not even know that existed, but sure enough - it's there...
RB750Gr3, RB750r2, CRS326-24G-2S (in SwitchOS), CSS326-24G-2S, CSS106-5G-1S, RB260GS
Not sure if I beat them in submission, or they beat me into submission


Jim

Who is online

Users browsing this forum: Google [Bot] and 24 guests