0

So this is a higher level problem I'm having, and I'm trying to wrap my head around it. I have a program that sends out a broadcast ethernet packet (it is stripped down using the Pcap.Net dll). If the device listens to the broadcast, it will respond to me with another Ethernet packet.

My setup:

My PC IP is : 10.10.3.109 (DHCP)

My Gateway: 10.10.1.254

If I broadcast an ethernet packet at this point to 255.255.255.0 I get responses from 10.10.0.x to 10.10.1.x

My Goal:

I want to set up my environment so that I can send this broadcast packet can reach my office's 10.10.5.x and 10.10.4.5.x network with a gateway of 10.10.5.254 from my computer on the different network (I didn't number the networks, so I apologize if they're confusing. .4/.5 are the same network)

So my question is, what do I need to do in my vb, or my environment so that when I send this packet, both networks are heard?

What I have tried:

Obviously, Ethernet isn't going to talk to other subnet on its own. What I have read is that you can create routes through your router using the command like. For example:

 route ADD 10.10.4.254 MASK 255.255.255.0 10.10.3.109

It ran successfully, but when I run the program I don't get any response from other networks. What am I missing in my setup to make this work?

My VB Code:

For funsies (based of pcapdotnet example):

      ' Open the output device
         Dim Communicator As PacketCommunicator = selectedOutputDevice.Open(65536, PacketDeviceOpenAttributes.None, 500)

        Dim filter As BerkeleyPacketFilter = Communicator.CreateFilter("len >= 415 and len <= 417")
        Communicator.SetFilter(filter)

        ' send broadcast packet
        Communicator.SendPacket(BuildEthernetPacket(ReqInfoPkt, "ff:ff:ff:ff:ff:ff"))
Kat
  • 2,460
  • 2
  • 36
  • 70

1 Answers1

2

How to I send my broadcast Ethernet packet to other subnets?

You can't.

Ethernet doesn't know or care about protocols on higher levels, including IP. IP doesn't always run over Ethernet. They're separate things.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • Bummer. I guess there's no way to get around it then. – Kat Dec 18 '14 at 15:36
  • @sparkysword You can bridge your two networks using a tunnel over the internet. There are some cheap hardware VPN devices that can do this. But no, this is not something you can accomplish at the application layer. The network needs to be set up for this activity. Also, I don't see anything in your question that really relates to Ethernet frames. I don't understand entirely what you're trying to do. Why don't you just send data to the IP broadcast address? You may be able to configure your router to pass that traffic. – Brad Dec 18 '14 at 15:39
  • The only way the ethernet frames is important, is that this type of frame is what the device will respond to, and only that. I'm liking that other thinking though, and might try to use that. – Kat Dec 18 '14 at 15:50