BGP引入实验,华为ensp模拟器

一个小作业题,中间三台路由器bgp 100 分支用rip和ospf,最后如有引入时通过前缀列表精确匹配和路由策略调用,都是一些基本配置,考研学生们的基本功扎不扎实,从最最基础的接口配ip,到igp的路由配置,bgp路由配置,前缀列表、路由策略配置,路由引入等

配置如下

R1
 sysname R1
#
interface GigabitEthernet0/0/0
 ip address 10.0.12.1 255.255.255.0 
#
interface LoopBack0
 ip address 10.0.1.1 255.255.255.255 
#
rip 1
 version 2
 network 10.0.0.0

R2
 sysname R2
#
interface GigabitEthernet0/0/0
 ip address 10.0.23.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.0.12.2 255.255.255.0 
#
interface LoopBack0
 ip address 10.0.2.2 255.255.255.255 
#
bgp 100
 router-id 10.0.2.2
 peer 10.0.23.3 as-number 100 
 peer 10.0.34.4 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  network 10.0.2.2 255.255.255.255 
  import-route rip 1 route-policy l
  peer 10.0.23.3 enable
  peer 10.0.23.3 next-hop-local 
  peer 10.0.34.4 enable
  peer 10.0.34.4 next-hop-local 
#
rip 1
 default-route originate
 version 2
 network 10.0.0.0
#
route-policy 1 permit node 10 
 if-match ip-prefix 1 
#
ip ip-prefix 1 index 10 permit 10.0.1.1 32
#
ip route-static 10.0.34.0 255.255.255.0 10.0.23.3


R3
 sysname R3
#
interface GigabitEthernet0/0/0
 ip address 10.0.23.3 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.0.34.3 255.255.255.0 
#
interface LoopBack0
 ip address 10.0.3.3 255.255.255.255 
#
bgp 100
 router-id 10.0.3.3
 peer 10.0.23.2 as-number 100 
 peer 10.0.34.4 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  network 10.0.3.3 255.255.255.255 
  peer 10.0.23.2 enable
  peer 10.0.34.4 enable


R4
 sysname R4
#
interface GigabitEthernet0/0/0
 ip address 10.0.34.4 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.0.45.4 255.255.255.0 
#
interface LoopBack0
 ip address 10.0.4.4 255.255.255.255 
#
bgp 100
 router-id 10.0.4.4
 peer 10.0.23.2 as-number 100 
 peer 10.0.34.3 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  network 10.0.4.4 255.255.255.255 
  import-route ospf 1 route-policy 1
  peer 10.0.23.2 enable
  peer 10.0.23.2 next-hop-local 
  peer 10.0.34.3 enable
  peer 10.0.34.3 next-hop-local 
#
ospf 1 router-id 10.0.4.4 
 default-route-advertise always
 area 0.0.0.0 
  network 10.0.45.0 0.0.0.255 
#
route-policy 1 permit node 10 
 if-match ip-prefix 1 
#
ip ip-prefix 1 index 10 permit 10.0.5.5 32
#
ip route-static 10.0.23.0 255.255.255.0 10.0.34.3


R5
 sysname R5
#
interface GigabitEthernet0/0/0
 ip address 10.0.45.5 255.255.255.0 
#
interface LoopBack0
 ip address 10.0.5.5 255.255.255.255 
#
ospf 1 router-id 10.0.5.5 
 area 0.0.0.0 
  network 10.0.5.5 0.0.0.0 
  network 10.0.45.0 0.0.0.255 



猜你喜欢

转载自blog.csdn.net/weixin_45650628/article/details/134464172