#How to set packet size for Ping

1 messages · Page 1 of 1 (latest)

placid surge
#

Is it somehow possible to set the packet size for the Ping integration? I have intermittent problems with MTU size between sites and it will be very useful to be able to ping with two packet sizes. This would be the -s option for the Ping command.

radiant mauve
#

If it's not documented (and I don't see it), probably not possible.

paper bramble
paper bramble
placid surge
#

Thanks - I'll check this out. If I don't have to write scripts, it will be a win 🙂

placid surge
#

Look like shell and scripts for me..

placid surge
#

OK it works.

Maybe this helps someone:
In configuration.yaml:

shell_command:
  ping_that_ip: ping [the ip] -c 5 -s 1500

You need a helper:

input_number.that_ip_big_mtu_ping

In Automations:

id: '[your id]'
alias: Ping A Big MTU
description: ''
triggers:
  - trigger: time_pattern
    seconds: '60'
conditions: []
actions:
  - action: shell_command.ping_that_ip
    metadata: {}
    data: {}
    response_variable: pingResponse
  - action: input_number.set_value
    target:
      entity_id: input_number.that_ip_big_mtu_ping
    data:
      value: '{{ pingResponse[''stdout''].split('' = '')[1].split(''/'')[1] | float }}'
mode: single