好消息,超酷的在线虚拟网络实验室上线了!点击开始实验

为获得更好的浏览效果,建议您使用 Firefox 或者 Chrome 浏览器



 

BFD for BGP配置举例

 

组网需求

l           两台路由器Router ARouter B通过二层交换机互连,并且在双方接口上使能BFD应用,在路由器上运行BGP,网络层相互可达。

l           Router A和二层交换机之间的链路发生故障后,BFD能够快速检测并通告BGP协议。

图1  BFD for BGP配置举例组网图

配置思路

l           配置BGP基本功能

l           配置BFD for BGP功能

 

配置步骤

路由器A的配置

# BGP基本功能

<RouterA> system-view

[RouterA] bgp 100

[RouterA-bgp] peer 192.168.0.100 as-number 100

[RouterA-bgp] peer 192.168.0.100 bfd

 

 

# 各路由器接口及BFD参数

<RouterA> system-view

[RouterA] bfd session init-mode active

[RouterA] interface gigabitEthernet 3/1/1

[RouterA-GigabitEthernet3/1/1] ip address 192.168.0.102 24

[RouterA-GigabitEthernet3/1/1] bfd min-transmit-interval 400

[RouterA-GigabitEthernet3/1/1] bfd min-receive-interval 400

[RouterA-GigabitEthernet3/1/1] bfd detect-multiplier 7

           

路由器B的配置

# BGP基本功能

<RouterB> system-view

[RouterB] bgp 100

[RouterB-bgp] peer 192.168.0.102 as-number 100

[RouterB-bgp] peer 192.168.0.102 bfd

 

# 置各路由器接口及BFD参数

<RouterB> system-view

[RouterB] bfd session init-mode active

[RouterB] interface gigabitEthernet 3/1/2

[RouterB-GigabitEthernet3/1/2] ip address 192.168.0.100 24

[RouterB-GigabitEthernet3/1/2] bfd min-transmit-interval 400

[RouterB-GigabitEthernet3/1/2] bfd min-receive-interval 400

[RouterB-GigabitEthernet3/1/2] bfd detect-multiplier 7

 

 

验证结果

可通过以下方式验证上述配置:

[RouterA]dis bfd session ver

 

 Total Session Num: 1            Init Mode: Active

 

 Session Working Under Ctrl Mode:

 

     Local Discr: 5                   Remote Discr: 6

       Source IP: 192.168.0.102     Destination IP: 192.168.0.100

   Session State: Up                     Interface: GigabitEthernet3/1/1

 Min Trans Inter: 400ms            Act Trans Inter: 400ms

  Min Recv Inter: 400ms           Act Detect Inter: 2800ms

  Establish Time: 273:40:06         Last Down Time: 273:40:06

    Last Up Time: 273:40:07              Auth mode: None

    Connect Type: Direct                 Board Num: 3

        Protocol: BGP

       Diag Info: No Diagnostic     

 

        

[RouterB]dis bfd session ver

 Total Session Num: 1            Init Mode: Active

 Session Working Under Ctrl Mode:

     Local Discr: 6                   Remote Discr: 5

       Source IP: 192.168.0.100     Destination IP: 192.168.0.102

   Session State: Up                     Interface: GigabitEthernet3/1/2

 Min Trans Inter: 400ms            Act Trans Inter: 400ms

  Min Recv Inter: 400ms           Act Detect Inter: 2800ms

  Establish Time: 273:14:53         Last Down Time: 273:14:53

    Last Up Time: 273:14:54              Auth mode: None

    Connect Type: Direct                 Board Num: 3

        Protocol: BGP

       Diag Info: No Diagnostic     

 


配置文件

RouterA:

[RouterA]dis cur

#

 version 5.20, Ess 3121

#

 sysname RouterA

#

 password-control login-attempt 3 exceed lock-time 120

#

 domain default enable system

#

 ipv6

#

 telnet server enable

#

 xbar load-single

#

vlan 1

#

vlan 100

#

domain system

 access-limit disable

 state active

 idle-cut disable

 self-service-url disable

#

interface NULL0

#

interface GigabitEthernet3/1/1

 port link-mode route

 ip address 192.168.0.102 255.255.255.0

 bfd detect-multiplier 7

#

interface GigabitEthernet3/1/5

 port link-mode route

 shutdown

#

interface GigabitEthernet3/1/8

 port link-mode route

#

interface GigabitEthernet3/1/9

 port link-mode route

#

interface GigabitEthernet3/1/10

 port link-mode route

 shutdown

#

interface GigabitEthernet3/1/2

 port link-mode bridge

 shutdown

#

interface GigabitEthernet3/1/3

 port link-mode bridge

#

interface GigabitEthernet3/1/4

 port link-mode bridge

#

interface GigabitEthernet3/1/6

 port link-mode bridge

#

interface GigabitEthernet3/1/7

 port link-mode bridge

#

interface M-Ethernet4/0/0

 ip address 191.1.1.231 255.255.255.0

#

bgp 100

 undo synchronization

 peer 192.168.0.100 as-number 100

 peer 192.168.0.100 bfd

#

user-interface con 0

user-interface aux 0

 authentication-mode none

 user privilege level 3

user-interface vty 0 4

 authentication-mode none

 user privilege level 3

#

return    

 

 

RouterB:

[RouterB]dis cur

#

 version 5.20, Ess 3121

#

 sysname RouterB

#

 password-control login-attempt 3 exceed lock-time 120

#

 domain default enable system

#

 ipv6

#

 telnet server enable

#

 xbar load-single

#

 bfd echo-source-ip 10.10.10.10

#

vlan 1

#

vlan 100

#

domain system

 access-limit disable

 state active

 idle-cut disable

 self-service-url disable

#

interface NULL0

#

interface GigabitEthernet3/1/3

 port link-mode route

#

interface GigabitEthernet3/1/4

 port link-mode route

#

interface GigabitEthernet3/1/6

 port link-mode route

#

interface GigabitEthernet3/1/2

 port link-mode route

 ip address 192.168.0.100 255.255.255.0

 bfd detect-multiplier 7

#

interface GigabitEthernet3/1/8

 port link-mode route

#

interface GigabitEthernet3/1/9

 port link-mode route

#

interface GigabitEthernet3/1/10

 port link-mode route

 shutdown

#

interface GigabitEthernet3/1/1

 port link-mode bridge

#

interface GigabitEthernet3/1/7

 port link-mode bridge

#

interface GigabitEthernet3/1/5

 port link-mode bridge

#

interface M-Ethernet4/0/0

 ip address 191.1.1.232 255.255.255.0

 ospf trans-delay 23

#

bgp 100

 undo synchronization

 peer 192.168.0.102 as-number 100

 peer 192.168.0.102 bfd

#

user-interface con 0

user-interface aux 0

 authentication-mode none

 user privilege level 3

user-interface vty 0 4

 authentication-mode none

 user privilege level 3

#

 

 

 

X Close
X Close