2023年全国职业院校技能竞赛网络系统管理数通BGP-MPLS部分解题方法

2023年全国职业院校技能竞赛网络系统管理数通BGP-MPLS部分解题方法_第1张图片

题目

8.R2、S1、S2间部署IBGP,AS号为100;定义R2为路由反射器RR,使用Loopback 0接口建立BGP邻居关系。

9.北京综合服务中心局域网间通过MPLS xxx技术实现各业务安全隔离。R2、S1、S2开启MPLS报文转发及LDP标签转发协议。

10.生产VRF名称为SC,RD值为100:1、RT值自定义;办公VRF名称为BG,RD值为100:2、RT值自定义;管理VRF名称为GL,RD值为100:3、RT值自定义。

11.通过MPLS VPN技术实现同VPN终端间互访,生产与办公不同xxx间禁止互访,管理xxx可与生产及办公xxx互通。北京综合服务中心办公xxx终端用户可访问互联网。

解题思路:

1.按照要求先部署ospf实现R2、S1、S2间的Loopback 0可达

2.创建生产、办公、管理VRF实例,按照要求实现VRF间互访需求

3.部署mpls,接口开启标签功能和mpls功能

解题操作

R2设备

mpls ip   
mpls router ldp
 ldp router-id interface Loopback 0 force

!
ip vrf BG
 rd 100:2
 route-target both 100:2
 route-target import 100:3    //和GL互通
!
ip vrf GL
 rd 100:3
 route-target both 100:3
 route-target import 100:2    //和BG、SC互通
 route-target import 100:1
!
ip vrf SC
 rd 100:1
 route-target both 100:1
 route-target import 100:3    //和GL互通
 
interface GigabitEthernet 0/1
 label-switching
 mpls ip
interface GigabitEthernet 0/2
 label-switching
 mpls ip
 
router ospf 10
 router-id 10.0.0.22
 network 10.0.0.22 0.0.0.0 area 0
 network 10.1.0.0 0.0.0.3 area 0
 network 10.2.0.0 0.0.0.3 area 0

router bgp 100
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 no bgp default route-target filter
 neighbor 10.0.0.1 remote-as 100
 neighbor 10.0.0.1 update-source Loopback 0
 neighbor 10.0.0.2 remote-as 100
 neighbor 10.0.0.2 update-source Loopback 0
 !
 address-family v4 unicast
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 route-reflector-client
  neighbor 10.0.0.1 next-hop-self
  neighbor 10.0.0.1 send-community extended
  neighbor 10.0.0.2 activate
  neighbor 10.0.0.2 route-reflector-client
  neighbor 10.0.0.2 next-hop-self
  neighbor 10.0.0.2 send-community extended

S1设备

mpls ip
mpls router ldp
 ldp router-id interface Loopback 0 force
ip vrf BG
 rd 100:2
 route-target both 100:2
!
ip vrf GL
 rd 100:3
 route-target both 100:3
!
ip vrf SC
 rd 100:1
 route-target both 100:1

interface GigabitEthernet 0/24
 no switchport
 ip address 10.1.0.1 255.255.255.252
 ipv6 address 2001:10:1::1/64
 ipv6 enable
 ip ospf network point-to-point
 ipv6 ospf network point-to-point
 ipv6 ospf 14 area 0
 mpls ip
 !
 label-switching
 
 interface Loopback 11
 ip vrf forwarding SC
 ip address 10.1.4.1 255.255.255.255
!
interface Loopback 12
 ip vrf forwarding BG
 ip address 10.1.4.2 255.255.255.255
!
interface Loopback 13
 ip vrf forwarding GL
 ip address 10.1.4.3 255.255.255.255
interface VLAN 11
 ip vrf forwarding SC
 ip address 10.1.1.1 255.255.255.252
 ip ospf network point-to-point
!
interface VLAN 12
 ip vrf forwarding BG
 ip address 10.1.2.1 255.255.255.252
 ip ospf network point-to-point
!
interface VLAN 13
 ip vrf forwarding GL
 ip address 10.1.3.1 255.255.255.252
 ip ospf network point-to-point
router bgp 100
 bgp router-id 10.0.0.1
 bgp log-neighbor-changes
 no bgp default route-target filter
 bgp graceful-restart restart-time 120
 bgp graceful-restart stalepath-time 360
 bgp graceful-restart
 neighbor 10.0.0.22 remote-as 100
 neighbor 10.0.0.22 update-source Loopback 0
 address-family ipv4
  no neighbor 10.0.0.22 activate
  exit-address-family
 address-family v4 unicast
  neighbor 10.0.0.22 activate
  neighbor 10.0.0.22 send-community both
 address-family ipv4 vrf BG
  maximum-prefix 10000
  redistribute ospf 12 match internal external
  exit-address-family
  !
 address-family ipv4 vrf GL
  maximum-prefix 10000
  redistribute ospf 13 match internal external
  exit-address-family
  !
 address-family ipv4 vrf SC
  maximum-prefix 10000
  redistribute ospf 11 match internal external
  exit-address-family
  
router ospf 10
 router-id 10.0.0.1
 graceful-restart
 area 0
 network 10.0.0.1 0.0.0.0 area 0
 network 10.1.0.1 0.0.0.0 area 0
!
router ospf 11 vrf SC
 router-id 10.1.4.1
 graceful-restart
 redistribute bgp metric-type 1 subnets
 network 10.1.1.0 0.0.0.3 area 0
 network 10.1.4.1 0.0.0.0 area 0
!
router ospf 12 vrf BG
 router-id 10.1.4.2
 graceful-restart
 redistribute bgp metric-type 1 subnets
 network 10.1.2.0 0.0.0.3 area 0
 network 10.1.4.2 0.0.0.0 area 0
 default-information originate always
!
router ospf 13 vrf GL
 router-id 10.1.4.3
 graceful-restart
 redistribute bgp metric-type 1 subnets
 network 10.1.3.0 0.0.0.3 area 0
 network 10.1.4.3 0.0.0.0 area 0

S2设备

mpls ip
mpls router ldp
 ldp router-id interface Loopback 0 force
ip vrf BG
 rd 100:2
 route-target both 100:2
!
ip vrf GL
 rd 100:3
 route-target both 100:3
!
ip vrf SC
 rd 100:1
 route-target both 100:1

interface GigabitEthernet 0/24
 no switchport
 ip address 10.2.0.1 255.255.255.252
 ipv6 address 2001:10:2::1/64
 ipv6 enable
 ip ospf network point-to-point
 ipv6 ospf network point-to-point
 ipv6 ospf 14 area 0
 mpls ip
 !
 label-switching
 interface Loopback 0
 ip address 10.0.0.2 255.255.255.255
!
interface Loopback 11
 ip vrf forwarding SC
 ip address 10.2.4.1 255.255.255.255
!
interface Loopback 12
 ip vrf forwarding BG
 ip address 10.2.4.2 255.255.255.255
!
interface Loopback 13
 ip vrf forwarding GL
 ip address 10.2.4.3 255.255.255.255
interface VLAN 11
 ip vrf forwarding SC
 ip address 10.2.1.1 255.255.255.252
 ip ospf network point-to-point
!
interface VLAN 12
 ip vrf forwarding BG
 ip address 10.2.2.1 255.255.255.252
 ip ospf network point-to-point
!
interface VLAN 13
 ip vrf forwarding GL
 ip address 10.2.3.1 255.255.255.252
 ip ospf network point-to-point
router bgp 100
 bgp log-neighbor-changes
 no bgp default route-target filter
 bgp graceful-restart restart-time 120
 bgp graceful-restart stalepath-time 360
 bgp graceful-restart
 neighbor 10.0.0.22 remote-as 100
 neighbor 10.0.0.22 update-source Loopback 0
 address-family ipv4
  no neighbor 10.0.0.22 activate
  exit-address-family
 address-family v4 unicast
  neighbor 10.0.0.22 activate
  neighbor 10.0.0.22 send-community extended
  exit-address-family
  !
 address-family ipv4 vrf BG
  maximum-prefix 10000
  redistribute ospf 12 match internal external
  exit-address-family
  !
 address-family ipv4 vrf GL
  maximum-prefix 10000
  redistribute ospf 13 match internal external
  exit-address-family
  !
 address-family ipv4 vrf SC
  maximum-prefix 10000
  redistribute ospf 11 match internal external
  exit-address-family
router ospf 10
 router-id 10.0.0.2
 graceful-restart
 area 0
 network 10.0.0.2 0.0.0.0 area 0
 network 10.2.0.1 0.0.0.0 area 0
!
router ospf 11 vrf SC
 router-id 10.2.4.1
 graceful-restart
 redistribute bgp metric-type 1 subnets
 network 10.2.1.0 0.0.0.3 area 0
 network 10.2.4.1 0.0.0.0 area 0
!
router ospf 12 vrf BG
 router-id 10.2.4.2
 graceful-restart
 redistribute bgp metric-type 1 subnets
 network 10.2.2.0 0.0.0.3 area 0
 network 10.2.4.2 0.0.0.0 area 0
!
router ospf 13 vrf GL
 router-id 10.2.4.3
 graceful-restart
 redistribute bgp metric-type 1 subnets
 network 10.2.3.0 0.0.0.3 area 0
 network 10.2.4.3 0.0.0.0 area 0

S3的ospf配置

router ospf 11
 router-id 10.1.4.4
 graceful-restart
 passive-interface VLAN 10
 network 10.1.1.0 0.0.0.3 area 0
 network 10.1.4.4 0.0.0.0 area 0
 network 10.1.10.0 0.0.0.255 area 0
!
router ospf 12
 router-id 10.1.4.5
 graceful-restart
 passive-interface VLAN 20
 network 10.1.2.0 0.0.0.3 area 0
 network 10.1.4.5 0.0.0.0 area 0
 network 10.1.20.0 0.0.0.255 area 0
!
router ospf 13
 router-id 10.1.4.6
 graceful-restart
 passive-interface VLAN 30
 network 10.1.3.0 0.0.0.3 area 0
 network 10.1.4.6 0.0.0.0 area 0
 network 10.1.30.0 0.0.0.255 area 0

S4的ospf配置

router ospf 11
 router-id 10.2.4.4
 graceful-restart
 passive-interface VLAN 10
 network 10.2.1.0 0.0.0.3 area 0
 network 10.2.4.4 0.0.0.0 area 0
 network 10.2.10.0 0.0.0.255 area 0
!
router ospf 12
 router-id 10.2.4.5
 graceful-restart
 passive-interface VLAN 20
 network 10.2.2.0 0.0.0.3 area 0
 network 10.2.4.5 0.0.0.0 area 0
 network 10.2.20.0 0.0.0.255 area 0
!
router ospf 13
 router-id 10.2.4.6
 graceful-restart
 passive-interface VLAN 30
 network 10.2.3.0 0.0.0.3 area 0
 network 10.2.4.6 0.0.0.0 area 0
 network 10.2.30.0 0.0.0.255 area 0

测试,R2查看BG的路由表,已经出现了

2023年全国职业院校技能竞赛网络系统管理数通BGP-MPLS部分解题方法_第2张图片

你可能感兴趣的:(网络)