本次練習是參考Cisco網路學院
CCNP1 Building Scalable Internetworks v5.0
Student Lab Manual
我將它轉成Dynamips的設定檔 並寫下自己的實驗紀錄
Dynamips的設定檔:
##################################################
#
# For CCNP1 Building Scalable Internetworks v5.0
# Lab 6_7_1-2,4
#
##################################################
autostart=false
[localhost:7200]
workingdir = /opt/dynamips/dynagen-0.10.1/UTS/CCNP1/Week05/workingconfig/
[[3640]]
# Specify 3640 IOS image on Windows here:
# image = C:\Program Files\Dynamips\images\c3640-jk9o3s-mz.123-14.T7.extracted.bin
# Specify 3640 IOS image on Linux here:
image = /opt/dynamips/images/c3640-jk.bin
ram = 128
disk0 = 0
disk1 = 0
# Choose an idlepc value from the below
idlepc = 0x605ac7b8
mmap = true
ghostios = true
confreg = 0x2102
###########################
#
# Define router instances 1
#
###########################
[[Router R1]]
model = 3640
console = 2001
slot0 = NM-4T
[[Router R2]]
model = 3640
console = 2002
slot0 = NM-4T
S0/0 = R1 S0/0
S0/1 = R3 S0/1
[[Router R3]]
model = 3640
console = 2003
slot0 = NM-4T
這Lab學習目標為
In this lab, you will configure BGP to exchange routing information with two
Internet Service Providers (ISPs).
我的設定是
1. Assign IP Addresses
ISP1:
hostname ISP1
!
no ip domain lookup
!
interface Loopback0
ip address 12.0.1.1 255.255.255.0
!
interface Serial0/0
ip address 10.0.0.1 255.255.255.252
no shutdown
!
line con 0
exec-timeout 0 0
logging synchronous
!
end
SanJose:
hostname SanJose
!
no ip domain lookup
!
interface Loopback0
ip address 192.168.0.1 255.255.255.0
!
interface Loopback1
ip address 192.168.1.1 255.255.255.0
!
interface Serial0/0
ip address 10.0.0.2 255.255.255.252
no shutdown
!
interface Serial0/1
ip address 172.16.0.2 255.255.255.252
no shutdown
!
line con 0
exec-timeout 0 0
logging synchronous
!
end
ISP2:
hostname ISP2
!
no ip domain lookup
!
interface Loopback0
ip address 172.16.1.1 255.255.255.0
!
interface Serial0/1
ip address 172.16.0.1 255.255.255.252
no shutdown
!
line con 0
exec-timeout 0 0
logging synchronous
!
end
2. Configure the ISPs
ISP1:
router bgp 200
network 12.0.1.0 mask 255.255.255.0
neighbor 10.0.0.2 remote-as 100
ISP2:
router bgp 300
network 172.16.1.0 mask 255.255.255.0
neighbor 172.16.0.2 remote-as 100
3. Configure SanJose BGP
SanJose:
router bgp 100
network 192.168.0.0
network 192.168.1.0
neighbor 10.0.0.1 remote-as 200
neighbor 172.16.0.1 remote-as 300
!
show ip route
4. Verify BGP on the SanJose Router
SanJose:
show ip bgp
5. Filter Routes
Configure the SanJose router so that it advertises only
International Travel Agency networks 192.168.0.0 and 192.168.1.0 to both
ISPs.
SanJose:
access-list 1 permit 192.168.0.0 0.0.1.255
!
router bgp 100
neighbor 10.0.0.1 distribute-list 1 out
neighbor 172.16.0.1 distribute-list 1 out
!
clear ip bgp *
6. Configure the Primary and Backup Routes Using Floating Static Routes
SanJose:
ip route 0.0.0.0 0.0.0.0 10.0.0.1 210
!
ip route 0.0.0.0 0.0.0.0 172.16.0.1 220
7. Configure Primary and Backup Routes Using Static Routes
SanJose:
no ip route 0.0.0.0 0.0.0.0 10.0.0.1 210
!
no ip route 0.0.0.0 0.0.0.0 172.16.0.1 220
!
ip default-network ?
ISP1 Configuration:
hostname ISP1
!
no ip domain lookup
!
interface Loopback0
ip address 12.0.1.1 255.255.255.0
!
interface Serial0/0
ip address 10.0.0.1 255.255.255.252
no shutdown
!
router bgp 200
no synchronization
network 12.0.1.0 mask 255.255.255.0
neighbor 10.0.0.2 remote-as 100
!
line con 0
exec-timeout 0 0
logging synchronous
!
end
SanJose Configuration:
hostname SanJose
!
no ip domain lookup
!
interface Loopback0
ip address 192.168.0.1 255.255.255.0
!
interface Loopback1
ip address 192.168.1.1 255.255.255.0
!
interface Serial0/0
ip address 10.0.0.2 255.255.255.252
no shutdown
!
interface Serial0/1
ip address 172.16.0.2 255.255.255.252
no shutdown
!
router bgp 100
no synchronization
network 192.168.0.0
network 192.168.1.0
neighbor 10.0.0.1 remote-as 200
neighbor 10.0.0.1 distribute-list 1 out
neighbor 172.16.0.1 remote-as 300
neighbor 172.16.0.1 distribute-list 1 out
no auto-summary
!
access-list 1 permit 192.168.0.0 0.0.1.255
!
line con 0
exec-timeout 0 0
logging synchronous
!
end
ISP2 Configuration:
hostname ISP2
!
no ip domain lookup
!
interface Loopback0
ip address 172.16.1.1 255.255.255.0
!
interface Serial0/1
ip address 172.16.0.1 255.255.255.252
no shutdown
!
router bgp 300
no synchronization
network 172.16.1.0 mask 255.255.255.0
neighbor 172.16.0.2 remote-as 100
no auto-summary
!
line con 0
exec-timeout 0 0
logging synchronous
!
end
參考資料:
Cisco網路學院 http://www.cisco.com/web/learning/netacad/index.html
CCNP1 Building Scalable Internetworks v5.0
Student Lab Manual
最初發表 / 最後更新: 2008.04.24 / 2018.05.31
0 comments:
張貼留言