华为三层架构+隔离+路由区域实验


交换部分

在这里插入图片描述

1.起vlan 2.划分vlan

在交换机1,2,3,4,上分别起vlan2,3,并将vlan划分给交换机3,4下的接口

3.聚合

int Eth-Trunk 1  //创建接口
[SW1]int g0/0/3
[SW1-GigabitEthernet0/0/3]eth-trunk 1 //加入接口
[SW1]int g0/0/2
[SW1-GigabitEthernet0/0/2]eth-trunk 1

4.干道

配置各交换机之间的Trunk干道

[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]dis this
#
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3 102
#

5.配置mstp
1.sw1为vlan2的主根(可以设置优先级或者直接定)
2.sw2为vlan3的主根

[SW1]stp region-configuration 
[SW1-mst-region]dis this
#
stp region-configuration
 region-name HW
 instance 1 vlan 2
 instance 2 vlan 3
 active region-configuration
#
stp instance 0 root primary
stp instance 1 root primary

其他类比

生成树配置完成后要配置 边缘端口
1.收敛速度加快0.1ms内
2.不会发出TC报文

配置完边缘端口要配置bpdu保护,避免下联交换机形成环路

6.配置vrrp

1.sw1作为vlan2的主网关
2.sw2作为vlan3的主网关
3.注意作为主网关配置上行监控

interface Vlanif2
 ip address 10.1.2.1 255.255.255.0
 vrrp vrid 1 virtual-ip 10.1.2.254
 vrrp vrid 1 priority 120
 vrrp vrid 1 preempt-mode timer delay 3
 vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 30 //上行监控,若down掉,优先级下降30,切换网关
 vrrp vrid 1 authentication-mode md5 CGw~L}56G:$+cx#k/mS=@\6#  // 加密
#
interface Vlanif3
 ip address 10.1.3.1 255.255.255.0
 vrrp vrid 1 virtual-ip 10.1.3.254
 vrrp vrid 1 authentication-mode md5 kwvRRQ]:
interface Vlanif2
 ip address 10.1.2.2 255.255.255.0
 vrrp vrid 1 virtual-ip 10.1.2.254
 vrrp vrid 1 authentication-mode md5 .ePC2PZf)+^QW:LZJi;=\^a#
#
interface Vlanif3
 ip address 10.1.3.2 255.255.255.0
 vrrp vrid 1 virtual-ip 10.1.3.254
 vrrp vrid 1 priority 120
 vrrp vrid 1 preempt-mode timer delay 3
 vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 30
 vrrp vrid 1 authentication-mode md5 +hty8R#JwX^QW:LZJi;=%^V#
#

vrrp的切换条件
1.上行链路发生故障
2.Backup发现不了主设备

核心交换机之间心跳线的作用

1.能够减少局域网PC互通的转发路径
2.最大限度发挥核心的转发效能,而不是让接入交换机承担更多的转发任务
3.能够增加冗余
在这里插入图片描述

将AR1,AR2,SW1,SW2作为同一网段来处理

在这里插入图片描述
1.将AR1和AR2做vrrp
2.做两个vrrp,为vrrp1和vrrp2,使得走sw1的走AR1,走sw2的走AR2

创建一个svi接口并下放给sw1 的0/0/1接口,access
同理给sw2的0/0/1接口

interface Vlanif102
 ip address 10.1.102.1 255.255.255.0

AR1

interface GigabitEthernet0/0/1
 ip address 10.1.102.2 255.255.255.0 
 vrrp vrid 1 virtual-ip 10.1.102.253
 vrrp vrid 2 virtual-ip 10.1.102.254
 vrrp vrid 2 priority 120
 vrrp vrid 2 preempt-mode timer delay 3
 vrrp vrid 2 track interface GigabitEthernet0/0/0 reduced 30
#

要求是:vlan2走左边,vlan3走右边

