• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C 园区盒式交换机典型配置举例-6W100

目录

18-BGP典型配置举例

本章节下载 18-BGP典型配置举例  (218.97 KB)

docurl=/cn/Service/Document_Software/Document_Center/Home/Switches/00-Public/Configure/Typical_Configuration_Example/H3C_CE-B70D022-6W100/202012/1371443_30005_0.htm

18-BGP典型配置举例


1  简介

本文档介绍了BGP的基础配置举例。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解BGP特性。

3  IPv4 BGP基础配置举例

3.1  组网需求

随着A公司的不断发展,其网络规模也不断扩大,导致其设备运行的IGP协议不堪重负,为了解决这一问题,公司管理者决定在设备上运行一些BGP的基础配置。如图1所示,所有交换机均运行BGP协议。要求Switch A和Switch B之间建立EBGP连接,Switch B和Switch C之间建立IBGP连接,使得Switch C能够访问Switch A直连的8.1.1.0/24网段。

图1 IPv4 BGP基础配置组网图

 

3.2  配置思路

·            在AS 65009内部,保证Switch B到Switch C的LoopBack接口路由可达,Switch C到Switch B的LoopBack接口路由可达,这样两个IBGP对等体才能建立TCP连接,本案例使用OSPF协议实现。

·            由于设备缺省情况下BGP不发布任何本地的网段路由,为了使Switch C能够访问Switch A直连的8.1.1.0/24网段,将8.1.1.0/24网段宣告进Switch A的BGP进程中,将3.1.1.0/24网段和9.1.1.0/24网段宣告进Switch B的BGP进程中。

3.3  适用产品及版本

表1 适用产品及版本

产品

软件版本

S5560X-EI系列

Release 63xx系列

S5560X-HI系列

Release 63xx系列

S5500V2-EI系列

Release 63xx系列

MS4520V2-30F

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列

S5000-EI系列

Release 63xx系列

MS4600系列

Release 63xx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5130S-HI系列

S5130S-EI系列

S5130S-SI系列

S5130S-LI系列

不支持

S5120V2-SI系列

S5120V2-LI系列

不支持

S3100V3-EI系列

S3100V3-SI系列

不支持

S5110V2系列

不支持

S5110V2-SI系列

不支持

S5000V3-EI系列

不支持

S5000E-X系列

不支持

E128C

E152C

E500C系列

E500D系列

不支持

MS4520V2系列(除MS4520V2-30F)

Release 63xx系列

MS4320V2系列

MS4300V2系列

MS4320系列

MS4200系列

不支持

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

不支持

WAS6000系列

不支持

 

3.4  配置注意事项

·            为了防止端口状态不稳定引起路由震荡,本举例使用LoopBack接口来创建IBGP对等体。

·            使用LoopBack接口创建IBGP对等体时,因为LoopBack接口不是两对等体实际连接的接口,所以,必须使用peer connect-interface命令将LoopBack接口配置为BGP连接的源接口。

·            EBGP邻居关系的两台交换机,处于不同的AS域,对端的LoopBack接口一般路由不可达,所以一般使用直连地址建立EBGP邻居。

3.5  配置步骤

3.5.1  配置各接口的IP地址

# 配置接口Vlan-int100的IP地址。

<SwitchA> system-view

[SwitchA] interface Vlan-interface 100

[SwitchA-Vlan-interface100] ip address 8.1.1.1 24

# 请参考以上方法配置其它相关接口的IP地址,具体配置步骤略。

3.5.2  配置IBGP连接

1. Switch B的配置

<SwitchB> system-view

[SwitchB] bgp 65009

[SwitchB-bgp-default] router-id 2.2.2.2

[SwitchB-bgp-default] peer 3.3.3.3 as-number 65009

[SwitchB-bgp-default] peer 3.3.3.3 connect-interface Loopback 0

[SwitchB-bgp-default] address-family ipv4 unicast

[SwitchB-bgp-default-ipv4] peer 3.3.3.3 enable

[SwitchB-bgp-default-ipv4] quit

[SwitchB-bgp-default] quit

[SwitchB] ospf 1

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[SwitchB-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

2. Switch C的配置

<SwitchC> system-view

[SwitchC] bgp 65009

[SwitchC-bgp-default] router-id 3.3.3.3

[SwitchC-bgp-default] peer 2.2.2.2 as-number 65009

[SwitchC-bgp-default] peer 2.2.2.2 connect-interface Loopback 0

[SwitchC-bgp-default] address-family ipv4 unicast

[SwitchC-bgp-default-ipv4] peer 2.2.2.2 enable

[SwitchC-bgp-default-ipv4] quit

[SwitchC-bgp-default] quit

[SwitchC] ospf 1

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

[SwitchC-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# 查看Switch C的BGP对等体的连接状态。

[SwitchC] display bgp peer ipv4

 

 BGP local router ID : 3.3.3.3

 Local AS number : 65009

 Total number of peers : 1                 Peers in established state : 1

 

  * - Dynamically created peer

  Peer                    AS  MsgRcvd  MsgSent OutQ PrefRcv Up/Down  State

 

  2.2.2.2              65009        2        2    0       0 00:00:13 Established

以上显示信息表明Switch B和Switch C之间的IBGP连接已经建立。

3.5.3  配置EBGP连接

1. Switch A的配置

<SwitchA> system-view

[SwitchA] bgp 65008

[SwitchA-bgp-default] router-id 1.1.1.1

[SwitchA-bgp-default] peer 3.1.1.1 as-number 65009

[SwitchA-bgp-default] address-family ipv4 unicast

[SwitchA-bgp-default-ipv4] peer 3.1.1.1 enable

[SwitchA-bgp-default-ipv4] network 8.1.1.0 24

[SwitchA-bgp-default-ipv4] quit

[SwitchA-bgp-default] quit

2. Switch B的配置

[SwitchB] bgp 65009

[SwitchB-bgp-default] peer 3.1.1.2 as-number 65008

[SwitchB-bgp-default] address-family ipv4 unicast

[SwitchB-bgp-default-ipv4] peer 3.1.1.2 enable

[SwitchB-bgp-default-ipv4] quit

[SwitchB-bgp-default] quit

# 查看Switch B的BGP对等体的连接状态。

[SwitchB] display bgp peer ipv4

 

 BGP local router ID : 2.2.2.2

 Local AS number : 65009

 Total number of peers : 2                 Peers in established state : 2

 

  * - Dynamically created peer

  Peer                    AS  MsgRcvd  MsgSent OutQ PrefRcv Up/Down  State

 

  3.3.3.3              65009        4        4    0       0 00:02:49 Established

  3.1.1.2              65008        2        2    0       0 00:00:05 Established

可以看出,Switch B与Switch C、Switch B与Switch A之间的BGP连接均已建立。

# 查看Switch A的BGP路由表。

[SwitchA] display bgp routing-table ipv4

 

 Total number of routes: 1

 

 BGP local router ID is 1.1.1.1

 Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e - external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >  8.1.1.0/24         8.1.1.1         0                     32768   i

# 查看Switch B的BGP路由表。

[SwitchB] display bgp routing-table ipv4

 

 Total number of routes: 1

 

 BGP local router ID is 2.2.2.2

 Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e – external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >e 8.1.1.0/24         3.1.1.2         0                     0       65008i

# 查看Switch C的BGP路由表。

[SwitchC] display bgp routing-table ipv4

 

 Total number of routes: 1

 

 BGP local router ID is 3.3.3.3

 Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e – external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

   i 8.1.1.0/24         3.1.1.2         0          100        0       65008i

从路由表可以看出,Switch A没有学到AS 65009内部的任何路由,Switch C虽然学到了AS 65008中的8.1.1.0的路由,但因为下一跳3.1.1.2不可达,所以也不是有效路由。

3.5.4  配置Switch B发布本地网段路由

在Switch B上配置BGP发布本地网段路由,以便Switch A能够获取到网段9.1.1.0/24的路由,Switch C能够获取到网段3.1.1.0/24的路由。

[SwitchB] bgp 65009

[SwitchB-bgp-default] address-family ipv4 unicast

[SwitchB-bgp-default-ipv4] network 3.1.1.0 24

[SwitchB-bgp-default-ipv4] network 9.1.1.0 24

[SwitchB-bgp-default-ipv4] quit

[SwitchB-bgp-default] quit

# 查看Switch A的BGP路由表。

[SwitchA] display bgp routing-table ipv4

 

 Total number of routes: 3

 

 BGP local router ID is 1.1.1.1

 Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e – external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >e 3.1.1.0/24         3.1.1.1         0                     0       65009?

* >  8.1.1.0/24         8.1.1.1         0                     32768   i

* >e 9.1.1.0/24         3.1.1.1         0                     0       65009i

以上显示信息表明,在Switch B上发布本地网段路由后,Switch A新增了到达9.1.1.0/24的路由。

# 查看Switch C的BGP路由表。

[SwitchC] display bgp routing-table ipv4

 

 Total number of routes: 3

 

 BGP local router ID is 3.3.3.3

 Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e – external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >i 3.1.1.0/24         2.2.2.2         0          100        0       ?

* >i 8.1.1.0/24         3.1.1.2         0          100        0       65008i

* >i 9.1.1.0/24         2.2.2.2         0          100        0       i

以上显示信息表明,到8.1.1.0的路由变为有效路由,下一跳为Switch A的地址。

3.6  验证配置

# 在SwitchC上Ping目标地址8.1.1.1进行验证。

[SwitchC] ping 8.1.1.1

Ping 8.1.1.1 (8.1.1.1): 56 data bytes, press CTRL_C to break

56 bytes from 8.1.1.1: icmp_seq=0 ttl=254 time=10.000 ms

56 bytes from 8.1.1.1: icmp_seq=1 ttl=254 time=4.000 ms

56 bytes from 8.1.1.1: icmp_seq=2 ttl=254 time=4.000 ms

56 bytes from 8.1.1.1: icmp_seq=3 ttl=254 time=3.000 ms

56 bytes from 8.1.1.1: icmp_seq=4 ttl=254 time=3.000 ms

 

--- Ping statistics for 8.1.1.1 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 3.000/4.800/10.000/2.638 ms

以上信息表明Switch C能够访问Switch A直连的8.1.1.0/24网段。

3.7  配置文件

·            Switch A

#

vlan 100

#

vlan 200

#

interface Loopback0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface100

 ip address 8.1.1.1 255.255.255.0

#

interface Vlan-interface200

 ip address 3.1.1.2 255.255.255.0

#

bgp 65008

 router-id 1.1.1.1

 peer 3.1.1.1 as-number 65009

#

address-family ipv4 unicast

 network 8.1.1.0 255.255.255.0

 peer 3.1.1.1 enable

#

·            Switch B

#

vlan 200

#

vlan 300

#

interface Loopback0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface200

 ip address 3.1.1.1 255.255.255.0

#

interface Vlan-interface300

 ip address 9.1.1.1 255.255.255.0

#

bgp 65009

 router-id 2.2.2.2

 peer 3.1.1.2 as-number 65008

 peer 3.3.3.3 as-number 65009

 peer 3.3.3.3 connect-interface Loopback0

#

address-family ipv4 unicast

 network 3.1.1.0 255.255.255.0

 network 9.1.1.0 255.255.255.0

 peer 3.1.1.2 enable

 peer 3.3.3.3 enable

#

ospf 1

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 9.1.1.0 0.0.0.255

#

·            Switch C

#

vlan 300

#

interface Loopback0

 ip address 3.3.3.3 255.255.255.255

#

interface Vlan-interface300

 ip address 9.1.1.2 255.255.255.0

#

bgp 65009

 router-id 3.3.3.3

 peer 2.2.2.2 as-number 65009

 peer 2.2.2.2 connect-interface Loopback0

#

address-family ipv4 unicast

 peer 2.2.2.2 enable

#

ospf 1

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 9.1.1.0 0.0.0.255

#

4  BGP与IGP交互配置举例

4.1  组网需求

公司A的所有设备在AS 65008内,公司B的所有设备在AS 65009内,AS 65008和AS 65009通过设备Switch A和Switch B相连。公司A的研发部门所在网段为8.1.1.0/24,公司B的研发部门所在网段为9.1.2.0/24。

由于市场需求,现在两个公司决定联合开发一款新型产品,这就需要两个公司的研发部门可以互相通信,实现网段9.1.2.0/24与网段8.1.1.0/24的互通,同时需要确保两个公司的其它网段不能相互通信。

图2 BGP与IGP交互配置组网图

 

4.2  配置思路

在Switch B上将BGP和OSPF路由互相引入,使得Switch A可以访问9.1.2.0/24网段,Switch C可以访问8.1.1.0/24网段。

4.3  适用产品及版本

表2 适用产品及版本

产品

软件版本

S5560X-EI系列

Release 63xx系列

S5560X-HI系列

Release 63xx系列

S5500V2-EI系列

Release 63xx系列

MS4520V2-30F

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列

S5000-EI系列

Release 63xx系列

MS4600系列

Release 63xx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5130S-HI系列

S5130S-EI系列

S5130S-SI系列

S5130S-LI系列

不支持

S5120V2-SI系列

S5120V2-LI系列

不支持

S3100V3-EI系列

S3100V3-SI系列

不支持

S5110V2系列

不支持

S5110V2-SI系列

不支持

S5000V3-EI系列

不支持

S5000E-X系列

不支持

E128C

E152C

E500C系列

E500D系列

不支持

MS4520V2系列(除MS4520V2-30F)

Release 63xx系列

MS4320V2系列

MS4300V2系列

MS4320系列

MS4200系列

不支持

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

不支持

WAS6000系列

不支持

 

4.4  配置注意事项

EBGP邻居关系的两台交换机,处于不同的AS域,对端的LoopBack接口一般路由不可达,所以一般使用直连地址建立EBGP邻居。

4.5  配置步骤

4.5.1  配置各接口的IP地址

# 配置接口Vlan-int100的IP地址。

<SwitchA> system-view

[SwitchA] interface Vlan-interface 100

[SwitchA-Vlan-interface100] ip address 8.1.1.1 24

# 请参考以上方法配置其它相关接口的IP地址,具体配置步骤略。

4.5.2  配置OSPF

在AS 65009内配置OSPF,使得Switch B能获取到到9.1.2.0/24网段的路由。

1. Switch B的配置

<SwitchB> system-view

[SwitchB] ospf 1

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[SwitchB-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

2. Switch C的配置

<SwitchC> system-view

[SwitchC] ospf 1

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] network 9.1.2.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

4.5.3  配置EBGP连接

配置EBGP连接,并在Switch A上将8.1.1.0/24网段通告到BGP路由表中,以便Switch B获取到网段8.1.1.0/24的路由。

1. Switch A的配置

<SwitchA> system-view

[SwitchA] bgp 65008

[SwitchA-bgp-default] router-id 1.1.1.1

[SwitchA-bgp-default] peer 3.1.1.1 as-number 65009

[SwitchA-bgp-default] address-family ipv4 unicast

[SwitchA-bgp-default-ipv4] peer 3.1.1.1 enable

[SwitchA-bgp-default-ipv4] network 8.1.1.0 24

[SwitchA-bgp-default-ipv4] quit

[SwitchA-bgp-default] quit

2. Switch B的配置

[SwitchB] bgp 65009

[SwitchB-bgp-default] router-id 2.2.2.2

[SwitchB-bgp-default] peer 3.1.1.2 as-number 65008

[SwitchB-bgp-default] address-family ipv4 unicast

[SwitchB-bgp-default-ipv4] peer 3.1.1.2 enable

4.5.4  配置BGP与IGP交互

# 在Switch B上配置BGP和OSPF互相引入路由。

[SwitchB-bgp-default-ipv4] import-route ospf 1

[SwitchB-bgp-default-ipv4] quit

[SwitchB-bgp-default] quit

[SwitchB] ospf 1

[SwitchB-ospf-1] import-route bgp

[SwitchB-ospf-1] quit

# 查看Switch A的BGP路由表。

[SwitchA] display bgp routing-table ipv4

 

 Total number of routes: 3

 

 BGP local router ID is 1.1.1.1

 Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e – external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >  8.1.1.0/24         8.1.1.1         0                     32768   i

* >e 9.1.2.0/24         3.1.1.1         1                     0       65009?

# 查看Switch C的OSPF路由表。

[SwitchC] display ospf routing

 

          OSPF Process 1 with Router ID 3.3.3.3

                   Routing Table

 

                Topology base (MTID 0)

 

 Routing for network

 Destination        Cost     Type    NextHop         AdvRouter       Area

 9.1.1.0/24         1        Transit 9.1.1.2         3.3.3.3         0.0.0.0

9.1.2.0/24         1        Stub    9.1.2.1         192.168.0.63    0.0.0.0

 2.2.2.2/32         1        Stub    9.1.1.1         2.2.2.2         0.0.0.0

 

 Routing for ASEs

 Destination        Cost     Type    Tag         NextHop         AdvRouter

 8.1.1.0/24         1        Type2   1           9.1.1.1         2.2.2.2

 

 Total nets: 3

 Intra area: 2  Inter area: 0  ASE: 1  NSSA: 0

从Switch A的BGP路由表和Switch C的OSPF路由表可以看出,Swtich B上的BGP和OSPF路由已经互相引入。

4.6  验证配置

# 在Switch A上使用源地址8.1.1.1Ping目标地址9.1.2.1进行验证。

[SwitchA] ping -a 8.1.1.1 9.1.2.1

Ping 9.1.2.1 (9.1.2.1) from 8.1.1.1: 56 data bytes, press CTRL_C to break

56 bytes from 9.1.2.1: icmp_seq=0 ttl=254 time=10.000 ms

56 bytes from 9.1.2.1: icmp_seq=1 ttl=254 time=12.000 ms

56 bytes from 9.1.2.1: icmp_seq=2 ttl=254 time=2.000 ms

56 bytes from 9.1.2.1: icmp_seq=3 ttl=254 time=7.000 ms

56 bytes from 9.1.2.1: icmp_seq=4 ttl=254 time=9.000 ms

 

--- Ping statistics for 9.1.2.1 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 2.000/8.000/12.000/3.406 ms

# 在Switch C上使用源地址9.1.2.1Ping目标地址8.1.1.1进行验证。

[SwitchC] ping -a 9.1.2.1 8.1.1.1

Ping 8.1.1.1 (8.1.1.1) from 9.1.2.1: 56 data bytes, press CTRL_C to break

56 bytes from 8.1.1.1: icmp_seq=0 ttl=254 time=9.000 ms

56 bytes from 8.1.1.1: icmp_seq=1 ttl=254 time=4.000 ms

56 bytes from 8.1.1.1: icmp_seq=2 ttl=254 time=3.000 ms

56 bytes from 8.1.1.1: icmp_seq=3 ttl=254 time=3.000 ms

56 bytes from 8.1.1.1: icmp_seq=4 ttl=254 time=3.000 ms

 

--- Ping statistics for 8.1.1.1 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 3.000/4.400/9.000/2.332 ms

上述显示信息说明网段9.1.2.0/24与网段8.1.1.0/24能实现互通。

# 在Switch A上使用源地址8.1.2.1分别Ping目标地址9.1.2.1和9.1.3.1进行验证。

[SwitchA] ping –a 8.1.2.1 9.1.2.1

Ping 9.1.2.1 (9.1.2.1) from 8.1.2.1: 56 data bytes, press CTRL_C to break

Request time out

Request time out

Request time out

Request time out

Request time out

 

--- Ping statistics for 9.1.2.1 ---

5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss

 

[SwitchA] ping –a 8.1.2.1 9.1.3.1

Ping 9.1.3.1 (9.1.3.1) from 8.1.2.1: 56 data bytes, press CTRL_C to break

Request time out

Request time out

Request time out

Request time out

Request time out

 

--- Ping statistics for 9.1.3.1 ---

5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss

# 在Switch C上使用源地址9.1.3.1分别Ping目标地址8.1.1.1和8.1.2.1进行验证。

[SwitchC] ping –a 9.1.3.1 8.1.1.1

Ping 8.1.1.1 (8.1.1.1) from 9.1.3.1: 56 data bytes, press CTRL_C to break

Request time out

Request time out

Request time out

Request time out

Request time out

 

--- Ping statistics for 8.1.1.1 ---

5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss

 

[SwitchC] ping –a 9.1.3.1 8.1.2.1

Ping 8.1.2.1 (8.1.2.1) from 9.1.3.1: 56 data bytes, press CTRL_C to break

Request time out

Request time out

Request time out

Request time out

Request time out

 

--- Ping statistics for 8.1.2.1 ---

5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss

上述信息说明两个自治区域之间只有网段9.1.2.0/24与网段8.1.1.0/24能实现互通,其他网段之间是无法互通的。

4.7  配置文件

·            Switch A

#

vlan 100

#

vlan 200

#

vlan 600

#

interface Loopback0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface100

 ip address 8.1.1.1 255.255.255.0

#

interface Vlan-interface200

 ip address 3.1.1.2 255.255.255.0

#

interface Vlan-interface600

 ip address 8.1.2.1 255.255.255.0

#

bgp 65008

 router-id 1.1.1.1

 peer 3.1.1.1 as-number 65009

#

address-family ipv4 unicast

 network 8.1.1.0 255.255.255.0

 peer 3.1.1.1 enable

#

·            Switch B

#

vlan 200

#

vlan 300

#

vlan 500

#

interface Loopback0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface200

 ip address 3.1.1.1 255.255.255.0

#

interface Vlan-interface300

 ip address 9.1.1.1 255.255.255.0

#

bgp 65009

 router-id 2.2.2.2

 peer 3.1.1.2 as-number 65008

#

address-family ipv4 unicast

 import-route ospf 1

 peer 3.1.1.2 enable

#

ospf 1

 import-route bgp

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 9.1.1.0 0.0.0.255

#

·            Switch C

#

vlan 300

#

vlan 400

#

interface Loopback0

 ip address 3.3.3.3 255.255.255.255

#

interface Vlan-interface300

 ip address 9.1.1.2 255.255.255.0

#

interface Vlan-interface400

 ip address 9.1.2.1 255.255.255.0

#

interface Vlan-interface500

 ip address 9.1.3.1 255.255.255.0

#

ospf 1

 area 0.0.0.0

  network 9.1.1.0 0.0.0.255

  network 9.1.2.0 0.0.0.255

#

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们