LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 05-08-2005, 09:42 PM   #1
a5an0
LQ Newbie
 
Registered: May 2005
Distribution: Debian, Ubuntu, OpenBSD (UNIX), Solaris 10 (UNIX), Fedora Core 3
Posts: 4

Rep: Reputation: 0
Ping question


Hey all. back again. I'm trying to use the -I option with ping (It lets you set the source address of the packets), but everytime I get the following:

bind: Cannot assign requested address



Does anyone have any ideas for a solution/workaround? Thanks a LOT in advance!
 
Old 05-09-2005, 01:24 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
can u post here the full comand that u tried

regards
 
Old 05-09-2005, 05:17 PM   #3
SirGertrude
Member
 
Registered: May 2004
Location: Missouri
Distribution: Gentoo
Posts: 59

Rep: Reputation: 15
the "-I" option allows you to specify which IP address or interface you are sending the ping from. This means that if you have IP addresses: 192.168.1.1, 192.168.2.1, and 192.168.3.1 you could send a ping to a host from a specific address. Example I want to ping 192.168.1.100 from 192.168.1.1:

Code:
ping -I 192.168.1.1 192.168.1.100
If you just use the command "ping -I 192.168.1.100" you will get "bind: Cannot assign requested address"
 
Old 05-09-2005, 07:37 PM   #4
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Rep: Reputation: 30
why would you want to ping from a different machine than the one you are currently on?

ANd this is allowed?? if i am on machine 192.168.1.2, i can ping from 192.168.1.3 to another machine????

josh
 
Old 05-09-2005, 07:50 PM   #5
a5an0
LQ Newbie
 
Registered: May 2005
Distribution: Debian, Ubuntu, OpenBSD (UNIX), Solaris 10 (UNIX), Fedora Core 3
Posts: 4

Original Poster
Rep: Reputation: 0
indeed it is. Well, the good news is I think I found a workaround: I'm crafting custom ICMP packets at the socket level in Python. It works, but I'd love to know why PING wouldnt work. Anyone?
 
Old 05-09-2005, 09:54 PM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hey looks like ur present address is not allowing u

in the source IP address try some other address same as that of ur network

regards
 
  


Reply



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 15 03-30-2015 02:39 PM
Ping question mikeshn Linux - Networking 2 06-01-2003 07:42 PM
dumb ping question linowes Linux - Networking 14 02-16-2003 03:43 PM
Ping Security question. (short) Stingreen Linux - Security 22 08-19-2002 04:13 AM
Question about ping. jayakrishnan Linux - General 2 04-10-2002 01:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:27 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration