网络拓扑如下:

XRV1配置

===========================================================

root@XRV1# run show configuration

## Last commit: 2019-03-27 13:27:33 UTC by root
version 14.1R1.10;
system {
host-name XRV1;
root-authentication {
encrypted-password "$1$iiqdh9ru$CBQygri2MkpfgtgdGo8GO1"; ## SECRET-DATA
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.10.1.1/30;
}
family iso;
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 10.10.1.5/30;
}
family iso;
}
}
ge-0/0/2 {
unit 0 {
family inet {
address 10.201.1.1/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.1.1/32;
}
family iso {
address 49.0000.1921.6811.00;
}
}
}
}
routing-options {
router-id 192.168.1.1;
autonomous-system 65001;
}
protocols {
bgp {
group ibgp {
type internal;
local-address 192.168.1.1;
neighbor 192.168.1.2 {
export as65002_to_as65001;
}
neighbor 192.168.1.3 {
export as65002_to_as65001;
}
}
group ebgp {
type external;
neighbor 10.201.1.2 {
peer-as 65002;
}
}
}
isis {
interface ge-0/0/0.0 {
level 1 disable;
}
interface ge-0/0/1.0 {
level 1 disable;
}
interface lo0.0;
}
}
policy-options {
prefix-list as65002_import {
10.123.1.0/24;
10.123.2.0/24;
10.123.3.0/24;
10.123.4.0/24;
10.123.5.0/24;
10.123.6.0/24;
10.123.7.0/24;
10.178.1.0/24;
10.178.2.0/24;
10.178.3.0/24;
10.178.4.0/24;
10.178.5.0/24;
10.178.6.0/24;
10.178.7.0/24;
10.178.8.0/24;
}
policy-statement as65002_to_as65001 {
from {
prefix-list as65002_import;
}
then {
next-hop self;
}
}
}

[edit]
root@XRV1#

XRV2配置

===========================================================

root@XRV2# run show configuration
## Last commit: 2019-03-27 13:38:59 UTC by root
version 14.1R1.10;
system {
host-name XRV2;
root-authentication {
encrypted-password "$1$iiqdh9ru$CBQygri2MkpfgtgdGo8GO1"; ## SECRET-DATA
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.10.1.2/30;
}
family iso;
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 10.10.1.9/30;
}
family iso;
}
}
ge-0/0/2 {
unit 0 {
family inet {
address 10.201.1.6/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.1.2/32;
}
family iso {
address 49.0000.1921.6812.00;
}
}
}
}
routing-options {
router-id 192.168.1.2;
autonomous-system 65001;
}
protocols {
bgp {
group ibgp {
type internal;
local-address 192.168.1.2;
neighbor 192.168.1.1 {
export as65002_to_as65001;
}
neighbor 192.168.1.3 {
export as65002_to_as65001;
}
}
group ebgp {
type external;
neighbor 10.201.1.5 {
peer-as 65002;
}
}
}
isis {
interface ge-0/0/0.0 {
level 1 disable;
}
interface ge-0/0/1.0 {
level 1 disable;
}
interface lo0.0;
}
}
policy-options {
prefix-list as65002_import {
10.123.1.0/24;
10.123.2.0/24;
10.123.3.0/24;
10.123.4.0/24;
10.123.5.0/24;
10.123.6.0/24;
10.123.7.0/24;
10.178.1.0/24;
10.178.2.0/24;
10.178.3.0/24;
10.178.4.0/24;
}
policy-statement as65002_to_as65001 {
from {
prefix-list as65002_import;
}
then {
next-hop self;
}
}
}

[edit protocols bgp group ibgp]
root@XRV2#

L3-SW配置

===========================================================

L3-SW#show running-config
Building configuration...

