K
K
Kirill Gerasenkov2015-02-09 15:17:50
linux
Kirill Gerasenkov, 2015-02-09 15:17:50

How to configure your route for each interface?

Hello dear beards!
The crux of the matter is my curiosity.
There are 2 interfaces, with 2 different networks. from 2 different providers.
there is a default gw on the system (assume it is 88.88.88.88)
route looks like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         88.88.88.88 0.0.0.0         UG    0      0        0 enp6s0f0
111.111.111.111 0.0.0.0         255.255.255.248 U     0      0        0 enp6s0f0
222.222.222.222   0.0.0.0         255.255.255.252 U     0      0        0 enp6s0f1

how do i set enp6s0f0 to my gw and enp6s0f1 to mine?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Petrikov, 2015-02-09
@m000dy

We divide the gateways into tables (for convenience, the table number corresponds to the third response) ip route add default via
XX.170.105.1 table 105 from XX.170.107.4 table 107 ip rule add from XX.170.105.4 table 105

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question