Le lundi 19 octobre 2020 à 17:17 +0100, Tom Smyth a écrit :
> Hi Bastien,
Hello

> can you do a
> route show -n |grep 10\.42

Boot time: 

default            10.42.42.1         UGS        5        5     -     8 em0
10.42.2/24         10.42.42.21        UGS        0        0     -     8 em0
10.42.42/24        10.42.42.69        UCn        3        0     -     4 em0
10.42.42.1         40:62:31:01:4b:66  UHLch      1        2     -     3 em0
10.42.42.3         d0:50:99:18:63:82  UHLc       1        4     - L   3 em0
10.42.42.21        link#1             UHLch      1        2     -     3 em0
10.42.42.69        08:00:27:d6:6e:dd  UHLl       0        2     -     1 em0
10.42.42.255       10.42.42.69        UHb        0       12     -     1 em0

After bird is started :


default            10.42.42.1         UGS        5        6     -     8 em0
10.42.2/24         10.42.42.21        UGS        0        0     -     8 em0
10.42.42/24        10.42.42.69        U1         0        2     -    56 em0
10.42.42.69        08:00:27:d6:6e:dd  UHLl       0       10     -     1 em0
10.42.42.255       10.42.42.69        UHb        0       14     -     1 em0


And a few seconds after :

default            10.42.42.1         UGS        1       28     -     8 em0
default            10.42.42.1         UG1        0        0     -    56 em0
10.0.42.21         10.42.42.21        UGH1       0        0     -    56 em0
10.42.0/24         10.42.42.1         UG1        0        0     -    56 em0
10.42.1.56/30      10.42.42.21        UG1        0        0     -    56 em0
10.42.1.64/30      10.42.42.21        UG1        0        0     -    56 em0
10.42.1.76/30      10.42.42.21        UG1        0        0     -    56 em0
10.42.2/24         10.42.42.21        UGS        0       10     -     8 em0
10.42.2/24         10.42.42.21        UG1        0        0     -    56 em0
10.42.2.254        10.42.42.21        UGH1       0     1088     -    56 em0
10.42.7.6          10.42.42.21        UGH1       0        0     -    56 em0
10.42.7.7          10.42.42.21        UGH1       0        0     -    56 em0
10.42.7.53         10.42.42.21        UGH1       0        0     -    56 em0
10.42.42/24        10.42.42.69        U1h       31       95     -    56 em0
10.42.42.69        08:00:27:d6:6e:dd  UHLl       0       19     -     1 em0
10.42.42.255       10.42.42.69        UHb        0        7     -     1 em0
10.60.77.5         10.42.42.1         UGH1       0        0     -    56 em0
10.120/16          10.42.42.1         UG1        0        0     -    56 em0
[...]

As all routes are going through 10.42.42.1 or 10.42.42.21, all my
routing table matches the grep

Im guessing here but
can you verify if BGP  or Ospf is  *Not* inserting  routes that are
more specific than your connected route on your interface

say you have 10.42.42.x/24  on your interface em0

openbsd-test# ifconfig em0 | grep -v inet6
em0:
flags=a08843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF6,AUTOCONF4
> mtu 1500
        lladdr 08:00:27:d6:6e:dd
        index 1 priority 0 llprio 3
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active
        inet 10.42.42.69 netmask 0xffffff00 broadcast 10.42.42.255


and then you receive a /32 route 10.42.42.1  to point at another
address

once that route is installed your kernel wont know how to look up the
mac address of 10.42.42.1  (because it will no longer try your
physical interface)

quick workaround is put a sciatic arp entry for the ips that are
being
inserted as a morespecific route than your connected route

proper workaround filter out the more specifics If you need more
specifics (have the more specific ips on a separate network that does
not conflict with your connected routes

Hope this helps

I don't see routes to 10.42.42.1 or 10.42.42.21 (I've put full ospf
status & ospf interface outputs)

Note that ospfd(8) can run without crashing network, so I assume ospf
works correctly in the network

Regards,

-- 
Bastien
BIRD 2.0.7 ready.
ospfv2:
Interface em0 (10.42.42.0/24)
        Type: broadcast
        Area: 0.0.0.0 (0)
        State: DROther
        Priority: 1
        Cost: 5
        Hello timer: 10
        Wait timer: 40
        Dead timer: 40
        Retransmit timer: 5
        Designated router (ID): 10.42.42.21
        Designated router (IP): 10.42.42.21
        Backup designated router (ID): 10.42.42.1
        Backup designated router (IP): 10.42.42.1
BIRD 2.0.7 ready.

