Routing
From DD-WRT Wiki
Contents |
[edit] start
This is the WIP page for routing with ddwrt. Just to have something to start.
In general router works like this:
unitB-----(10.10.10.0/24)--------unitA---(NAT)---Internet (WAN) connection | | clientB clientA (192.168.168.15/24) (10.0.0.12/24)
Set the (private) subnetwork ip (sub)networks to e.g.:
- unitA 10.0.0.1/24 Short for: ( address 10.0.0.1 subnet 10.0.0.0 mask 255.255.255.0 = 24 left-to-right binary ones )
- clientA 10.0.0.12/24
- unitB 192.168.168.1/24
- clientB 192.168.168.15/24
- transfer net 10.10.10.0/24
Routing (static) configurations:
- tell clientA that unitA is his default gateway (normally done through dhcp)
- tell clientB that unitB is his default gateway (normally done through dhcp)
- tell unitB that unitA is his default gateway
- tell unitA that "WAN"-router is his default gateway. mostly automaticly via pppoe, etc
- set the apB device to router mode
- tell apA that requests to 192.168.168.0/24 will be routed through unitB (static route)
- unitA automaticly knows that the clientA network in connected to itself
That's it!