OSPF JUNOS/VR CONFIG

From Teknologisk videncenter
Jump to: navigation, search
[edit]
root@SRX240# show | no-more
## Last changed: 2014-11-04 12:44:22 CET
version 12.1X44-D40.2;
interfaces {
    lt-0/0/0 {
        unit 1 {
            encapsulation ethernet;
            peer-unit 2;
            family inet {
                address 10.0.0.1/30;
            }
        }
        unit 2 {
            encapsulation ethernet;
            peer-unit 1;
            family inet {
                address 10.0.0.2/30;
            }
        }
        unit 5 {
            encapsulation ethernet;
            peer-unit 6;
            family inet {
                address 10.0.0.5/30;
            }
        }
        unit 6 {
            encapsulation ethernet;
            peer-unit 5;
            family inet {
                address 10.0.0.6/30;
            }
        }
        unit 9 {
            encapsulation ethernet;
            peer-unit 10;
            family inet {
                address 10.0.0.9/30;
            }
        }
        unit 10 {
            encapsulation ethernet;
            peer-unit 9;
            family inet {
                address 10.0.0.10/30;
            }
        }
        unit 13 {
            encapsulation ethernet;
            peer-unit 14;
            family inet {
                address 10.0.0.13/30;
            }
        }
        unit 14 {
            encapsulation ethernet;
            peer-unit 13;
            family inet {
                address 10.0.0.14/30;
            }
        }
    }
    ge-0/0/15 {
        unit 0 {
            family inet {
                dhcp;
            }
        }
    }
    lo0 {
        unit 1 {
            family inet {
                address 10.1.0.1/24;
            }
        }
        unit 2 {
            family inet {
                address 10.2.0.1/24;
            }
        }
        unit 3 {
            family inet {
                address 10.3.0.1/24;
            }
        }
        unit 4 {
            family inet {
                address 10.4.0.1/24;
            }
        }
    }
}
routing-options {
    autonomous-system 65099;
}
policy-options {
    policy-statement OSPF-EXPORT {
        term 1 {
            from protocol direct;
            then accept;
        }
    }
}
security {
    forwarding-options {
        family {
            inet6 {
                mode packet-based;
            }
            mpls {
                mode packet-based;
            }
        }
    }
}
routing-instances {
    P1 {
        instance-type virtual-router;
        interface lt-0/0/0.1;
        interface lt-0/0/0.10;
        interface lo0.1;
        routing-options {
            router-id 10.1.0.1;
        }
        protocols {
            ospf {
                traceoptions {
                    file P1.ospf.debug size 5m files 5;
                    flag all;
                }
                external-preference 105;
                area 0.0.0.0 {
                    interface lt-0/0/0.1 {
                        authentication {
                            md5 1 key "$9$dGw2ajHmFnCZUnCtuEhVwY"; ## SECRET-DATA
                        }
                    }
                    interface lt-0/0/0.10 {
                        authentication {
                            md5 1 key "$9$2hoZjmfzCtOHqtO1RlegoJ"; ## SECRET-DATA
                        }
                    }
                }
                area 0.0.0.1 {
                    interface lo0.1 {
                        passive;
                    }
                }
            }
        }
    }
    P2 {
        instance-type virtual-router;
        interface lt-0/0/0.2;
        interface lt-0/0/0.5;
        interface lo0.2;
        routing-options {
            router-id 10.2.0.1;
        }
        protocols {
            ospf {
                traceoptions {
                    file P2.ospf.debug size 5m files 5;
                    flag all;
                }
                external-preference 105;
                area 0.0.0.0 {
                    interface lt-0/0/0.2 {
                        authentication {
                            md5 1 key "$9$e4mMLNs2aikPdbkP5Q9CKM8"; ## SECRET-DATA
                        }
                    }
                    interface lt-0/0/0.5 {
                        authentication {
                            md5 1 key "$9$aCGjqTz6uORmfORhSMWJGD"; ## SECRET-DATA
                        }
                    }
                }
                area 0.0.0.2 {
                    interface lo0.2 {
                        passive;
                    }
                }
            }
        }
    }
    P3 {
        instance-type virtual-router;
        interface lt-0/0/0.9;
        interface lt-0/0/0.14;
        interface lo0.3;
        routing-options {
            router-id 10.3.0.1;
        }
        protocols {
            ospf {
                traceoptions {
                    file P3.ospf.debug size 5m files 5;
                    flag all;
                }
                external-preference 105;
                area 0.0.0.0 {
                    interface lt-0/0/0.9 {
                        authentication {
                            md5 1 key "$9$ACXmuBElK8db2cyb24aiHtuO"; ## SECRET-DATA
                        }
                    }
                    interface lt-0/0/0.14 {
                        authentication {
                            md5 1 key "$9$tbId01hevLVwgSrwgoJHkp0B"; ## SECRET-DATA
                        }
                    }
                }
                area 0.0.0.3 {
                    interface lo0.3 {
                        passive;
                    }
                }
            }
        }
    }
    P4 {
        instance-type virtual-router;
        interface lt-0/0/0.6;
        interface lt-0/0/0.13;
        interface lo0.4;
        routing-options {
            router-id 10.4.0.1;
        }
        protocols {
            ospf {
                traceoptions {
                    file P4.ospf.debug size 5m files 5;
                    flag all;
                }
                external-preference 105;
                area 0.0.0.0 {
                    interface lt-0/0/0.6 {
                        authentication {
                            md5 1 key "$9$1jDESeLxdgoGvWoGDif5IEc"; ## SECRET-DATA
                        }
                    }
                    interface lt-0/0/0.13 {
                        authentication {
                            md5 1 key "$9$qPT3ApBSrv69rvWLVb.P5"; ## SECRET-DATA
                        }
                    }
                }
                area 0.0.0.4 {
                    interface lo0.4 {
                        passive;
                    }
                }
            }
        }
    }
}