BGP实施模拟



 模拟3个自治系统:

            1:AS64512,内部运行RIP v2(模拟核心接入HQ-DateCentre)

            2:AS64513,内部运行Eigrp(模拟运营商网络)

            3:AS64514,内部运行OSPF(模拟远程Branch-Office)

 

将相应网络通告到BGP中去,并在64512、64514自治系统内部的EBGP路由器上各自生成默认路由给系统内的IGP路由器或主机使用。

 

配置如下:

------------

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.16.1.1 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 172.19.0.1 255.255.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/1
 ip address 172.20.0.1 255.255.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
router rip
 version 2
 network 172.16.0.0
 network 172.19.0.0
 network 172.20.0.0
 no auto-summary
!
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
webvpn context Default_context
 ssl authenticate verify all
 !
 no inservice
!
!
end

------------

 

---------!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.17.1.1 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 172.19.0.2 255.255.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/1
 ip address 7.0.0.1 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
router rip
 version 2
 network 172.17.0.0
 network 172.19.0.0
 default-information originate
 no auto-summary
!
router bgp 64512
 no synchronization
 bgp log-neighbor-changes
 network 172.16.1.1 mask 255.255.255.255
 network 172.17.1.1 mask 255.255.255.255
 network 172.18.1.1 mask 255.255.255.255
 neighbor 1.1.1.1 remote-as 64513
 neighbor 1.1.1.1 ebgp-multihop 2
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 172.18.1.1 remote-as 64512
 neighbor 172.18.1.1 update-source Loopback0
 neighbor 172.18.1.1 next-hop-self
 no auto-summary
!
ip route 1.1.1.1 255.255.255.255 7.0.0.2
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
webvpn context Default_context
 ssl authenticate verify all
 !
 no inservice
!
!
end
---------

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.18.1.1 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 172.20.0.2 255.255.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/1
 ip address 8.0.0.1 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
router rip
 version 2
 network 172.18.0.0
 network 172.20.0.0
 default-information originate
 no auto-summary
!
router bgp 64512
 no synchronization
 bgp log-neighbor-changes
 network 172.16.1.1 mask 255.255.255.255
 network 172.17.1.1 mask 255.255.255.255
 network 172.18.1.1 mask 255.255.255.255
 neighbor 2.2.2.2 remote-as 64513
 neighbor 2.2.2.2 ebgp-multihop 2
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 172.17.1.1 remote-as 64512
 neighbor 172.17.1.1 update-source Loopback0
 neighbor 172.17.1.1 next-hop-self
 no auto-summary
!
ip route 2.2.2.2 255.255.255.255 8.0.0.2
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
webvpn context Default_context
 ssl authenticate verify all
 !
 no inservice
!
!
end

--------

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 7.0.0.2 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/1
 ip address 4.0.0.1 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/2
 ip address 5.0.0.1 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/3
 ip address 9.0.0.1 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
router eigrp 100
 network 1.0.0.0
 network 4.0.0.0
 network 5.0.0.0
 no auto-summary
!
router bgp 64513
 no synchronization
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 64513
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 next-hop-self
 neighbor 3.3.3.3 remote-as 64513
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 next-hop-self
 neighbor 172.17.1.1 remote-as 64512
 neighbor 172.17.1.1 ebgp-multihop 2
 neighbor 172.17.1.1 update-source Loopback0
 neighbor 192.168.6.1 remote-as 64514
 neighbor 192.168.6.1 ebgp-multihop 2
 neighbor 192.168.6.1 update-source Loopback0
 no auto-summary
!
ip route 172.17.1.1 255.255.255.255 7.0.0.1
ip route 192.168.6.1 255.255.255.255 9.0.0.2
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
webvpn context Default_context
 ssl authenticate verify all
 !
 no inservice
!
!
end

--------

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 8.0.0.2 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/1
 ip address 4.0.0.2 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/2
 ip address 6.0.0.1 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
router eigrp 100
 network 2.0.0.0
 network 4.0.0.0
 network 6.0.0.0
 no auto-summary
!
router bgp 64513
 no synchronization
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 64513
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 next-hop-self
 neighbor 3.3.3.3 remote-as 64513
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 next-hop-self
 neighbor 172.18.1.1 remote-as 64512
 neighbor 172.18.1.1 ebgp-multihop 2
 neighbor 172.18.1.1 update-source Loopback0
 no auto-summary
!
ip route 172.18.1.1 255.255.255.255 8.0.0.1
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
webvpn context Default_context
 ssl authenticate verify all
 !
 no inservice
!
!
end

--------

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R6
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 3.3.3.3 255.0.0.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 6.0.0.2 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/1
 ip address 5.0.0.2 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/2
 ip address 10.0.0.1 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
router eigrp 100
 network 3.0.0.0
 network 5.0.0.0
 network 6.0.0.0
 no auto-summary
!
router bgp 64513
 no synchronization
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 64513
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 next-hop-self
 neighbor 2.2.2.2 remote-as 64513
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 next-hop-self
 neighbor 192.168.6.1 remote-as 64514
 neighbor 192.168.6.1 ebgp-multihop 2
 neighbor 192.168.6.1 update-source Loopback0
 no auto-summary
!
ip route 192.168.6.1 255.255.255.255 10.0.0.2
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
webvpn context Default_context
 ssl authenticate verify all
 !
 no inservice
!
!
end

--------

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R7
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.6.1 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 9.0.0.2 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/1
 ip address 10.0.0.2 255.0.0.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/2
 ip address 192.168.2.1 255.255.255.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/3
 ip address 192.168.1.1 255.255.255.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
router ospf 100
 log-adjacency-changes
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 0
 network 192.168.6.0 0.0.0.255 area 0
 default-information originate
!
router bgp 64514
 no synchronization
 bgp log-neighbor-changes
 network 192.168.4.1 mask 255.255.255.255
 network 192.168.5.1 mask 255.255.255.255
 network 192.168.6.0
 neighbor 1.1.1.1 remote-as 64513
 neighbor 1.1.1.1 ebgp-multihop 2
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 3.3.3.3 remote-as 64513
 neighbor 3.3.3.3 ebgp-multihop 2
 neighbor 3.3.3.3 update-source Loopback0
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 9.0.0.1
ip route 0.0.0.0 0.0.0.0 10.0.0.1
ip route 1.1.1.1 255.255.255.255 9.0.0.1
ip route 3.3.3.3 255.255.255.255 10.0.0.1
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
webvpn context Default_context
 ssl authenticate verify all
 !
 no inservice
!
!
end

--------

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R8
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.4.1 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 192.168.1.2 255.255.255.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/1
 ip address 192.168.3.1 255.255.255.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
router ospf 100
 log-adjacency-changes
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.3.0 0.0.0.255 area 0
 network 192.168.4.0 0.0.0.255 area 0
!
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
webvpn context Default_context
 ssl authenticate verify all
 !
 no inservice
!
!
end

--------

!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R9
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.5.1 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 192.168.2.2 255.255.255.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/1
 ip address 192.168.3.2 255.255.255.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
router ospf 100
 log-adjacency-changes
 network 192.168.2.0 0.0.0.255 area 0
 network 192.168.3.0 0.0.0.255 area 0
 network 192.168.5.0 0.0.0.255 area 0
!
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
!
webvpn context Default_context
 ssl authenticate verify all
 !
 no inservice
!
!
end

--------

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值