12 063
правки
(Новая страница: «To ensure failover of connections we need to provide for any procedure for raising and fall of the interfaces. The task is to provide communication regardless of…») |
(Новая страница: «The default gateway with metric 0 in the routing table is created for the eth0 interface, which we will consider to be the primary interface for Internet access.…») |
||
Строка 163: | Строка 163: | ||
To ensure failover of connections we need to provide for any procedure for raising and fall of the interfaces. The task is to provide communication regardless of the order of raising the interfaces and switching when one of them crushes. | To ensure failover of connections we need to provide for any procedure for raising and fall of the interfaces. The task is to provide communication regardless of the order of raising the interfaces and switching when one of them crushes. | ||
The default gateway with metric 0 in the routing table is created for the eth0 interface, which we will consider to be the primary interface for Internet access. Set the default gateway via the ppp0 interface to 100 metric (or any metric other than 0). | |||
The daemon uses the <code>/etc/ppp/ip-up directory to execute commands after any ppp interface is initialized.d</code>. The name of the ppp interface is also passed to the script as command-line parameters (in our case, there is only one such interface — ppp0). | |||
Создадим скрипт add_routes в директории <code>/etc/ppp/ip-up.d</code> и сделаем его исполняемым (<code>chmod +x /etc/ppp/ip-up.d/add_routes</code>): | Создадим скрипт add_routes в директории <code>/etc/ppp/ip-up.d</code> и сделаем его исполняемым (<code>chmod +x /etc/ppp/ip-up.d/add_routes</code>): |
правки