网络拓扑如下:

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. Google瓦片地图URL

    http://mt2.google.cn/vt/lyrs=y&scale=2&hl=zh-CN&gl=cn&x=6891&y=3040&z=13 //含 ...

  2. 权限模型AGDLP

    关于权限模型,认真学习下AD+FS应用在企业中,使用AGDLP模型,即可. AD是微软最牛逼的设计之一.

  3. Odoo-10开发环境配置与测试

    Odoo是使用Python写的开源ERP软件,这几年比较火.内部有实施能力的,这个软件还是很不错的.总体来说,国外的这类软件,更多是在做平台(比如微软的AX.SharePoint.SAP等)平台本身具 ...

  4. [转]Deciding on a Project Coding Mask

    https://blogs.sap.com/2015/11/26/deciding-on-a-project-coding-mask/ SAP里面每个模块都有其number range的定义和分派逻辑 ...

  5. Nginx设置防止IP及非配置域名访问

    #设置IP或其它域名访问时返回500或304 server{ listen default; server_name _; ##标示空主机头 return ; } #设置IP或其它域名访问时重定向到w ...

  6. java 调用c# web api 代码

    上次我们写的.net  web api 给对方公司的java团队调用,他们觉得说java无法调用.net 写的api ,靠居然有这事,索性自己写一个java的demo给他们 使用apache的Http ...

  7. shell中使用类似Python的参数处理

    params=$* for param in ${params} do name=$() value=$() if [[ "$name" = "run_type" ...

  8. VS2017无法进入安装界面问题的解决方法

    VS2017无法进入安装界面问题的解决方法 打开C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe也没有 ...

  9. Java 基于WebMagic 开发的网络爬虫

    第一次接触爬虫,之所以选择WebMagic,是因为文档齐全.用法简单.而且框架一直在维护. WebMagic是一个简单灵活的Java爬虫框架.基于WebMagic,我们可以快速开发出一个高效.易维护的 ...

  10. MYSQL临时表使用方法

    当工作在非常大的表上时,你可能偶尔需要运行很多查询获得一个大量数据的小的子集,不是对整个表运行这些查询,而是让MySQL每次找出所需的少数记录,将记录选择到一个临时表可能更快些,然后在这些表运行查询. ...