projectcalico / calico

Cloud native networking and network security
https://docs.tigera.io/calico/latest/about/
Apache License 2.0
5.97k stars 1.33k forks source link

found unreadchable route when execute show route #2178

Closed wanghonglei5181 closed 5 years ago

wanghonglei5181 commented 6 years ago

Expected Behavior

birdcl BIRD 1.6.4 ready. bird> show route 192.168.0.0/16 unreachable [node_10_17_8_36 11:41:29 from 10.17.8.36] (100/-) [i] 10.58.2.0/24 unreachable [node_10_17_8_37 11:41:28 from 10.17.8.37] (100/-) [i] 10.58.3.0/24 via 10.17.8.30 on eth0 [static_bgp 11:41:24] (200) 10.58.0.0/24 unreachable [node_10_17_8_35 11:41:29 from 10.17.8.35] (100/-) [i] 10.58.1.0/24 unreachable [node_10_17_8_36 11:41:28 from 10.17.8.36] * (100/-) [i] bird>

i used bird ad bgp rr,why unreachable? here is configuration。 (and i don‘t down how to delete static_bgp,and what's meaning [i],that's another 2 questions!!) 130> cat /etc/bird.conf

log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
log stderr all;
log "/var/log/bird.log" all;
router id 10.17.8.34;
filter import_kernel {
if ( net != 0.0.0.0/0 ) then {
   accept;
   }
reject;
}
# Turn on global debugging of all protocols
debug protocols all;
# This pseudo-protocol watches all interface up/down events.
protocol device {
  scan time 2;    # Scan interfaces every 2 seconds
}
protocol static static_bgp { 
        import all;
        route 10.58.3.0/24 via 10.17.8.30;
}
protocol bgp node_10_17_8_30 {
  description "node_10_17_8_30";
  local as 65512;
  neighbor 10.17.8.30 as 65512;
  multihop;
  rr client;
  graceful restart;
  import none;
  #export all;
  export where proto = "static_bgp";
}
protocol bgp node_10_17_8_35 {
  description "node_10_17_8_35";
  local as 65512;
  neighbor 10.17.8.35 as 65512;
  multihop;
  rr client;
  graceful restart;
  import all;
  export all;
}
protocol bgp node_10_17_8_36 {
  description "node_10_17_8_36";
  local as 65512;
  neighbor 10.17.8.36 as 65512;
  multihop;
  rr client;
  graceful restart;
  import all;
  export all;
}
protocol bgp node_10_17_8_37 {
  description "node_10_17_8_37";
  local as 65512;
  neighbor 10.17.8.37 as 65512;
  multihop;
  rr client;
  graceful restart;
  import all;
  export all;
}

here is a part of bird.log

130> cat /var/log/bird.log 

