Hi,
I have a senario like below :-
server1
eth0 10.1.1.9 eth0.5 10.1.1.10 (vlan 5)
gateway 10.1.1.1
On 10.1.1.1, (the gateway) I have the following route
10.1.1.0 * 255.255.255.0 U 0 0 0 eth1 10.1.2.0 * 255.255.255.0 U 0 0 0 eth2 10.1.3.0 * 255.255.255.0 U 0 0 0 vlan5
Interfaces are
eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:A0 inet addr:10.1.1.1 Bcast:10.1.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:48250711 errors:0 dropped:0 overruns:0 frame:0 TX packets:44504353 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:2479942868 (2.3 GiB) TX bytes:2052597702 (1.9 GiB) Interrupt:9 Base address:0xe000
vlan5 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx:A0 (same as eth1) inet addr:10.1.3.1 Bcast:10.1.3.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:245092 errors:0 dropped:0 overruns:0 frame:0 TX packets:72378 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:49341672 (47.0 MiB) TX bytes:6273804 (5.9 MiB)
Now, when I ping a device 10.1.3.128 from server 1, it forwards the packet to 10.1.1.1, but then it does not forward it out to the device.
If however, I change the IP address of eth0.5 to 10.1.3.244, I can ping 10.1.3.128 (because now both are on the same subnet, and same vlan)
I thought that even though the source (10.1.1.10) and destination IP (10.1.3.128) address are on different subnets, as both are on the same vlan, the gateway should be able to forward the packets.
Can anyone please clarify ?
Thanks Shahed.