Route traffic from a source CIDR using a specific table.

Section: Routes and Gateways

Add source routing rule

bash
bash
sudo ip rule add from 10.10.0.0/24 table 100
Explanation

Route traffic from a source CIDR using a specific table.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Routes and Gateways
Show policy routing rules
Display source-based and policy routing rules.
OpenIn sheetbashsame section
Show routes
Display the main routing table.
OpenIn sheetbashsame section
Resolve route for destination
Show which route and source address will be used.
OpenIn sheetbashsame section
Add default route
Set a default gateway.
OpenIn sheetbashsame section
Delete default route
Remove the default gateway.
OpenIn sheetbashsame section
Add static route
Add a route for a remote network.
OpenIn sheetbashsame section