2018-09-07 12:08:19 <TRACE> device1: Initializing
2018-09-07 12:08:19 <TRACE> static_bgp: Initializing
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Initializing
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Initializing
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Initializing
2018-09-07 12:08:19 <TRACE> node_10_17_8_37: Initializing
2018-09-07 12:08:19 <TRACE> device1: Starting
2018-09-07 12:08:19 <TRACE> device1: Scanning interfaces
2018-09-07 12:08:19 <TRACE> device1: Connected to table master
2018-09-07 12:08:19 <TRACE> device1: State changed to feed
2018-09-07 12:08:19 <TRACE> static_bgp: Starting
2018-09-07 12:08:19 <TRACE> static_bgp: Connected to table master
2018-09-07 12:08:19 <TRACE> static_bgp: State changed to feed
2018-09-07 12:08:19 <TRACE> static_bgp > added [best] 10.58.3.0/24 via 10.17.8.30 on eth0
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Starting
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: State changed to start
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Starting
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: State changed to start
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Starting
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: State changed to start
2018-09-07 12:08:19 <TRACE> node_10_17_8_37: Starting
2018-09-07 12:08:19 <TRACE> node_10_17_8_37: State changed to start
2018-09-07 12:08:19 <INFO> Started
2018-09-07 12:08:19 <TRACE> device1: State changed to up
2018-09-07 12:08:19 <TRACE> static_bgp < interface lo goes up
2018-09-07 12:08:19 <TRACE> static_bgp < interface eth0 goes up
2018-09-07 12:08:19 <TRACE> static_bgp < interface eth1 created
2018-09-07 12:08:19 <TRACE> static_bgp < interface eth2 created
2018-09-07 12:08:19 <TRACE> static_bgp < interface eth3 created
2018-09-07 12:08:19 <TRACE> static_bgp < interface docker0 goes up
2018-09-07 12:08:19 <TRACE> static_bgp < interface tunl0 created
2018-09-07 12:08:19 <TRACE> static_bgp: State changed to up
2018-09-07 12:08:19 <TRACE> node_10_17_8_37: Started
2018-09-07 12:08:19 <TRACE> node_10_17_8_37: Connect delayed by 5 seconds
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Started
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Connect delayed by 5 seconds
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Started
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Connect delayed by 5 seconds
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Started
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Connect delayed by 5 seconds
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Incoming connection from 10.17.8.35 (port 34773) accepted
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Sending OPEN(ver=4,as=65512,hold=240,id=0a110822)
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Got OPEN(as=65512,hold=240,id=0a110823)
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Sending KEEPALIVE
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Got KEEPALIVE
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: BGP session established
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Connected to table master
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: State changed to feed
2018-09-07 12:08:19 <TRACE> node_10_17_8_35 < added 10.58.3.0/24 via 10.17.8.30 on eth0
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: State changed to up
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Sending UPDATE
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Sending END-OF-RIB
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Got UPDATE
2018-09-07 12:08:19 <TRACE> node_10_17_8_35 > added [best] 192.168.0.0/16 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_35 < rejected by protocol 192.168.0.0/16 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_35 > added [best] 10.58.0.0/24 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_35 < rejected by protocol 10.58.0.0/24 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Got UPDATE
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Got END-OF-RIB
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Incoming connection from 10.17.8.36 (port 47585) accepted
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Sending OPEN(ver=4,as=65512,hold=240,id=0a110822)
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Got OPEN(as=65512,hold=240,id=0a110824)
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Got KEEPALIVE
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: BGP session established
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Connected to table master
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: State changed to feed
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Sending KEEPALIVE
2018-09-07 12:08:19 <TRACE> node_10_17_8_36 < added 192.168.0.0/16 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_36 < added 10.58.3.0/24 via 10.17.8.30 on eth0
2018-09-07 12:08:19 <TRACE> node_10_17_8_36 < added 10.58.0.0/24 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: State changed to up
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Sending UPDATE
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Sending UPDATE
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Sending END-OF-RIB
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Got UPDATE
2018-09-07 12:08:19 <TRACE> node_10_17_8_36 > added 192.168.0.0/16 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_36 > added [best] 10.58.1.0/24 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_35 < added 10.58.1.0/24 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_36 < rejected by protocol 10.58.1.0/24 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Got UPDATE
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Got END-OF-RIB
2018-09-07 12:08:19 <TRACE> node_10_17_8_35: Sending UPDATE
2018-09-07 12:08:19 <TRACE> node_10_17_8_36: Got UPDATE
2018-09-07 12:08:19 <TRACE> node_10_17_8_36 > removed 192.168.0.0/16 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Incoming connection from 10.17.8.30 (port 38171) accepted
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Sending OPEN(ver=4,as=65512,hold=240,id=0a110822)
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Got OPEN(as=65512,hold=240,id=0a11081e)
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Sending KEEPALIVE
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Got KEEPALIVE
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: BGP session established
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Connected to table master
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: State changed to feed
2018-09-07 12:08:19 <TRACE> node_10_17_8_30 < added 192.168.0.0/16 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_30 < added 10.58.3.0/24 via 10.17.8.30 on eth0
2018-09-07 12:08:19 <ERR> node_10_17_8_30: Invalid NEXT_HOP attribute in route 10.58.3.0/24
2018-09-07 12:08:19 <TRACE> node_10_17_8_30 < added 10.58.0.0/24 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_30 < added 10.58.1.0/24 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: State changed to up
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Sending UPDATE
2018-09-07 12:08:19 <TRACE> ...
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Sending END-OF-RIB
2018-09-07 12:08:19 <TRACE> ...
2018-09-07 12:08:19 <TRACE> node_10_17_8_30 > filtered out 192.168.0.0/16 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_30 > filtered out 10.58.3.0/24 unreachable
2018-09-07 12:08:19 <TRACE> node_10_17_8_30: Got END-OF-RIB
2018-09-07 12:08:19 <TRACE> node_10_17_8_37: Incoming connection from 10.17.8.37 (port 53623) accepted
2018-09-07 12:08:19 <TRACE> node_10_17_8_37: Sending OPEN(ver=4,as=65512,hold=240,id=0a110822)
2018-09-07 12:08:21 <TRACE> device1: Scanning interfaces
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: Got OPEN(as=65512,hold=240,id=0a110825)
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: Got KEEPALIVE
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: BGP session established
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: Connected to table master
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: State changed to feed
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: Sending KEEPALIVE
2018-09-07 12:08:21 <TRACE> node_10_17_8_37 < added 192.168.0.0/16 unreachable
2018-09-07 12:08:21 <TRACE> node_10_17_8_37 < added 10.58.3.0/24 via 10.17.8.30 on eth0
2018-09-07 12:08:21 <TRACE> node_10_17_8_37 < added 10.58.0.0/24 unreachable
2018-09-07 12:08:21 <TRACE> node_10_17_8_37 < added 10.58.1.0/24 unreachable
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: State changed to up
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: Sending UPDATE
2018-09-07 12:08:21 <TRACE> ...
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: Sending END-OF-RIB
2018-09-07 12:08:21 <TRACE> node_10_17_8_37: Got UPDATE
2018-09-07 12:08:21 <TRACE> node_10_17_8_37 > added 192.168.0.0/16 unreachable
2018-09-07 12:08:21 <TRACE> node_10_17_8_37 > added [best] 10.58.2.0/24 unreachable
2018-09-07 12:08:21 <TRACE> node_10_17_8_35 < added 10.58.2.0/24 unreachable
2018-09-07 12:08:21 <TRACE> node_10_17_8_36 < added 10.58.2.0/24 unreachable
2018-09-07 12:08:21 <TRACE> node_10_17_8_30 < added 10.58.2.0/24 unreachable
2018-09-07 12:08:21 <TRACE> node_10_17_8_37 < rejected by protocol 10.58.2.0/24 unreachable

Your Environment

caseydavenport commented 6 years ago

I believe the "unreachable" means that the node has no route to the next hop included in the BGP route advertisement.

I suspect this might be a configuration error on the hosts themselves, or perhaps in the RR config.