I previously posted a similar message in the Whiterussian area, but I received no responses and I upgraded to Kamikaze 7.09. I have two LANs each with their own internet connection -- cable internet and dsl internet each on their own LAN with their own computers. I want to connect the two LANs so I can share resources between them (i.e. a network printer). I happened to have a WRT54G around and it seemed like that and OpenWrt would be a good match for what I wanted to do.
One LAN is 192.168.1.0/24 and the other is 10.1.10.0/24. The interfaces on the router are 192.168.1.5 and 10.1.10.5 respectively. The router is connected to both LANs and I can ping it from either side. If example,
$ ping 192.168.1.5
PING 192.168.1.5 (192.168.1.5) 56(84) bytes of data.
64 bytes from 192.168.1.5: icmp_seq=0 ttl=64 time=1.05 ms
If I traceroute from the 192.168.1.0 network to the 10.1.10.0 network, the packets seem to go to the default router for the network where the request originates: For example, from a computer on 192.168.1.0
$ traceroute -n 10.1.10.1
traceroute to 10.1.10.1 (10.1.10.1), 30 hops max, 38 byte packets
1 192.168.1.1 0.250 ms 0.216 ms 0.202 ms
2 *
^C
Do I need setup static routes on all my computers or is there something I need to configure (RIP?) that advertises the route to 10.1.10.0 through 192.168.1.5?
If I add a static route for 10.1.10.0 through 192.1.168.5, the packets seem to get to the to the correct router (I see the packet count increasing in iptables), but they don't seem to get forwarded through it. Here are my iptable rules:
root@OpenWrt:~# iptables -L -v
Chain INPUT (policy ACCEPT 154K packets, 43M bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 103 packets, 9476 bytes)
pkts bytes target prot opt in out source destination
96 8832 all -- br-lan eth0.1 192.168.1.0/24 10.1.10.0/24
7 644 all -- eth0.1 br-lan 10.1.10.0/24 192.168.1.0/24
Chain OUTPUT (policy ACCEPT 15260 packets, 4766K bytes)
pkts bytes target prot opt in out source destination
seems pretty straightforward but I really have no idea what I am doing -- just feeling my way through it. Am I missing something here?
For completeness, here are my interfaces:
root@OpenWrt:~# ifconfig
br-lan Link encap:Ethernet HWaddr 00:14:BF:0F:8D:4E
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:280045 errors:0 dropped:0 overruns:0 frame:0
TX packets:15187 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16466439 (15.7 MiB) TX bytes:4978896 (4.7 MiB)
eth0 Link encap:Ethernet HWaddr 00:14:BF:0F:8D:4E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:417158 errors:0 dropped:0 overruns:0 frame:0
TX packets:18047 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:65966334 (62.9 MiB) TX bytes:5298986 (5.0 MiB)
Interrupt:4
eth0.0 Link encap:Ethernet HWaddr 00:14:BF:0F:8D:4E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:280052 errors:0 dropped:0 overruns:0 frame:0
TX packets:15187 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17587019 (16.7 MiB) TX bytes:5039644 (4.8 MiB)
eth0.1 Link encap:Ethernet HWaddr 00:14:BF:0F:8D:4E
inet addr:10.1.10.5 Bcast:10.1.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:137116 errors:0 dropped:0 overruns:0 frame:0
TX packets:2864 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:40871181 (38.9 MiB) TX bytes:139234 (135.9 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1082 errors:0 dropped:0 overruns:0 frame:0
TX packets:1082 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:75758 (73.9 KiB) TX bytes:75758 (73.9 KiB)
and routes
root@OpenWrt:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan
10.1.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.1
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 br-lan
0.0.0.0 10.1.10.1 0.0.0.0 UG 0 0 0 eth0.1
Thanks for any help. -- Bud