Help on Linux Router
I am tying to set up a router on a computer (A) running SUSE Linux 10.0. A has two Network Cards (eth0: 192.168.1.1 and eth1: 192.168.2.1), and they are connected to two computers: B (192.168.1.2), C(192.168.2.2) respectively. B and C are in different subnets. I just want that, B can acesse C through A, and inversely. The configuration on A is following:
xxtw@linux:~> ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:46:44:35:0C
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:46ff:fe44:350c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:381 errors:0 dropped:0 overruns:0 frame:0
TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:47626 (46.5 Kb) TX bytes:11083 (10.8 Kb)
eth1 Link encap:Ethernet HWaddr 00:05:1B:01:0D:5F
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::205:1bff:fe01:d5f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:299 errors:1 dropped:0 overruns:0 frame:2
TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:37182 (36.3 Kb) TX bytes:12181 (11.8 Kb)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1227 errors:0 dropped:0 overruns:0 frame:0
TX packets:1227 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:102195 (99.7 Kb) TX bytes:102195 (99.7 Kb)
The routing table on A:
linux:/home/xingtw # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
I have enabled ip_forward through SUSE YaST, and also have tried
echo 1>/Proc/sys/net/ipv4/ip_forward. Now the problem is, B and C both can ping eth0 and eth1 on A, and themselves, but B can not ping C, C can also not ping B.
I am new to Linux Networking. Anyone can help me to solve this problem? Thanks ahead.
|