LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-09-2005, 09:11 PM   #1
bmike1
Member
 
Registered: Jul 2003
Posts: 132

Rep: Reputation: 15
'ping -b' / ping <switch> doesn't work


Hey all. I was wondering.....

YOu know, I was thinking about what I've learned from a list over the past
weeks about 'ip' and thought that it might be of some use with tpinging things succesfully.

First, lets test it on some known devices:

bmike1@1[bmike1]$ ip link show eth0 (lucky guess thinking of eth0)
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:08:c7:ca:62:4b brd ff:ff:ff:ff:ff:ff
bmike1@1[bmike1]$ ip link show ppp0
3: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1500 qdisc pfifo_fast qlen 3
link/ppp

Ok. So then it works w/o sudo.

Well, I found out the address to my switch with The
command 'cu -s 9600 -l /dev/ttyS2' (to access the 'Cisco console system') : it is 10.10.10.5
The address to eth0 is 10.10.10.2
So the broadcast address is 10.255.255.255 for both the switch and eth0

So first I ping eth0:

bmike1@3[bmike1]$ sudo ping -c 5 10.10.10.2
PING 10.10.10.2 (10.10.10.2) 56(84) bytes of data.
64 bytes from 10.10.10.2: icmp_seq=1 ttl=64 time=0.161 ms
64 bytes from 10.10.10.2: icmp_seq=2 ttl=64 time=0.156 ms
64 bytes from 10.10.10.2: icmp_seq=3 ttl=64 time=0.130 ms
64 bytes from 10.10.10.2: icmp_seq=4 ttl=64 time=0.143 ms
64 bytes from 10.10.10.2: icmp_seq=5 ttl=64 time=0.152 ms

--- 10.10.10.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4004ms
rtt min/avg/max/mdev = 0.130/0.148/0.161/0.015 ms

That looked good. So then I ping the switch:

bmike1@3[bmike1]$ sudo ping -c 5 10.10.10.5
PING 10.10.10.5 (10.10.10.5) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
<cntrl-c>

No good. So let's try the broadcast address to make sure the switch didn't lie
to me when using cu.

bmike1@3[bmike1]$ sudo ping -c 5 -b 10.255.255.255
WARNING: pinging broadcast address
PING 10.255.255.255 (10.255.255.255) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted

--- 10.255.255.255 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4011ms

That didn't work either. So after reviewing man ping I see the option that
let's you specify the name of the device:

bmike1@3[bmike1]$ sudo ping -c 5 -I eth0
Usage: pin......

That didn't work. I don't even want to guess at what the switch rj45 ports are
called (haven't a clue).So then I thing that maybe I can ping it through the
serial port (which is /dev/ttyS2- why? I don't know! I only have two ports).

bmike1@3[bmike1]$ sudo ping -c 5 -I /dev/ttyS2
Usage: pin.....

Again, it does not work.

Here is what happens when I ping from the Cisco console system:

#ping 10.255.255.255 ****<again- broadcast for both switch and eth0>****
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.255.255.255, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5), round-trip min/avg/max = 0/0/0 ms
#ping 10.10.10.5 ****<the switch>****
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms
#ping 10.10.10.2 ****<eth0>****
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5), round-trip min/avg/max = 0/0/0 ms
#

I am now at a loss for words. It is like the switch and eth0 are in their own little worlds. I must need to make them visible to 'the world'. So here are the questions:

1- Do I need to make them visible to each other?
2- What's wrong with the broadcast ping? I meanthe broadcast address
for both eth0 and the switch are 10.255.255.255 so even if I can't ping
the switch I should get a reply from eth0.

Last edited by bmike1; 01-09-2005 at 09:17 PM.
 
Old 01-09-2005, 10:09 PM   #2
linuxgeekery
Member
 
Registered: Jul 2004
Location: Austin, Texas!
Distribution: Gentoo
Posts: 121

Rep: Reputation: 15
I have no idea. Maybe your switch isn't permitting you to access it with ping? Try it with doing su, THEN doing ping.
 
Old 01-10-2005, 02:48 PM   #3
bmike1
Member
 
Registered: Jul 2003
Posts: 132

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by linuxgeekery
I have no idea. Maybe your switch isn't permitting you to access it with ping? Try it with doing su, THEN doing ping.
Well, I used sudo but I tried it as superuser also but with no better results.

I think I need to make them visible to each other but I do not know if that is correct, nor do I know how to do it if that is correct.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 13 03-17-2011 02:47 AM
FC4 won't ping 127.0.0.1 or the internet, but will ping local computers jalsk Linux - Networking 4 11-22-2005 05:59 PM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 09:10 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM
I can ping google.com successfully,but ping client(in my intranet) failed.Why? whepin Linux - Newbie 4 12-30-2001 04:54 AM


All times are GMT -5. The time now is 01:38 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration