From 037fd6a56255854e87333223f8966a1dfa339fc3 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 22 Sep 2017 18:25:21 +0900 Subject: bgp4: added iBGP peer --- spec/bgp4/config.yaml | 2 +- spec/bgp4/vyos1_script.sh | 12 ++++++++---- spec/bgp4/vyos2_script.sh | 12 ++++++++---- spec/bgp4/vyos3_script.sh | 8 +++++++- spec/bgp4/vyos3_spec.rb | 2 +- spec/bgp4/vyos4_script.sh | 8 +++++++- spec/bgp4/vyos4_spec.rb | 2 +- 7 files changed, 33 insertions(+), 13 deletions(-) diff --git a/spec/bgp4/config.yaml b/spec/bgp4/config.yaml index 35406da..b46047f 100644 --- a/spec/bgp4/config.yaml +++ b/spec/bgp4/config.yaml @@ -6,7 +6,7 @@ vyos1: vyos2: :networks: net1: "10.0.1.12/24" - net3: "10.0.3.11/24" + net3: "10.0.3.12/24" vyos3: :networks: net2: "10.0.2.13/24" diff --git a/spec/bgp4/vyos1_script.sh b/spec/bgp4/vyos1_script.sh index 3767236..7d77a62 100644 --- a/spec/bgp4/vyos1_script.sh +++ b/spec/bgp4/vyos1_script.sh @@ -6,12 +6,16 @@ fi source /opt/vyatta/etc/functions/script-template -set protocols bgp 65536 neighbor 10.0.1.12 ebgp-multihop 2 -set protocols bgp 65536 neighbor 10.0.1.12 remote-as 65537 +set protocols bgp 65536 parameters router-id 10.0.1.11 + +set protocols bgp 65536 neighbor 10.0.1.12 remote-as 65537 set protocols bgp 65536 neighbor 10.0.1.12 update-source 10.0.1.11 set protocols bgp 65536 neighbor 10.0.1.12 advertisement-interval 1 -set protocols bgp 65536 network 10.0.2.0/24 -set protocols bgp 65536 parameters router-id 10.0.1.11 + +set protocols bgp 65536 neighbor 10.0.2.13 remote-as 65536 +set protocols bgp 65536 neighbor 10.0.2.13 update-source 10.0.2.11 +set protocols bgp 65536 neighbor 10.0.2.13 advertisement-interval 1 +set protocols bgp 65536 neighbor 10.0.2.13 nexthop-self commit save diff --git a/spec/bgp4/vyos2_script.sh b/spec/bgp4/vyos2_script.sh index 7cb0586..a153e0d 100644 --- a/spec/bgp4/vyos2_script.sh +++ b/spec/bgp4/vyos2_script.sh @@ -6,12 +6,16 @@ fi source /opt/vyatta/etc/functions/script-template -set protocols bgp 65537 neighbor 10.0.1.11 ebgp-multihop 2 -set protocols bgp 65537 neighbor 10.0.1.11 remote-as 65536 +set protocols bgp 65537 parameters router-id 10.0.1.12 + +set protocols bgp 65537 neighbor 10.0.1.11 remote-as 65536 set protocols bgp 65537 neighbor 10.0.1.11 update-source 10.0.1.12 set protocols bgp 65537 neighbor 10.0.1.11 advertisement-interval 1 -set protocols bgp 65537 network 10.0.3.0/24 -set protocols bgp 65537 parameters router-id 10.0.1.12 + +set protocols bgp 65537 neighbor 10.0.3.14 remote-as 65537 +set protocols bgp 65537 neighbor 10.0.3.14 update-source 10.0.3.12 +set protocols bgp 65537 neighbor 10.0.3.14 advertisement-interval 1 +set protocols bgp 65537 neighbor 10.0.3.14 nexthop-self commit save diff --git a/spec/bgp4/vyos3_script.sh b/spec/bgp4/vyos3_script.sh index 3db2539..5a2c611 100644 --- a/spec/bgp4/vyos3_script.sh +++ b/spec/bgp4/vyos3_script.sh @@ -6,7 +6,13 @@ fi source /opt/vyatta/etc/functions/script-template -set protocols static route 10.0.3.0/24 next-hop 10.0.2.11 +set protocols bgp 65536 parameters router-id 10.0.2.13 + +set protocols bgp 65536 neighbor 10.0.2.11 remote-as 65536 +set protocols bgp 65536 neighbor 10.0.2.11 update-source 10.0.2.13 +set protocols bgp 65536 neighbor 10.0.2.11 advertisement-interval 1 + +set protocols bgp 65536 network 10.0.2.0/24 commit save diff --git a/spec/bgp4/vyos3_spec.rb b/spec/bgp4/vyos3_spec.rb index 0754f2e..372a285 100644 --- a/spec/bgp4/vyos3_spec.rb +++ b/spec/bgp4/vyos3_spec.rb @@ -6,7 +6,7 @@ describe 'vyos3_config' do end # Wait for advertising -sleep(10) +sleep(60) describe host('10.0.3.14') do it { should be_reachable.with(timeout: 10) } diff --git a/spec/bgp4/vyos4_script.sh b/spec/bgp4/vyos4_script.sh index df048bb..4728b20 100644 --- a/spec/bgp4/vyos4_script.sh +++ b/spec/bgp4/vyos4_script.sh @@ -6,7 +6,13 @@ fi source /opt/vyatta/etc/functions/script-template -set protocols static route 10.0.2.0/24 next-hop 10.0.3.11 +set protocols bgp 65537 parameters router-id 10.0.3.14 + +set protocols bgp 65537 neighbor 10.0.3.12 remote-as 65537 +set protocols bgp 65537 neighbor 10.0.3.12 update-source 10.0.3.14 +set protocols bgp 65537 neighbor 10.0.3.12 advertisement-interval 1 + +set protocols bgp 65537 network 10.0.3.0/24 commit save diff --git a/spec/bgp4/vyos4_spec.rb b/spec/bgp4/vyos4_spec.rb index 393d2b6..c3e3491 100644 --- a/spec/bgp4/vyos4_spec.rb +++ b/spec/bgp4/vyos4_spec.rb @@ -6,7 +6,7 @@ describe 'vyos4_config' do end # Wait for advertising -sleep(10) +sleep(60) describe host('10.0.2.13') do it { should be_reachable.with(timeout: 10) } -- cgit v1.2.3