Created
December 22, 2024 10:52
-
-
Save liweitianux/a4509935f9d73e32c470d967545d637b to your computer and use it in GitHub Desktop.
BIRD (Jinja template) for OSPF & OSPFv3 with DPVS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: bird2 on centos 7.x | |
# Jinja template | |
# Configure logging | |
log syslog all; | |
# Log to file; need to 'touch /var/log/bird.log && chown bird: /var/log/bird.log' | |
#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 {{ server_ip }}; | |
# 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; | |
# Tables master4 and master6 are defined by default | |
# ipv4 table master4; | |
# ipv6 table master6; | |
# 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 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 | |
} | |
protocol kernel { | |
ipv6 { export all; }; | |
} | |
# Bidirectional Forwarding Detection (BFD) is not a routing protocol itself, | |
# it # is an independent tool providing liveness and failure detection. | |
# BFD offers universal, fast and low-overhead mechanism for failure detection, | |
# which could be attached to any routing protocol in an advisory role. | |
protocol bfd { | |
} | |
protocol ospf v2 o4 { | |
area {{ area }} { | |
stub; | |
summary no; | |
interface "eth0", "dpdk0.kni" { | |
type broadcast; | |
priority 0; # don't to be selected as DR | |
cost 10; | |
#bfd on; # use BFD for quick failure detection | |
authentication {{ authentication }}; | |
password "{{ password }}"; | |
}; | |
}; | |
} | |
protocol ospf v3 o6 { | |
area {{ area }} { | |
stub; | |
summary no; | |
interface "eth0", "dpdk0.kni" { | |
type broadcast; | |
priority 0; # don't to be selected as DR | |
cost 10; | |
#bfd on; # use BFD for quick failure detection | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment