Network - Static Routes, Policy Based Routing and Routing Tables: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Network - Static Routes, Policy Based Routing and Routing Tables == RHEL 8+ == # Create the default route for the interface #: <tt>'''nmcli con modify <interface> ipv4.routes...") |
(No difference)
|
Revision as of 15:16, 29 May 2022
Network - Static Routes, Policy Based Routing and Routing Tables
RHEL 8+
- Create the default route for the interface
- nmcli con modify <interface> ipv4.routes "0.0.0.0/0 <gateway IP address> table=<table_id>"
- Add the subnet route
- nmcli con modify <interface> +ipv4.routes "<IP Range>/<CIDR subnet mask> <gateway IP address> table=<table_id>"
- Create the routing rules from the IP to lookup the <table_id>
- nmcli con modify <interface> ipv4.routing-rules "priority <number> from <interface IP address>/32 table <table_id>"
- Add the iif rule to route all traffic coming in/out through the <interface> using <table_id>
- nmcli con modify <interface> +ipv4.routing-rules "priority <number + 1> iif <interface> table <table_id>"
- Apply the new settings to the adapter
- nmcli dev reapply <interface>