在AR1和AR2上写去向静态路由,回程路由,在R1上做回来的明细路由(可以直接用nat,而且可以省去一个大麻烦)

正常情况下流量走向
在这里插入图片描述
当AR1与SW1之间断开后,vlan2的流量上去后,R1依然会发给AR1,需要加入检测(bfd),配了一下bfd但是有一点小问题,所以还是用nat(假设R1是ISP的话)吧

在这里插入图片描述

使用OSPF完成,这三条链路处于不同网段
在这里插入图片描述
注意中间的链路宣告了vlan2和vlan3之后,也建立了邻居,需要在ospf进程中启用禁默接口

[SW1]ospf 1
[SW1-ospf-1]dis this
#
ospf 1 router-id 112.112.112.112
 silent-interface Vlanif2
 silent-interface Vlanif3
 area 0.0.0.0
  network 10.1.102.1 0.0.0.0
 area 0.0.0.1
  network 10.1.112.1 0.0.0.0
  network 10.0.0.0 0.255.255.255
#
return

测试一下:pc1和pc2分别 tracert R1的环回(1.1.1.1/32)
正常情况下:
pc1走左边
在这里插入图片描述
pc2走右边
在这里插入图片描述
AR1的g0/0/1口关闭之后,就会绕道,路由器中午重启崩了,没来的及截成图

现在改变要求,接口断了还是要用到上面的链路
在这里插入图片描述
方案一:上边接一条链路,在AR2上做策略路由,然后监测AR1的上行链路(我不会)
在这里插入图片描述
方案二:
在这里插入图片描述

隔离VLAN1和VLAN2然后整合,中间设置两条线(两个svi接口)
在这里插入图片描述
最终效果
在这里插入图片描述

测试一下:
正常情况下和断掉AR1g0/0/1接口:
PC1 tracert 1.1.1.1
在这里插入图片描述
至此各设备配置:
R1

#
interface Ethernet0/0/0
 ip address 11.1.1.2 255.255.255.0
#
interface Ethernet0/0/1
 ip address 12.1.1.2 255.255.255.0
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
#
ospf 1 router-id 11.12.11.11
 area 0.0.0.0
  network 11.1.1.2 0.0.0.0
  network 12.1.1.2 0.0.0.0
  network 1.1.1.1 0.0.0.0
#

AR1

#
interface GigabitEthernet0/0/0
 ip address 11.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 shutdown
 ip address 10.1.102.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 10.1.115.2 255.255.255.0 
#
interface NULL0
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.0 
  network 10.1.102.2 0.0.0.0 
  network 10.1.115.0 0.0.0.255 
  network 11.1.1.1 0.0.0.0 
#

AR2

#
interface GigabitEthernet0/0/0
 ip address 12.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.1.113.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 10.1.114.2 255.255.255.0 
#
interface NULL0
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 10.1.113.2 0.0.0.0 
  network 10.1.114.0 0.0.0.255 
  network 12.1.1.1 0.0.0.0 
#

SW1

#
sysname SW1
#
vlan batch 2 to 3 102 112 114 116
#
stp instance 0 root primary
stp instance 1 root primary
#
drop illegal-mac alarm
#
diffserv domain default
#
ip vpn-instance VLAN2
 ipv4-family
  route-distinguisher 1:1
#
ip vpn-instance VLAN3
 ipv4-family
  route-distinguisher 2:2
#
stp region-configuration
 region-name HW
 instance 1 vlan 2
 instance 2 vlan 3
 active region-configuration
#
interface Vlanif1
#
interface Vlanif2
 ip binding vpn-instance VLAN2
 ip address 10.1.2.1 255.255.255.0
 vrrp vrid 1 virtual-ip 10.1.2.254
 vrrp vrid 1 priority 120
 vrrp vrid 1 preempt-mode timer delay 3
 vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 30
 vrrp vrid 1 authentication-mode md5 CGw~L}56G:$+cx#k/mS=@\6#
#
interface Vlanif3
 ip binding vpn-instance VLAN3
#
interface Vlanif102
 ip binding vpn-instance VLAN2
 ip address 10.1.102.1 255.255.255.0
#
interface Vlanif112
 ip binding vpn-instance VLAN2
 ip address 10.1.112.1 255.255.255.0
#
interface Vlanif114
 ip binding vpn-instance VLAN3
 ip address 10.1.114.1 255.255.255.0
#
interface Vlanif116
 ip binding vpn-instance VLAN3
 ip address 10.1.116.1 255.255.255.0
#
interface MEth0/0/1
#
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3 102 112 to 113 116
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 102
#
interface GigabitEthernet0/0/2
 eth-trunk 1
#
interface GigabitEthernet0/0/3
 eth-trunk 1
#
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/5
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/6
 port link-type access
 port default vlan 114
#
ospf 1 router-id 11.11.11.11 vpn-instance VLAN2
 area 0.0.0.0
  network 10.1.102.0 0.0.0.255
  network 10.1.112.0 0.0.0.255
 area 0.0.0.1
  network 10.1.2.0 0.0.0.255
#
ospf 2 router-id 34.3.3.3 vpn-instance VLAN3
 area 0.0.0.0
  network 10.1.116.0 0.0.0.255
  network 10.1.114.0 0.0.0.255
 area 0.0.0.2
  network 10.1.3.0 0.0.0.255
#

SW2

#
sysname SW2
#
vlan batch 2 to 3 112 to 113 115 to 116
#
stp instance 2 root primary
#
drop illegal-mac alarm
#
diffserv domain default
#
ip vpn-instance VLAN2
 ipv4-family
  route-distinguisher 1:1
#
ip vpn-instance VLAN3
 ipv4-family
  route-distinguisher 2:2
#
stp region-configuration
 region-name HW
 instance 1 vlan 2
 instance 2 vlan 3
 active region-configuration
#
interface Vlanif1
#
interface Vlanif2
 ip binding vpn-instance VLAN2
 ip address 10.1.2.2 255.255.255.0
 vrrp vrid 1 virtual-ip 10.1.2.254
 vrrp vrid 1 authentication-mode md5 .ePC2PZf)+^QW:LZJi;=\^a#
#
interface Vlanif3
 ip binding vpn-instance VLAN3
 ip address 10.1.3.2 255.255.255.0
 vrrp vrid 1 virtual-ip 10.1.3.254
 vrrp vrid 1 priority 120
 vrrp vrid 1 preempt-mode timer delay 3
 vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 30
 vrrp vrid 1 authentication-mode md5 +hty8R#JwX^QW:LZJi;=%^V#
#
interface Vlanif112
 ip binding vpn-instance VLAN3
 ip address 10.1.112.2 255.255.255.0
#
interface Vlanif113
 ip binding vpn-instance VLAN3
 ip address 10.1.113.1 255.255.255.0
#
interface Vlanif115
 ip binding vpn-instance VLAN2
 ip address 10.1.115.1 255.255.255.0
#
interface Vlanif116
 ip binding vpn-instance VLAN2
 ip address 10.1.116.2 255.255.255.0
#
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3 100 102 112 to 113 116
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 113
#
interface GigabitEthernet0/0/2
 eth-trunk 1
#
interface GigabitEthernet0/0/3
 eth-trunk 1
#
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/5
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/6
 port link-type access
 port default vlan 115
#
ospf 1 router-id 33.33.33.33 vpn-instance VLAN3
 area 0.0.0.0
  network 10.1.113.0 0.0.0.255
  network 10.1.112.0 0.0.0.255
 area 0.0.0.1
  network 10.1.3.0 0.0.0.255
#
ospf 2 router-id 35.2.2.2 vpn-instance VLAN2
 area 0.0.0.0
  network 10.1.116.0 0.0.0.255
  network 10.1.115.0 0.0.0.255
 area 0.0.0.2
  network 10.1.2.0 0.0.0.255
#

SW3

#
sysname SW3
#
vlan batch 2 to 3
#
stp bpdu-protection
#
stp region-configuration
 region-name HW
 instance 1 vlan 2
 instance 2 vlan 3
 active region-configuration
#
interface Vlanif1
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 2
 stp edged-port enable
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 3
 stp edged-port enable
#

SW4

#
sysname SW4
#
vlan batch 2 to 3
#
stp bpdu-protection
#
stp region-configuration
 region-name HW
 instance 1 vlan 2
 instance 2 vlan 3
 active region-configuration
#
interface Vlanif1
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 2
 stp edged-port enable
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 3
 stp edged-port enable
#

pc1
在这里插入图片描述

路由部分

继续往上做,之前做的黑色区域作为中转站,R11,R12作为两个分公司,对红色部分做OSPF,BGP,MPLS,MPLS VPN
说明及注意点:

  1. R4~R12先启用ospf协议
  2. R4.R5.R8.R9.R10启用bgp,R10作为中心分别与其他四个路由器建立BGP邻居
  3. R4~R10全部铺设MPLS
  4. R4.R5,R8,R9上做MPLS VPN,R4和R5为instance A,R8为instance B,R9为instanceC,R8和R9需要去往R2(中转站)R3(备份中转),才可以互通
  5. 第四条可以在R2和R3上做汇总

在这里插入图片描述

过程中细节:

  1. stub-router 会使进过该OSPF路由器的一类LSA开销设置为 65535
  2. ipv4-family vpnv4 undo policy vpn-target
    bgp反射器中需要关闭vpn标签策略,不然不接收标签路由
  3. 华为中bgp如果network宣告路由表中ospf的路由会把该路由的cost值同步给 BGP的MED
  4. peer 10.1.118.1 substitute-as 把路由as-path中的邻居as号改为本地as号
  5. peer 10.1.25.2 allow-as-loop 接受携带自己AS号的路由

配置如下:

R4

#
sysname R4
#
ip vpn-instance A
 ipv4-family
  route-distinguisher 100:1
  vpn-target 100:1 export-extcommunity
  vpn-target 100:2 100:3 import-extcommunity
#
mpls lsr-id 10.0.4.4
mpls
#
mpls ldp
#
firewall zone Local
 priority 16
#
interface Ethernet0/0/0
 ip address 10.1.45.2 255.255.255.0
 mpls
 mpls ldp
#
interface Ethernet0/0/1
 ip address 10.1.47.1 255.255.255.0
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/0
 ip binding vpn-instance A
 ip address 10.1.34.2 255.255.255.0
#
interface NULL0
#
interface LoopBack0
 ip address 10.0.4.4 255.255.255.255
#
bgp 100
 peer 10.0.10.10 as-number 100
 peer 10.0.10.10 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.0.10.10 enable
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 10.0.10.10 enable
  peer 10.0.10.10 advertise-community
 #
 ipv4-family vpn-instance A
  peer 10.1.34.1 as-number 1
  peer 10.1.34.1 substitute-as
  peer 10.1.34.1 allow-as-loop
#
ospf 1 router-id 10.0.4.4
 area 0.0.0.0
  network 10.1.45.0 0.0.0.255
  network 10.1.47.0 0.0.0.255
  network 10.0.4.4 0.0.0.0
#

R5

#
sysname R5
#
ip vpn-instance A
 ipv4-family
  route-distinguisher 100:1
  vpn-target 100:1 export-extcommunity
  vpn-target 100:2 100:3 import-extcommunity
#
mpls lsr-id 10.0.5.5
mpls
#
mpls ldp
#
interface Ethernet0/0/0
 ip address 10.1.56.1 255.255.255.0
 mpls
 mpls ldp
#
interface Ethernet0/0/1
 ip address 10.1.45.1 255.255.255.0
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/0
 ip binding vpn-instance A
 ip address 10.1.25.2 255.255.255.0