Current configuration : 6662 bytes
!
! Last configuration change at 13:30:46 UTC Wed Mar 27 2019
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname L3-SW
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
!
!
!
!
!
no ip domain-lookup
ip cef
no ipv6 cef
!
!
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 192.168.1.3 255.255.255.255
ip router isis 1
!
interface GigabitEthernet0/0
switchport access vlan 100
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
switchport access vlan 200
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
interface Vlan1
ip address 10.158.1.254 255.255.255.0
!
interface Vlan2
ip address 10.158.2.254 255.255.255.0
!
interface Vlan3
ip address 10.158.3.254 255.255.255.0
!
interface Vlan4
ip address 10.158.4.254 255.255.255.0
!
interface Vlan5
ip address 10.158.5.254 255.255.255.0
!
interface Vlan6
ip address 10.158.6.254 255.255.255.0
!
interface Vlan7
ip address 10.158.7.254 255.255.255.0
!
interface Vlan8
ip address 10.158.8.254 255.255.255.0
!
interface Vlan9
ip address 10.158.9.254 255.255.255.0
!
interface Vlan10
ip address 10.158.10.254 255.255.255.0
!
interface Vlan11
ip address 10.158.11.254 255.255.255.0
!
interface Vlan12
ip address 10.158.12.254 255.255.255.0
!
interface Vlan13
ip address 10.158.13.254 255.255.255.0
!
interface Vlan14
ip address 10.158.14.254 255.255.255.0
!
interface Vlan15
ip address 10.158.15.254 255.255.255.0
!
interface Vlan16
ip address 10.158.16.254 255.255.255.0
!
interface Vlan17
ip address 10.133.1.254 255.255.255.0
!
interface Vlan18
ip address 10.133.2.254 255.255.255.0
!
interface Vlan19
ip address 10.133.3.254 255.255.255.0
!
interface Vlan20
ip address 10.133.4.254 255.255.255.0
!
interface Vlan21
ip address 10.133.5.254 255.255.255.0
!
interface Vlan22
ip address 10.133.6.254 255.255.255.0
!
interface Vlan23
ip address 10.133.7.254 255.255.255.0
!
interface Vlan24
ip address 10.133.8.254 255.255.255.0
!
interface Vlan25
ip address 10.133.9.254 255.255.255.0
!
interface Vlan26
ip address 10.133.10.254 255.255.255.0
!
interface Vlan27
ip address 10.133.11.254 255.255.255.0
!
interface Vlan28
ip address 10.133.12.254 255.255.255.0
!
interface Vlan29
ip address 10.133.13.254 255.255.255.0
!
interface Vlan30
ip address 10.133.14.254 255.255.255.0
!
interface Vlan31
ip address 10.133.15.254 255.255.255.0
!
interface Vlan32
ip address 10.133.16.254 255.255.255.0
!
interface Vlan100
ip address 10.10.1.6 255.255.255.252
ip router isis 1
isis circuit-type level-2-only
!
interface Vlan200
ip address 10.10.1.10 255.255.255.252
ip router isis 1
isis circuit-type level-2-only
!
router isis 1
net 49.0000.1921.6813.00
is-type level-2-only
!
router bgp 65001
bgp router-id 192.168.1.3
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
network 10.133.1.0 mask 255.255.255.0
network 10.133.2.0 mask 255.255.255.0
network 10.133.3.0 mask 255.255.255.0
network 10.133.4.0 mask 255.255.255.0
network 10.133.5.0 mask 255.255.255.0
network 10.133.6.0 mask 255.255.255.0
network 10.133.7.0 mask 255.255.255.0
network 10.133.8.0 mask 255.255.255.0
network 10.133.9.0 mask 255.255.255.0
network 10.133.10.0 mask 255.255.255.0
network 10.133.11.0 mask 255.255.255.0
network 10.133.12.0 mask 255.255.255.0
network 10.133.13.0 mask 255.255.255.0
network 10.133.14.0 mask 255.255.255.0
network 10.133.15.0 mask 255.255.255.0
network 10.133.16.0 mask 255.255.255.0
network 10.158.1.0 mask 255.255.255.0
network 10.158.2.0 mask 255.255.255.0
network 10.158.3.0 mask 255.255.255.0
network 10.158.4.0 mask 255.255.255.0
network 10.158.5.0 mask 255.255.255.0
network 10.158.6.0 mask 255.255.255.0
network 10.158.7.0 mask 255.255.255.0
network 10.158.8.0 mask 255.255.255.0
network 10.158.9.0 mask 255.255.255.0
network 10.158.10.0 mask 255.255.255.0
network 10.158.11.0 mask 255.255.255.0
network 10.158.12.0 mask 255.255.255.0
network 10.158.13.0 mask 255.255.255.0
network 10.158.14.0 mask 255.255.255.0
network 10.158.15.0 mask 255.255.255.0
network 10.158.16.0 mask 255.255.255.0
neighbor 192.168.1.1 remote-as 65001
neighbor 192.168.1.1 update-source Loopback0
neighbor 192.168.1.2 remote-as 65001
neighbor 192.168.1.2 update-source Loopback0
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server

XRV3配置

===========================================================

