Difference between revisions of "NMCLI"
Jump to navigation
Jump to search
Michael.mast (talk | contribs) |
Michael.mast (talk | contribs) |
||
Line 1: | Line 1: | ||
==Policy Based Routing== | ==Policy Based Routing== | ||
===Return traffic on interface it came in on=== | ===Return traffic on interface it came in on=== | ||
− | + | Could not figure out using network manager because I am too depressed as of this writing to care. Ended up getting it working with ip commands and startup scripts. | |
+ | *Create rule file, in my case it was /etc/sysconfig/network-scripts/rule-eth3 | ||
+ | **Add routes to the rule file. This will state that the interface subnet is reachable on the interface using the table specified. | ||
+ | **Default route on the interface for the table, then anything coming in on that interface hits that table instead of the main table. | ||
+ | **Make sure to add the rule that anything coming from the interface address also goes to that table. | ||
<pre> | <pre> | ||
− | + | ***.***.***.***/** dev eth3 table 2 | |
− | + | default via ***.***.***.*** dev eth3 table 2 | |
− | + | iif eth3 table 2 | |
+ | from ***.***.***.*** table 2 | ||
</pre> | </pre> | ||
+ | |||
==Create Bridge Interface== | ==Create Bridge Interface== | ||
<ref>https://www.cyberciti.biz/faq/how-to-add-network-bridge-with-nmcli-networkmanager-on-linux/</ref> | <ref>https://www.cyberciti.biz/faq/how-to-add-network-bridge-with-nmcli-networkmanager-on-linux/</ref> |
Revision as of 12:05, 28 August 2021
Policy Based Routing
Return traffic on interface it came in on
Could not figure out using network manager because I am too depressed as of this writing to care. Ended up getting it working with ip commands and startup scripts.
- Create rule file, in my case it was /etc/sysconfig/network-scripts/rule-eth3
- Add routes to the rule file. This will state that the interface subnet is reachable on the interface using the table specified.
- Default route on the interface for the table, then anything coming in on that interface hits that table instead of the main table.
- Make sure to add the rule that anything coming from the interface address also goes to that table.
***.***.***.***/** dev eth3 table 2 default via ***.***.***.*** dev eth3 table 2 iif eth3 table 2 from ***.***.***.*** table 2
Create Bridge Interface
[root@natasha ~]# nmcli con add type bridge ifname br0 [root@natasha ~]# nmcli con add type bridge-slave ifname eno1 master br0 [root@natasha ~]# nmcli con edit bridge-br0 nmcli> set ipv4.addresses 192.168.11.120/24 nmcli> set ipv4.gateway 192.168.11.1 nmcli> save nmcli> quit [root@natasha ~]# nmcli con up br0