#
wlan
#
interface NULL0
#
interface LoopBack0
 ip address 10.0.5.5 255.255.255.255
#
bgp 100
 peer 10.0.10.10 as-number 100
 peer 10.0.10.10 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.0.10.10 enable
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 10.0.10.10 enable
  peer 10.0.10.10 advertise-community
 #
 ipv4-family vpn-instance A
  peer 10.1.25.1 as-number 1
  peer 10.1.25.1 substitute-as
  peer 10.1.25.1 allow-as-loop
#
ospf 1 router-id 10.0.5.5
 area 0.0.0.0
  network 10.1.45.0 0.0.0.255
  network 10.1.56.0 0.0.0.255
  network 10.0.5.5 0.0.0.0
#

R6

#
sysname R6
#
mpls lsr-id 10.0.6.6
mpls
#
mpls ldp
#
interface Ethernet0/0/0
 ip address 10.1.68.1 255.255.255.0
 mpls
 mpls ldp
#
interface Ethernet0/0/1
 ip address 10.1.106.1 255.255.255.0
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 10.1.56.2 255.255.255.0
 mpls
 mpls ldp
#
interface NULL0
#
interface LoopBack0
 ip address 10.0.6.6 255.255.255.255
#
ospf 1 router-id 10.0.6.6
 area 0.0.0.0
  network 10.1.106.0 0.0.0.255
  network 10.0.6.6 0.0.0.0
  network 10.1.68.0 0.0.0.255
  network 10.1.56.0 0.0.0.255
#

R7

#
sysname R7
#
mpls lsr-id 10.0.7.7
mpls
#
mpls ldp
#
interface Ethernet0/0/0
 ip address 10.1.107.2 255.255.255.0
 mpls
 mpls ldp
#
interface Ethernet0/0/1
 ip address 10.1.79.1 255.255.255.0
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 10.1.47.2 255.255.255.0
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 10.0.7.7 255.255.255.255
#
ospf 1 router-id 10.0.7.7
 area 0.0.0.0
  network 10.0.7.7 0.0.0.0
  network 10.1.107.0 0.0.0.255
  network 10.1.79.0 0.0.0.255
  network 10.1.47.0 0.0.0.255
#

R8

#
sysname R8
#
ip vpn-instance B
 ipv4-family
  route-distinguisher 100:2
  vpn-target 100:2 export-extcommunity
  vpn-target 100:1 import-extcommunity
#
mpls lsr-id 10.0.8.8
mpls
#
mpls ldp
#
interface Ethernet0/0/0
 ip binding vpn-instance B
 ip address 10.1.118.2 255.255.255.0
#
interface Ethernet0/0/1
 ip address 10.1.89.1 255.255.255.0
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 10.1.68.2 255.255.255.0
 mpls
 mpls ldp
#
interface NULL0
#
interface LoopBack0
 ip address 10.0.8.8 255.255.255.255
#
bgp 100
 peer 10.0.10.10 as-number 100
 peer 10.0.10.10 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.0.10.10 enable
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 10.0.10.10 enable
  peer 10.0.10.10 advertise-community
 #
 ipv4-family vpn-instance B
  peer 10.1.118.1 as-number 1
  peer 10.1.118.1 substitute-as
#
ospf 1 router-id 10.0.8.8
 area 0.0.0.0
  network 10.0.8.8 0.0.0.0
  network 10.1.89.0 0.0.0.255
  network 10.1.68.0 0.0.0.255
#

R9

#
sysname R9
#
ip vpn-instance C
 ipv4-family
  route-distinguisher 100:3
  vpn-target 100:3 export-extcommunity
  vpn-target 100:1 import-extcommunity
#
mpls lsr-id 10.0.9.9
mpls
#
mpls ldp
#
interface Ethernet0/0/0
 ip binding vpn-instance C
 ip address 10.1.129.1 255.255.255.0
