Re: Rephrasing my question: how source address is determined?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



RFC1122, section 3.3.4.2:

<quote>
  3.3.4.2  Multihoming Requirements

             The following general rules apply to the selection of an IP
             source address for sending a datagram from a multihomed
             host.

             (1)  If the datagram is sent in response to a received
                  datagram, the source address for the response SHOULD be
                  the specific-destination address of the request.  See
                  Sections 4.1.3.5 and 4.2.3.7 and the "General Issues"
                  section of [INTRO:1] for more specific requirements on
                  higher layers.

                  Otherwise, a source address must be selected.
</quote>

Do you guys think that the current Linux implementation might have 
violated the "SHOULD BE" described above? Sorry for using the word 
"violate"...

-nick


nick wrote:
> Hi folks,
> 
>     Yesterday I asked a question on this mailing list regarding a 
> multi-homed host, and big thanks to Ralph's kind responose. But I think 
> i'm still puzzled by the symptom. So I'd like to rephrase my question as 
> follows:
>     My multi-homed host have two ethernet interfaces, their ip addreses 
> are not on the same subnet. The only routing rule is "default gateway 
> via eth0" besides the usual direct links.
>     This host may send out a packet spontaneously (f.e. I issue a ping 
> comand from this host), or send out a packet in response to a coming-in 
> packet (f.e. someone thousands miles away is pinging this host). In each 
> case, the outgoing packet must have a source address in its ip header. 
> In the first case, my guess is that the src addr would be determined by 
> the route (,therefore using eth0's ip). For the 2nd case, the "ideal" 
> src addr should be taken from the dst addr of the incoming packet. 
> Therefore, if someone is pinging my host through eth1's IP, then my host 
> should respond a packet whose src addr is eth1's IP.
>     Am I right? If my host is not behaving like this, what could have 
> gone wrong with my configuration? How can I trace this in the kernel? 
> Which kernel code should I look into for answer? linux/net/ip_output.c? 
>  Linux's TCP/IP stack is huge to me, I kindof lost in it...
> 
> Thanks,
> -nick
> 
> -
> : send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 



-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux