Subscribed unsubscribe Subscribe Subscribe

目の前に僕らの道がある

勉強会とか、技術的にはまったことのメモ

link-localアドレスでBGP4+を試してみた

IOSでピアのアドレスをlink-localアドレスにしているとうまくいかないって聞いたけど、よくわからないので試してみました。

ルータA、ルータBともにcisco 2611XM、IOS12.3(15b)です。GNS3というかDynamipsで試してます。

コンフィグはこんな感じ。

version 12.3
!
hostname A
!
ipv6 unicast-routing
!
interface Loopback0
 no ip address
 ipv6 address 2001::1/128
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 ipv6 address 2001:FFFF::1/64
 ipv6 address FE80:FFFF::1 link-local
!
router bgp 1
 bgp router-id 10.10.10.1
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 bgp graceful-restart restart-time 120
 bgp graceful-restart stalepath-time 360
 bgp graceful-restart
 neighbor fe80:FFFF::2 remote-as 2
 neighbor fe80:FFFF::2 update-source FastEthernet0/0
 !
 address-family ipv6
 neighbor fe80:FFFF::2 activate
 neighbor fe80:FFFF::2 soft-reconfiguration inbound
 exit-address-family
version 12.3
!
hostname B
!
ipv6 unicast-routing
!
interface Loopback0
 no ip address
 ipv6 address 2001::2/128
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 ipv6 address 2001:FFFF::2/64
 ipv6 address FE80:FFFF::2 link-local
!
router bgp 2
 bgp router-id 10.10.10.2
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 bgp graceful-restart restart-time 120
 bgp graceful-restart stalepath-time 360
 bgp graceful-restart
 neighbor fe80:FFFF::1 remote-as 1
 neighbor fe80:FFFF::1 update-source FastEthernet0/0
 !
 address-family ipv6
 neighbor fe80:FFFF::1 activate
 neighbor fe80:FFFF::1 soft-reconfiguration inbound
 network 2001::2/128
 network 2001::3/128
 network 2001::4/128
 exit-address-family
!
ipv6 route 2001::2/128 Null0
ipv6 route 2001::3/128 Null0
ipv6 route 2001::4/128 Null0

ちなみに、router-idを設定しないとBGPを動かせませんよと怒られたので適当に設定してます。

A#show bgp ipv6 neighbors
Load for five secs: 1%/0%; one minute: 0%; five minutes: 0%
No time source, *01:10:19.160 UTC Mon Mar 1 1993

BGP neighbor is FE80:FFFF::2,  remote AS 2, external link
  BGP version 4, remote router ID 10.10.10.2
  BGP state = Established, up for 01:09:23
  Last read 00:00:23, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv6 Unicast: advertised and received
    Graceful Restart Capabilty: advertised and received
      Remote Restart timer is 120 seconds
      Address families preserved by peer:
        none
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                0          2
    Keepalives:            72         72
    Route Refresh:          0          0
    Total:                 74         75
  Default minimum time between advertisement runs is 30 seconds

 For address family: IPv6 Unicast
  BGP table version 1, neighbor version 1
  Index 1, Offset 0, Mask 0x2
  Inbound soft reconfiguration allowed
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               0          0
    Prefixes Total:                 0          0
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          0
    Used as multipath:            n/a          0

                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Total:                                0          0
  Number of NLRIs in the update sent: max 0, min 0

  Connections established 1; dropped 0
  Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: FE80:FFFF::1, Local port: 179
Foreign host: FE80:FFFF::2, Foreign port: 18827

Enqueued packets for retransmit: 0, input: 0  mis-ordered: 0 (0 bytes)

Event Timers (current time is 0x406496):
Timer          Starts    Wakeups            Next
Retrans            72          0             0x0
TimeWait            0          0             0x0
AckHold            72         53             0x0
SendWnd             0          0             0x0
KeepAlive           0          0             0x0
GiveUp              0          0             0x0
PmtuAger            0          0             0x0
DeadWait            0          0             0x0

iss: 1344605646  snduna: 1344607095  sndnxt: 1344607095     sndwnd:  16384
irs: 2088194697  rcvnxt: 2088196278  rcvwnd:      16251  delrcvwnd:    133

SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 8 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs

Datagrams (max data segment is 1440 bytes):
Rcvd: 106 (out of order: 0), with data: 72, total data bytes: 1580
Sent: 127 (retransmit: 0, fastretransmit: 0), with data: 127, total data bytes:6536

stateがestablishedになってるからピアは張れているはずなんだけど、ピアから通知されるはずの経路が一切BGPテーブルに載りません。

グローバルアドレスにした場合は、ルータBのipv6 routeで指定されている経路がルータAのBGPテーブルに載ります。

なるほどね。