发新话题
打印

[技术分享] 一个JUNOS配置

一个JUNOS配置

version 6.4R4.3;
groups {
    re0 {
        system {
            host-name m160;
        }
        interfaces {
            fxp0 {
                unit 0 {
                    family inet {
                        address 172.27.10.164/25;
                    }
                }
            }
        }
    }
    re1 {
        system {
            host-name m160-re1;
        }
        interfaces {
            fxp0 {
                unit 0 {
                    family inet {
                        address 172.27.10.165/25;
                    }
                }
            }
        }
    }
}
apply-groups [ re0 re1 ];
system {
    domain-name jnpr.net;
    backup-router 172.27.10.129;
    time-zone Asia/Shanghai;
    name-server {
        172.27.8.10;
    }
    login {
        user lab {
            uid 2003;
            class superuser;
            authentication {
                encrypted-password "$1$pAAO669B$M2cFNmPjS/x3SvIe5Fhb40"; ## SECRET-DATA
            }
        }
    }
    services {
        ftp;
        telnet;
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any info;
            authorization info;
        }
    }
    ntp {
        server 172.27.10.199;
    }
}
interfaces {
    so-1/1/0 {
        sonet-options {
            rfc-2615;
        }
        unit 0 {
            family inet {
                address 10.2.2.160/24;
            }
        }
    }
    so-1/1/1 {
        unit 0 {
            family inet {
                address 10.1.1.160/24;
            }
        }
    }
    so-2/1/0 {
        no-keepalives;
        encapsulation cisco-hdlc;
        unit 0 {
            family inet {
                address 33.33.33.1/30;
            }
        }
    }
    so-5/0/0 {
        no-keepalives;
        encapsulation cisco-hdlc;
        unit 0 {
            family inet {
                address 33.33.33.5/30;
            }
        }
    }
    so-5/3/1 {
        no-keepalives;
        encapsulation cisco-hdlc;
        unit 0 {
            family inet {
                address 44.44.44.1/30;
            }
        }
    }
    so-6/1/0 {
        unit 0 {
            family inet {
                address 9.9.9.160/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                filter {
                    input abc;
                }
                address 10.10.10.160/32;
                address 10.90.90.160/32;
                address 10.10.10.1/32;
            }
        }
    }
}
routing-options {
    static {
        route 172.27.0.0/16 next-hop 172.27.10.129;
        route 0.0.0.0/0 next-hop [ 10.2.2.201 10.1.1.10 ];
        route 8.8.8.8/32 next-hop 9.9.9.150;
        route 100.100.7.0/24 {
            discard;
            as-path {
                path 1234;
            }
        }
    }
    aggregate {
        route 100.100.0.0/16 discard;
    }
    router-id 10.10.10.1;
    autonomous-system 1239;
    forwarding-table {
        export lb;
    }
}
protocols {
    bgp {
        group ebgp {
            type external;
            multihop;
            local-address 10.10.10.1;
            export agg;
            peer-as 2000;
            neighbor 8.8.8.8;
        }
    }
}
policy-options {
    policy-statement lb {
        then {
            load-balance per-packet;
            accept;
        }
    }
    policy-statement agg {
        term 1 {
            from protocol aggregate;
            then accept;
        }
    }
}
firewall {
    filter abc {
        term 1 {
            from {
                ip-options route-record;
            }
            then {
                count icmp-with-rr;
                log;
                syslog;
                sample;
                discard;
            }
        }
        term 2 {
            then accept;
        }
    }
}

TOP

一个配置,又多个一种技术和方法,谢谢楼主

TOP

不错,好教程,收藏了。谢谢楼主的分享了啊!~

TOP

发新话题