Created
May 7, 2020 16:54
-
-
Save enukane/9c5a3ac619c16ab2cb8d1b15916aa3d5 to your computer and use it in GitHub Desktop.
homenet
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
# policy | |
bgp AS Number := 650000 + ($layer - 1) * 100 + $inLayerID | |
$layer := { 1 (external), 2 (aggr) , 3 (head | |
$inlayerid := counter from left | |
e.g. aggr router with ID=2 -> 65102 | |
# bgp-local(101, 10.1.$ID.1/32) | |
.1: seilx1-1 | |
$ID := ($layer - 1) * 100 + $InLayerID | |
10.1.1.1: seilx1-1 | |
10.1.2.1: c1812j-1 | |
10.1.3.1: erlite3-1 | |
10.1.101.1: rtx1200-1 | |
10.1.102.1: c3750-1 | |
10.1.201.1: rb750gl-1 | |
10.1.202.1: bpv4-1 | |
10.1.203.1: ssb-1 | |
# bgp-interlink(201, 10.2.$LINKID.1/29) | |
$LINKID := 図中のリンク番号 | |
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
# mgmt vlan2001, 172.31.0.0/16 | |
## 1-: mgmt core系 | |
.1 erlite3-1 | |
# 10-20: L2系 | |
.10 gs924s-1 | |
.11 c2960-1 | |
.12 ex2200p-1 | |
.13 c3560cg-1 | |
# 51-70 1段目ゲートウェイ系 | |
.51 seilx1-1 | |
.52 c1812j-1 | |
.53 ix2025-1 | |
# 71-90 2段目系ゲートウェイ | |
.71 rtx1200-1 | |
.72 c3750-1 | |
# 91-100 3段目ゲートウェイ系 | |
.91 sirg200-1 | |
.92 bpv4-1 | |
# 151- サーバ系 | |
.151 (dhcp) | |
.152 (dns) | |
.153 ts2540-1 | |
# 201- 無線系 | |
.201 hapliste-1 | |
.211 cpe510-1 | |
.212 cpe510-2 | |
# 255.1 DHCP | |
.2551/24 (DHCP assignment) | |
# 91-100 三段目ゲートウェイ系 |
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
#remote sites/small(172.30.$RID.0/24) | |
# remote sites/small-1 | |
172.30.1.0/24: conoha-site-1 | |
172.30.2.0/24: jikka-1 | |
# remote sites/middle(172.$RSID.0.0/16) | |
## remote sites/middle-1 | |
RSID := 16 + $counter | |
172.17.0.0/16: conoha-site-0 |
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
# user1/23(1001, 10.10.2.0/23) | |
.1 vgw | |
.2 sirg200-1 | |
.3 bpv4-1 | |
.101 dhcp-range | |
# user6/21 (1006, 10.13.48.0/21) | |
.1 vgw | |
.2 sirg200-1 | |
.3 bpvr-1 | |
.101 dhcp-range |
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
userN <= (vlanid, subnetid) | |
vlanid := 1000 + counter | |
subnet := 10.type.subtype.0/mask | |
type := 10 + size | |
size = (24 - msk) e.g. /24 -> 0, /23 -> 1, /22 -> 2, /21 -> 3 | |
subtype := ID << size, e.g. 3rd /21 network -> vlan 1303, 10.13.240/21 | |
limit -> | |
/24: 256 (10.10.0.0/24 - 10.10.255.0/24) | |
/23: 128 (10.11.2.0/23 - 10.11.254.0/23) | |
/22: 64 (10.12.4.0/22 - 10.11.252.0/22) | |
/21: 32 (10.13.8.0/21 - 10.13.0.248.0/21) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment