Bgp 4 peer problems, 2 peer stay in connect
Mattia Milani
mattia.milani at studenti.unitn.it
Tue Mar 6 17:49:02 CET 2018
Hello everyone, I'm writing you because i have a problem with the
implementation of BGP on 4 peer in 4 different AS in line.
I use bird 2.0.1, and the four peer is virtualized on my pc
The 4 peer is in this form
AS2 AS4
AS3 AS1
H0 ------------------------------- H1 -------------------------------- H2
------------------------------ H3
eth1 eth1 eth2 eth2
eth1 eth1
The same configuration without H3 work perfectly, but with H3, H1 and H2
can't comunicate, they stay in the connect state, it's like they never bee
reachable for the connection, but if i ping the 2 interface i get a replay.
the address of my peer is:
H0.eth1: 10.0.0.1/8
H1.eth1: 10.0.1.1/8
H1.eth2: 10.0.1.2/8
H2.eth1: 10.0.2.1/8
H2.eth2: 10.0.2.2/8
H3.eth1: 10.0.3.1/8
the 4 configuration of bird is:
H0
log "fileLogh0_0.log" all;
debug protocols all;
router id 200.0.0.2;
protocol kernel {
metric 0;
learn;
ipv4 {
import all;
export all;
};
}
protocol direct {
}
protocol device {
scan time 2;
}
function avoid_crappy_prefixes()
{
if net.len < 8 then return false;
if net.len > 24 then return false;
return true;
}
filter bgp_in {
if avoid_crappy_prefixes() then accept;
else reject;
}
protocol bgp h0_0_h1_1 {
local as 2;
neighbor 10.0.1.1 as 4;
ipv4{
import filter bgp_in;
export all;
};
connect retry time 3;
source address 10.0.0.1;
}
H1
log "fileLogh1_1.log" all;
debug protocols all;
router id 200.0.0.4;
protocol kernel {
metric 0;
learn;
ipv4 {
import all;
export all;
};
}
protocol direct {
}
protocol device {
scan time 2;
}
function avoid_crappy_prefixes()
{
if net.len < 8 then return false;
if net.len > 24 then return false;
return true;
}
filter bgp_in {
if avoid_crappy_prefixes() then accept;
else reject;
}
protocol bgp h1_1_h0_0 {
local as 4;
neighbor 10.0.0.1 as 2;
ipv4{
import filter bgp_in;
export all;
};
connect retry time 3;
source address 10.0.1.1;
}
protocol bgp h1_1_h2_2 {
local as 4;
neighbor 10.0.2.2 as 3;
ipv4{
import filter bgp_in;
export all;
};
connect retry time 3;
source address 10.0.1.2;
}
H2:
log "fileLogh2_2.log" all;
debug protocols all;
router id 200.0.0.3;
protocol kernel {
metric 0;
learn;
ipv4 {
import all;
export all;
};
}
protocol direct {
}
protocol device {
scan time 2;
}
function avoid_crappy_prefixes()
{
if net.len < 8 then return false;
if net.len > 24 then return false;
return true;
}
filter bgp_in {
if avoid_crappy_prefixes() then accept;
else reject;
}
protocol bgp h2_2_h3_3 {
local as 3;
neighbor 10.0.3.1 as 1;
ipv4{
import filter bgp_in;
export all;
};
connect retry time 3;
source address 10.0.2.1;
}
protocol bgp h2_2_h1_1 {
local as 3;
neighbor 10.0.1.2 as 4;
ipv4{
import filter bgp_in;
export all;
};
connect retry time 3;
source address 10.0.2.2;
}
H3
log "fileLogh3_3.log" all;
debug protocols all;
router id 200.0.0.1;
protocol kernel {
metric 0;
learn;
ipv4 {
import all;
export all;
};
}
protocol direct {
}
protocol device {
scan time 2;
}
function avoid_crappy_prefixes()
{
if net.len < 8 then return false;
if net.len > 24 then return false;
return true;
}
filter bgp_in {
if avoid_crappy_prefixes() then accept;
else reject;
}
protocol bgp h3_3_h2_2 {
local as 1;
neighbor 10.0.2.1 as 3;
ipv4{
import filter bgp_in;
export all;
};
connect retry time 3;
source address 10.0.3.1;
}
This are the file .conf, using the command "show protocols" for every peer
i get this results:
H0
BIRD 2.0.1 ready.
Name Proto Table State Since Info
kernel1 Kernel master4 up 17:18:55.370
direct1 Direct --- up 17:18:55.370
device1 Device --- up 17:18:55.370
h0_0_h1_1 BGP --- up 17:19:00.115 Established
H1
BIRD 2.0.1 ready.
Name Proto Table State Since Info
kernel1 Kernel master4 up 17:18:55.370
direct1 Direct --- up 17:18:55.370
device1 Device --- up 17:18:55.370
h1_1_h0_0 BGP --- up 17:19:00.115 Established
h1_1_h2_2 BGP --- start 17:18:55.370 Connect
H2
BIRD 2.0.1 ready.
Name Proto Table State Since Info
kernel1 Kernel master4 up 17:18:55.370
direct1 Direct --- up 17:18:55.370
device1 Device --- up 17:18:55.370
h2_2_h3_3 BGP --- up 17:19:00.114 Established
h2_2_h1_1 BGP --- start 17:18:55.370 Connect
H3
BIRD 2.0.1 ready.
Name Proto Table State Since Info
kernel1 Kernel master4 up 17:18:55.353
direct1 Direct --- up 17:18:55.353
device1 Device --- up 17:18:55.353
h3_3_h2_2 BGP --- up 17:19:00.114 Established
Using a ping from H1.eth2 to 10.0.2.2 i get the replay from peer 2
but in the log of H1 i founded that:
2018-03-06 17:11:57.854 <TRACE> h1_1_h2_2: Connecting to 10.0.2.2 from
local address 10.0.1.2
2018-03-06 17:11:59.462 <TRACE> device1: Scanning interfaces
2018-03-06 17:12:00.128 <TRACE> h1_1_h2_2: Connecting to 10.0.2.2 from
local address 10.0.1.2
2018-03-06 17:12:01.462 <TRACE> device1: Scanning interfaces
2018-03-06 17:12:02.960 <TRACE> h1_1_h2_2: Connecting to 10.0.2.2 from
local address 10.0.1.2
2018-03-06 17:12:03.462 <TRACE> device1: Scanning interfaces
peer H1 try to estabilish a connection with H2 without success
the same for peer H2
using tcp dump i found that it consider 10.0.2.2 unreachable after some
arpe request that didn't get answered.
without H3 it works perfectly but i want to work with it, sorry if i'm
annoying.
Thanks if you will answer me with some idea/explanation
Mattia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20180306/46d212e5/attachment.html>
More information about the Bird-users
mailing list