Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-28-2004, 11:52 PM
|
#1
|
LQ Newbie
Registered: Jan 2004
Posts: 6
Rep:
|
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
|
|
|
04-29-2004, 01:45 AM
|
#2
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
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.
|
|
|
04-29-2004, 02:18 AM
|
#3
|
LQ Newbie
Registered: Apr 2004
Posts: 3
Rep:
|
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??
|
|
|
04-29-2004, 02:18 AM
|
#4
|
LQ Newbie
Registered: Apr 2004
Posts: 3
Rep:
|
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??
|
|
|
04-29-2004, 09:31 AM
|
#5
|
Member
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147
Rep:
|
Last edited by NetAX; 04-29-2004 at 01:15 PM.
|
|
|
04-29-2004, 05:46 PM
|
#6
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
I guess you shold just use netcat.
|
|
|
05-06-2004, 12:16 AM
|
#7
|
Member
Registered: Jun 2002
Location: Australia
Distribution: Slack 9.1
Posts: 232
Rep:
|
Perhaps try hammerhead if you're load testing a webserver
|
|
|
05-06-2004, 05:18 AM
|
#8
|
Member
Registered: May 2004
Location: Italy
Distribution: Debian Unstable 64bit
Posts: 99
Rep:
|
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
|
|
|
05-17-2004, 12:25 PM
|
#9
|
LQ Newbie
Registered: May 2004
Posts: 1
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 02:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|