area 0.0.0.0

        router 10.42.1.78
                distance 15
                router 10.42.42.21 metric 10
                stubnet 10.42.1.76/30 metric 10
                stubnet 10.42.2.254/32 metric 10

        router 10.42.42.1
                distance 5
                network 10.120.0.20/30 metric 12
                network 10.120.0.8/30 metric 12
                network 10.120.0.4/30 metric 10
                network 10.120.0.0/30 metric 10
                network 10.42.42.0/24 metric 1
                stubnet 10.255.255.0/24 metric 10
                stubnet 10.42.0.0/24 metric 5
                external 0.0.0.0/0 metric 100
                external 10.120.0.32/29 metric 100
                external 10.120.0.33/32 metric 100
                external 10.120.0.40/29 metric 100
                external 10.120.0.41/32 metric 100
                external 192.168.1.252/30 metric 100

        router 10.42.42.21
                distance 5
                router 10.42.1.78 metric 10
                network 10.42.42.0/24 metric 10
                stubnet 10.42.7.6/32 metric 0
                stubnet 10.42.7.7/32 metric 0
                stubnet 10.42.7.53/32 metric 0
                stubnet 172.20.55.130/32 metric 0
                stubnet 10.0.42.21/32 metric 0
                stubnet 94.23.110.210/32 metric 0
                stubnet 10.42.2.0/24 metric 10
                stubnet 10.42.1.76/30 metric 10
                stubnet 10.42.1.64/30 metric 10
                stubnet 10.42.1.56/30 metric 10
                external 0.0.0.0/0 metric2 10000 via 10.42.42.1
                external 94.23.110.217/32 metric2 10000 via 10.42.1.58

        router 10.42.42.69
                distance 0
                network 10.42.42.0/24 metric 5

        router 10.121.0.3
                distance 25
                network 10.121.0.0/24 metric 10
                stubnet 10.42.2.254/32 metric 10

        router 10.121.0.36
                distance 25
                network 10.121.0.0/24 metric 250
                stubnet 94.23.110.218/32 metric 10
                stubnet 94.23.110.216/32 metric 10

        router 10.121.0.42
                distance 25
                network 10.121.0.0/24 metric 65535
                stubnet 10.42.7.7/32 metric 0
                stubnet 94.23.110.219/32 metric 0
                stubnet 87.98.180.13/32 metric 0
                stubnet 87.98.155.94/32 metric 0
                stubnet 172.20.55.129/32 metric 0
                stubnet 178.32.50.226/32 metric 20

        router 51.178.76.107
                distance 25
                router 51.255.165.194 metric 200
                router 151.80.16.138 metric 200
                router 192.168.100.53 metric 200
                network 192.168.43.0/24 metric 10
                stubnet 192.168.44.0/24 metric 10

        router 51.255.165.194
                distance 17
                router 51.178.76.107 metric 10
                router 151.80.16.138 metric 10
                network 10.120.0.20/30 metric 12
                network 10.120.0.8/30 metric 12
                stubnet 10.120.0.16/30 metric 12
                stubnet 10.120.21.254/32 metric 0
                stubnet 172.20.55.128/32 metric 0

        router 151.80.16.138
                distance 15
                router 51.255.165.194 metric 10
                router 51.178.76.107 metric 10
                network 10.121.0.0/24 metric 10
                network 10.120.0.0/30 metric 10
                network 10.120.0.4/30 metric 10
                stubnet 94.23.110.221/32 metric 0
                stubnet 10.42.7.6/32 metric 0
                stubnet 10.121.21.0/24 metric 10
                stubnet 10.120.0.32/29 metric 9
                stubnet 10.120.0.40/29 metric 9
                stubnet 10.121.2.0/24 metric 10
                stubnet 10.120.0.0/16 metric 10

        router 178.32.50.226
                distance 25
                network 10.121.0.0/24 metric 10
                stubnet 178.32.50.226/32 metric 0

        router 192.168.51.12
                distance 35
                network 192.168.43.0/24 metric 10
                stubnet 10.60.77.5/32 metric 10
                stubnet 192.168.199.5/32 metric 10
                stubnet 192.168.42.5/32 metric 10
                stubnet 185.93.37.127/32 metric 10
                stubnet 192.168.1.4/32 metric 10
                stubnet 192.168.2.0/24 metric 10
                stubnet 172.16.0.0/23 metric 10
                stubnet 172.16.1.0/24 metric 10
                stubnet 172.16.200.0/24 metric 10

        router 192.168.100.53
                distance 225
                router 51.178.76.107 metric 200
                stubnet 192.168.100.0/24 metric 10

        network 10.42.42.0/24
                dr 10.42.42.21
                distance 5
                router 10.42.42.21
                router 10.42.42.1
                router 10.42.42.69

        network 10.120.0.0/30
                dr 151.80.16.138
                distance 15
                router 151.80.16.138
                router 10.42.42.1

        network 10.120.0.4/30
                dr 151.80.16.138
                distance 15
                router 151.80.16.138
                router 10.42.42.1

        network 10.120.0.8/30
                dr 51.255.165.194
                distance 17
                router 51.255.165.194
                router 10.42.42.1

        network 10.120.0.20/30
                dr 51.255.165.194
                distance 17
                router 51.255.165.194
                router 10.42.42.1

        network 10.121.0.0/24
                dr 151.80.16.138
                distance 25
                router 151.80.16.138
                router 10.121.0.3
                router 178.32.50.226
                router 10.121.0.36
                router 10.121.0.42

        network 192.168.43.0/24
                dr 192.168.51.12
                distance 35
                router 192.168.51.12
                router 51.178.76.107
