Re: UDP's sendto() from two IP Addresses to IP Address from small LAN




Eugene Gershnik wrote:
> Alex Vinokur wrote:
> >
> > I sent two messages to IP Address 10.1.1.1 via UDP socket (the
> > sendto() command):
> > * from 128.129.101.102
> > and
> > * from 10.1.1.200.
> >
> > IP Address 10.1.1.1 received both messages.
> >
> > The question is: why did 10.1.1.1 receive message from 128.129.101.102
> > ?
> > It seems that 10.1.1.1 and 128.129.101.102 are in different LANs.
>
>
> Because the route the packet takes is decided based on routing table and not
> on where it is coming from. This was discussed multiple times over here.
Can I get any references?
Thanks.
> With IPv4 UDP you cannot usually prevent this behavior.
>
[snip]

Here is the routing table:

$ netstat -r

===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface
Metric
0.0.0.0 0.0.0.0 128.129.0.1 128.129.101.102
20
10.1.1.0 255.255.255.0 10.1.1.200 10.1.1.200
20
10.1.1.200 255.255.255.255 127.0.0.1 127.0.0.1
20
10.255.255.255 255.255.255.255 10.1.1.200 10.1.1.200
20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
128.129.0.0 255.255.0.0 128.129.101.102 128.129.101.102
20
128.129.101.102 255.255.255.255 127.0.0.1 127.0.0.1
20
128.129.255.255 255.255.255.255 128.129.101.102 128.129.101.102
20
224.0.0.0 240.0.0.0 10.1.1.200 10.1.1.200
20
224.0.0.0 240.0.0.0 128.129.101.102 128.129.101.102
20
255.255.255.255 255.255.255.255 10.1.1.200 10.1.1.200 1
255.255.255.255 255.255.255.255 128.129.101.102 128.129.101.102 1
Default Gateway: 128.129.0.1
===========================================================================
Persistent Routes:
None


How does 'a message from 128.129.101.102' go to 10.1.1.1 ?


Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn

.



Relevant Pages

  • Re: UDPs sendto() from two IP Addresses to IP Address from small LAN
    ... in the case of few default routes you ... >> Alex Vinokur wrote: ... > Here is the routing table: ... alex DOT vinokur AT gmail DOT com ...
    (microsoft.public.win32.programmer.networks)
  • Re: MS-DOS Eiting
    ... "Alex Vinokur" wrote in message ... > "Eric McG" wrote in message ... %SystemRoot%\System32 after each restart/shut down. ... alex DOT vinokur AT gmail DOT com ...
    (microsoft.public.win2000.general)
  • Re: Running out of ROM and out of RAM
    ... Paul Burke wrote: ... > And, of course, running out of ROM means running in ROM. ... Alex Vinokur ... alex DOT vinokur AT gmail DOT com ...
    (comp.arch.embedded)
  • Re: Running out of ROM and out of RAM
    ... >Running out of ROM and running out of RAM. ... > Alex Vinokur ... alex DOT vinokur AT gmail DOT com ...
    (comp.arch.embedded)
  • Re: inetinfo.exe uses 100% CPU
    ... Dave Patrick ....Please no email replies - reply in newsgroup. ... Microsoft MVP [Windows] ... "Alex Vinokur" wrote: ... alex DOT vinokur AT gmail DOT com ...
    (microsoft.public.win2000.general)