网络拓扑如下:

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. key diff 在input上的踩坑

    1.在react-native 遇到一个坑,希望的效果如下,同一个按钮,不同的状态下显示不同的input. 2.然后,在做的时候遇到了这样一个问题.输入我的姓名,点击下一步 3.问题出来了,输入框已经 ...

  2. oracle数据库的权限系统

    oracle数据库的权限系统分为系统权限与对象权限.系统权限( database system privilege )可以让用户执行特定的命令集.例如,create table权限允许用户创建表,gr ...

  3. js基础面试篇

    1,js中的new做了什么? function Person () { this.name = name; this.age = age; this.sex = sex this.sayName = ...

  4. 【python】Django自定义模板函数

    参考:https://blog.csdn.net/wenyuanhai/article/details/73656761 注意: 1.自定义模板函数的路径必须为APP的templatetags下:ap ...

  5. LeetCode 102. Binary Tree Level Order Traversal 二叉树的层次遍历 C++

    Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, ...

  6. 服务器上运行程序Out of memory 解决办法

    ****** 服务器上跑过程序经常能遇到out of memory 这个问题,下面是我经常在实验室碰到的解决方法. 1.使用命令nvidia-smi,看到GPU显存被占满: 2.尝试使用 ps aux ...

  7. 使用Feign调用服务的问题

    最近在搞微服务的东西,系统A提供了一个服务,定义方式: @RequestMapping(value = "/hasSuberList", method = RequestMetho ...

  8. 使用spring-session共享springmvc项目的session

    一.说在前面 spring mvc项目,使用nginx,tomcat部署. 之前没做session共享,而nginx采用sticky模块进行分发. 但发现有时不能正确地指向同一台服务器,从而导致ses ...

  9. promise.then, setTimeout,await执行顺序问题

    promise.then VS setTimeout 在chrome和node环境环境中均输出2, 3, 1, 先输出2没什么好说的,3和1顺序让人有些意外 原因: 有一个事件循环,但是任务队列可以有 ...

  10. .net core 2.2 修改IdentityUser主键标识类型

    .net core2.2,生成WebApi或者MVC项目后,Identity 1.增加ApplicationUser.cs文件,内容如下 public class ApplicationUser : ...