I have a bunch of (protocol) SW sitting behind a virtual Ethernet adapter on a PC which I want to thrash-test with traffic. The SW is setup to echo whatever traffic it receives (that is directly copy the same packet back out of the virtual Ethernet adapter without modification, not a Ping-type echo) and I want to test it on a single PC. I have a UDP client pushing packets into the virtual Ethernet adapter (which is on fixed IP address 192.168.48.171, subnet 255.255.255.0) by sending them to 192.168.48.1, port 5000.
I have a UDP server listening on port 5000 but no packets ever arrive there, presumably because when they emerge from the virtual Ethernet adapter Windows doesn't know how to route them.
Is there a way to get the client/server arrangement to work on a single PC with this echo device between them? Or is there a better way to do the testing I desire?
Rob
- Follow via:
- RSS
- Email Alert
Question
0
Votes
IP routing within one (Win32) PC
Updated - 3rd Jun 2010
Answers (1)
0
Votes
TCP/UDP Ports Explained
3rd Jun 2010
Replies
That's a good explanation of TCP/UDP ports and sockets. I suppose it clarifies that what I'm trying to do won't work - a UDP packet sent to 192.168.48.1 will be routed into my virtual Ethernet adapter as I want it to but, when echoed out from the virtual Ethernet adapter, will reappear in Windows and go nowhere 'cos Windows has no idea what to do with it.
Is it possible to send a packet directly into an Ethernet adapter from within Windows and grab the output directly? Or am I barking up the wrong tree entirely here...
Rob
Is it possible to send a packet directly into an Ethernet adapter from within Windows and grab the output directly? Or am I barking up the wrong tree entirely here...
Rob
RobMeades
3rd Jun 2010
subnets of the physical address? or simply another address on the same subnet?
CG IT
3rd Jun 2010
All my Ethernet adapters are on different subnets. I have three, the virtual one I want to test on 192.168.48.x, one at 192.168.30.x for public internet, and another at 10.130.100.x for LAN.
All I really want to do is poke packets into a virtual Ethernet adapter and catch the same packet reflected back out but the Windows IP stack is between me and the virtual Ethernet adapter. Need to fool it somehow, or get it out of the way.
Rob
All I really want to do is poke packets into a virtual Ethernet adapter and catch the same packet reflected back out but the Windows IP stack is between me and the virtual Ethernet adapter. Need to fool it somehow, or get it out of the way.
Rob
RobMeades
4th Jun 2010
The User Datagram Protocol (UDP) provides a connectionless, unreliable transport service. Connectionless means that a communication session between hosts is not established before exchanging data. UDP is often used for communications that use broadcast or multicast Internet Protocol (IP) packets. The UDP connectionless packet delivery service is unreliable because it does not guarantee data packet delivery or send a notification if a packet is not delivered. However, if a packet is delivered, a checksum is computed over the received data and matched against the checksum transmitted in the packet. If these checksums do not match, the received UDP packet is not handed up the stack to the next protocol layer on the receiving side.
Because delivery of UDP packets is not guaranteed, applications that use this protocol must supply their own mechanisms for reliability if necessary. Although UDP appears to have some limitations, it is useful in certain situations. Microsoft networking components use UDP for logon, browsing, and name resolution. Unlike Transmission Control Protocol (TCP), UDP also can be used to carry IP multicast and broadcast streams. UDP is efficient because of its low overhead.
UDP and Name Resolution
UDP is used for NetBIOS name resolution by unicast to a NetBIOS name server or broadcast to subnets. UDP is also used for resolving Domain Name System (DNS) host names to IP addresses.
NetBIOS name resolution is accomplished over UDP port 137. DNS queries use UDP port 53.
Because UDP itself does not guarantee delivery of packets, both NetBIOS and DNS use their own retransmission schemes if they receive no answer to queries. Broadcast UDP packets are usually not forwarded over IP routers, so NetBIOS name resolution in a routed environment requires a name server of some type or the use of static database files.
Mail Slot Messaging over UDP
Many NetBIOS applications use mail slot messaging. A second-class mail slot is a simple mechanism for sending a message from one NetBIOS name to another over UDP. Mail slot messages can be broadcast on a subnet or directed to the remote host. To direct a mail slot message to another host, some method of NetBIOS name resolution must be available. Microsoft provides the Windows Internet Name Service (WINS) for this purpose.
Because delivery of UDP packets is not guaranteed, applications that use this protocol must supply their own mechanisms for reliability if necessary. Although UDP appears to have some limitations, it is useful in certain situations. Microsoft networking components use UDP for logon, browsing, and name resolution. Unlike Transmission Control Protocol (TCP), UDP also can be used to carry IP multicast and broadcast streams. UDP is efficient because of its low overhead.
UDP and Name Resolution
UDP is used for NetBIOS name resolution by unicast to a NetBIOS name server or broadcast to subnets. UDP is also used for resolving Domain Name System (DNS) host names to IP addresses.
NetBIOS name resolution is accomplished over UDP port 137. DNS queries use UDP port 53.
Because UDP itself does not guarantee delivery of packets, both NetBIOS and DNS use their own retransmission schemes if they receive no answer to queries. Broadcast UDP packets are usually not forwarded over IP routers, so NetBIOS name resolution in a routed environment requires a name server of some type or the use of static database files.
Mail Slot Messaging over UDP
Many NetBIOS applications use mail slot messaging. A second-class mail slot is a simple mechanism for sending a message from one NetBIOS name to another over UDP. Mail slot messages can be broadcast on a subnet or directed to the remote host. To direct a mail slot message to another host, some method of NetBIOS name resolution must be available. Microsoft provides the Windows Internet Name Service (WINS) for this purpose.
Peconet Tietokoneet
4th Jun 2010
So you need a layer 3 device [router]to route between the subnets.
can't really "fool" the windows box that packets it send out on one subnet should come back in on a different subnet.
can't really "fool" the windows box that packets it send out on one subnet should come back in on a different subnet.
CG IT
4th Jun 2010
Thanks - you have confirmed the conclusion I came to over the weekend, that I need to write a littul NDIS driver of which Microsoft has a sample here:
http://msdn.microsoft.com/en-us/library/ff563732(v=VS.85).aspx
Looks like fun...
Rob
http://msdn.microsoft.com/en-us/library/ff563732(v=VS.85).aspx
Looks like fun...
Rob
RobMeades
7th Jun 2010

