root@XRV3# run show configuration
## Last commit: 2019-03-27 13:48:14 UTC by root
version 14.1R1.10;
system {
host-name XRV3;
root-authentication {
encrypted-password "$1$iiqdh9ru$CBQygri2MkpfgtgdGo8GO1"; ## SECRET-DATA
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.10.2.1/30;
}
family iso;
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 10.201.1.2/30;
}
}
}
ge-0/0/2 {
unit 0 {
family inet {
address 10.10.2.5/30;
}
family iso;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.1.3/32;
}
family iso {
address 49.0000.1921.6813.00;
}
}
}
}
routing-options {
router-id 192.168.1.3;
autonomous-system 65002;
}
protocols {
bgp {
group ebgp {
type external;
neighbor 10.201.1.1 {
peer-as 65001;
}
}
group ibgp {
type internal;
local-address 192.168.1.3;
neighbor 192.168.1.4 {
export as65001_to_as65002;
}
neighbor 192.168.1.5 {
export as65001_to_as65002;
}
}
}
isis {
interface ge-0/0/0.0 {
level 1 disable;
}
interface ge-0/0/2.0 {
level 1 disable;
}
interface lo0.0;
}
}
policy-options {
prefix-list as65001_export {
10.133.1.0/24;
10.133.2.0/24;
10.133.3.0/24;
10.133.4.0/24;
10.133.5.0/24;
10.133.6.0/24;
10.133.7.0/24;
10.133.8.0/24;
10.133.9.0/24;
10.133.10.0/24;
10.133.11.0/24;
10.133.12.0/24;
10.133.13.0/24;
10.133.14.0/24;
10.133.15.0/24;
10.133.16.0/24;
10.158.1.0/24;
10.158.2.0/24;
10.158.3.0/24;
10.158.4.0/24;
10.158.5.0/24;
10.158.6.0/24;
10.158.7.0/24;
10.158.8.0/24;
10.158.9.0/24;
10.158.10.0/24;
10.158.11.0/24;
10.158.12.0/24;
10.158.13.0/24;
10.158.14.0/24;
10.158.15.0/24;
10.158.16.0/24;
}
policy-statement as65001_to_as65002 {
from {
prefix-list as65001_export;
}
then {
next-hop self;
}
}
}

XRV4配置

===========================================================

root@XRV4# run show configuration 
## Last commit: 2019-03-27 13:48:24 UTC by root
version 14.1R1.10;
system {
host-name XRV4;
root-authentication {
encrypted-password "$1$iiqdh9ru$CBQygri2MkpfgtgdGo8GO1"; ## SECRET-DATA
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.10.2.2/30;
}
family iso;
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 10.201.1.5/30;
}
}

