[Changed] Policy routing with dynamic IP's
Posted: Sun Apr 03, 2005 3:19 am
I've noticed this problem would happen with any dynamically assigned protocol so if my out interfaces are DHCP clients I get the same problem. Since their IP and gateway is assigned dynamically, there is no possibility to do policy routing because routing tables need that you inform a gateway IP.Hi,
I need to set up policy routing based on source address of my internal IP's. Some IP's from my internal network should reach Internet using gateway 01 and other internal IP's using gateway 02. The problem is that these two Internet interfaces are PPPoE clients with dynamic IP's. I have created two routing tables corresponding to gateway 01 and 02 and the correct rules but I don't know how could I insert the gateway IP in these tables since they are dynamic addresses (with dynamic gateways also). If I enable the option in PPPoe client to create the default gateway, it's created in the main table.
Is there any way to set up an interface as the gateway in the routing table? IP address is not useful in this case.
Anyone could help me? I'm using 2.8.26 version
If my question is so stupid, please tell me because it really do make sense for me trying to use policy routing with dynamic IP's. Any suggestion is welcome. I've guessed to use a script to create the routing tables on demand (as soon the dynamic routes are created by RouterOS but I don't know if it's possible and how to trigger this script).
Any RouterOS coder read this forum? Maybe questions from newbies are not so relevant
![Sad :(](./images/smilies/icon_sad.gif)