juniper OSPF中virtual-link配置实例

拓扑图如上所示,area2和area0没有直接连接,所以网络没有获得全拓扑,此时我们可以在abr上做virtual-link来讲area2和area0连接,以下是配置脚本:

system {
    time-zone Asia/Shanghai;
    root-authentication {
        encrypted-password "$1$eb9tNUWo$gYal5nxLO7VdL4n6MrNDY1"; ## SECRET-DATA
    }
    login {
        user olive {
            uid 1000;
            class super-user;
            authentication {
                encrypted-password "$1$T5KQ/SxD$i12MFkx8PNZTgoxJ5CS5G0"; ## SECRET-DATA
            }
        }
    }
    services {
        ssh;
        telnet;
        web-management {
            http;
        }
    }
}
logical-systems {
    r1 {
        interfaces {
            em1 {
                unit 12 {
                    vlan-id 12;
                    family inet {
                        address 10.0.4.5/30;
                    }
                }
                unit 13 {
                    vlan-id 13;
                    family inet {
                        address 10.0.4.14/30;
                    }
                }
                inactive: unit 15 {
                    vlan-id 15;
                    family inet {
                        address 172.30.25.2/30;
                    }
                }
            }
            lo0 {
                unit 1 {
                    family inet {
                        address 10.0.0.1/32;
                    }
                }
            }
        }
        protocols {
            ospf {
                area 0.0.0.2 {
                    interface em1.12;
                    interface em1.13;
                }
            }
    }
    r2 {
        interfaces {
            em2 {
                unit 21 {
                    vlan-id 12;
                    family inet {
                        address 10.0.4.6/30;
                    }
                }
                unit 23 {
                    vlan-id 23;
                    family inet {
                        address 10.0.4.2/30;
                    }
                }
                unit 24 {
                    vlan-id 24;
                    family inet {
                        address 10.0.4.10/30;
                    }
                }
            }
            lo0 {
                unit 2 {
                    family inet {
                        address 10.0.0.2/32;
                    }
                }
            }
        }
        protocols {
            ospf {
                area 0.0.0.2 {
                    interface em2.21;
                    interface em2.24;
                }
            }
    }
    r3 {
        interfaces {
            em3 {
                unit 31 {
                    vlan-id 13;
                    family inet {
                        address 10.0.4.13/30;
                    }
                }
                unit 32 {
                    vlan-id 23;
                    family inet {
                        address 10.0.4.1/30;
                    }
                }
                unit 34 {
                    vlan-id 34;
                    family inet {
                        address 10.0.2.5/30;
                    }
                }
                unit 35 {
                    vlan-id 35;
                    family inet {
                        address 10.0.2.2/30;
                    }
                }
            }
            lo0 {
                unit 3 {
                    family inet {
                        address 10.0.0.3/32;
                    }
                }
            }
        }
        protocols {
            ospf {
                area 0.0.0.2 {
                    interface em3.31;
                }
                area 0.0.0.1 {
                    interface em3.35;
                    interface em3.34;
                }
                area 0.0.0.0 {
                    virtual-link neighbor-id 10.0.0.5 transit-area 0.0.0.1;//virtual-link只能在area0里面配置,neighbor-id指对端RID,transit-area指virtual-link要通过的area
                }
            }
    }
    r4 {
        interfaces {
            em4 {
                unit 42 {
                    vlan-id 24;
                    family inet {
                        address 10.0.4.9/30;
                    }
                }
                unit 43 {
                    vlan-id 34;
                    family inet {
                        address 10.0.2.6/30;
                    }
                }
                unit 45 {
                    vlan-id 45;
                    family inet {
                        address 10.0.2.10/30;
                    }
                }
            }
            lo0 {
                unit 4 {
                    family inet {
                        address 10.0.0.4/32;
                    }
                }
            }
        }
        protocols {
            ospf {
                area 0.0.0.2 {
                    interface em4.42;
                }
                area 0.0.0.1 {
                    interface em4.45;
                    interface em4.43;
                }
                area 0.0.0.0 {
                    virtual-link neighbor-id 10.0.0.5 transit-area 0.0.0.1;
                }
            }
    }
    r5 {
        interfaces {
            em5 {
                unit 53 {
                    vlan-id 35;
                    family inet {
                        address 10.0.2.1/30;
                    }
                }
                unit 54 {
                    vlan-id 45;
                    family inet {
                        address 10.0.2.9/30;
                    }
                }
                unit 56 {
                    vlan-id 56;
                    family inet {
                        address 10.0.8.6/30;
                    }
                }
                unit 57 {
                    vlan-id 57;
                    family inet {
                        address 10.0.8.9/30;
                    }
                }
            }
            lo0 {
                unit 5 {
                    family inet {
                        address 10.0.0.5/32;
                    }
                }
            }
        }
        protocols {
            ospf {
                area 0.0.0.1 {
                    interface em5.53;
                    interface em5.54;
                }
                area 0.0.0.0 {
                    virtual-link neighbor-id 10.0.0.4 transit-area 0.0.0.1;
                    virtual-link neighbor-id 10.0.0.3 transit-area 0.0.0.1;
                    interface em5.57;
                    interface em5.56;
                }
            }
        }
    }
    r6 {
        interfaces {
            em6 {
                unit 65 {
                    vlan-id 56;
                    family inet {
                        address 10.0.8.5/30;
                    }
                }
                unit 67 {
                    vlan-id 67;
                    family inet {
                        address 10.0.8.1/30;
                    }
                }
            }
            lo0 {
                unit 6 {
                    family inet {
                        address 10.0.0.6/32;
                    }
                }
            }
        }
        protocols {
            ospf {
                area 0.0.0.0 {
                    interface em6.65;
                    interface em6.67;
                }
            }
        }
    }
    r7 {
        interfaces {
            em7 {
                unit 75 {
                    vlan-id 57;
                    family inet {
                        address 10.0.8.10/30;
                    }
                }
                unit 76 {
                    vlan-id 67;
                    family inet {
                        address 10.0.8.2/30;
                    }
                }
            }
            lo0 {
                unit 7 {
                    family inet {
                        address 10.0.0.7/32;
                    }
                }
            }
        }
        protocols {
            ospf {
                area 0.0.0.0 {
                    interface em7.75;
                    interface em7.76;
                }
            }
        }
    }
}
interfaces {
    em0 {
        unit 0 {
            family inet {
                address 192.168.1.254/24;
            }
        }
    }
    em1 {
        vlan-tagging;
    }
    em2 {
        vlan-tagging;
    }
    em3 {
        vlan-tagging;
    }
    em4 {
        vlan-tagging;
    }
    em5 {
        vlan-tagging;
    }
    em6 {
        vlan-tagging;
    }
    em7 {
        vlan-tagging;
    }
}
olive# run show ospf neighbor logical-system all    

logical-system: r2
Address          Interface              State     ID               Pri  Dead
10.0.4.5         em2.21                 Full      10.0.0.1         128    34
10.0.4.9         em2.24                 Full      10.0.0.4         128    34
-----   

logical-system: r3
10.0.2.6         em3.34                 Full      10.0.0.4         128    35
10.0.2.1         em3.35                 Full      10.0.0.5         128    33
10.0.4.14        em3.31                 Full      10.0.0.1         128    33
10.0.2.1         vl-10.0.0.5            Full      10.0.0.5           0    37
-----   

logical-system: r1
10.0.4.6         em1.12                 Full      10.0.0.2         128    36
10.0.4.13        em1.13                 Full      10.0.0.3         128    31
-----   

logical-system: r5
10.0.8.5         em5.56                 Full      10.0.0.6         128    34
10.0.8.10        em5.57                 Full      10.0.0.7         128    34
10.0.2.2         vl-10.0.0.3            Full      10.0.0.3           0    33
10.0.2.10        vl-10.0.0.4            Full      10.0.0.4           0    34
10.0.2.2         em5.53                 Full      10.0.0.3         128    31
10.0.2.10        em5.54                 Full      10.0.0.4         128    32
-----   

logical-system: r4
10.0.2.5         em4.43                 Full      10.0.0.3         128    39
10.0.2.9         em4.45                 Full      10.0.0.5         128    37
10.0.4.10        em4.42                 Full      10.0.0.2         128    35
10.0.2.9         vl-10.0.0.5            Full      10.0.0.5           0    38
-----   

logical-system: r7
10.0.8.9         em7.75                 Full      10.0.0.5         128    36
10.0.8.1         em7.76                 Full      10.0.0.6         128    31   

-----   

logical-system: r6
10.0.8.6         em6.65                 Full      10.0.0.5         128    34
10.0.8.2         em6.67                 Full      10.0.0.7         128    33
-----
olive# run show ospf interface logical-system all    

logical-system: r2
Interface           State   Area            DR ID           BDR ID          Nbrs
em2.21              DR      0.0.0.2         10.0.0.2        10.0.0.1           1
em2.24              BDR     0.0.0.2         10.0.0.4        10.0.0.2           1
-----   

logical-system: r3
em3.34              BDR     0.0.0.1         10.0.0.4        10.0.0.3           1
em3.35              BDR     0.0.0.1         10.0.0.5        10.0.0.3           1
em3.31              DR      0.0.0.2         10.0.0.3        10.0.0.1           1
vl-10.0.0.5         PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
-----   

logical-system: r1
em1.12              BDR     0.0.0.2         10.0.0.2        10.0.0.1           1
em1.13              BDR     0.0.0.2         10.0.0.3        10.0.0.1           1
-----   

logical-system: r5
em5.56              BDR     0.0.0.0         10.0.0.6        10.0.0.5           1
em5.57              BDR     0.0.0.0         10.0.0.7        10.0.0.5           1
vl-10.0.0.3         PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
vl-10.0.0.4         PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
em5.53              DR      0.0.0.1         10.0.0.5        10.0.0.3           1
em5.54              DR      0.0.0.1         10.0.0.5        10.0.0.4           1
-----   

logical-system: r4
em4.43              DR      0.0.0.1         10.0.0.4        10.0.0.3           1
em4.45              BDR     0.0.0.1         10.0.0.5        10.0.0.4           1
em4.42              DR      0.0.0.2         10.0.0.4        10.0.0.2           1
vl-10.0.0.5         PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
-----   

logical-system: r7
em7.75              DR      0.0.0.0         10.0.0.7        10.0.0.5           1
em7.76              DR      0.0.0.0         10.0.0.7        10.0.0.6           1
-----   

logical-system: r6
em6.65              DR      0.0.0.0         10.0.0.6        10.0.0.5           1
em6.67              BDR     0.0.0.0         10.0.0.7        10.0.0.6           1

本文出自 “Rista” 博客,请务必保留此出处http://rista.blog.51cto.com/2526140/946558

以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索interface
, 10
, em
, 10 1 arcpy
, address
, windous10
, caffecifar10
, unit
, full
, V7.75
, v4.45
10乘阶
ospf virtual link、juniper ospf配置、juniper ospf、juniper srx ospf、juniper 放行ospf流量,以便于您获取更多的相关知识。

时间: 2024-08-30 07:31:14

juniper OSPF中virtual-link配置实例的相关文章

Juniper防火墙IS-IS单区域配置实例

拓扑图中的节点都在areaID为49.0001的区域中.由于IS-IS的地址都是基于ISO形式的,所以每个参与IS-IS的接口都要封装成ISO格式,一个节点的NET地址是基于环回口来分配地址的,并且从7.2版本后环回口默认是passive的,本实验是基于单区域来分析ISIS的路由学习过程的,以下是配置脚本: olive# show logical-systems r1 { interfaces { em1 { unit 12 { vlan-id 12; family inet { address

juniper防火墙上做vrrp配置实例

在一台运行freebsd的和junos的PC上实验,拓扑如上图: Virtual IP (VIP) addresses = 10.0.5.253 and 10.0.6.253 r1 is master of VLAN 520 AND R2 IS BACK r2 is master of VLAN 530 AND R1 IS BACK MD5 authentication is enabled. For VLAN 520, the key is "vrrp520" .for VLAN 5

juniper防火墙利用policy-options(策略)来重分布static到ospf中

Juniper中要实现像cisco那样的重分布功能就要通过policy来实现,下面就是我的一个实例:其功能就是把static路由重分布到ospf中,下面是拓扑图 把R1的默认路由重分布到OSPF中 配置如下: ## ## Last changed: 2012-07-18 06:03:09 CST version 12.1R1.9; logical-systems { r1 { interfaces { em1 { unit 12 { vlan-id 12; family inet { addre

Apache中Virtual Host虚拟主机配置及rewrite参数说明_Linux

Virtual Host配置过程 这里例子中我们的路径为这样 DocumentRoot: /home/jb51 /sites/demo.jb51.net ServerName:demo.jb51.net 1.进入apache虚拟主机设置目录 cd /etc/apache2/sites-available 2.创建文件demo.jb51.net <VirtualHost *:80> ServerAdmin webmaster@localhost DirectoryIndex index.html

Juniper OSPF邻居验证实例讲解

OSPF邻居验证支持MD5和明文验证两种方式,下面就通过r1,r2,r3来做邻居验证.这里我们把r1和r2进行邻居md5加密 r1的配置如下: interfaces { em1 { unit 12 { vlan-id 12; family inet { address 10.0.4.5/30; } } unit 13 { vlan-id 13; family inet { address 10.0.4.14/30; } } } lo0 { unit 1 { family inet { addre

Yii框架中sphinx索引配置方法解析_php实例

本文实例讲述了Yii框架中sphinx索引配置方法.分享给大家供大家参考,具体如下: 请先将var/test/documents.sql导入数据库,并配置好以下的MySQL用户密码数据库 #源定义 source mysql { type = mysql sql_host = localhost sql_user = root sql_pass = root sql_db = yii2 sql_port = 3306 sql_query_pre = SET NAMES utf8 sql_query

Nginx中泛域名配置的实例教程_nginx

原本准备换Linux服务器,所以数据迁移暂时需要使用静态页面临时代替一下,之前的article.asp?id=xxx都要重定向到静态文件 article/xxx.htm,nginx的rewrite比apache的强大很多,还可以用if语句,很容易理解,下面看看Nginx是如何进行Rewrite的! 提示:以下rewrite指令写在 nginx.conf 配置的 server { - } 中 最常见的: 静态地址重定向到带参数的动态地址 rewrite "^(.*)/service/(.*)/.h

图解OSPF从入门到配置到验证

OSPF(Open Shortest Path First开放式最短路径优先)是一个内部网关协议(Interior Gateway Protocol,简称IGP),用于在单一自治系统(autonomous system,AS)内决策路由.在1 个大型网络中, 如果不是所 有的设备都是Cisco的,具有私有性质的EIGRP就不能用,这时候就要用到OSPF协议.下面是Cisco特意推出的图解OSPF从入门到配置,大家赶紧收藏吧.OSPF知识入门498)this.w idth=498;' onmous

.NET 2.0 中的自定义配置处理

引言 现代软件开发中,各种技术.技巧越来越依赖配置,譬如客户端对用户体验的个性化设置.系统的各种运行时参数设置.可插拔的插件机制.基于配置的IoC架构模式等.配置方式也从最初的二进制存储格式逐步过度到INI文本格式直至今时所广泛使用的Xml格式.使用Xml格式进行配置,大大提高了对设置数据的表现能力,但是在 .NET 1.x 中对Xml配置的操控还有诸多不便,尤其是对Xml配置的存储同步机制很不完善,而从 .NET 2.0 开始,框架提供了更丰富和易于操控使用的机制. .NET 中的配置文件(X