Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add guide and examples for bgp model
- Loading branch information
Showing
28 changed files
with
2,295 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"bgp:bgp": { | ||
"global": { | ||
"config": { | ||
"as": 65001 | ||
}, | ||
"afi-safis": { | ||
"afi-safi": [ | ||
{ | ||
"afi-safi-name": "ipv4-unicast", | ||
"config": { | ||
"afi-safi-name": "ipv4-unicast", | ||
"enabled": true | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"peer-groups": { | ||
"peer-group": [ | ||
{ | ||
"peer-group-name": "EBGP", | ||
"config": { | ||
"peer-group-name": "EBGP", | ||
"peer-as": 65002 | ||
}, | ||
"afi-safis": { | ||
"afi-safi": [ | ||
{ | ||
"afi-safi-name": "ipv4-unicast", | ||
"config": { | ||
"afi-safi-name": "ipv4-unicast", | ||
"enabled": true | ||
}, | ||
"apply-policy": { | ||
"config": { | ||
"import-policy": [ | ||
"POLICY3" | ||
], | ||
"export-policy": [ | ||
"POLICY1" | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"neighbors": { | ||
"neighbor": [ | ||
{ | ||
"neighbor-address": "192.168.1.1", | ||
"config": { | ||
"neighbor-address": "192.168.1.1", | ||
"peer-group": "EBGP" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
router bgp 65001 | ||
address-family ipv4 unicast | ||
! | ||
neighbor-group EBGP | ||
remote-as 65002 | ||
address-family ipv4 unicast | ||
route-policy POLICY3 in | ||
route-policy POLICY1 out | ||
! | ||
! | ||
neighbor 192.168.1.1 | ||
use neighbor-group EBGP | ||
! | ||
! | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0"?> | ||
<bgp xmlns="http://openconfig.net/yang/bgp"> | ||
<global> | ||
<config> | ||
<as>65001</as> | ||
</config> | ||
<afi-safis> | ||
<afi-safi> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<config> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<enabled>true</enabled> | ||
</config> | ||
</afi-safi> | ||
</afi-safis> | ||
</global> | ||
<peer-groups> | ||
<peer-group> | ||
<peer-group-name>EBGP</peer-group-name> | ||
<config> | ||
<peer-group-name>EBGP</peer-group-name> | ||
<peer-as>65002</peer-as> | ||
</config> | ||
<afi-safis> | ||
<afi-safi> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<config> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<enabled>true</enabled> | ||
</config> | ||
<apply-policy> | ||
<config> | ||
<import-policy>POLICY3</import-policy> | ||
<export-policy>POLICY1</export-policy> | ||
</config> | ||
</apply-policy> | ||
</afi-safi> | ||
</afi-safis> | ||
</peer-group> | ||
</peer-groups> | ||
<neighbors> | ||
<neighbor> | ||
<neighbor-address>192.168.1.1</neighbor-address> | ||
<config> | ||
<neighbor-address>192.168.1.1</neighbor-address> | ||
<peer-group>EBGP</peer-group> | ||
</config> | ||
</neighbor> | ||
</neighbors> | ||
</bgp> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"bgp:bgp": { | ||
"global": { | ||
"config": { | ||
"as": 65001 | ||
}, | ||
"afi-safis": { | ||
"afi-safi": [ | ||
{ | ||
"afi-safi-name": "ipv4-unicast", | ||
"config": { | ||
"afi-safi-name": "ipv4-unicast", | ||
"enabled": true | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"peer-groups": { | ||
"peer-group": [ | ||
{ | ||
"peer-group-name": "IBGP", | ||
"config": { | ||
"peer-group-name": "IBGP", | ||
"peer-as": 65001 | ||
}, | ||
"transport": { | ||
"config": { | ||
"local-address": "Loopback0" | ||
} | ||
}, | ||
"afi-safis": { | ||
"afi-safi": [ | ||
{ | ||
"afi-safi-name": "ipv4-unicast", | ||
"config": { | ||
"afi-safi-name": "ipv4-unicast", | ||
"enabled": true | ||
}, | ||
"apply-policy": { | ||
"config": { | ||
"export-policy": [ | ||
"POLICY2" | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"neighbors": { | ||
"neighbor": [ | ||
{ | ||
"neighbor-address": "172.16.255.3", | ||
"config": { | ||
"neighbor-address": "172.16.255.3", | ||
"peer-group": "IBGP" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
router bgp 65001 | ||
address-family ipv4 unicast | ||
! | ||
neighbor-group IBGP | ||
remote-as 65001 | ||
update-source Loopback0 | ||
address-family ipv4 unicast | ||
route-policy POLICY2 out | ||
! | ||
! | ||
neighbor 172.16.255.3 | ||
use neighbor-group IBGP | ||
! | ||
! |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0"?> | ||
<bgp xmlns="http://openconfig.net/yang/bgp"> | ||
<global> | ||
<config> | ||
<as>65001</as> | ||
</config> | ||
<afi-safis> | ||
<afi-safi> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<config> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<enabled>true</enabled> | ||
</config> | ||
</afi-safi> | ||
</afi-safis> | ||
</global> | ||
<peer-groups> | ||
<peer-group> | ||
<peer-group-name>IBGP</peer-group-name> | ||
<config> | ||
<peer-group-name>IBGP</peer-group-name> | ||
<peer-as>65001</peer-as> | ||
</config> | ||
<transport> | ||
<config> | ||
<local-address>Loopback0</local-address> | ||
</config> | ||
</transport> | ||
<afi-safis> | ||
<afi-safi> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<config> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<enabled>true</enabled> | ||
</config> | ||
<apply-policy> | ||
<config> | ||
<export-policy>POLICY2</export-policy> | ||
</config> | ||
</apply-policy> | ||
</afi-safi> | ||
</afi-safis> | ||
</peer-group> | ||
</peer-groups> | ||
<neighbors> | ||
<neighbor> | ||
<neighbor-address>172.16.255.3</neighbor-address> | ||
<config> | ||
<neighbor-address>172.16.255.3</neighbor-address> | ||
<peer-group>IBGP</peer-group> | ||
</config> | ||
</neighbor> | ||
</neighbors> | ||
</bgp> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"bgp:bgp": { | ||
"global": [ | ||
null | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<bgp xmlns="http://openconfig.net/yang/bgp"> | ||
<global/> | ||
</bgp> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"bgp:bgp": { | ||
"neighbors": [ | ||
null | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<bgp xmlns="http://openconfig.net/yang/bgp"> | ||
<neighbors/> | ||
</bgp> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"bgp:bgp": { | ||
"peer-groups": [ | ||
null | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<bgp xmlns="http://openconfig.net/yang/bgp"> | ||
<peer-groups/> | ||
</bgp> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"bgp:bgp": [ | ||
null | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<bgp xmlns="http://openconfig.net/yang/bgp"/> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="100"> | ||
<edit-config> | ||
<target> | ||
<candidate/> | ||
</target> | ||
<error-option>rollback-on-error</error-option> | ||
<config> | ||
<bgp xmlns="http://openconfig.net/yang/bgp"> | ||
<global> | ||
<config> | ||
<as>65001</as> | ||
</config> | ||
<afi-safis> | ||
<afi-safi> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<config> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<enabled>true</enabled> | ||
</config> | ||
</afi-safi> | ||
</afi-safis> | ||
</global> | ||
<peer-groups> | ||
<peer-group> | ||
<peer-group-name>EBGP</peer-group-name> | ||
<config> | ||
<peer-group-name>EBGP</peer-group-name> | ||
<peer-as>65002</peer-as> | ||
</config> | ||
<afi-safis> | ||
<afi-safi> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<config> | ||
<afi-safi-name>ipv4-unicast</afi-safi-name> | ||
<enabled>true</enabled> | ||
</config> | ||
<apply-policy> | ||
<config> | ||
<import-policy>POLICY3</import-policy> | ||
<export-policy>POLICY1</export-policy> | ||
</config> | ||
</apply-policy> | ||
</afi-safi> | ||
</afi-safis> | ||
</peer-group> | ||
</peer-groups> | ||
<neighbors> | ||
<neighbor> | ||
<neighbor-address>192.168.1.1</neighbor-address> | ||
<config> | ||
<neighbor-address>192.168.1.1</neighbor-address> | ||
<peer-group>EBGP</peer-group> | ||
</config> | ||
</neighbor> | ||
</neighbors> | ||
</bgp> | ||
</config> | ||
</edit-config> | ||
</rpc> |
Oops, something went wrong.