logic router配置案例

标题:logic router配置案例

数码相机金牌推荐商家!

级别:列兵
威望:8
性别:男
发帖数:1
贡献币:0
回帖数:0
来自:其它
查看博客文集
电脑直销免费咨询电话 800 858 2293

logic router配置案例

 

version 7.2R2.4;
system {
    host-name Juniper-Lab;
    backup-router 172.27.10.129;
    time-zone Asia/Shanghai;
    saved-core-context;
    ports {
        console type vt100;
        auxiliary type vt100;
    }
    login {
        user juniper {
            uid 2002;
            class superuser;
            authentication {
                encrypted-password "$1$fTE4aVvP$u8euyzJMcJdVZ/AlBCNoj1"; ## SECRET-DATA
            }
        }
        user lab {
            uid 2000;
            class super-user;
            authentication {
                encrypted-password "$1$egKb445d$Ygcrc.fzXzxi0nw966brT1"; ## SECRET-DATA
            }
        }
    }
    services {
        ftp;
        ssh {
            root-login allow;
            protocol-version v2;
        }
        telnet;
    }
    compress-configuration-files;
}
logical-routers {
    c1 {
        interfaces {
            fxp2 {
                unit 10 {
                    vlan-id 10;
                    family inet {
                        address 172.16.0.6/30;
                    }
                }
                unit 20 {
                    vlan-id 20;
                    family inet {
                        address 172.16.0.10/30;
                    }
                }
            }
            lo0 {
                unit 200 {
                    family inet {
                        address 200.200.0.1/32;
                    }
                }
            }
        }
        protocols {
            bgp {
                group r4 {
                    type external;
                    multihop;
                    export r4;
                    peer-as 65412;
                    neighbor 10.0.3.4;
                }
            }
        }
        policy-options {
            policy-statement null {
                then reject;
            }
            policy-statement r4 {
                term first {
                    from {
                        route-filter 200.200.0.0/16 exact;
                    }
                    then {
                        as-path-prepend "10458 14203 701 4230";
                        accept;
                    }
                }
                term second {
                    from {
                        protocol static;
                        route-filter 200.0.0.0/8 orlonger;
                        route-filter 32.0.0.0/8 longer;
                        route-filter 172.16.0.0/16 orlonger;
                    }
                    then {
                        as-path-prepend 65000;
                        accept;
                    }
                }
            }
        }
        routing-options {
            static {
                route 200.200.0.0/16 reject;
                route 200.200.0.0/24 discard;
                route 200.200.1.0/24 discard;
                route 200.200.2.0/24 discard;
                route 200.200.3.0/24 discard;
                route 200.200.4.0/24 discard;
                route 200.200.5.0/24 discard;
                route 200.200.6.0/24 discard;
                route 200.200.7.0/24 discard;
                route 32.0.0.0/16 {
                    discard;
                    as-path {
                        path 420;
                    }
                }
                route 200.200.0.0/28 discard;
                route 10.0.1.0/24 discard;
                route 200.200.5.128/25 discard;
                route 10.0.3.4/32 next-hop [ 172.16.0.5 172.16.0.9 ];
            }
            autonomous-system 65010;
        }
    }
    c2 {
        interfaces {
            fxp2 {
                unit 80 {
                    vlan-id 80;
                    family inet {
                        address 172.16.0.26/30;
                    }
                }
            }
            lo0 {
                unit 80 {
                    family inet {
                        address 201.201.0.1/32;
                    }
                }
            }
        }
        protocols {
            bgp {
                group r7 {
                    type external;
                    export r7;
                    neighbor 172.16.0.25 {
                        peer-as 65412;
                    }
                }
            }
        }
        policy-options {
            policy-statement r7 {
                term 1 {
                    from protocol static;
                    then {
                        as-path-prepend 65020;
                        accept;
                    }
                }
                term 2 {
                    from {
                        protocol direct;
                        route-filter 201.201.0.0/24 exact;
                    }
                    then accept;
                }
            }
        }
        routing-options {
            static {
                route 201.201.0.0/24 discard;
                route 201.201.1.0/24 discard;
                route 201.201.2.0/24 discard;
                route 201.201.3.0/24 discard;
                route 201.201.4.0/24 discard;
                route 201.201.5.0/24 discard;
                route 201.201.6.0/24 discard;
                route 201.201.7.0/24 discard;
                route 0.0.0.0/0 {
                    discard;
                    as-path {
                        path "62 39";
                    }
                }
                route 64.0.0.0/7 discard;
                route 201.201.0.7/32 discard;
                route 210.210.16.128/26 {
                    discard;
                    as-path {
                        path 65010;
                    }
                }
            }
            autonomous-system 65020;
        }
    }
    ospf-RTR {
        interfaces {
            fxp1 {
                unit 70 {
                    vlan-id 70;
                    family inet {
                        address 172.16.40.1/30;
                    }
                }
            }
            fxp2 {
                unit 60 {
                    vlan-id 60;
                    family inet {
                        address 172.16.40.5/30;
                    }
                }
            }
            lo0 {
                unit 192 {
                    family inet {
                        address 192.168.0.1/32;
                        address 192.168.1.1/32;
                        address 192.168.2.1/32;
                        address 192.168.3.1/32;
                        address 192.168.4.1/32;
                        address 192.168.5.1/32;
                        address 192.168.6.1/32;
                    }
                }
            }
        }
        protocols {
            inactive: ospf {
                export advertise-ospf;
                area 0.0.0.2 {
                    nssa;
                    authentication-type simple;
                    interface fxp1.70 {
                        authentication {
                            simple-password "$9$EwUhlM8LNbYoxN"; ## SECRET-DATA
                        }
                    }
                    interface fxp2.60 {
                        authentication {
                            simple-password "$9$g74GikqfznCmf"; ## SECRET-DATA
                        }
                    }
                }
            }
            rip {
                group rip-grp {
                    export advertise-rip;
                    neighbor fxp1.70;
                    neighbor fxp2.60;
                }
            }
        }



泡泡论坛提醒:网上购物易上当,请不要给论坛内网上购物广告贴打款 回复  

回复

喜迎奥运,天天特价!
  功能: 插入图插图 上传图传图 插入链接插链接 上传附件传文件  
  内容:
登录发言  立即注册!  [完成后可按Ctrl+Enter 发布]