Hi.
This is a bug report regarding the ICMP and IP-Alias
interaction under linux.
It also descibes a bug/feature in the ARP handling under Linux.

My test network consists of 3 machines on one coax-segment.
I have, using IP-Alias, configured one machine to act as a router
between the two other machines, thus building two
logical networks ontop of the single physical network:

Configuration is as follows : (netmask is always 255.255.255.0)
Machine A: 10.1.1.10 eth0  Router:10.1.1.11     (linux)   HW:00a024102fb2
Machine B: 10.1.1.11 eth0                       (linux)   HW:00c0df206cdf
           10.2.2.11 eth0:0 (Alias interface)
Machine C: 10.2.2.13 eth0  Router:10.2.2.11     (w95)     HW:00a0c910b430

I.e. Machine A and C belong to two different networks
with Machine B acting as a router. In reality though,
the two networks are defined ontop of the same physical network.
It is designed this way because I want it this way.

The problem comes when I activate port-redirection on Machine B.
On machine B I create a port-redirection from eth0:0 port 23
to 10.1.1.10 port 23.

This is what happens when I do a telnet from C to 10.2.2.11
(wishing to get redirected to A)


05:44:46.862102 0:a0:c9:10:b4:30 0:c0:df:20:6c:df ip 62: C.1118 >
10.2.2.11.telnet: S 1950099:1950099(0) win 8192 <mss 1460,nop,nop,sackOK>
(DF)

05:44:46.863258 0:c0:df:20:6c:df 0:a0:c9:10:b4:30 ip 110: 10.2.2.11 > C:
icmp: redirect A to host A [tos 0xc0]

05:44:46.863583 0:c0:df:20:6c:df 0:a0:24:10:2f:b2 ip 62: C.1118 > A.telnet:
S 1950099:1950099(0) win 8192 <mss 1460,nop,nop,sackOK> (DF)

05:44:46.864328 0:a0:24:10:2f:b2 0:a0:c9:10:b4:30 ip 58: A.telnet > C.1118:
S 2488420067:2488420067(0) ack 1950100 win 32767 <mss 1460> (DF)

05:44:46.864847 0:a0:c9:10:b4:30 0:c0:df:20:6c:df ip 60: C.1118 > A.telnet:
R 1950100:1950100(0) win 0


As can be seen, the Linux router (B) responds by sending a ICMP Redirect
message back to C before forwarding the redirected packet on to A.
Also, the redirection packet is "interesting" redirect A to A ?
I belive it is a bug that this message is generated.

The second bug (feature) it that C (linux) has intercepted the arp
traffic between A and B and thus has A in its arp table. This can be seen
in the 4th packet where C sends data directly to A without using the router
B.
This breaks redirection.
I belive it is a bug that Linux will add hosts to the arp-table even if the
host
does not belong to the same subnet.
Even if C and A are connected to the same physical network, they still
belong
to two different networks and should use the router to communicate.

In this case, the telnet client on W95 is confused and resets/terminates the
connection (packet 5) because it sent TCP+SYN to B, but received TCP+SYN+ACK
from A.

ronnie sahlberg   [EMAIL PROTECTED]


-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to