配置EBGP邻居

配置EBGP邻居
3.1 问题
如图配置IP地址,确保设备之间的连通性
配置BGP,R1 和 R3 之间建立稳定的 IBGP 邻居关系
验证设备之间的BGP邻居关系
3.2 方案
使用eNSP搭建实验环境,如图-3所示。

在这里插入图片描述
图-3

3.3 步骤
实现此案例需要按照如下步骤进行。

1)配置网络设备- R1

<Huawei>undo terminal monitor 
<Huawei>system-view 
[Huawei]sysname R1    
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address  192.168.12.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]bgp 100
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 192.168.12.2 as-number  234
[R1-bgp]quit

2)配置网络设备R2

<Huawei>undo terminal monitor 
<Huawei>system-view 
[Huawei]sysname R2    
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address  192.168.23.2 24
[R2-GigabitEthernet0/0/0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address  192.168.12.2 24
[R2-GigabitEthernet0/0/1]quit
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area  0 
[R2-ospf-1-area-0.0.0.0]network  192.168.12.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network  192.168.23.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]quit
[R2]bgp 234
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 192.168.12.1 as-number  100
[R2-bgp]quit

3)配置网络设备R3

<Huawei>undo terminal monitor 
<Huawei>system-view 
[Huawei]sysname R3    
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address  192.168.23.3 24
[R3-GigabitEthernet0/0/1]quit
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address  192.168.34.3 24
[R3-GigabitEthernet0/0/0]quit
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area  0 
[R3-ospf-1-area-0.0.0.0]network  192.168.23.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network  192.168.34.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]quit

4)配置网络设备 R4

<Huawei>undo terminal monitor 
<Huawei>system-view 
[Huawei]sysname R4    
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address  192.168.34.4 24
[R4-GigabitEthernet0/0/1]quit
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]ip address  192.168.44.4 24
[R4-GigabitEthernet0/0/0]quit
 [R4]interface GigabitEthernet 0/0/2
[R4-GigabitEthernet0/0/2]ip address  192.168.55.4 24
[R4-GigabitEthernet0/0/2]quit
 [R4]interface LoopBack  0
[R4-LoopBack0]ip address 10.10.4.4 32
[R4-LoopBack0]quit
 [R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area  0 
[R4-ospf-1-area-0.0.0.0]network  192.168.34.0 0.0.0.255
[R4-ospf-1-area-0.0.0.0]quit
[R4]ip route-static 10.10.5.5 32 192.168.44.5
[R4]ip route-static 10.10.5.5 32 192.168.55.5
[R4]bgp 234
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 10.10.5.5 as-number  500
[R4-bgp]peer 10.10.5.5 connect-interface loopback 0
[R4-bgp]peer 10.10.5.5 ebgp-max-hop 2
[R4-bgp]quit

4)配置网络设备 R5

<Huawei>undo terminal monitor 
<Huawei>system-view 
[Huawei]sysname R5    
[R5]interface GigabitEthernet 0/0/0
[R5-GigabitEthernet0/0/0]ip address  192.168.44.5 24
[R5-GigabitEthernet0/0/0]quit
[R5]interface GigabitEthernet 0/0/2
[R5-GigabitEthernet0/0/2]ip address  192.168.55.5 24
[R5-GigabitEthernet0/0/2]quit
[R5]interface LoopBack  0
[R5-LoopBack0]ip address 10.10.5.5 32
[R5-LoopBack0]quit
[R5]ip route-static 10.10.4.4 32 192.168.44.4
[R5]ip route-static 10.10.4.4 32 192.168.55.4
[R5]bgp 500
[R5-bgp]router-id 5.5.5.5
[R5-bgp]peer 10.10.4.4 as-number  234
[R5-bgp]peer 10.10.4.4 connect-interface loopback 0
[R5-bgp]peer 10.10.4.4 ebgp-max-hop 
[R5-bgp]quit

5)在R1上查看 BGP 的邻居表

[R1]display bgp  peer 
 BGP local router ID : 1.1.1.1
 Local AS number : 100
 Total number of peers : 1          Peers in established state : 1
  Peer            V        AS  MsgRcvd  MsgSent  OutQ  Up/Down    State     PrefRcv
192.168.12.2      4       234      4        5     0     00:02:13   Established    0

6)在R5上查看 BGP 的邻居表

[R5]display bgp  peer 
 BGP local router ID : 5.5.5.5
 Local AS number : 500
 Total number of peers : 1          Peers in established state : 1
  Peer            V      AS  MsgRcvd  MsgSent  OutQ  Up/Down  State     PrefRcv
  10.10.4.4     4       234      10       9     0    00:15:17   Established    0
©️2020 CSDN 皮肤主题: 我行我“速” 设计师: Amelia_0503 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值