Routing

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 12:24, 1 July 2012 (edit)
Glenn (Talk | contribs)
(linkchg)
← Previous diff
Current revision (10:34, 21 November 2012) (edit) (undo)
Sash (Talk | contribs)
(start)
 
Line 8: Line 8:
In general router works like this: In general router works like this:
- apB--------apA-----Internet (WAN) connection+ unitB-----(10.10.10.0/24)--------unitA---(NAT)---Internet (WAN) connection
- | |+ | |
- clientB clientA+ clientB clientA
 + (192.168.168.15/24) (10.0.0.12/24)
 + 
Set the ([[Private ip addresses|private]]) subnetwork ip (sub)networks to e.g.: Set the ([[Private ip addresses|private]]) subnetwork ip (sub)networks to e.g.:
-* apA 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 )+* 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 Short for: ( address 10.0.0.12 subnet 10.0.0.0 mask 255.255.255.0 )+* clientA 10.0.0.12/24
-* apB 192.168.168.1/24 Short for: ( address 192.168.168.1 subnet 192.168.168.0 mask 255.255.255.0 )+* unitB 192.168.168.1/24
-* clientB 192.168.168.15/24 Short for: ( address 192.168.168.15 subnet 192.168.168.0 mask 255.255.255.0 )+* clientB 192.168.168.15/24
 +* transfer net 10.10.10.0/24
Routing (static) configurations: Routing (static) configurations:
-* tell clientA that apA is his default gateway (normally done through dhcp)+* tell clientA that unitA is his default gateway (normally done through dhcp)
-* tell clientB that apB is his default gateway (normally done through dhcp)+* tell clientB that unitB is his default gateway (normally done through dhcp)
-* tell apB that apA is his default gateway+* tell unitB that unitA is his default gateway
-* tell apA that "WAN"-router 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 * set the apB device to router mode
-* tell apA that requests to 192.168.168.0/24 will be routed through (apB) 192.168.168.1/24 (static route)+* 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! That's it!

Current revision

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!

[edit] See also