• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Attach to a ethernet interface usingip 0.0.0.0 using datagram socket

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need to connect to a network interface eg. eth1 using source ip 0.0.0.0.
I need this ip as i am trying to send a DHCP discover packet from this interface.
But i am not able to connect to this interface when ip is not provided while creating DatagramSocket.
Packet is always send using default interface like eth0(and source ip changes to ip of this interface).
I checked this online but the solution provided is not working correctly and i am not able to figure out why.
Kindly help me regarding this.

Thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you're trying to spoof the source IP? Please tell us what you're trying to achieve by doing that.
 
Tarun Jain
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am making a simulator which simulates a vm on a server without actually launching a VM.
I need to give IP to this VM. So i am trying to send DHCP request using my main server on behalf of this VM and store the received IP for furthur processing in my DB.
 
reply
    Bookmark Topic Watch Topic
  • New Topic