# This is a basic configuration file, which contains boilerplate options and
# some basic examples. It allows the BIRD daemon to start but will not cause
# anything else to happen.
#
# Please refer to the BIRD User's Guide documentation, which is also available
# online at http://bird.network.cz/ in HTML format, for more information on
# configuring BIRD and adding routing protocols.

# Configure logging
# log syslog all;
log "/var/log/bird.log" { debug, trace, info, remote, warning, error, auth, 
fatal, bug };

# Set router ID. It is a unique identification of your router, usually one of
# IPv4 addresses of the router. It is recommended to configure it explicitly.
router id 10.42.42.69;

# Turn on global debugging of all protocols (all messages or just selected 
classes)
debug protocols all;
# debug protocols { events, states };

# Turn on internal watchdog
# watchdog warning 5 s;
# watchdog timeout 30 s;

# You can define your own constants
# define my_asn = 65000;
#define my_addr = 10.42.42.69;

# Tables master4 and master6 are defined by default
# ipv4 table master4;
# ipv6 table master6;

# Define more tables, e.g. for policy routing or as MRIB
# ipv4 table mrib4;
# ipv6 table mrib6;

# The Device protocol is not a real routing protocol. It does not generate any
# routes and it only serves as a module for getting information about network
# interfaces from the kernel. It is necessary in almost any configuration.
protocol device {
}

# The direct protocol is not a real routing protocol. It automatically generates
# direct routes to all network interfaces. Can exist in as many instances as you
# wish if you want to populate multiple routing tables with direct routes.
protocol direct {
        disabled;               # Disable by default
        ipv4;                   # Connect to default IPv4 table
        ipv6;                   # ... and to default IPv6 table
}

# The Kernel protocol is not a real routing protocol. Instead of communicating
# with other routers in the network, it performs synchronization of BIRD
# routing tables with the OS kernel. One instance per table.
protocol kernel {
        ipv4 {                  # Connect protocol to IPv4 table by channel
#             table master4;    # Default IPv4 table is master4
#             import all;       # Import to table, default is import all
              export all;       # Export to protocol. default is export none
        };
#       learn;                  # Learn alien routes from the kernel
#       kernel table 10;        # Kernel table to synchronize with (default: 
main)
}

# Another instance for IPv6, skipping default options
protocol kernel {
        ipv6 { export all; };
}

# Static routes (Again, there can be multiple instances, for different address
# families and to disable/enable various groups of static routes on the fly).
protocol static {
        ipv4;                   # Again, IPv4 channel with default options

#       route 0.0.0.0/0 via 198.51.100.10;
#       route 192.0.2.0/24 blackhole;
#       route 10.0.0.0/8 unreachable;
#       route 10.2.0.0/24 via "eth0";
#       # Static routes can be defined with optional attributes
#       route 10.1.1.0/24 via 198.51.100.3 { rip_metric = 3; };
#       route 10.1.2.0/24 via 198.51.100.3 { ospf_metric1 = 100; };
#       route 10.1.3.0/24 via 198.51.100.4 { ospf_metric2 = 100; };
}

protocol ospf v2 ospfv2 {
        rfc1583compat yes;
        tick 2;
        ipv4 {};
        area 0 {
             interface "em0" { cost 5; };
        };
}


protocol ospf v3 ospfv3 {
        ipv6 {};
        area 0 {
             interface "em0" { cost 5; };
        };
}

Reply via email to