juniper路由器的rip配置示例

来源:互联网 发布:瓷砖铺贴效果图软件 编辑:程序博客网 时间:2024/05/17 07:40
root@rt3# show
version 6.3R3.1;
system {
    host-name rt3;
}
interfaces {
    fxp0 {
        unit 0 {
            family inet {
                address 10.2.2.1/24;
            }
        }
    }
    fxp1 {
        speed 10m;
        link-mode half-duplex;
        unit 0 {
            family inet {
                address 10.3.3.1/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 172.16.1.1/32;
            }
        }
    }
}
routing-options {
    static {
        route 10.7.7.0/24 reject;
//相当于cisco的ip route 10.7.7.0 255.255.255.0 null0
    }
}
protocols {
    rip {
        group juniper {
            export send-statics;
//定义转发策略,juniper默认不会将直连网络宣告出去,需要定义转发策略,这里“send-statics”是策略名称,可以自定义
            neighbor fxp0.0;
            neighbor fxp1.0;
//个人理解:相当于在接口上启用rip
        }
    }
}
policy-options {
    policy-statement send-statics {
        term 1 {
            from protocol static;
            then accept;
//相当于cisco的 redistribut static,重发布静态路由
        }
        term 2 {
            from interface lo0.0;
            then accept;
        }
        term 3 {
            from interface [ fxp0.0 fxp1.0 ];
            then accept;
//将在这些接口上收到的路由发布出去,包括这些接口的网络号
        }
    }
}
//juniper只要在接口上启用了了路由就默认接收路由,但是不会在接口上转发路由信息,需要定义转发策略,juniper默认使用ripv2,并且关闭自动总结。
原创粉丝点击