Tomato/DD-WRT router to act as switch & only NAT some port

Posted by fseto on Super User See other posts from Super User or by fseto
Published on 2010-09-17T03:06:22Z Indexed on 2011/01/06 20:56 UTC
Read the original article Hit count: 283

Filed under:
|
|
|
|

BACKGROUND: I have a device that must use a real IP address. Currently, my ISP uses DHCP and I can have up to 4 real IP address assigned. However, the cable modem only have 1 ethernet port and it's connected to my router (running Tomato, but can run DD-wrt or other Openwrt if required). Question stems from how I can connect the additional device, requiring a real IP?

EASY SOLUTION: would be to get a switch and connect to the CM, Router, and Device. But alas, I want to avoid this route, since:

  • my wiring cabinet in my home is drawing lots of power and heat already
  • Device will be unprotected by any firewall
  • unable to monitor the traffic to/from device.
  • Besides, what would be the FUN in that? =)

IDEA: So what I want to do is to configure the router, so that one of the switchport is removed from the normal br0 bridge. Instead, I want to make it behave like a switch on the WAN port.

What's the best way of doing this? Should I create another bridge on the WAN & the device port? Can a single port belongs to two bridges? or would I need to create a subinterface first? Would I need a DHCP-relay? Am I expecting too much from my poor cheapie router?

   +------+
   |  CM  |
   +--++--+
      ||
+----WAN---------------+
|   /    \      Router |
| BR1?   BR0           |
|  |       \           |
|  |       {NAT}       |
|  |     / |  | \      |
+-P0----P1-P2-P3-Wifi--+
   |
+------+
|Device|  
+------+

© Super User or respective owner

Related posts about linux

Related posts about networking