RIP juniper

RIP <wbr>juniper

RIP协议

R1配置结果

root@R1#

[edit]
root@R1# show
## Last changed: 2012-05-24 07:42:20 UTC
version 11.1R1.14;
system {
    host-name R1;
    root-authentication {
        encrypted-password abc123; ## SECRET-DATA
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
}
interfaces {
    em0 {
        unit 0 {
            family inet {              
                address 172.16.1.1/24;
            }
        }
    }
    lo0 {
        unit 1 {
            family inet {
                address 1.1.1.1/32;
            }
        }
    }
}
protocols {
    rip {
        group RIP1 {
            export INTORIP;
            neighbor em0.0;     //将em0.0和lo0.1加入RIP组通告
            neighbor lo0.1;
        }
    }
}
policy-options {
    policy-statement INTORIP        
        term 1 {
            from protocol static;
            then accept;
        }
        term 2 {
            from interface [ em0.0 lo0.1 ]; //允许转发的接口
            then accept;
        }
    }
}

[edit]

 

R2配置结果

## Last changed: 2012-05-24 08:59:18 UTC
version 11.1R1.14;
system {
    host-name R2;
    root-authentication {
        encrypted-password abc123; ## SECRET-DATA
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
}
interfaces {
    em0 {
        unit 0 {
            family inet {              
                address 192.168.1.1/24;
            }
        }
    }
    em1 {
        unit 0 {
            family inet {
                address 172.16.1.2/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 2.2.2.2/32;
            }
        }
    }
}
protocols {
    rip {
        group RIP1 {
            export INTORIP           
            neighbor lo0.0;
            neighbor em0.0;
            neighbor em1.0;
        }
    }
}
policy-options {
    policy-statement INTORIP {
        term 1 {
            from protocol static;
            then accept;
        }
        term 2 {
            from interface [ em0.0 lo0.0 em1.0 ];
            then accept;
        }
    }
}

[edit]

R3的配置

root@R3# show
## Last changed: 2012-05-24 07:23:10 UTC
version 11.1R1.14;
system {
    host-name R3;
    root-authentication {
        encrypted-password abc123; ## SECRET-DATA
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any notice;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
}
interfaces {
    em1 {
        unit 0 {
            family inet {              
                address 192.168.1.2/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 3.3.3.3/32;
            }
        }
    }
}
protocols {
    rip {
        group RIP1 {
            export INTORIP;
            neighbor em1.0;
            neighbor lo0.0;
        }
    }
}
policy-options {
    policy-statement INTORIP        
        term 1 {
            from protocol static;
            then accept;
        }
        term 2 {
            from interface [ lo0.0 em1.0 ];
            then accept;
        }
    }
}

[edit]

下面是R1上的配置步骤,R2和R3配置类似

root@R1# edit protocols rip 
root@R1# edit group RIP1  
root@R1# set export INTORIP
root@R1# set neighbor lo0.0
root@R1# set neighbor em0.0
root@R1# exit
root@R1# exit
root@R1# edit policy-options policy-statement INTORIP 
root@R1# edit term 1 
root@R1# set from protocol static 
root@R1# set then accept 
root@R1# exit
root@R1# edit term 2
root@R1# set from interface [ lo0.0 em0.0] 
root@R1# set then accept
root@R1# commit

 

root@R1# run show route protocol rip all   

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

2.2.2.2/32         *[RIP/100] 00:24:00, metric 2, tag 0
                    > to 172.16.1.2 via em0.0
3.3.3.3/32         *[RIP/100] 00:11:36, metric 3, tag 0
                    > to 172.16.1.2 via em0.0
192.168.1.0/24     *[RIP/100] 00:24:00, metric 2, tag 0
                    > to 172.16.1.2 via em0.0
224.0.0.9/32       *[RIP/100] 00:13:44, metric 1
                      MultiRecv

 

 

 

posted on 2012-05-24 18:19  侯志清  阅读(265)  评论(0编辑  收藏  举报

导航