Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B BIRD Internet Routing Daemon
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • labs
  • BIRD Internet Routing Daemon
  • Wiki
  • BGP_example_2

BGP_example_2 · Changes

Page history
Rename pages authored Jun 03, 2013 by Ondřej Surý's avatar Ondřej Surý
Hide whitespace changes
Inline Side-by-side
BGP_example_2.md 0 → 100644
View page @ e466a356
# BGP example 2
Here is an example of a gateway router for a leaf AS with several upstreams (multihoming). This config is an extension of [BGP example 1](BGP_example_1). We cannot use the default route locally, we import routes from BGP and use BGP to choose between upstreams for each prefix - some networks are closer using bgp_abc, other using bgp_def. But we don't want all these routes received from BGP (cca 300k routes) export to the OSPF. Therefore, we propagate the default route (from static_ospf protocol) to the OSPF protocol (it does not matter that the default route is an unreachable route, other OSPF routers that receive it will compute _via_ according to the shortest path to this gateway).
This config should be extended to contain proper import filters for bgp protocols to prevent upstreams to send us some bogus routes. For details see the [BGP filtering](BGP_filtering) for more examples.
log syslog all;
router id A.B.C.D;
protocol device {
scan time 10;
}
protocol kernel {
export all;
scan time 15;
}
protocol static static_bgp {
import all;
route A.B.C.0/24 reject;
route D.E.F.0/24 reject;
}
protocol static static_ospf {
import all;
route 0.0.0.0/0 reject;
}
protocol bgp bgp_abc {
import all;
export where proto = "static_bgp";
local as XXXX;
neighbor W1.X1.Y1.Z1 as YYYY;
}
protocol bgp bgp_def {
import all;
export where proto = "static_bgp";
local as XXXX;
neighbor W2.X2.Y2.Z2 as ZZZZ;
}
protocol ospf {
import all;
export where proto = "static_ospf";
...
}
Clone repository
  • BGP_example_1
  • BGP_example_2
  • BGP_filtering
  • Command_interface_examples
  • Examples
  • FAQ
  • OSPF_example
  • Policy_routing
  • Related
  • Route_server_with_community_based_filtering_and_multiple_RIBs
  • Route_server_with_community_based_filtering_and_single_RIB
  • Simple_route_server
  • Home
  • transition notes to bird 2