juniper multi-area OSPF

 
R1的配置
root@R1# show
## Last changed: 2012-10-30 13:26:21 UTC
version 11.1R1.14;
system {
    host-name R1;
    root-authentication {
        encrypted-password 123; ## 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;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 1.1.1.1/24;
            }
        }
    }
}
routing-options {
    max-interface-supported 0;
}
protocols {
    ospf {
        area 0.0.0.0 {
            interface em0.0;
        }
        area 0.0.0.1 {
            interface lo0.0;
        }                              
    }
}
[edit]
R2的配置
root@R2# show
## Last changed: 2012-10-30 13:34:38 UTC
version 11.1R1.14;
system {
    host-name R2;
    root-authentication {
        encrypted-password 123; ## 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.2/24;
            }
        }
    }
    em1 {
        unit 0 {
            family inet {
                address 172.16.1.1/24;
            }
        }
    }
}
routing-options {
    max-interface-supported 0;
}
protocols {
    ospf {
        area 0.0.0.0 {
            interface em0.0;
            interface em1.0;
        }
    }
}                                      
[edit]
R3配置
root@R3# show
## Last changed: 2012-10-30 13:28:34 UTC
version 11.1R1.14;
system {
    host-name R3;
    root-authentication {
        encrypted-password 123; ## 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.2/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 3.3.3.3/24;
            }
        }
    }
}
routing-options {
    max-interface-supported 0;
}
protocols {
    ospf {
        area 0.0.0.0 {
            interface em0.0;
        }
        area 0.0.0.2 {
            interface lo0.0;
        }                              
    }
}
[edit]
root@R1# run show ospf neighbor
Address          Interface              State     ID               Pri  Dead
192.168.1.2      em0.0                  Full      172.16.1.1       128    34
[edit]
root@R1# run show ospf route      
Topology default Route Table:
Prefix             Path  Route      NH       Metric NextHop       Nexthop     
                   Type  Type       Type            Interface     Address/LSP
3.3.3.3            Intra Area BR    IP            2 em0.0         192.168.1.2
172.16.1.1         Intra Router     IP            1 em0.0         192.168.1.2
1.1.1.0/24         Intra Network    IP            0 lo0.0
1.1.1.1/32         Intra Network    IP            0 lo0.0
3.3.3.0/24         Inter Network    IP            2 em0.0         192.168.1.2
3.3.3.3/32         Inter Network    IP            2 em0.0         192.168.1.2
172.16.1.0/24      Intra Network    IP            2 em0.0         192.168.1.2
192.168.1.0/24     Intra Network    IP            1 em0.0
[edit]
root@R1# run show ospf database
    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router  *1.1.1.1          1.1.1.1          0x8000000c   141  0x22 0x7fc7  36
Router   3.3.3.3          3.3.3.3          0x8000000a   133  0x22 0x99f8  36
Router   172.16.1.1       172.16.1.1       0x8000000d   136  0x22 0x82c0  48
Network  172.16.1.1       172.16.1.1       0x80000002   159  0x22 0x46aa  32
Network  192.168.1.2      172.16.1.1       0x80000002   166  0x22 0xab9f  32
Summary *1.1.1.0          1.1.1.1          0x80000001   589  0x22 0x47ee  28
Summary *1.1.1.1          1.1.1.1          0x80000001   589  0x22 0x3df7  28
Summary  3.3.3.0          3.3.3.3          0x80000002   619  0x22 0xc066  28
Summary  3.3.3.3          3.3.3.3          0x80000002   619  0x22 0xa281  28
    OSPF database, Area 0.0.0.1
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router  *1.1.1.1          1.1.1.1          0x8000000a   141  0x22 0x5bae  48
Summary *3.3.3.0          1.1.1.1          0x80000001   158  0x22 0x131b  28
Summary *3.3.3.3          1.1.1.1          0x80000001   158  0x22 0xf436  28
Summary *172.16.1.0       1.1.1.1          0x80000001   165  0x22 0xee8a  28
Summary *192.168.1.0      1.1.1.1          0x80000005   165  0x22 0xb019  28
[edit]
 
 

本文出自 “侯志清” 博客,谢绝转载!

你可能感兴趣的:(juniper,ospf,多区域)