ICMP echo and port 7 echo service

ICMP echo and port 7 echo service

Post by N.K. Li » Wed, 29 Sep 1999 04:00:00



I have set the echo service in the inetd.conf (port 7) to run and was
using the attached visual basic code to ping the same but upgraded to
RH6 server. That runs fine until the server echo service got killed
for reason I suspected to be overloaded pinging from 80 win95 machines
running the same code. The pinging by the machines were to ensure that
the server were alive, followed by updating (copy) of data to
samba-mounted directories to the server.

To monitor the pinging, I have installed a utility, ippl 1.4.7, that
have the following description:

ippl is a daemon which logs IP packets sent to a computer. It
runs in the background, and displays information about the incoming
packets.
http://www.via.ecp.fr/~hugo/ippl/

The log I got looked as follows. The RH6 server is 133.1.2.101, AIX
server ams301 (133.1.2.53) and all others were win95 machines. The log
revealed that there were 2 type of echo service: port 7 echo and no
port ICMP. All the 'echo connections' were from the vb6 application,
whereas the ICMP echo request were either using a win95 DOS ping or
AIX ping.

So, how is it that the DOS or AIX ping were able to work without a
port no.? Anybody has a sample code that for these ping programs that
I could use it in my vb program? ie. I would like to use the ICMP echo
request in the vb program instead of using the port 7 echo. Also, is
there any way to check if the port 7 echo service were running using
ps (can't grep any)?

Another thing was the entry:

Sep 27 14:26:33 ICMP message type destination unreachable - bad host
from ams101 [133.1.2.101] (133.1.2.101->133.1.2.101)

Why did the RH server pinging itself at every 1 min 15s, yet showing
bad host?
thks
--nk

---------- ippl log ------------
Sep 27 14:20:16 echo connection attempt from unknown@m14 [133.1.38.14]
(133.1.38.14:1237->133.1.2.101:7)
Sep 27 14:21:33 echo connection attempt from unkn...@133.1.30.131
(133.1.30.131:1040->133.1.2.101:7)
Sep 27 14:21:33 echo connection attempt from unknown@m14 [133.1.38.14]
(133.1.38.14:1238->133.1.2.101:7)
Sep 27 14:22:48 echo connection attempt from unkn...@133.1.30.128
(133.1.30.128:1124->133.1.2.101:7)
Sep 27 14:24:03 ICMP message type destination unreachable - bad host
from ams101 [133.1.2.101] (133.1.2.101->133.1.2.101)
Sep 27 14:24:03 last message repeated 3 time(s)
Sep 27 14:24:03 echo connection attempt from unkn...@133.1.30.172
(133.1.30.172:1262->133.1.2.101:7)
Sep 27 14:24:03 echo connection attempt from unknown@m54 [133.1.30.54]
(133.1.30.54:1097->133.1.2.101:7)
Sep 27 14:25:18 ICMP message type destination unreachable - bad host
from ams101 [133.1.2.101] (133.1.2.101->133.1.2.101)
Sep 27 14:25:18 last message repeated 3 time(s)
Sep 27 14:25:18 ICMP message type echo request from nklim [133.1.8.12]
(133.1.8.12->133.1.2.101)
Sep 27 14:25:18 last message repeated 7 time(s)
Sep 27 14:25:18 echo connection attempt from unkn...@133.1.30.115
(133.1.30.115:1131->133.1.2.101:7)
Sep 27 14:25:18 echo connection attempt from unknown@M25 [133.1.30.25]
(133.1.30.25:1127->133.1.2.101:7)
Sep 27 14:26:33 ICMP message type destination unreachable - bad host
from ams101 [133.1.2.101] (133.1.2.101->133.1.2.101)
Sep 27 14:26:33 last message repeated 3 time(s)
Sep 27 14:26:33 echo connection attempt from unkn...@133.1.30.222
(133.1.30.222:1578->133.1.2.101:7)
Sep 27 14:27:48 echo connection attempt from unkn...@133.1.30.103
(133.1.30.103:1063->133.1.2.101:7)
Sep 27 14:30:44 ICMP message type echo request from ams301
[133.1.2.53] (133.1.2.53->133.1.2.101)

 ----------------------
 HOWTO: Use NT Simple TCP/IP
 Services for Winsock Testing

 The information in this article applies to:

      Microsoft Visual Basic Professional and Enterprise Editions for
                        Windows, versions 5.0,6.0
      Microsoft Windows NT versions 3.51, 4.0
      Microsoft Win32 Software Development Kit (SDK)

 SUMMARY

 Windows NT has a Simple TCP/IP Services service that can be used to
test applications that use the Winsock API and/or the Winsock Control.
Rather  than having to create both a client and server in Visual
Basic, you can  test the client against this service.

 A list of well-known ports available through this service can be
found on an NT machine in the text document
C:\WINNT\SYSTEM32\DRIVERS\ETC\SERVICES.

 MORE INFORMATION

The following sample describes how to use the Microsoft Winsock
Control that shipped with Visual Basic to call the Echo service and
the Quote Service.

 Verify that Simple TCP/IP Services is Running

 Check to see if you can contact the server you are trying to attach
to by running Ping <servername> at the command prompt. If the server
responds, go to the control panel on the server and start the Services
icon. Check the list that comes up for Simple TCP/IP Services.

The Simple TCP/IP Services service must be running for these samples
to work correctly. If Simple TCP/IP Services is not listed,
double-click Network in the Control Panel.

In Windows NT 3.51, click Add Software, choose TCP/IP Protocol and
related components, and click OK. In the dialog box that appears,
click Simple TCP/IP Services and click OK.

In Windows NT 4.0, click Add, choose Simple TCP/IP Services, and click
OK.  

The install program may ask you to provide the path to the Windows NT
 installation CD-ROM and will require that you restart the computer
when it  is finished.

 Using the Echo Service

 1. Create a new Standard EXE project in Visual Basic.
 2. From the Projects menu, choose Components. Make sure that
Microsoft  Winsock Control is checked and click OK.
 3. Add a Winsock Control to the form and leave it named Winsock1.
 4. Add three CommandButtons named cmdConnect, cmdEcho, and
cmdDisconnect, and then change the captions to Connect, Echo and
Disconnect,  respectively.
 5. Add two text boxes and leave them named Text1 and Text2, but
change the  MultiLine property on each to True.
 6. Add the following code to the form:

       Option Explicit
       Const EchoPort = 7

       Private Sub cmdConnect_Click()
          Dim temp As String
          temp = InputBox$("Enter a server name...", _
                 "Connect to the Echo Service", Winsock1.RemoteHost)
          If temp <> "" Then
          If Winsock1.State <> sckClosed Then Winsock1.Close
             Winsock1.RemoteHost = temp
             Winsock1.RemotePort = EchoPort
             Winsock1.LocalPort = 0
             Winsock1.Connect
          End If
       End Sub

       Private Sub cmdDisconnect_Click()
          If Winsock1.State <> sckClosed Then Winsock1.Close
          cmdConnect.Enabled = True
          cmdDisconnect.Enabled = False
          cmdConnect.SetFocus
       End Sub

       Private Sub cmdEcho_Click()
          Winsock1.SendData Text1.Text
          cmdEcho.Enabled = False
       End Sub

       Private Sub Winsock1_Close()
          If Winsock1.State <> 0 Then Winsock1.Close
       End Sub

       Private Sub Winsock1_Connect()
          cmdConnect.Enabled = False
          cmdEcho.Enabled = True
          cmdDisconnect.Enabled = True
       End Sub

       Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)

          Dim temp As String
          temp = String(bytesTotal, "*")
          Winsock1.GetData temp, vbString, bytesTotal
          Text2.Text = temp
          cmdEcho.Enabled = True
       End Sub

       Private Sub Winsock1_Error(ByVal Number As Integer, _
                                  Description As String, _
                                  ByVal Scode As Long, _
                                  ByVal Source As String, _
                                  ByVal HelpFile As String, _
                                  ByVal HelpContext As Long, _
                                  CancelDisplay As Boolean)
          MsgBox "Error: " & Number & vbTab & Description, vbOKOnly, _
                 "Winsock Control 1 Error"
          CancelDisplay = True
       End Sub

 
 
 

1. ICMP HOST cannot build IP Header address to echo ICMP HOST

 this is the error message i get when trying to telnet anywhere but to my
domain serveror ping anything but my domain server i also get it when logged
into any other machine but my domain server even machines on the same net will
recognize dns make an attempt then puke! i assume this a problem in my
config which is preventing the returning or "echoing" of the returns off of
commands that require two way communication i have tried everything that i
know and then some!! please HELP ME !!!!!!!!!!!!
                                    thanks big time in advance


2. Help CD-RW HP-8100

3. echo $$ ; (echo $$)

4. Testing if Apache Web Server is Running

5. Local Echo vs Host Echo for tty's

6. touchscreen-kalibrierung

7. Linux 1.2.13: echo echoes \n

8. X server not booting on Clevo 660 Laptop

9. what causes kdm to echo "*" vs. no echo for password

10. diff among echo a>f; command<f; echo $a|command; command << $a; EOF

11. Q: What echoes faster than /bin/echo?

12. Looking for a brain-dead echo - i.e., an echo-like command that will pass \n

13. no echo when there should be echo