ge-0/0/2 {
unit 0 {
family inet {
address 10.10.2.10/30;
}
family iso;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.1.4/32;
}
family iso {
address 49.0000.1921.6814.00;
}
}
}
}
routing-options {
router-id 192.168.1.4;
autonomous-system 65002;

protocols {
bgp {
group ebgp {
type external;
neighbor 10.201.1.6 {
peer-as 65001;
}
}
group ibgp {
type internal;
local-address 192.168.1.4;
neighbor 192.168.1.3 {
export as65001_to_as65002;
}
neighbor 192.168.1.5 {
export as65001_to_as65002;
}
}
}
isis {
interface ge-0/0/0.0 {
level 1 disable;

interface ge-0/0/2.0 {
level 1 disable;
}
interface lo0.0;
}
}
policy-options {
prefix-list as65001_export {
10.133.1.0/24;
10.133.2.0/24;
10.133.3.0/24;
10.133.4.0/24;
10.133.5.0/24;
10.133.6.0/24;
10.133.7.0/24;
10.133.8.0/24;
10.133.9.0/24;
10.133.10.0/24;
10.133.11.0/24;
10.133.12.0/24;
10.133.13.0/24;
10.133.14.0/24;
10.133.15.0/24; 
10.133.16.0/24;
10.158.1.0/24;
10.158.2.0/24;
10.158.3.0/24;
10.158.4.0/24;
10.158.5.0/24;
10.158.6.0/24;
10.158.7.0/24;
10.158.8.0/24;
10.158.9.0/24;
10.158.10.0/24;
10.158.11.0/24;
10.158.12.0/24;
10.158.13.0/24;
10.158.14.0/24;
10.158.15.0/24;
10.158.16.0/24;
}
policy-statement as65001_to_as65002 {
from {
prefix-list as65001_export;
}
then { 
next-hop self;
}
}
}

[edit protocols bgp group ibgp]
root@XRV4#

Juniper BGP配置的更多相关文章

  1. juniper srx 配置

    天涯海角- juniper为人所熟悉的一定是从netscreen开始的,作为一线防火墙品牌,还是有很高的地位.但是以前玩netscreen,都是用的网页版去配置,而且网页版做得很不错.但是现在nets ...

  2. Juniper基础配置

    root> show configuration | display set      配置按set行显示,查看的配置为未commit的配置(commit check)root# set sys ...

  3. juniper交换机配置

    1.链接串口配置: minicom -s ```bash Serial port setup  A -    Serial Device      : /dev/ttyS1               ...

  4. 如何在Quagga BGP路由器中设置IPv6的BGP对等体和过滤

    在本教程中,我们会向你演示如何创建IPv6 BGP对等体并通过BGP通告IPv6前缀.同时我们也将演示如何使用前缀列表和路由映射特性来过滤通告的或者获取到的IPv6前缀. 拓扑 服务供应商A和B希望在 ...

  5. 想玩 BGP 路由器么?用 CentOS 做一个

    在之前的教程中,我对如何简单地使用Quagga把CentOS系统变成一个不折不扣地OSPF路由器做了一些介绍.Quagga是一个开源路由软件套件.在这个教程中,我将会重点讲讲如何把一个Linux系统变 ...

  6. 如何使用 Quagga BGP(边界网关协议)路由器来过滤 BGP 路由

    在之前的文章中,我们介绍了如何使用 Quagga 将 CentOS 服务器变成一个 BGP 路由器,也介绍了 BGP 对等体和前缀交换设置.在本教程中,我们将重点放在如何使用前缀列表prefix-li ...

  7. 总结:BGP和静态路由并存,达到故障自动倒换的目的。

    总体结论: 在上云的场景中,客户需要本地数据中心到云上VPC,出现网络故障时做到自动倒换,保证业务不中断. 一.客户需求 1.客户有总厂.分厂.总厂是通过专线和VPN连接上云,分厂是通过专线先连接到总 ...

  8. BGP - 3,BGP重要概念(EBGP,IBGP,防环/黑洞/全互连/同步)

    1,防环/黑洞/同步/全互连(为出现大于号,现在通常都是要下一跳可达+关同步) a)EBGP邻居传来的路由可以通过AS_PATH防环,所以收到的不会有问题,因此直接是优化的(>),也就是直接装表 ...

  9. BGP华为、思科选路规则

    选路规则 华为BGP选路规则 思科BGP选路规则 第0条 下一跳是否可达,如果不可达则不参与选路 BGP 向IBGP对等体发布import引入的IGP路由时, 将下一跳属性改为自身的接口地址,而非IG ...

随机推荐

  1. Linux系统编程——fcntl

    fcntl可实现对指定文件描述符的各种操作,其函数原型如下: int fcntl(int fd, int cmd, ... /* arg */ ); 头文件 #include <unistd.h ...

  2. python网页爬虫开发之七-多线程爬虫示例01

    from urllib.request import quote import urllib.request from bs4 import BeautifulSoup import re impor ...

  3. C#开发微信支付之企业向用户付款

    1.企业付款的介绍 所谓企业付款指的是,在功能开放后诸如保险行业的客户理赔.退保.商品退款.发放征集活动奖金.抽奖互动等操作都可以通过企业付款完成.而此前,微信支付只能提供客户向企业单向付款. 商户如 ...

  4. 使用shell解析脚本依赖关系,并自动补数

    将脚本依赖关系放到表中 使用shell解析脚本依赖关系,递归的计算各个脚本. #!/bin/bash # dm 补数 basepath=$(cd ``; pwd) cd $basepath sourc ...

  5. python使用itchat发送微信消息提醒

    最近在学习一点python,先找了找有趣的应用,实际修改跑了一下提高兴趣程度. 找到itchat,它的简介是这样的: “itchat是一个开源的微信个人号接口,使用python调用微信从未如此简单. ...

  6. LayaAir疑难杂症之三:1.7版本click()、execCommand('copy')函数不生效

    问题描述 在使用Laya1.7引擎开发H5游戏时,引入Js原生函数click( ),模拟一次点击事件,发现无效.在使用Laya1.7引擎开发H5游戏时,引入Js原生函数execCommand('cop ...

  7. thinkphp中插入ueditor编辑器的代码

    1.需要在header中加入以下js内容:<script type="text/javascript" src="{$smarty.const.__ROOT__}/ ...

  8. java 英文单词拼写纠正框架(Word Checker)

    Word Checker 本项目用于单词拼写检查. 项目简介 word checker 用于单词拼写检查. Github 地址 特性说明 支持 i18n 错误提示支持 i18N 支持英文的单词纠错 可 ...

  9. Webservice 从客户端中检测到有潜在危险的 request.form值[解决方法]

    <system.web> <httpRuntime requestValidationMode="2.0" /> <pages validateReq ...

  10. ajax调用.net API项目跨域问题解决

    ajax调用.net API项目,经常提示跨域问题.添加如下节点代码解决:httpProtocol <system.webServer> <handlers> <remo ...