Re: 回复: How to config a ospf stub area?

2024-04-10 Thread Ondrej Zajicek via Bird-users
On Wed, Apr 10, 2024 at 02:48:11AM +, chan alfie wrote:
> rt3
> ```
> rt3# bird -c /etc/bird/lab/rt3.conf -p
> bird: /etc/bird/lab/rt3.conf:173:1 ASBR must be in non-stub area
> ```
> does it mean this router is an ASBR? but this router only connect to rt4. and 
> does not contain static route, here is the complete bird.conf

Yes. In BIRD, router is considered ASBR if the export filter of the OSPF
protocol is set to something different than 'none' (so it could export
external routes, regardless of whether it actually exported them).

That is also a reason why it does not allow it the area 172.16.34.0 to be
set as stub area (as ASBRs cannot be in stub areas).

Just do not set export filter in OSPF if you do not want to export external 
routes.

> protocol ospf v2 {
> ipv4 {
> import all;
> export all;
> };
> area 172.16.34.0 {
> stub;
> summary yes;
> interface "veth34" {
> type bcast;
> cost 10;
> hello 10;
> };
> interface "lo3" {
> stub yes;
> };
> };
> }

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
"To err is human -- to blame it on a computer is even more so."


回复: How to config a ospf stub area?

2024-04-09 Thread chan alfie
rt3
```
rt3# bird -c /etc/bird/lab/rt3.conf -p
bird: /etc/bird/lab/rt3.conf:173:1 ASBR must be in non-stub area
```
does it mean this router is an ASBR? but this router only connect to rt4. and 
does not contain static route, here is the complete bird.conf
```
log syslog all;
log "/var/log/bird-rt3.log" all;
debug protocols all;
router id 172.16.8.3;
protocol device {
scan time 10;
}
protocol direct {
disabled;
ipv4;
}
filter kernel_out
prefix set reject_local_net;
{
reject_local_net = [ 4.8.3.0/28+, 172.16.34.0/30 ];
if net ~ reject_local_net then reject;
else accept;
}
protocol kernel {
ipv4 {
import none;
export filter kernel_out;
};
learn;
scan time 20;
persist;
merge paths on;
}
protocol ospf v2 {
ipv4 {
import all;
export all;
};
area 172.16.34.0 {
stub;
summary yes;
interface "veth34" {
type bcast;
cost 10;
hello 10;
};
interface "lo3" {
stub yes;
};
};
}
```
so how to identify if a router is asbr of abr?