You are not logged in.

#1 2016-09-29 08:37:40

arx
Member
From: 2730ft above sea level
Registered: 2016-04-30
Posts: 46

[RESOLVED] Delaying timeoute with ping

Good evening,

The address I am pinging to is in a private VPN, and I am expecting the ping to fail as I am not connected to the VPN. I want ping not timeout if there is no response and I've manipulated the TTL, timeout, deadline, count, sndbuf and interval flags. All timeoutes are happening at appriximately 10 seconds.

I'm thinking about manipulating the pattern to avoid failed packets.

examples:

$ ping -f -W 60 -w 60 -c 99999 x.x.x.com
ping: unknown host x.x.x.com
$ ^C
$ godmode "ping -f -w 60 x.x.x.com"
ping: unknown host x.x.x.com
$ godmode "ping -f -l 100 x.x.x.com"
ping: unknown host x.x.x.com

Where godmode is a function in .bashrc:

godmode() {
	sudo -i $1
}

Duplicate because it spans system and network: https://bbs.archlinux.org/viewtopic.php … 0#p1657480

Last edited by arx (2016-09-30 19:51:30)

Offline

#2 2016-09-30 05:14:07

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [RESOLVED] Delaying timeoute with ping

Have you experimented with fping which is in extra?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2016-09-30 10:37:15

progandy
Member
Registered: 2012-05-17
Posts: 5,209

Re: [RESOLVED] Delaying timeoute with ping

In my opinion, it doesn't fail the ping, but the NS lookup. I think you'll have to specify the IP instead of the hostname.
It would probably best to create your own bash script that loops the commands, maybe with a bit of delay.

Last edited by progandy (2016-09-30 10:39:35)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2016-09-30 19:49:22

arx
Member
From: 2730ft above sea level
Registered: 2016-04-30
Posts: 46

Re: [RESOLVED] Delaying timeoute with ping

Fping did the trick..

here's my alias for anyone that wants it:

function godmode() { sudo -i $1 }
function kvpn() { kill $(ps -ef | grep msjnc | awk '{print $2 " " $3}'); }
alias pbld='godmode "fping -I tun0 <ip address>"'
alias vpn='kvpn; screen -d -m /usr/bin/msjnc --connect; pbld'

Offline

Board footer

Powered by FluxBB