LinuxQuestions.org
Visit Jeremy's Blog.
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 04-28-2004, 11:52 PM   #1
Vaish
LQ Newbie
 
Registered: Jan 2004
Posts: 6

Rep: Reputation: 0
IP address faking


Hello ,
I want to simulate packets coming from 50 machines to a single machine.I mean each packet should have different IP address. Is there any way i can do this.
Thanks
Ashish
 
Old 04-29-2004, 01:45 AM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Setup 50 virtual interfaces on your nic

ifconfig eth0:1 192.168.0.2
ifconfig eth0:2 192.168.0.3

etc...

ping from each of them with

ping -I eth0:1 192.168.1.1
ping -I eth0:2 192.168.1.1

etc..


you might want to make a script to creat the interfaces and ping the system.
 
Old 04-29-2004, 02:18 AM   #3
ashish_q
LQ Newbie
 
Registered: Apr 2004
Posts: 3

Rep: Reputation: 0
faking ip address

if I want to ping from different machines i can use this
ping -I eth0:1 192.168.1.1
ping -I eth0:2 192.168.1.1

but what about TCPIP connections .What if I want to establish TCP connections as if I from 50 different machines??
 
Old 04-29-2004, 02:18 AM   #4
ashish_q
LQ Newbie
 
Registered: Apr 2004
Posts: 3

Rep: Reputation: 0
if I want to ping from different machines i can use this
ping -I eth0:1 192.168.1.1
ping -I eth0:2 192.168.1.1

but what about TCPIP connections .What if I want to establish TCP connections as if I from 50 different machines??
 
Old 04-29-2004, 09:31 AM   #5
NetAX
Member
 
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 146

Rep: Reputation: 16

Last edited by NetAX; 04-29-2004 at 01:15 PM.
 
Old 04-29-2004, 05:46 PM   #6
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
I guess you shold just use netcat.
 
Old 05-06-2004, 12:16 AM   #7
Pres
Member
 
Registered: Jun 2002
Location: Australia
Distribution: Slack 9.1
Posts: 232

Rep: Reputation: 30
Perhaps try hammerhead if you're load testing a webserver
 
Old 05-06-2004, 05:18 AM   #8
wrongman
Member
 
Registered: May 2004
Location: Italy
Distribution: Debian Unstable 64bit
Posts: 99

Rep: Reputation: 15
if you want to send packets you can make a prog with raw sockets that change headers, so you'll write every address you want... but if you have to estabilish tcp connections i don't know
 
Old 05-17-2004, 12:25 PM   #9
jmacleod
LQ Newbie
 
Registered: May 2004
Posts: 1

Rep: Reputation: 0
Add the address alias as listed above using ifconfig. Then in your code, specify your source address in the inaddr you feed to bind(), just like you do with connect(). Note that bind() will fail if the address isn't already added.

If you're not writing code, you may still be able to pull this off by using different destination addresses and adding -host routes mapping each destination address to a specific local address. Clearly this will be much more easily accomplished with a script.

If anyone knows how to add the addresses from within the program, I'd be much obliged to know.
 
  


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
faking a file.. wrongman Linux - Software 3 03-20-2005 12:12 PM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
Faking the name of a cd brainlesspinkey Linux - Software 5 07-29-2004 03:12 PM
faking HWaddr and inetaddr Hano Linux - Networking 3 11-05-2003 01:12 PM
faking /dev/dsp? tristan_vdv Linux - General 3 05-03-2002 04:18 AM


All times are GMT -5. The time now is 08:21 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