Two or more network interfaces: Difference between revisions

From Notes to self
Jump to navigation Jump to search
Created page with "''Based on [https://www.thomas-krenn.com/en/wiki/Two_Default_Gateways_on_One_System the Thomas-Krenn-Wiki]'' Suppose that we have a system with already configured network int..."
 
No edit summary
Line 6: Line 6:


* Add a routing table to <code>/etc/iproute2/rt_tables</code>:
* Add a routing table to <code>/etc/iproute2/rt_tables</code>:
<par>
<pre>
#
#
# reserved values
# reserved values
Line 18: Line 18:
#
#
#1      inr.ruhep
#1      inr.ruhep
1 rt2</par>
1 rt2</pre>


[[Category: Linux]]
[[Category: Linux]]

Revision as of 15:54, 19 August 2021

Based on the Thomas-Krenn-Wiki

Suppose that we have a system with already configured network interface eth0 and we want to add another interface eth1 with address x.x.x.x/22 and the gateway g.g.g.g.

  • Add x.x.x.x/22 to /etc/rc.d/rc.inet1.conf. Do not change the gateway.
  • Add a routing table to /etc/iproute2/rt_tables:
#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
1 rt2