Re: UDP's sendto() from two IP Addresses to IP Address from small LAN
- From: "Alex Vinokur" <alexvn@xxxxxxxxxxxxxxxxxxxxx>
- Date: 23 Jan 2006 22:35:01 -0800
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
.
- Follow-Ups:
- Re: UDP's sendto() from two IP Addresses to IP Address from small LAN
- From: Eugene Gershnik
- Re: UDP's sendto() from two IP Addresses to IP Address from small LAN
- From: Arkady Frenkel
- Re: UDP's sendto() from two IP Addresses to IP Address from small LAN
- References:
- UDP's sendto() from two IP Addresses to IP Address from small LAN
- From: Alex Vinokur
- Re: UDP's sendto() from two IP Addresses to IP Address from small LAN
- From: Eugene Gershnik
- UDP's sendto() from two IP Addresses to IP Address from small LAN
- Prev by Date: Re: Network Security
- Next by Date: Re: Can an app see the same UDP packet multiple times?
- Previous by thread: Re: UDP's sendto() from two IP Addresses to IP Address from small LAN
- Next by thread: Re: UDP's sendto() from two IP Addresses to IP Address from small LAN
- Index(es):
Relevant Pages
|