Two or more network interfaces: Difference between revisions

From Notes to self
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
Suppose that we have a system with already configured network interface <code>eth0</code> and we want to add another interface <code>eth1</code> with address <code>a.a.a.a</code> from the network <code>n.n.n.n/22</code> and the gateway <code>g.g.g.g</code>.
Suppose that we have a system with already configured network interface <code>eth0</code> and we want to add another interface <code>eth1</code> with address <code>a.a.a.a</code> from the network <code>n.n.n.n/22</code> and the gateway <code>g.g.g.g</code>.


* Add <code>eth1</code> to <code>/etc/rc.d/rc.inet1.conf</code>. Do not change the gateway.
* Add <code>eth1</code> data to <code>/etc/rc.d/rc.inet1.conf</code>. Do not change the gateway.


* Add a routing table to <code>/etc/iproute2/rt_tables</code>:
* Add a routing table to <code>/etc/iproute2/rt_tables</code>:

Revision as of 16:01, 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 a.a.a.a from the network n.n.n.n/22 and the gateway g.g.g.g.

  • Add eth1 data 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