章节大纲

  •         AS-155 是一个 stub 自治系统,它有一个网络 (10.155.0.0/24) 和一个 BGP 路由器(10.155.0.254)。请在该路由器容器上获取终端,并研究 /etc/bird/bird.conf  中的 BGP 配置,然后完成以下任务。

           • 任务 1.a.1:从 BGP 配置文件中识别AS-155与其他哪个AS进行互连。目前可以忽略配置中的过滤部分。以下是配置文件中的一个条目。

    protocol bgp u_as2 {
        ipv4 {
            table t_bgp;
            import filter {
                bgp_large_community.add(PROVIDER_COMM);
                bgp_local_pref = 10;
                accept;
            };
            export where bgp_large_community ~ [LOCAL_COMM, CUSTOMER_COMM];
            next hop self;
        };
        local 10.102.0.155 as 155;
        neighbor 10.102.0.2 as 2;
    }

           • 任务 1.a.2:AS-155 与其他多个 AS 进行互连,因此如果与其中一个 AS 的连接中断,它仍然可以继续连接到互联网上。请设计一个实验来证明这一点。可以从图中(见图2)或使用 birdc 命令(参见以下示例)来启用/禁用 BGP 会话。在您的实验中,请展示当特定的 BGP 会话被禁用/启用时路由表的变化。(您可以使用 "ip route" 来查看路由表的内容。)

    root@0c97d3ade85a / # birdc show protocols
    BIRD 2.0.7 ready.
    Name       Proto      Table      State  Since         Info
    u_as2      BGP        ---        up     14:51:40.447  Established
    u_as4      BGP        ---        up     14:51:39.500  Established
    
    root@0c97d3ade85a / # birdc disable u_as2  
    BIRD 2.0.7 ready.
    u_as2: disabled
    
    root@0c97d3ade85a / # birdc show protocols
    BIRD 2.0.7 ready.
    Name       Proto      Table      State  Since         Info
    u_as2      BGP        ---        down    16:32:14.883
    u_as4      BGP        ---        up      14:51:39.500 Established