Sponsored Content
Top Forums Shell Programming and Scripting Solaris ping report failed packet script Post 302957225 by drbiloukos on Thursday 8th of October 2015 10:06:28 AM
Old 10-08-2015
Solaris ping report failed packet script

Hello,
on Solaris ping command does not report failed packet as in i.e. Windows (Connection timeout)
Instead it reports the sequence of the sent packet:

Code:
64 bytes from 10.80.4.120: icmp_seq=11. time=36.0 ms
64 bytes from 10.80.4.120: icmp_seq=12. time=35.9 ms
64 bytes from 10.80.4.120: icmp_seq=13. time=38.0 ms
64 bytes from 10.80.4.120: icmp_seq=14. time=35.8 ms
64 bytes from 10.80.4.120: icmp_seq=15. time=35.9 ms
64 bytes from 10.80.4.120: icmp_seq=68. time=50.2 ms
64 bytes from 10.80.4.120: icmp_seq=69. time=35.2 ms
64 bytes from 10.80.4.120: icmp_seq=70. time=36.0 ms
64 bytes from 10.80.4.120: icmp_seq=71. time=35.4 ms
64 bytes from 10.80.4.120: icmp_seq=72. time=35.8 ms

I am trying to create a script ie. while read line in order to check differences icmp_seq so if next_seq-prev_seq > 1 give a message like ping failed. Can somebody please help ?

Moderator's Comments:
Mod Comment Use code tags, thanks.

Last edited by zaxxon; 10-08-2015 at 11:22 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

0821-077 ping: illegal packet size.

Hi, When i try this command ping ukblx151.ukhx.astrazeneca.net -n 3 | grep icmp it gives following error :mad:: 0821-077 ping: illegal packet size. But when i give command ping ukblx151.ukhx.astrazeneca.net It returns correct output.:D Could you please help? (2 Replies)
Discussion started by: vishal_ranjan
2 Replies

2. Solaris

PLOGI failed state=Packet Transport error

Someone who can help me. the following error occur, what does it mean, and any possible solution you can give.thanks syslog: fp: NOTICE: fp(2): PLOGI to d5900 failed state=Packet Transport error , reason=No Connection (Database) $cat /var/adm/messages Nov 3 05:16:21 vfaus279 fp: ... (7 Replies)
Discussion started by: o_m_g
7 Replies

3. UNIX for Advanced & Expert Users

Need help with configuring large packet size on Solaris 7 / e6500

We're running Solaris 7 on FDDI n/w on an E6500 host and wish to use MTU (packet size) > 1500, more like 3072 bytes to begin with and possibly up to 4096 bytes. Linux has /etc/network/interfaces. Does ANYONE remember the equivalent in Unix? When I do ifconfig eth0 mtu 4000, I get the error... (0 Replies)
Discussion started by: sharique
0 Replies

4. Solaris

Need help with configuring large packet size on Solaris 7 / e6500

Greetings, I'm stuck in a time warp using ancient machines from the prehistoric era that should be rightfully displayed in the Smithsonian. We're running Solaris 7 on FDDI n/w on an E6500 host and wish to use MTU (packet size) > 1500, more like 3072 bytes to begin with and possibly up to 4096... (9 Replies)
Discussion started by: sharique
9 Replies

5. Solaris

Solaris 2.6 looking for ARP/RARP packet

Hi Everybody :) This is my first post concerning Solaris 2.6 trying to boot on a Tadpole SparcBook 3. I bought the laptop from somebody who configured it for his network. For the moment I want it as a non-networked standalone machine, or at least have that option. On trying to boot I get an... (0 Replies)
Discussion started by: JuBiLeE_50_05
0 Replies

6. Shell Programming and Scripting

Animation Ping on Solaris Like Cisco Ping

Hi, I develop simple animation ping script on Solaris Platform. It is like Cisco ping. Examples and source code are below. bash-3.00$ gokcell 152.155.180.8 30 Sending 30 Ping Packets to 152.155.180.8 !!!!!!!!!!!!!.!!!!!!!!!!!!!!!. % 93.33 success... % 6.66 packet loss...... (1 Reply)
Discussion started by: gokcell
1 Replies

