直连BGP邻居配置

案例:直连BGP邻居配置

1)确保设备之间的连通性

2)配置BGP,指定邻居

3)验证
方案

使用eNSP搭建实验环境,如图-1所示。
直连BGP邻居配置

    //R1的基本配置
      interface gi0/0/0 
        ip address  192.168.12.1  255.255.255.0 
    //R2的基本配置
      interface gi0/0/1 
        ip address  192.168.12.2  255.255.255.0 
    //配置R1启用BGP,并指定 AS 为 64512 
    bgp 64512        
    //指定邻居的IP地址以及邻居所在的 AS 号
      peer 192.168.12.2   as-number  64512
    //配置R2启用BGP,并指定 AS 为 64512 
    bgp 64512        
    //指定邻居的IP地址以及邻居所在的 AS 号
      peer 192.168.12.1   as-number  64512 
    //在R1上查看 BGP 的邻居表
    display  bgp   peer
    BGP local router ID : 192.168.12.1
     Local AS number : 64512
     Total number of peers : 1          Peers in established state : 0
     Peer          V    AS   MsgRcvd  MsgSent  OutQ  Up/Down    State     PrefRcv
     192.168.12.2  4  64512        0        1     0  00:00:45  Established    0        
    //在R2上查看 BGP 的邻居表
    display  bgp   peer
    BGP local router ID : 192.168.12.2
     Local AS number : 64512
     Total number of peers : 1          Peers in established state : 1
     Peer          V    AS   MsgRcvd  MsgSent  OutQ  Up/Down    State     PrefRcv
     192.168.12.1  4  64512        5        5     0  00:03:07  Established    0                 

猜你喜欢

转载自blog.51cto.com/14315231/2396216