The Private Peer 2 router performs two main functions:
- [edit]
- routing-options { # simulate local customer routes
-
- static {
- route 172.16.64.0/20 reject;
- route 172.16.80.0/20 reject;
- route 172.16.96.0/20 reject;
- route 172.16.112.0/20 reject;
- route 172.16.72.0/21 reject;
- route 172.16.88.0/21 reject;
- route 172.16.104.0/21 reject;
- route 172.16.120.0/21 reject;
- }
- generate {
- route 0.0.0.0/0 policy if-upstream-routes-exist;
- }
- autonomous-system 8000;
- protocols {
-
- bgp {
-
- group External-Peers {
- type external;
- export outbound-routes;
-
- neighbor 10.222.44.1 {
- peer-as 22222;
- }
-
- neighbor 10.222.45.1 {
- peer-as 1000;
- }
- }
-
- group Customers {
- type external;
- export internal-routes;
-
- neighbor 10.222.6.1 {
- peer-as 2468;
- }
- }
- }
- }
- policy-options {
-
- policy-statement outbound-routes { # advertise local customer
routes
-
- term statics {
- from protocol static;
- then accept;
- }
-
- term allowed-bgp-routes {
- from { # advertise routes
- as-path [ my-own-routes AS2468-routes ];
- }
- then accept;
- }
-
- term no-transit {
- then reject; # do not advertise any other routes
- }
- }
-
- policy-statement internal-routes { # advertise local customer
routes
-
- term statics {
- from protocol static;
- then accept;
- }
-
- term default-route { # advertise just the default route
-
- from {
- route-filter 0.0.0.0/0 exact;
- }
- then accept;
- }
-
- term reject-all-other-routes { # do not advertise any other
routes
- then reject;
- }
- }
-
- policy-statement if-upstream-routes-exist {
-
- term as-22222-routes {
-
- from { # allow the 10.100.0.0/17 route to activate
- route-filter 10.100.0.0/17 exact; # the generated route
in the routing # table
- }
- then accept;
- }
-
- term reject-all-other-routes {
- then reject; # do not allow any other route to activate
- } # the generated route in the routing table
- }
- as-path my-own-routes "()";
- as-path AS2468-routes "2468";
- }