7. Shell Programming and Scripting

Calculate packet in/out interval script

Hello I'm trying to find interval for packet IN/OUT for a gateway. log looks like: 02.12.2011 16.28.29:200 PDU IN CI:424 TRID:200 ID:N/A EID:N/A EX:N/A PDU:0000001f0000000100000000000000c874746f700074746f70000034010100 02.12.2011 16.28.29:228 PDU OU CI:424 TRID:200 ID:N/A EID:N/A EX:ACK... (3 Replies)
Discussion started by: samer.odeh
3 Replies

8. Linux

Ping check failed from Nagios master server on windows hosts in the same subnet

Hello All, We have added a windows host and its config files to Nagios master server and wanted to do a ping check alone at the moment however, the nagios master server identifies the host in its GUI and immediately disappears can anyone let me know the right approach to this one, We want to... (2 Replies)
Discussion started by: lovesaikrishna
2 Replies

9. AIX

Packet loss coming with big packet size ping

(5 Replies)
Discussion started by: Vishal_dba
5 Replies

10. AIX

Ping to remote host failed

Actually. I was getting a ping to remote host failed for one of my etherchannel. When I checked it was in backup adapter and again I use to faileover and brought to primary channel. But it was again going to backup channel and giving me the alert ping to remotehost failed. When I checked the load... (3 Replies)
Discussion started by: Mohamed Thamim
3 Replies
net_inject(9F)						   Kernel Functions for Drivers 					    net_inject(9F)

NAME
net_inject - determine if a network interface name exists for a network protocol SYNOPSIS
#include <sys/neti.h> int net_inject(const net_data_t net, inject_t style, net_inject_t *packet); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
net value returned from a successful call to net_protocol_lookup(9F). style method that determines how this packet is to be injected into the network or kernel. packet details about the packet to be injected. DESCRIPTION
The net_inject() function provides an interface to allow delivery of network layer (layer 3) packets either into the kernel or onto the network. The method of delivery is determined by style. If NI_QUEUE_IN is specified, the packet is scheduled for delivery up into the kernel, imitating its reception by a network interface. In this mode, packet->ni_addr is ignored and packet->ni_physical specifies the interface for which the packet is made to appear as if it arrived on. If NI_QUEUE_OUT is specified, the packet is scheduled for delivery out of the kernel, as if it were being sent by a raw socket. In this mode, packet->ni_addr and packet->ni_physical are both ignored. Neither NI_QUEUE_IN or NI_QUEUE_OUT cause the packet to be immediately processed by the kernel. Instead, the packet is added to a list and a timeout is scheduled (if there are none already pending) to deliver the packet. The call to net_inject() returns once the setup has been completed, and not after the packet has been processed. The packet processing is completed on a different thread and in a different context to that of the original packet. Thus, a packet queued up using net_inject() for either NI_QUEUE_IN or NI_QUEUE_OUT is presented to the packet event again. A packet received by a hook from NH_PHYSICAL_IN and then queued up with NI_QUEUE_IN is seen by the hook as another NH_PHYSICAL_IN packet. This also applies to both NH_PHYSICAL_OUT and NI_QUEUE_OUT packets. If NI_DIRECT_OUT is specified, an attempt is made to send the packet out to a network interface immediately. No processing on the packet, aside from prepending any required layer 2 information, is made. In this instance, packet->ni_addr may be used to specify the next hop (for the purpose of link layer address resolution) and packet->ni_physical determines which interface the packet should be sent out. For all three packets, packet->ni_packet must point to an mblk structure with the packet to be delivered. See net_inject_t(9S) for more details on the structure net_inject_t. RETURN VALUES
The net_inject() function returns: -1 The network protocol does not support this function. 0 The packet is successfully queued or sent. 1 The packet could not be queued up or sent out immediately. CONTEXT
The net_inject() function may be called from user, kernel, or interrupt context. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
net_protocol_lookup(9F), netinfo(9F), net_inject_t(9S) SunOS 5.11 1 May 2008 net_inject(9F)
All times are GMT -4. The time now is 05:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy