Created
July 25, 2017 01:43
-
-
Save hichihara/b5ec91275513742489119f564cf732ed to your computer and use it in GitHub Desktop.
BGP config demo with OpenConfig in Janog40
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
<config> | |
<interfaces xmlns="http://openconfig.net/yang/interfaces"> | |
<interface> | |
<name>ge-0/0/0</name> | |
<subinterfaces> | |
<subinterface> | |
<index>0</index> | |
<config> | |
<index>0</index> | |
<enabled>true</enabled> | |
</config> | |
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip"> | |
<addresses> | |
<address> | |
<ip>10.10.0.10</ip> | |
<config> | |
<ip>10.10.0.10</ip> | |
<prefix-length>24</prefix-length> | |
</config> | |
</address> | |
</addresses> | |
</ipv4> | |
</subinterface> | |
</subinterfaces> | |
</interface> | |
<interface> | |
<name>ge-0/0/1</name> | |
<subinterfaces> | |
<subinterface> | |
<index>0</index> | |
<config> | |
<index>0</index> | |
<enabled>true</enabled> | |
</config> | |
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip"> | |
<addresses> | |
<address> | |
<ip>10.1.1.1</ip> | |
<config> | |
<ip>10.1.1.1</ip> | |
<prefix-length>24</prefix-length> | |
</config> | |
</address> | |
</addresses> | |
</ipv4> | |
</subinterface> | |
</subinterfaces> | |
</interface> | |
</interfaces> | |
<routing-policy xmlns="http://openconfig.net/yang/routing-policy"> | |
<policy-definitions> | |
<policy-definition> | |
<name>bgp-in</name> | |
<statements> | |
<statement> | |
<name>bgp-in</name> | |
<actions> | |
<config> | |
<accept-route/> | |
</config> | |
</actions> | |
</statement> | |
</statements> | |
</policy-definition> | |
<policy-definition> | |
<name>bgp-out</name> | |
<statements> | |
<statement> | |
<name>bgp-out</name> | |
<actions> | |
<config> | |
<accept-route/> | |
</config> | |
</actions> | |
</statement> | |
</statements> | |
</policy-definition> | |
</policy-definitions> | |
</routing-policy> | |
<bgp xmlns="http://openconfig.net/yang/bgp"> | |
<global> | |
<config> | |
<as>65101</as> | |
<router-id>10.10.0.10</router-id> | |
</config> | |
<afi-safis> | |
<afi-safi> | |
<afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:IPV4_UNICAST</afi-safi-name> | |
<config> | |
<enabled>true</enabled> | |
</config> | |
</afi-safi> | |
</afi-safis> | |
</global> | |
<neighbors> | |
<neighbor> | |
<neighbor-address>10.10.0.20</neighbor-address> | |
<config> | |
<peer-group>group65102</peer-group> | |
<neighbor-address>10.10.0.20</neighbor-address> | |
</config> | |
<afi-safis> | |
<afi-safi> | |
<afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:IPV4_UNICAST</afi-safi-name> | |
<config> | |
<enabled>true</enabled> | |
</config> | |
</afi-safi> | |
</afi-safis> | |
<apply-policy> | |
<config> | |
<import-policy>bgp-in</import-policy> | |
<export-policy>bgp-out</export-policy> | |
</config> | |
</apply-policy> | |
</neighbor> | |
</neighbors> | |
<peer-groups> | |
<peer-group> | |
<peer-group-name>group65102</peer-group-name> | |
<config> | |
<peer-as>65102</peer-as> | |
</config> | |
</peer-group> | |
</peer-groups> | |
</bgp> | |
</config> |
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
<config> | |
<interfaces xmlns="http://openconfig.net/yang/interfaces"> | |
<interface> | |
<name>ge-0/0/0</name> | |
<subinterfaces> | |
<subinterface> | |
<index>0</index> | |
<config> | |
<index>0</index> | |
<enabled>true</enabled> | |
</config> | |
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip"> | |
<addresses> | |
<address> | |
<ip>11.11.0.10</ip> | |
<config> | |
<ip>11.11.0.10</ip> | |
<prefix-length>24</prefix-length> | |
</config> | |
</address> | |
</addresses> | |
</ipv4> | |
</subinterface> | |
</subinterfaces> | |
</interface> | |
<interface> | |
<name>ge-0/0/1</name> | |
<subinterfaces> | |
<subinterface> | |
<index>0</index> | |
<config> | |
<index>0</index> | |
<enabled>true</enabled> | |
</config> | |
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip"> | |
<addresses> | |
<address> | |
<ip>20.1.1.1</ip> | |
<config> | |
<ip>20.1.1.1</ip> | |
<prefix-length>24</prefix-length> | |
</config> | |
</address> | |
</addresses> | |
</ipv4> | |
</subinterface> | |
</subinterfaces> | |
</interface> | |
</interfaces> | |
<routing-policy xmlns="http://openconfig.net/yang/routing-policy"> | |
<policy-definitions> | |
<policy-definition> | |
<name>bgp-in</name> | |
<statements> | |
<statement> | |
<name>bgp-in</name> | |
<actions> | |
<config> | |
<accept-route/> | |
</config> | |
</actions> | |
</statement> | |
</statements> | |
</policy-definition> | |
<policy-definition> | |
<name>bgp-out</name> | |
<statements> | |
<statement> | |
<name>bgp-out</name> | |
<actions> | |
<config> | |
<accept-route/> | |
</config> | |
</actions> | |
</statement> | |
</statements> | |
</policy-definition> | |
</policy-definitions> | |
</routing-policy> | |
<bgp xmlns="http://openconfig.net/yang/bgp"> | |
<global> | |
<config> | |
<as>65103</as> | |
<router-id>11.11.0.10</router-id> | |
</config> | |
<afi-safis> | |
<afi-safi> | |
<afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:IPV4_UNICAST</afi-safi-name> | |
<config> | |
<enabled>true</enabled> | |
</config> | |
</afi-safi> | |
</afi-safis> | |
</global> | |
<neighbors> | |
<neighbor> | |
<neighbor-address>11.11.0.20</neighbor-address> | |
<config> | |
<peer-group>group65102</peer-group> | |
<neighbor-address>11.11.0.20</neighbor-address> | |
</config> | |
<afi-safis> | |
<afi-safi> | |
<afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:IPV4_UNICAST</afi-safi-name> | |
<config> | |
<enabled>true</enabled> | |
</config> | |
</afi-safi> | |
</afi-safis> | |
<apply-policy> | |
<config> | |
<import-policy>bgp-in</import-policy> | |
<export-policy>bgp-out</export-policy> | |
</config> | |
</apply-policy> | |
</neighbor> | |
</neighbors> | |
<peer-groups> | |
<peer-group> | |
<peer-group-name>group65102</peer-group-name> | |
<config> | |
<peer-as>65102</peer-as> | |
</config> | |
</peer-group> | |
</peer-groups> | |
</bgp> | |
</config> |
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
<config> | |
<interfaces xmlns="http://openconfig.net/yang/interfaces"> | |
<interface> | |
<name>GigabitEthernet0/0/0/0</name> | |
<subinterfaces> | |
<subinterface> | |
<index>0</index> | |
<config> | |
<index>0</index> | |
<enabled>true</enabled> | |
</config> | |
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip"> | |
<address> | |
<ip>10.10.0.20</ip> | |
<config> | |
<ip>10.10.0.20</ip> | |
<prefix-length>24</prefix-length> | |
</config> | |
</address> | |
</ipv4> | |
</subinterface> | |
</subinterfaces> | |
</interface> | |
<interface> | |
<name>GigabitEthernet0/0/0/1</name> | |
<subinterfaces> | |
<subinterface> | |
<index>0</index> | |
<config> | |
<index>0</index> | |
<enabled>true</enabled> | |
</config> | |
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip"> | |
<address> | |
<ip>11.11.0.20</ip> | |
<config> | |
<ip>11.11.0.20</ip> | |
<prefix-length>24</prefix-length> | |
</config> | |
</address> | |
</ipv4> | |
</subinterface> | |
</subinterfaces> | |
</interface> | |
</interfaces> | |
<routing-policy xmlns="http://openconfig.net/yang/routing-policy"> | |
<policy-definitions> | |
<policy-definition> | |
<name>bgp-in</name> | |
<statements> | |
<statement> | |
<name>bgp-in</name> | |
<actions> | |
<accept-route/> | |
</actions> | |
</statement> | |
</statements> | |
</policy-definition> | |
<policy-definition> | |
<name>bgp-out</name> | |
<statements> | |
<statement> | |
<name>bgp-out</name> | |
<actions> | |
<accept-route/> | |
</actions> | |
</statement> | |
</statements> | |
</policy-definition> | |
</policy-definitions> | |
</routing-policy> | |
<bgp xmlns="http://openconfig.net/yang/bgp"> | |
<global> | |
<config> | |
<as>65102</as> | |
<router-id>10.10.0.20</router-id> | |
</config> | |
<afi-safis> | |
<afi-safi> | |
<afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:ipv4-unicast</afi-safi-name> | |
<config> | |
<enabled>true</enabled> | |
</config> | |
</afi-safi> | |
</afi-safis> | |
</global> | |
<neighbors> | |
<neighbor> | |
<neighbor-address>10.10.0.10</neighbor-address> | |
<config> | |
<peer-group>group65101</peer-group> | |
<neighbor-address>10.10.0.10</neighbor-address> | |
</config> | |
<afi-safis> | |
<afi-safi> | |
<afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:ipv4-unicast</afi-safi-name> | |
<config> | |
<enabled>true</enabled> | |
</config> | |
<apply-policy> | |
<config> | |
<import-policy>bgp-in</import-policy> | |
<export-policy>bgp-out</export-policy> | |
</config> | |
</apply-policy> | |
</afi-safi> | |
</afi-safis> | |
</neighbor> | |
<neighbor> | |
<neighbor-address>11.11.0.10</neighbor-address> | |
<config> | |
<peer-group>group65103</peer-group> | |
<neighbor-address>11.11.0.10</neighbor-address> | |
</config> | |
<afi-safis> | |
<afi-safi> | |
<afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:ipv4-unicast</afi-safi-name> | |
<config> | |
<enabled>true</enabled> | |
</config> | |
<apply-policy> | |
<config> | |
<import-policy>bgp-in</import-policy> | |
<export-policy>bgp-out</export-policy> | |
</config> | |
</apply-policy> | |
</afi-safi> | |
</afi-safis> | |
</neighbor> | |
</neighbors> | |
<peer-groups> | |
<peer-group> | |
<peer-group-name>group65101</peer-group-name> | |
<config> | |
<peer-as>65101</peer-as> | |
</config> | |
</peer-group> | |
<peer-group> | |
<peer-group-name>group65103</peer-group-name> | |
<config> | |
<peer-as>65103</peer-as> | |
</config> | |
</peer-group> | |
</peer-groups> | |
</bgp> | |
</config> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment