Skip to content

Commit b30d72c

Browse files
authored
Merge pull request #2 from homenoc/develop
feat: add configuration of the BGP connection by VyOS GRE and some improvements
2 parents bc4d728 + 512baa5 commit b30d72c

File tree

3 files changed

+397
-36
lines changed

3 files changed

+397
-36
lines changed

docs/examples/bgp/etherip/nec-ix.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ architecture-beta
2626
```
2727

2828
## デフォルトルート
29+
- 例示環境
30+
- サンプルコンフィグ内のIPアドレスは、以下の仮定の下、設定しています。実際に投入する際は、ダッシュボードの値をもとに、適宜変更してください。
31+
- 割り当てIPv4 Prefix: 192.0.2.0/29
32+
- ルータのIPv4アドレス: 192.0.2.6/29
33+
- DHCPサーバの割り当て範囲:
34+
- 開始: 192.0.2.1
35+
- 終了: 192.0.2.5
36+
- トンネル用IPv4 Prefix: 192.0.2.254/31
37+
- 弊団体側IPv4アドレス: 192.0.2.254/31
38+
- 貴団体側IPv4アドレス: 192.0.2.255/31
39+
- 貴団体側ASN: 64512
40+
- 弊団体側トンネル終端アドレス: 2001:db8:3::1
41+
- ネームサーバのIPアドレス(お好みで設定してください): 198.51.100.1
42+
- IPv6 Interface Identifier: 00:00:00:00:00:00:00:01
2943
```
3044
! NEC Portable Internetwork Core Operating System Software
3145
! IX Series IX2215 (magellan-sec) Software, Version 10.7.18, RELEASE SOFTWARE
@@ -37,13 +51,11 @@ timezone +09 00
3751
!
3852
ip ufs-cache enable
3953
! GigaEthernet2がdownでもルートを広報する
40-
ip route <割り当てIPv4プレフィックス> Null0.0
54+
ip route 192.0.2.0/29 Null0.0
4155
ip dhcp enable
42-
ip prefix-list pref-in 10 permit 0.0.0.0/0
43-
ip prefix-list pref-in 20 deny any
44-
ip prefix-list pref-out 10 permit <割り当てIPv4プレフィックス>
56+
ip prefix-list pref-out 10 permit 192.0.2.0/29
4557
ip prefix-list pref-out 20 deny any
46-
ip access-list proxy-dns permit ip src <割り当てIPv4プレフィックス> dest any
58+
ip access-list proxy-dns permit ip src 192.0.2.0/29 dest any
4759
ip access-list proxy-dns deny ip src any dest any
4860
!
4961
!
@@ -60,21 +72,20 @@ bridge irb enable
6072
!
6173
proxy-dns ip enable
6274
proxy-dns ip access-list proxy-dns
63-
proxy-dns server <任意のDNSサーバアドレス>
75+
proxy-dns server 198.51.100.1
6476
!
6577
!
6678
!
6779
ip dhcp profile server1
68-
assignable-range <最小割り当てアドレス> <最大割り当てアドレス>
69-
default-gateway <自身のルータのアドレス>
70-
dns-server <自身のルータのアドレス>
80+
assignable-range 192.0.2.1 192.0.2.5
81+
default-gateway 192.0.2.6
82+
dns-server 192.0.2.6
7183
!
72-
router bgp <割り当てられたAS番号>
73-
neighbor <HomeNOC側境界アドレス> remote-as 59105
84+
router bgp 64512
85+
neighbor 192.0.2.254 remote-as 59105
7486
address-family ipv4 unicast
75-
neighbor <HomeNOC側境界アドレス> distribute-list pref-in in
76-
neighbor <HomeNOC側境界アドレス> distribute-list pref-out out
77-
network <割り当てIPv4プレフィックス>
87+
neighbor 192.0.2.254 distribute-list pref-out out
88+
network 192.0.2.0/29
7889
!
7990
device GigaEthernet0
8091
!
@@ -92,7 +103,7 @@ interface GigaEthernet0.0
92103
no ip address
93104
ipv6 enable
94105
! 以下のコマンドで、IPv6アドレスのインターフェースIDを指定する
95-
ipv6 interface-identifier 00:00:00:00:ca:fe:00:02
106+
ipv6 interface-identifier 00:00:00:00:00:00:00:01
96107
ipv6 address autoconfig receive-default
97108
ipv6 traffic-class tos 0
98109
no shutdown
@@ -102,7 +113,7 @@ interface GigaEthernet1.0
102113
shutdown
103114
!
104115
interface GigaEthernet2.0
105-
ip address <自身のルータのアドレス>/<割り当てられたIPv4プレフィックス長>
116+
ip address 192.0.2.6/29
106117
ip dhcp binding server1
107118
no shutdown
108119
!
@@ -119,7 +130,7 @@ interface USB-Serial0.0
119130
shutdown
120131
!
121132
interface BVI1
122-
ip address <貴団体側トンネル境界アドレス>
133+
ip address 192.0.2.255/31
123134
bridge-group 1
124135
no shutdown
125136
!
@@ -131,7 +142,7 @@ interface Null0.0
131142
!
132143
interface Tunnel0.0
133144
tunnel mode ether-ip ipv6
134-
tunnel destination <トンネル終端アドレス(HomeNOC側)>
145+
tunnel destination 2001:db8:3::1
135146
no ip address
136147
bridge-group 1
137148
! 以下のMSS値は、MTUが1500の場合の値です。MTUが異なる場合は適宜調整してください。
@@ -157,6 +168,9 @@ interface Tunnel0.0
157168
単位: byte
158169
```
159170

171+
また、MSS計算の際には、運営委員の須山が作成した計算サイトもよろしければご利用ください。
172+
https://nw-tools.suyama.ne.jp/mtu-calculator/
173+
160174
## 免責事項
161175
本資料は参考情報です。これらの情報によって被ったいかなる損害については、弊団体は一切の責任を負いません。十分なご検証の上ご利用ください。
162176
また、必要に応じてセキュリティの設定を行ってください。

docs/examples/bgp/gre/nec-ix.md

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ architecture-beta
2626
```
2727

2828
## デフォルトルート
29+
- 例示環境
30+
- サンプルコンフィグ内のIPアドレスは、以下の仮定の下、設定しています。実際に投入する際は、ダッシュボードの値をもとに、適宜変更してください。
31+
- 割り当てIPv4 Prefix: 192.0.2.0/29
32+
- ルータのIPv4アドレス: 192.0.2.6/29
33+
- DHCPサーバの割り当て範囲:
34+
- 開始: 192.0.2.1
35+
- 終了: 192.0.2.5
36+
- トンネル用IPv4 Prefix: 192.0.2.254/31
37+
- 弊団体側IPv4アドレス: 192.0.2.254/31
38+
- 貴団体側IPv4アドレス: 192.0.2.255/31
39+
- 貴団体側ASN: 64512
40+
- 弊団体側トンネル終端アドレス: 2001:db8:3::1
41+
- ネームサーバのIPアドレス(お好みで設定してください): 198.51.100.1
42+
- IPv6 Interface Identifier: 00:00:00:00:00:00:00:01
43+
- 変数
44+
- サンプルコンフィグ内の変数は以下の通りです。実際に投入する際は、ダッシュボードの値をもとに、もしくは実際の環境をもとに、適宜変更してください。
2945
```
3046
! NEC Portable Internetwork Core Operating System Software
3147
! IX Series IX2215 (magellan-sec) Software, Version 10.7.18, RELEASE SOFTWARE
@@ -37,13 +53,11 @@ timezone +09 00
3753
!
3854
ip ufs-cache enable
3955
! GigaEthernet2がdownでもルートを広報する
40-
ip route <割り当てIPv4プレフィクス> Null0.0
56+
ip route 192.0.2.0/29 Null0.0
4157
ip dhcp enable
42-
ip prefix-list pref-in 10 permit 0.0.0.0/0
43-
ip prefix-list pref-in 20 deny any
44-
ip prefix-list pref-out 10 permit <割り当てIPv4プレフィクス>
58+
ip prefix-list pref-out 10 permit 192.0.2.0/29
4559
ip prefix-list pref-out 20 deny any
46-
ip access-list proxy-dns permit ip src <割り当てIPv4プレフィクス> dest any
60+
ip access-list proxy-dns permit ip src 192.0.2.0/29 dest any
4761
ip access-list proxy-dns deny ip src any dest any
4862
!
4963
!
@@ -59,22 +73,21 @@ ipv6 ufs-cache enable
5973
!
6074
proxy-dns ip enable
6175
proxy-dns ip access-list proxy-dns
62-
proxy-dns server <任意のDNSサーバアドレス>
76+
proxy-dns server 198.51.100.1
6377
!
6478
!
6579
!
6680
!
6781
ip dhcp profile server1
68-
assignable-range <最小割り当てアドレス> <最大割り当てアドレス>
69-
default-gateway <自身のルータのアドレス>
70-
dns-server <自身のルータのアドレス>
82+
assignable-range 192.0.2.1 192.0.2.5
83+
default-gateway 192.0.2.6
84+
dns-server 192.0.2.6
7185
!
72-
router bgp <割り当てられたAS番号>
73-
neighbor <HomeNOC側境界アドレス> remote-as 59105
86+
router bgp 64512
87+
neighbor 192.0.2.254 remote-as 59105
7488
address-family ipv4 unicast
75-
neighbor <HomeNOC側境界アドレス> distribute-list pref-in in
76-
neighbor <HomeNOC側境界アドレス> distribute-list pref-out out
77-
network <割り当てIPv4プレフィクス>
89+
neighbor 192.0.2.254 distribute-list pref-out out
90+
network 192.0.2.0/29
7891
!
7992
device GigaEthernet0
8093
!
@@ -92,7 +105,7 @@ interface GigaEthernet0.0
92105
no ip address
93106
ipv6 enable
94107
! 以下のコマンドで、IPv6アドレスのインターフェースIDを指定する
95-
ipv6 interface-identifier xx:xx:xx:xx:xx:xx:xx:xx
108+
ipv6 interface-identifier 00:00:00:00:00:00:00:01
96109
ipv6 address autoconfig receive-default
97110
ipv6 traffic-class tos 0
98111
no shutdown
@@ -102,7 +115,7 @@ interface GigaEthernet1.0
102115
shutdown
103116
!
104117
interface GigaEthernet2.0
105-
ip address <自身のルータのアドレス>/<割り当てられたIPv4プレフィクス長>
118+
ip address 192.0.2.6/29
106119
ip dhcp binding server1
107120
no shutdown
108121
!
@@ -126,8 +139,8 @@ interface Null0.0
126139
!
127140
interface Tunnel0.0
128141
tunnel mode gre ipv6
129-
tunnel destination <トンネル終端アドレス(HomeNOC側)>
130-
ip address <貴団体側トンネル境界アドレス>
142+
tunnel destination 2001:db8:3::1
143+
ip address 192.0.2.255/31
131144
! 以下のMSS値は、MTUが1500の場合の値です。MTUが異なる場合は適宜調整してください。
132145
ip tcp adjust-mss 1416
133146
no shutdown
@@ -151,6 +164,9 @@ interface Tunnel0.0
151164
単位: byte
152165
```
153166

167+
また、MSS計算の際には、運営委員の須山が作成した計算サイトもよろしければご利用ください。
168+
https://nw-tools.suyama.ne.jp/mtu-calculator/
169+
154170
## 免責事項
155171
本資料は参考情報です。これらの情報によって被ったいかなる損害については、弊団体は一切の責任を負いません。十分なご検証の上ご利用ください。
156172
また、必要に応じてセキュリティの設定を行ってください。

0 commit comments

Comments
 (0)