#
interface Ethernet0/0/1
 ip address 10.1.89.2 255.255.255.0
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 10.1.79.2 255.255.255.0
 mpls
 mpls ldp
#
interface NULL0
#
interface LoopBack0
 ip address 10.0.9.9 255.255.255.255
#
bgp 100
 peer 10.0.10.10 as-number 100
 peer 10.0.10.10 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.0.10.10 enable
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 10.0.10.10 enable
  peer 10.0.10.10 advertise-community
 #
 ipv4-family vpn-instance C
  peer 10.1.129.2 as-number 1
  peer 10.1.129.2 substitute-as
#
ospf 1 router-id 10.0.9.9
 area 0.0.0.0
  network 10.0.9.9 0.0.0.0
  network 10.1.89.0 0.0.0.255
  network 10.1.79.0 0.0.0.255
#

R10

#
sysname R10
#
mpls lsr-id 10.0.10.10
mpls
#
mpls ldp
#
interface Ethernet0/0/0
 ip address 10.1.106.2 255.255.255.0
 mpls
 mpls ldp
#
interface Ethernet0/0/1
 ip address 10.1.107.1 255.255.255.0
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 10.0.10.10 255.255.255.255
#
bgp 100
 group IBGP internal
 peer IBGP connect-interface LoopBack0
 peer 10.0.4.4 as-number 100
 peer 10.0.4.4 group IBGP
 peer 10.0.5.5 as-number 100
 peer 10.0.5.5 group IBGP
 peer 10.0.8.8 as-number 100
 peer 10.0.8.8 group IBGP
 peer 10.0.9.9 as-number 100
 peer 10.0.9.9 group IBGP
 #
 ipv4-family unicast
  undo synchronization
  peer IBGP enable
  peer IBGP reflect-client
  peer 10.0.4.4 enable
  peer 10.0.4.4 group IBGP
  peer 10.0.5.5 enable
  peer 10.0.5.5 group IBGP
  peer 10.0.8.8 enable
  peer 10.0.8.8 group IBGP
  peer 10.0.9.9 enable
  peer 10.0.9.9 group IBGP
 #
 ipv6-family unicast
  undo synchronization
 #
 ipv4-family vpnv4
  undo policy vpn-target
  peer IBGP enable
  peer IBGP reflect-client
  peer IBGP advertise-community
  peer 10.0.4.4 enable
  peer 10.0.4.4 group IBGP
  peer 10.0.5.5 enable
  peer 10.0.5.5 group IBGP
  peer 10.0.8.8 enable
  peer 10.0.8.8 group IBGP
  peer 10.0.9.9 enable
  peer 10.0.9.9 group IBGP
#
ospf 1 router-id 10.0.10.10
 stub-router
 area 0.0.0.0
  network 10.0.10.10 0.0.0.0
  network 10.1.106.0 0.0.0.255
  network 10.1.107.0 0.0.0.255
#

R11

#
sysname R11
#
interface Ethernet0/0/0
 ip address 10.1.118.1 255.255.255.0
#
interface LoopBack0
 ip address 10.1.4.1 255.255.255.255
#
bgp 1
 peer 10.1.118.2 as-number 100
 #
 ipv4-family unicast
  undo synchronization
  network 10.0.0.0
  network 10.1.4.1 255.255.255.255
  peer 10.1.118.2 enable
#

R12

#
sysname R12
#
interface Ethernet0/0/0
 ip address 10.1.129.2 255.255.255.0
#
interface LoopBack0
 ip address 10.1.5.1 255.255.255.255
#
bgp 1
 peer 10.1.129.1 as-number 100
 #
 ipv4-family unicast
  undo synchronization
  network 10.1.5.1 255.255.255.255
  peer 10.1.129.1 enable
#

方案二:设置一个路由器作为中转站
在R8上建立三个vrf空间分别接收A,B,C的路由,然后和R16分别建立bgp邻居,于是R16拥有去A,B,C的路由
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值