模拟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
--------