Hello,
I want to simulate a flow-based routing protocol which matches a flow (Src IP, Src Port, Dst IP, Dst Port).
To achieve this, I need to use Linux features like "ip rule" and "ip route" together. I think it is also the same as using iptables.
Because I am still a beginner of ns-3, I don't know what kind of libraries I can achieve above purposes.
Is there any library similar to "ip rule"?
So far, I can manually add routes using Ipv4StaticRouting pointer, but it cannot distinguish "source IP, source port, and destination port".
For example, I want to make routing table like this:
Src SrcPort Dst DstPort nextHop ifIdx
------------------------------------------------------------------------------------------
10.1.1.1 * 10.1.2.3 22 10.1.1.6 0
10.1.1.1 * 10.1.2.3 80 10.1.2.5 1
Assuming that 10.1.1.1 has neighbors 10.1.1.6 and 10.1.2.5, and the source can differentiate routing paths based on any condition (usually flow) even if its destination is the same.
Any advise will be highly appreciated.
Best Regards,
-- Byoungheon Shin