Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
395
views
Routing traffic to a local LAN address when reachable, otherwise using WireGuard VPN
I have a WireGuard VPN set up that uses the 10.20.30.0/24 IP range. I want to configure routing on my laptop so that traffic to 10.20.30.xy is routed through 192.168.99.xy whenever the latter is reachable on the local network. If the local address isn’t reachable, I want the traffic to be routed thr...
I have a WireGuard VPN set up that uses the 10.20.30.0/24 IP range. I want to configure routing on my laptop so that traffic to 10.20.30.xy is routed through 192.168.99.xy whenever the latter is reachable on the local network. If the local address isn’t reachable, I want the traffic to be routed through the WireGuard tunnel as usual.
I understand that I can get about 80% of the way there by using a script triggered by NetworkManager whenever I connect to the local network. The script would simply add the necessary routes using:
Is there a simple way to handle this automatically, accounting for local network reachability? I’m also wondering if there might be a solution using OSPF or another dynamic routing protocol that could automatically detect reachability and adjust the routing accordingly.
EDIT: I am not opposed to making a /32 route for each of my devices (there aren't that many of them). I can also adjust my network topology - making a new prefix for switched devices would definitely be an option for me.
Jan Buchar
(101 rep)
Oct 5, 2024, 12:11 PM
• Last activity: Oct 10, 2024, 03:09 PM
0
votes
1
answers
220
views
Bird 2.0 OSPF to OSPF redistribution cost
I am trying to set up bird for routing networks between my sites witch are connected with 2 L2 links. Right now all my OSPF_INTRA are redistributed to others routers with automatic cost calculation. I would like to specify extra cost for some network in order to "force" traffic to pass on the other...
I am trying to set up bird for routing networks between my sites witch are connected with 2 L2 links.
Right now all my OSPF_INTRA are redistributed to others routers with automatic cost calculation.
I would like to specify extra cost for some network in order to "force" traffic to pass on the other link. (eg. Real-Time traffic on the first link and Bandwitdh consuming traffic on the other by tweaking cost).
Regards,
Nicolas
Nicolas P
(1 rep)
May 17, 2022, 07:20 AM
• Last activity: May 24, 2022, 08:57 AM
1
votes
0
answers
201
views
Failover Routing - How to detect dead link?
I have a network that is connected to the internet through Router 1 through cable, and separately through Router 2 on LTE. It is desired that in a situation where both cable and LTE are available, Router 1 and Router 2 both route their respective traffic through Router 1's cable connection. Only cab...
I have a network that is connected to the internet through Router 1 through cable, and separately through Router 2 on LTE. It is desired that in a situation where both cable and LTE are available, Router 1 and Router 2 both route their respective traffic through Router 1's cable connection. Only cable (or Router 1) fails, Router 2's LTE link is used. Once Router 1's link becomes available again, both go back to cable.
I am trying to set up a routing daemon (Quagga) on both Router 1 and Router 2, so the two devices exchange available routes through the OSPF protocol. However, one of the fundamental assumptions of this concept seems to be that the router's kernel notifies Quagga when its link is dead; as such, Quagga will treat a removed LAN cable or a completely non-responsive router as a "dead" route, but not other modes of failure, such as the LTE modem losing association with the cellular network or the cable being removed from the cable modem (both of which do not cause any changes on the "local" side of the modem).
Thus, my question: How can I instruct Quagga, or any other routing daemon, to periodically verify a route (e.g. by pinging a host that should be reachable through that route) and treat the route as failed if those pings fail.
Thank you for any suggestions.
Alex
(39 rep)
Jul 17, 2021, 06:17 PM
0
votes
1
answers
2171
views
Porting OSPF route filter rule for BIRD
I have an anycast setup for DNS using BIRD https://unix.stackexchange.com/questions/381962/ospf-migrating-quagga-to-bird However, using "show routes" in the `birdc` command I see lots of OSPF learned routes from our internal network. As it is, in this anycast setup (and normally), there is only a ne...
I have an anycast setup for DNS using BIRD https://unix.stackexchange.com/questions/381962/ospf-migrating-quagga-to-bird
However, using "show routes" in the
birdc
command I see lots of OSPF learned routes from our internal network.
As it is, in this anycast setup (and normally), there is only a need to announce routes, and not to receive them.
How to create a filter in BIRD to ignore the OSPF routes?
My OSPF setup is this one:
protocol ospf {
tick 2;
rfc1583compat yes;
area 0.0.0.0 {
networks {
1.1.1.0/22;
};
stubnet 2.2.2.2/32 {
cost 100;
};
stubnet 3.3.3.3/32 {
cost 500;
};
stubnet 4.4.4.4/32 {
cost 1000;
};
stubnet 5.5.5.5/32 {
cost 900;
};
interface "eth0" {
cost 1000;
password "MySecretPassword" {
id 5;
};
authentication cryptographic;
};
interface "dummy0" {
stub;
};
interface "dummy1" {
stub;
};
interface "dummy2" {
stub;
};
interface "dummy3" {
stub;
};
};
}
Rui F Ribeiro
(57882 rep)
Jul 27, 2017, 09:28 AM
• Last activity: May 1, 2019, 08:43 AM
3
votes
1
answers
2811
views
OSPF: Migrating Quagga to BIRD
I need/want to migrate from Quagga to BIRD after several Quagga hiccups, namely https://unix.stackexchange.com/questions/331664/quagga-stopped-working-after-updates-in-stretch/331665. BIRD is also more flexible and modern. I have my OSPF BIND anycast configuration in Quagga and would like to setup t...
I need/want to migrate from Quagga to BIRD after several Quagga hiccups, namely https://unix.stackexchange.com/questions/331664/quagga-stopped-working-after-updates-in-stretch/331665 .
BIRD is also more flexible and modern.
I have my OSPF BIND anycast configuration in Quagga and would like to setup the OSPF service in a way similar on BIRD.
What to do?
My
/etc/quagga/ospfd.conf
is:
!
! Zebra configuration saved from vty
! 2011/03/22 21:17:11
!
hostname dns
password 8 xxxxxxx
enable password 8 xxxxxxx
log stdout
service password-encryption
!
!
!
interface dummy0
ip ospf cost 100
!
interface dummy1
ip ospf cost 500
!
interface dummy2
ip ospf cost 1000
!
interface dummy3
ip ospf cost 900
!
interface eth0
ip ospf authentication message-digest
ip ospf message-digest-key 5 md5 MySecretPassword
ip ospf cost 1000
!
interface eth1
ip ospf cost 1000
!
interface lo
!
router ospf
ospf router-id 1.1.1.1
auto-cost reference-bandwidth 10000
network 1.1.1.0/22 area 0.0.0.0
network 2.2.2.2/32 area 0.0.0.0
network 3.3.3.3/32 area 0.0.0.0
network 4.4.4.4/32 area 0.0.0.0
network 5.5.5.5/32 area 0.0.0.0
area 0 filter-list prefix AREA_1_OUT out
!
ip prefix-list AREA_1_OUT seq 5 permit 2.2.2.2/32
ip prefix-list AREA_1_OUT seq 10 permit 3.3.3.3/32
ip prefix-list AREA_1_OUT seq 15 permit 4.4.4.4/32
ip prefix-list AREA_1_OUT seq 20 permit 5.5.5.5/32
ip prefix-list AREA_1_OUT seq 25 deny any
!
line vty
!
Rui F Ribeiro
(57882 rep)
Jul 26, 2017, 04:10 PM
• Last activity: May 1, 2019, 08:42 AM
0
votes
1
answers
3132
views
OSPF route costs in BIRD
I am migrating an anycast OSPF routing BIND redundant setup from Quagga to BIRD. One of my difficulties is getting several routes with different costs with BIRD, in the same way as I am doing it in quagga. As in Quagga I am doing in `/etc/quagga/ospfd.conf`: interface dummy0 ip ospf cost 100 ! inter...
I am migrating an anycast OSPF routing BIND redundant setup from Quagga to BIRD.
One of my difficulties is getting several routes with different costs with BIRD, in the same way as I am doing it in quagga.
As in Quagga I am doing in
/etc/quagga/ospfd.conf
:
interface dummy0
ip ospf cost 100
!
interface dummy1
ip ospf cost 500
!
interface dummy2
ip ospf cost 1000
!
interface dummy3
ip ospf cost 900
!
I can see in birdc
using the command show ospf state
that my configuration is not giving weights, despite having defined the cost in the interfaces in /etc/bird.conf
. What to do?
protocol ospf {
tick 2;
rfc1583compat yes;
area 0.0.0.0 {
networks {
1.1.1.0/22;
2.2.2.2/32;
3.3.3.3/32;
4.4.4.4/32;
5.5.5.5/32;
};
interface "eth0" {
cost 1000;
password "xxxxxxxxxx" {
id 5;
};
authentication cryptographic;
};
interface "dummy0" {
stub;
cost 100;
};
interface "dummy1" {
stub;
cost 500;
};
interface "dummy2" {
stub;
cost 1000;
};
interface "dummy3" {
stub;
cost 900;
};
};
}
Rui F Ribeiro
(57882 rep)
Jul 26, 2017, 01:38 PM
• Last activity: Jul 26, 2017, 03:27 PM
Showing page 1 of 6 total questions