Sambo a écrit :
>>>
>>>> echo 1 > /proc/sys/net/ipv4/ip_forward
>>>> echo 1 > /proc/sys/net/ipv4/conf/wlan0/forwarding
>>>> echo 1 > /proc/sys/net/ipv4/conf/eth1/forwarding
>>>>
>>> The first (at least) is done at boot on my SLACKware 12
>>> but all the other files in that directory have 1 anyway.
>>
>> Changing net/ipv4/ip_forward also affects net/ipv4/conf/*/forwarding.
>
> little correction to this ??filter files contain 0.
Filter files ? What do you mean ?
>> The router is supposed to forward packets that are sent to it. But
>> here no packets are sent to it as comp1 expects comp3 to be on the
>> same link.
>>
> I hope by "sent to it" you mean "reaching it" as opposed to "addressed
> to it", or is packet wrapping involved here.
I mean "addressed to it" at link layer (MAC address). Packets that are
meant to be forwarded by a router must be sent to its MAC address on the
link. This MAC address is obtained by doing an ARP query to the router's
local IP address, which is the gateway address in the routing table.
> [on windows/ comp1]
[...]
> C:\WINNT\SYSTEM32>route add 192.168.67.0 mask 255.255.255.0 192.168.0.9
Why 192.168.0.9 ? According to your diagram, comp2's eth1 address is
192.168.0.8.
> But when I tried the following :
> C:\WINNT\SYSTEM32>route add 192.168.67.0 mask 255.255.255.0
> interface 10000003
> ROUTE: bad gateway address interface
According to route help, the correct keyword to specify an interface is
"IF", not "INTERFACE". Anyway you don't want to create a direct route,
so you must specify a gateway, not just an interface.
> So is the gateway address really needed to address the packets to the
> gateway?
Yes it is.
> Did I read about packet wrapping in masqrading. Hmmm.
What are you talking about ? No masquerading is involved here, just
plain IP forwarding.
> So here is the routing table for comp2
Please use "route -n" (ou even better "ip route") so numeric IP
addresses are not resolved into obscure names.
> Well off to comp3
> SACREBLE it's working, was it the windows route?
> windows dialed out
> tcpdump -i eth1 where are you 192.168.0.1
Same here, pleas use option -n so numeric addresses are not resolved
into names.
> Heh, hope I can get this to happen on comp2.
Get *what* to happen ?
Please try to be clearer and more precise in describing your settings,
tests and results.
> From slack 9 , 10, 10.2 and 12, thinking 192.168.0.x only had 256
> addresses
And only 254 usable host addresses, .0 and .255 being reserved as
network and broadcast addresses. So what ?
> and trying to subnet with 255.255.255.224, ( address
> 192.168.0.33 and 34 ), I couldn't get this right?....
Get *what* right ?
Why the hell would you want to subnet 192.168.0.0/24 ?
> One more thing I was wondering about for the last few days is the
> difference between gateway and IFace column in the Linux route listing.
> Since my understanding always was that this is only to indicate which
> interface to send a packet addressed to given address on.
The interface column contains the output interface for a given
destination. The gateway column optionnally contains the address of the
next hop router if the destination is not directly reachable on the
network attached to the output interface. The gateway address must be
directly reachable on the network attached to the output interface.
"*" or 0.0.0.0 as the gateway means that the destination is directly
reachable on the network attached to the output interface. In this case
you can consider that the next hop address is equal to the destination
address.
In both cases the packet is sent on the link to the next hop MAC address.
|