手把手带你部署非直连BGP邻居配置

使用eNSP搭建实验环境:
在这里插入图片描述
1)确保设备之间的连通性

2)配置BGP,指定邻居

3)验证
实现此案例需要按照如下步骤进行。

//R1的基本配置
  interface gi0/0/0 
    ip address  192.168.12.1  255.255.255.0
interface loopback 13
       ip address 10.10.1.1 255.255.255.0
ospf 1 router-id 1.1.1.1
       area 0 
         network 192.168.12.0 0.0.0.255
         network 10.10.1.1 0.0.0.0  
//R2的基本配置
  interface gi0/0/1 
    ip address  192.168.12.2  255.255.255.0
  interface gi0/0/0 
    ip address  192.168.23.2  255.255.255.0
ospf 1 router-id 2.2.2.2
        area 0 
          network 192.168.12.0 0.0.0.255
network 192.168.23.0 0.0.0.255
//R3的基本配置
  interface gi0/0/1 
    ip address  192.168.23.3  255.255.255.0
interface loopback 13
       ip address 10.10.3.3 255.255.255.0
ospf 1 router-id 3.3.3.3
        area 0 
          network 192.168.23.0 0.0.0.255
          network 10.10.3.3 0.0.0.0
//R1的配置
  bgp 64512
       router-id 1.1.1.1
       peer 10.10.3.3 as-number 64512
//更改 R1 向 R3 发送 BGP 报文时所使用的源IP
       peer 10.10.3.3 connect-interface loopback 13
//R3的配置
  bgp 64512
       router-id 3.3.3.3
       peer 10.10.1.1 as-number 64512
//更改 R3 向 R1 发送 BGP 报文时所使用的源IP
       peer 10.10.1.1 connect-interface loopback 13                 
 //在R1上查看 BGP 的邻居表
display  bgp   peer
BGP local router ID : 1.1.1.1
 Local AS number : 64512
 Total number of peers : 1          Peers in established state : 1
  Peer        V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv
  10.10.3.3   4       64512        3        5     0 00:01:37 Established   0
//在R3上查看 BGP 的邻居表
display  bgp   peer
BGP local router ID : 3.3.3.3
 Local AS number : 64512
 Total number of peers : 1          Peers in established state : 1
  Peer        V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv
  10.10.1.1   4       64512        5        5     0 00:03:57 Established   0
发布了396 篇原创文章 · 获赞 56 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/xie_qi_chao/article/details/105202479