顯示具有 CCNP-BSCI 標籤的文章。 顯示所有文章
顯示具有 CCNP-BSCI 標籤的文章。 顯示所有文章

2010年6月20日 星期日

Lab 6-2 Using the AS_PATH Attribute

Topology
image
GNS檔案

SanJose
!
!Step 0: Basic Setting
conf t
hostname SanJose
no ip domain-lookup
end
!
!Step 1: IP Addressing
conf t
int s 0/0
ip add 192.168.1.5 255.255.255.252
no sh
int lo 0
ip add 201.0.0.1 255.255.255.0
no sh
end
!
!Step 2: Configure BGP
conf t
router bgp 100
neighbor 192.168.1.6 remote-as 300
network 201.0.0.0
end

ISP
!
!Step 0: Basic Setting
conf t
hostname ISP
no ip domain-lookup
end
!
!Step 1: IP Addressing
conf t
int s 0/0
ip add 192.168.1.6 255.255.255.252
no sh
int s 0/1
ip add 172.24.1.17 255.255.255.252
no sh
int lo 0
ip add 202.0.0.1 255.255.255.0
no sh
end
!
!Step 2: Configure BGP
conf t
router bgp 300
neighbor 192.168.1.5 remote-as 100
neighbor 172.24.1.18 remote-as 65000
network 202.0.0.0
end
!
!Step 3: Remove the Private AS
conf t
router bgp 300
neighbor 192.168.1.5 remove-private-as
end
!
!Step 4: Use the AS_PATH Attribute to Filter Routes
conf t
!過濾AS-Path字元為 開始100結束
ip as-path access-list 1 deny ^100$
!允許AS-Path字元為 一個字元+任意字元 = i 或 i xxx
ip as-path access-list 1 permit .*
end
!將產生好的as-path acl 套用到往172.24.1.18的更新上(OUT)
conf t
router bgp 300
neighbor 172.24.1.18 filter-list 1 out
end

CustRtr
!
!Step 0: Basic Setting
conf t
hostname CustRtr
no ip domain-lookup
end
!
!Step 1: IP Addressing
conf t
int s 0/1
ip add 172.24.1.18 255.255.255.252
no sh
int lo 0
ip add 203.0.0.1 255.255.255.0
no sh
!
!Step 2: Configure BGP
conf t
router bgp 65000
neighbor 172.24.1.17 remote-as 300
network 203.0.0.0
end

show指令
show ip route
show ip bgp
show ip bgp neighbor
show ip bgp regexp ^100$

clear指令
clear ip bgp *
clear ip bgp 192.168.1.5 soft out
clear ip bgp 172.24.1.18 soft out

參考文件
Removing Private Autonomous System Numbers in BGP

Using Regular Expressions in BGP

Lab 6-1 Configuring BGP with Default Routing

Topology

image

GNS檔案

SanJose
!
!Step 0: Basic Setting
conf t
hostname SanJose
no ip domain-lookup
end
!
!Step 1: Assign IP Addresses
conf t
int s 0/0
ip add 10.0.0.2 255.255.255.252
no sh
int s 0/1
ip add 172.16.0.2 255.255.255.252
no sh
int lo0
ip add 192.168.0.1 255.255.255.0
no sh
int lo1
ip add 192.168.1.1 255.255.255.0
no sh
end
!
!Step 3: Configure SanJose BGP
conf t
router bgp 100
neighbor 10.0.0.1 remote-as 200
neighbor 172.16.0.1 remote-as 300
network 192.168.0.0
network 192.168.1.0
end
!
!Step 4: Verify BGP on the SanJose Router
show ip bgp
!
!針對ISP1的lo0介面做shutdown
show ip bgp
show ip bgp neighbor
!
!Step 5: Filter Routes
conf t
access-list 192.168.0.0 0.0.1.255
end
!
conf t
router bgp 100
neighbor 10.0.0.1 distribute-list 1 out
neighbor 172.16.0.1 distribute-list 1 out
end
!
!Hardware Update BGP Session Out
clear ip bgp *
!
!Soft Update BGP Session Out
clear ip bgp 100 soft out
!
!Step 6: Configure the Primary and Backup Routes Using Floating Static Routes
conf t
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
end
!啟用extend ping (TargetIP 210.210.210.1, SourceIP 192.168.1.1)
ping
!
!Step 7: Configure Primary and Backup Routes Using Static Routes
conf t
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
end
!
!使用ip default-network指令來送出Default Gateway(Primary)
conf t
ip default-network 210.210.210.0
end
!設定Backup default route至172.16.0.1(Secondary)
conf t
ip route 0.0.0.0 0.0.0.0 172.16.0.1 220
end

ISP1
!
!Step 0: Basic Setting
conf t
hostname ISP1
no ip domain-lookup
end
!
!Step 1: Assign IP Addresses
conf t
int s 0/0
ip add 10.0.0.1 255.255.255.252
no sh
int lo0
ip add 12.0.1.1 255.255.255.0
no sh
end
!
!Step 2: Configure the ISPs
conf t
router bgp 200
neighbor 10.0.0.2 remote-as 100
network 12.0.1.0 mask 255.255.255.0
end
!
!Step 6: Configure the Primary and Backup Routes Using Floating Static Routes
conf t
int lo 100
ip add 210.210.210.1 255.255.255.0
no sh
end
Step 7: Configure Primary and Backup Routes Using Static Routes
conf t
router bgp 200
network 210.210.210.0
end
clear ip bgp 10.0.0.2

ISP2
!
!Step 0: Basic Setting
conf t
hostname ISP2
no ip domain-lookup
end
!
!Step 1: Assign IP Addresses
conf t
int s 0/1
ip add 172.16.0.1 255.255.255.252
no sh
int lo0
ip add 172.16.1.1 255.255.255.0
no sh
end
!
!Step 2: Configure the ISPs
conf t
router bgp 300
neighbor 172.16.0.2 remote-as 100
network 172.16.1.0 mask 255.255.255.0
end

show指令
show ip int brief
show ip route
show ip route bgp
show ip bgp

clear指令
clear ip bgp *
clear ip bgp 10.0.0.1 soft out
clear ip bgp 172.16.0.1 soft out

參考文件
Sample Configuration for BGP with Two Different Service Providers (Multihoming)

BGP Soft Reset Enhancement

2010年5月29日 星期六

Lab 3-1 Single-Area OSPF Link Costs and Interface Priorities

Topology
image
GNS檔案

R1
!
!Step 0: Basic Setting
conf t
hostname R1
no ip domain-lookup
end
!
!Step 1: Addressing
conf t
int lo 1
description Engineering Department
ip add 10.1.1.1 255.255.255.0
no sh
int fa 0/0
ip add 10.1.200.1 255.255.255.0
no sh
int s 0/0
ip add 10.1.100.1 255.255.255.0
no sh
end
!
!宣告正確的OSPF Network Type來讓Loopback介面送出正確的prefix
!conf t
int lo 1
ip ospf network point-to-point
end
!
!Step 2: Adding Physical Interfaces to OSPF
conf t
router ospf 1
network 10.1.100.0 0.0.0.255 area 0
network 10.1.200.0 0.0.0.255 area 0
!
!Step 4: Adding Loopback Interfaces to OSPF
conf t
router ospf 1
network 10.1.1.0 0.0.0.255 area 0
end
!
!Step 5: Modifying Link Costs in OSPF
conf t
int fa 0/0
ip ospf cost 50
end
!
!Step 6: Modifying Interface Priorities
conf t
int fa 0/0
ip ospf priority 10
end
!
!Step 3: OSPF show Commands
show ip protocols
show ip route
show ip ospf neighbor
show ip ospf interface fa 0/0
show ip ospf database

R2
!
!Step 0: Basic Setting
conf t
hostname R2
no ip domain-lookup
end
!
!Step 1: Addressing
conf t
int lo 2
description Marketing Department
ip add 10.1.2.1 255.255.255.0
no sh
int fa 0/0
ip add 10.1.200.2 255.255.255.0
no sh
int s 0/0
ip add 10.1.100.2 255.255.255.0
no sh
end
!
!宣告正確的OSPF Network Type來讓Loopback介面送出正確的prefix
!conf t
int lo 2
ip ospf network point-to-point
end
!
!Step 2: Adding Physical Interfaces to OSPF
conf t
router ospf 1
network 10.1.100.0 0.0.0.255 area 0
network 10.1.200.0 0.0.0.255 area 0
!
!Step 4: Adding Loopback Interfaces to OSPF
conf t
router ospf 1
network 10.1.2.0 0.0.0.255 area 0
end
!
!Step 5: Modifying Link Costs in OSPF
conf t
int fa 0/0
ip ospf cost 50
end
!Step 6: Modifying Interface Priorities
conf t
int fa 0/0
ip ospf priority 5
end

R3
!
!Step 0: Basic Setting
conf t
hostname R3
no ip domain-lookup
end
!
!Step 1: Addressing
conf t
int lo 3
description Accounting Department
ip add 10.1.3.1 255.255.255.0
no sh
int fa 0/0
ip add 10.1.200.3 255.255.255.0
no sh
end
!
!宣告正確的OSPF Network Type來讓Loopback介面送出正確的prefix
!conf t
int lo 3
ip ospf network point-to-point
end
!
!Step 2: Adding Physical Interfaces to OSPF
conf t
router ospf 1
network 10.1.200.0 0.0.0.255 area 0
!
!Step 4: Adding Loopback Interfaces to OSPF
conf t
router ospf 1
network 10.1.3.0 0.0.0.255 area 0
end
!
!Step 5: Modifying Link Costs in OSPF
conf t
int fa 0/0
ip ospf cost 50
end


OSPF Link Type

介面類型 Cost值
Asynchronous 10000
X25 5208
56Kbps Serial Link 1785
64Kbps Serial Link 1562
T1 1.544Mbps Serial Link 64
E1 2.048Mbps Serial Link 48
4Mbps Token Ring 25
Ethernet 10
16Mbps Token Ring 6
FDDI 1
ATM 1


show指令
show ip route
show ip protocol
show ip ospf
show ip ospf database
show ip ospf interface (介面 代號)
show ip ospf neighbor
show ip ospf neighbor detail

debug指令
debug ip ospf adj

參考文件
OSPF Design Guide

Lab 5-5 Configuring the Cisco IOS DHCP Server

Topology
image
GNS檔案

R1
!
!Step 0: Basic Setting
conf t
hostname R1
no ip domain-lookup
end
!
!Step 1: Assign IP Addresses
conf t
int s 0/0
ip add 172.16.12.1 255.255.255.0
bandwidth 64
no sh
!
int lo 1
ip add 172.16.1.1 255.255.255.0
no sh
end
!
!Step 2: Configure EIGRP
conf t
router eigrp 1
no auto-summary
network 172.16.0.0
end
!
!Step 6: Configure the IP Helper Address
conf t
int lo 1
ip helper-address 172.16.2.1
!
!備註:預設啟用DHCP Relay後,若收到下列UDP廣播時會自動將該封包轉送至ip helper-address
!TFTP UDP 69
!DNS UDP 53
!Time Service UDP 37
!NetBios Name Server UDP 137
!NetBios Datagram Server UDP 138
!Boot Protocol UDP 67,68
!TACACS Service UDP 49
!IEN-116 Name Service UDP 42
!
!手動增加其他特殊的UDP廣播封包(以UDP 50000為例)
conf t
ip forward-protocol udp 50000
end

R2
!
!Step 0: Basic Setting
conf t
hostname R2
no ip domain-lookup
end
!
!Step 1: Assign IP Addresses
!設定介面IP
conf t
int s 0/0
ip add 172.16.12.2 255.255.255.0
bandwidth 64
no sh
!
int lo 2
ip add 172.16.2.1 255.255.255.0
no sh
!
int fa 0/0
ip add 172.16.23.2 255.255.255.0
no sh
end
!
!Step 2: Configure EIGRP
conf t
router eigrp 1
no auto-summary
network 172.16.0.0
end
!
!Step 3: Configure a DHCP Pool
conf t
!設備被排除配發的DHCP範圍
ip dhcp excluded-address 172.16.23.1 172.16.23.100
!設定DHCP派發的領域資訊
ip dhcp pool VLAN1-POOL
network 172.16.23.0 255.255.255.0
default-router 172.16.23.2
domain-name Cisco.com
!設定租期
lease 1 5 36
!
!Step 5: Verify DHCP Configuration on Server
show ip dhcp binding
show ip dhcp pool
show ip dhcp server statistics
!
!Step 6: DHCPRELEASE and DHCPRENEW
debug dhcp detail

R3
!
!Step 0: Basic Setting
conf t
hostname R3
no ip domain-lookup
end
!
!Step 3: Configure a DHCP Pool
conf t
no ip routing
int fa 0/0
no ip address
ip address dhcp
no sh
end
!
!Step 4: Verify DHCP Lease on Client
show ip int brief
show ip route 
!
!Step 6: DHCPRELEASE and DHCPRENEW
conf t
int fa 0/0
sh
no sh
release dhcp int fa 0/0
renew dhcp int fa 0/0

show指令
show ip int brief
show ip route
show ip dhcp binding
show ip dhcp pool
show ip dhcp server statistics
show ip helper-address

debug指令
debug ip dhcp server events
debug ip dhcp server packets
debug ip packet detail

參考文件
Understanding and Troubleshooting DHCP in Catalyst Switch or Enterprise Networks

Configuring DHCP

2010年5月28日 星期五

Lab 5-4 Manipulating Administrative Distances

Topology
image 
GNS檔案

R1
!
!Step 0: Basic Setting
conf t
hostname R1
no ip domain-lookup
end
!
!Step 1: Configure Addressing
conf t
int lo 1
ip add 172.16.1.1 255.255.255.0
no sh
int lo 101
ip add 192.168.101.1 255.255.255.0
no sh
int fa 0/0
ip add 172.16.12.1 255.255.255.0
no sh
int s 0/0
ip add 172.16.13.1 255.255.255.0
no sh
end
!
!設定Serial介面的頻寬
conf t
int s 0/0
bandwidth 64
end
!
!Step 2: Configure RIP
conf t
router rip
version 2
no auto-summary
network 172.16.0.0
network 192.168.101.0
end
!
!Step 3: Configure OSPF
conf t
int lo 1
ip ospf network point-to-point
int lo 101
ip ospf network point-to-point
end
conf t
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
network 192.168.101.0 0.0.0.255 area 0
end
!
!Step 4: Modify a Routing Protocol’s Distance
!修改RIP的Distance值(120 –> 100)
conf t
router rip
distance 100
end
!
!Step 5: Modify Distance Based on Route Source
!針對OSPF路由中的特定網段(192.168.100-104.x)給予不同的Distance值(110 -> 85)(Route Proccess方式)
conf t
router ospf 1
distance 85 192.168.100.0 0.0.3.255
end
!
!Step 6: Modify Distance Based on an Access List
!針對RIP路由中的特定網段(172.16.x.x)給予不同的Distance值(110 -> 65)(ACL方式)
conf t
access-list 1 permit 172.16.0.0 0.0.255.255
router rip
distance 65 0.0.0.0 255.255.255.255 1
end

R2
!
!Step 0: Basic Setting
conf t
hostname R2
no ip domain-lookup
end
!
!Step 1: Configure Addressing
conf t
int lo 1
ip add 172.16.2.1 255.255.255.0
no sh
int lo 101
ip add 192.168.102.1 255.255.255.0
no sh
int fa 0/0
ip add 172.16.12.2 255.255.255.0
no sh
int fa 0/1
ip add 172.16.23.2 255.255.255.0
no sh
end
!
!Step 2: Configure RIP
conf t
router rip
version 2
no auto-summary
network 172.16.0.0
network 192.168.102.0
end
!
!Step 3: Configure OSPF
conf t
int lo 2
ip ospf network point-to-point
int lo 102
ip ospf network point-to-point
end
conf t
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
network 192.168.102.0 0.0.0.255 area 0
end
!
!Step 4: Modify a Routing Protocol’s Distance
!修改RIP的Distance值(120 –> 100)
conf t
router rip
distance 100
end
!
!Step 5: Modify Distance Based on Route Source
!針對OSPF路由中的特定網段(192.168.100-104.x)給予不同的Distance值(110 -> 85)(Route Proccess方式)
conf t
router ospf 1
distance 85 192.168.100.0 0.0.3.255
end
!
!Step 6: Modify Distance Based on an Access List
!針對RIP路由中的特定網段(172.16.x.x)給予不同的Distance值(110 -> 65)(ACL方式)
conf t
access-list 1 permit 172.16.0.0 0.0.255.255
router rip
distance 65 0.0.0.0 255.255.255.255 1
end

R3
!
!Step 0: Basic Setting
conf t
hostname R3
no ip domain-lookup
end
!
!Step 1: Configure Addressing
conf t
int lo 3
ip add 172.16.3.1 255.255.255.0
no sh
int lo 103
ip add 192.168.103.1 255.255.255.0
no sh
int s 0/0
ip add 172.16.13.3 255.255.255.0
no sh
end
!
!設定Serial介面的頻寬
conf t
int s 0/0
bandwidth 64
end
!
!Step 2: Configure RIP
conf t
router rip
version 2
no auto-summary
network 172.16.0.0
network 192.168.103.0
end
!
!Step 3: Configure OSPF
conf t
int lo 3
ip ospf network point-to-point
int lo 103
ip ospf network point-to-point
end
conf t
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
network 192.168.103.0 0.0.0.255 area 0
end
!
!Step 4: Modify a Routing Protocol’s Distance
!修改RIP的Distance值(120 –> 100)
conf t
router rip
distance 100
end
!
!Step 5: Modify Distance Based on Route Source
!針對OSPF路由中的特定網段(192.168.100-104.x)給予不同的Distance值(110 -> 85)(Route Proccess方式)
conf t
router ospf 1
distance 85 192.168.100.0 0.0.3.255
end
!
!Step 6: Modify Distance Based on an Access List
!針對RIP路由中的特定網段(172.16.x.x)給予不同的Distance值(110 -> 65)(ACL方式)
conf t
access-list 1 permit 172.16.0.0 0.0.255.255
router rip
distance 65 0.0.0.0 255.255.255.255 1
end

SW
!
!基本設定
conf t
hostname SW
no ip domain-lookup
end
!
!設定介面IP
conf t
int range fa 1/1 - 15
speed 100
end
!
!設定VLAN資訊給介面
conf t
int range fa 1/1 - 2
switchport mode access
switchport access vlan 13
int range fa 1/3 - 4
switchport mode access
switchport access vlan 23
end

show指令
show ip int brief
show ip route
show ip protocol
show ip ospf neighbor
clear ip ospf proccess (會讓設備重新競選路由,請小心使用)

參考文件

2010年5月27日 星期四

Lab 5-2 Redistribution Between EIGRP and OSPF

Topology
image
GNS檔案

R1
!
!Step 0: Basic Setting
conf terminal
hostname R1
no ip domain-lookup
end
!
!Step 1: Additional Addressing
conf terminal
int s 0/0
ip address 172.16.12.1 255.255.255.0
no shutdown
int loopback 0
ip address 172.16.1.1 255.255.255.0
no shutdown
int loopback 48
ip address 192.168.48.1 255.255.255.0
no shutdown
int loopback 49
ip address 192.168.49.1 255.255.255.0
no shutdown
int loopback 50
ip address 192.168.50.1 255.255.255.0
no shutdown
int loopback 51
ip address 192.168.51.1 255.255.255.0
no shutdown
int loopback 70
ip address 192.168.70.1 255.255.255.0
no shutdown
end
!
!設定EIGRP介面的Bandwidth(64K)
conf t
int s 0/0
bandwidth 64
end
!
!Step 2: Configuring EIGRP
conf t
router eigrp 1
no auto-summary
network 172.16.0.0
network 192.168.1.0 0.0.255.255
end
!
!Step 3: Create Passive Interfaces in EIGRP
!針對末端介接非Router的介面關閉路由資訊(EIGRP)交換
conf t
router eigrp 1
passive-interface default
no passive-interface s 0/0
end
!
!設定EIGRP手動摘要
conf t
int s 0/0
ip summary-address eigrp 1 192.168.48.0 255.255.254.0
end
!
!Step 10: Modifying EIGRP Distances
!調整EIGRP Distance值(原始值internal 90,external 170)
conf t
router eigrp 1
distance eigrp 95 165
end

R2
!
!Step 0: Basic Setting
conf terminal
hostname R2
no ip domain-lookup
end
!
!Step 1: Additional Addressing
conf terminal
int s 0/0
ip address 172.16.12.2 255.255.255.0
no shutdown
int s 0/1
ip address 172.16.23.2 255.255.255.0
no shutdown
int loopback 0
ip address 172.16.2.1 255.255.255.0
no shutdown
int loopback 100
ip address 172.16.100.1 255.255.255.0
no shutdown
end
!
!設定EIGRP介面的Bandwidth(64K)
conf t
int s 0/0
bandwidth 64
end
!
!Step 2: Configuring EIGRP
conf t
router eigrp 1
no auto-summary
network 172.16.0.0
end
!
!Step 3: Create Passive Interfaces in EIGRP
!針對末端介接非Router的介面關閉路由資訊(EIGRP)交換
conf t
router eigrp 1
passive-interface default
no passive-interface s 0/0
end
!
!Step 5: Additional OSPF Configuration
conf t
router ospf 1
network 172.16.23.0 0.0.0.255 area 0
network 172.16.100.0 0.0.0.255 area 10
end
!
!設定OSPF network type(預設OSPF在Loopback介面上會送出/32的prefix,當宣告network type P2P後將會顯示正確的prefix)
conf t
int lo 0
ip ospf network point-to-point
int lo 100
ip ospf network point-to-point
end
!
!Step 7: Mutually Redistribute Between OSPF and EIGRP
!redistributing EIGRP & Connect into OSPF(單向)
conf t
router ospf 1
redistribute eigrp 1 subnets
redistribute connected subnets
end
!
!redistributing OSPF into EIGRP(雙向)
conf t
router eigrp 1
redistribute ospf 1 metric 10000 100 255 1 1500
default-metric 10000 100 255 1 1500
redistribute ospf 1
end
!
!Step 8: Filter Redistribution with Route Maps
!透過route-map來過濾特定路由資訊(以過濾192.168.25.0/24,192.168.30.0/24為例)
conf t
!設定要被過濾的路由內容
access-list 1 permit 192.168.25.0
access-list 1 permit 192.168.30.0
!建立route-map規則
route-map SELECTED-DENY deny 10
match ip address 1
route-map SELECTED-DENY permit 20
!將規則套用到redistribute內容內
router eigrp 1
redistribute ospf 1 route-map SELECTED-DENY metric 64 100 255 1 1500
redistribute ospf 1 route-map SELECTED-DENY

R3
!
!Step 0: Basic Setting
conf terminal
hostname R3
no ip domain-lookup
end
!
!Step 1: Additional Addressing
conf terminal
int s 0/1
ip address 172.16.23.3 255.255.255.0
no shutdown
int loopback 0
ip address 172.16.3.1 255.255.255.0
no shutdown
int loopback 20
ip address 192.168.20.1 255.255.255.0
no shutdown
int loopback 25
ip address 192.168.25.1 255.255.255.0
no shutdown
int loopback 30
ip address 192.168.30.1 255.255.255.0
no shutdown
int loopback 35
ip address 192.168.35.1 255.255.255.0
no shutdown
int loopback 40
ip address 192.168.40.1 255.255.255.0
no shutdown
int loopback 8
ip address 192.168.8.1 255.255.255.0
no shutdown
int loopback 9
ip address 192.168.9.1 255.255.255.0
no shutdown
int loopback 10
ip address 192.168.10.1 255.255.255.0
no shutdown
int loopback 11
ip address 192.168.11.1 255.255.255.0
no shutdown
end
!
!Step 5: Additional OSPF Configuration
conf t
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
network 192.168.0.0 0.0.255.255 area 0
network 192.168.8.0 0.0.3.255 area 20
end
!
!針對末端介接非Router的介面關閉路由資訊(OSPF)交換
conf t
router ospf 1
passive-interface default
no passive-interface s 0/1
end
!
!設定OSPF network type(預設OSPF在Loopback介面上會送出/32的prefix,當宣告正確的network type後便會顯示正確的prefix)
conf t
int lo 0
ip ospf network point-to-point
int lo 8
ip ospf network point-to-point
int lo 9
ip ospf network point-to-point
int lo 10
ip ospf network point-to-point
int lo 11
ip ospf network point-to-point
int lo 25
ip ospf network point-to-point
int lo 30
ip ospf network point-to-point
int lo 35
ip ospf network point-to-point
int lo 40
ip ospf network point-to-point
end
!
!Step 6: Summarize OSPF Areas at the ABR
!設定OSPF ABR手動摘要
conf t
router ospf 1
area 20 range 192.168.8.0 255.255.252.0
end
!
!Step 9: Summarize External Routes into OSPF at the ASBR
!設定OSPF ASBR手動摘要
conf t
router ospf 1
summary-address 192.168.48.0 255.255.252.0
end
!
!Step 11: Modifying OSPF Distances
!調整OSPF Distance值(原始值都是110)
conf t
router ospf 1
distance ospf intra-area 105 inter-area 115 external 175
end

debug指令
debug ip packet
debug ip ospf adj

show指令
show ip eigrp neighbors
show ip route eigrp
show ip eigrp interface
show ip protocol
show ip route ospf
show ip eigrp topology
show ip ospf database

參考文件
Enhanced Interior Gateway Routing Protocol

OSPF Design Guide

Understanding Policy Routing

What Is Administrative Distance

2010年5月26日 星期三

Lab 5-1 Redistribution Between RIP and OSPF

Topology

image

GNS檔案

R1
!
!Step 0: Basic Setting 
conf terminal
hostname R1
no ip domain-lookup
end
!
!Step 1: Assign Addresses
conf terminal
int s 0/0
ip address 172.16.12.1 255.255.255.0
no shutdown
int loopback 0
ip address    172.16.1.1 255.255.255.0
no shutdown
int loopback 48
ip address 192.168.48.1 255.255.255.0
no shutdown
int loopback 49
ip address 192.168.49.1 255.255.255.0
no shutdown
int loopback 50
ip address 192.168.50.1 255.255.255.0
no shutdown
int loopback 51
ip address 192.168.51.1 255.255.255.0
no shutdown
int loopback 70
ip address 192.168.70.1 255.255.255.0
no shutdown
end
!
!Step 2: Configure RIPv2
conf terminal
router rip
version 2
no auto-summary
network 172.16.0.0
network 192.168.48.0
network 192.168.49.0
network 192.168.50.0
network 192.168.51.0
network 192.168.70.0
end
!
!針對末端介接非Router的介面關閉路由資訊交換
conf terminal
router rip
passive-interface loopback 0
passive-interface loopback 48
passive-interface loopback 49
passive-interface loopback 50
passive-interface loopback 51
passive-interface loopback 70
end
!
!Step 4: Summarize a Supernet with RIP
!方法一[無效],當輸入指令ip summary-address rip 192.168.48.0 255.255.252.0
!會出現錯誤訊息Summary mask must be greater or equal to major net
!方法二,設定RIP手動摘要(RIP無法使用summary-address的方式,需要透過redistribute static的方式才行)
conf terminal
ip route 192.168.48.0 255.255.252.0 null0
router rip
redistribute static
end
!
!Step 5: Suppress Routes Using Prefix Lists
!設定distribute lists來過濾送出的路由資訊
conf terminal
ip prefix-list RIP-OUT permit 192.168.48.0/22
ip prefix-list RIP-OUT deny 192.168.48.0/22 le 24
ip prefix-list RIP-OUT permit 0.0.0.0/0 le 32
router rip
distribute-list prefix RIP-OUT out serial 0/0
end

R2
!
!Step 0: Basic Setting 
conf terminal
hostname R2
no ip domain-lookup
end
!
!Step 1: Assign Addresses
conf terminal
int s 0/0
ip address 172.16.12.2 255.255.255.0
no shutdown
int s 0/1
ip address 172.16.23.2 255.255.255.0
no shutdown
int loopback 0
ip address 172.16.2.1 255.255.255.0
no shutdown
end
!
!Step 2: Configure RIPv2
conf terminal
router rip
version 2
no auto-summary
network 172.16.0.0
!
!Step 3: Configure Passive Interfaces in RIP
conf t
router rip
passive-interface loopback 0
end
!
!Step 6: Configure OSPF
conf t
router ospf 1
network 172.16.23.0 0.0.0.255 area 0
end
!
!Step 8: Allow One-way Redistribution
conf terminal
router rip
redistribute ospf 1 metric 4
end
!
!Step 9: Redistribute Between Two Routing Protocol
!設定Redistributing OSPF(雙向,採用External Type2)
router ospf 1
redistribute rip subnet

!
!強制送出OSPF Default Route給鄰居(若設備本身無預設路由時,需要使用always指令方能送出預設路由給鄰居)
conf terminal
router ospf 1
default-information originate always
end
!
!Step 10: Set a Default Seed Metric
conf t
router ospf 1
default-metric 10000
end
!
!Step 11: Change the OSPF External Network Type!設定Redistributing OSPF(雙向,採用External Type1)
router ospf 1
redistribute rip subnet metric-type 1

end

R3
!
!Step 0: Basic Setting 
conf terminal
hostname R3
no ip domain-lookup
end
!
!Step 1: Assign Addresses
conf terminal
int s 0/1
ip address 172.16.23.3 255.255.255.0
no shutdown
int loopback 0
ip address    172.16.3.1 255.255.255.0
no shutdown
int loopback 25
ip address 192.168.25.1 255.255.255.0
no shutdown
int loopback 30
ip address 192.168.30.1 255.255.255.0
no shutdown
int loopback 35
ip address 192.168.35.1 255.255.255.0
no shutdown
int loopback 40
ip address 192.168.40.1 255.255.255.0
no shutdown
end
!
!Step 6: Configure OSPF
conf terminal
router ospf 1
network 172.16.23.0 0.0.0.255 area 0
network 172.16.1.0 0.0.0.255 area 0
network 192.168.25.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0
network 192.168.35.0 0.0.0.255 area 0
network 192.168.40.0 0.0.0.255 area 0
!
!Step 7: Configure Passive Interfaces in OSPF
!針對末端介接非Router的介面關閉路由資訊交換(採用反向遮罩的方式)
passive-interface default
no passive-interface s 0/0
end

show指令
show ip route
show ip protocols
show ip route rip
show ip rip database
show ip route ospf
show ip ospf neighbor
show ip ospf database
show ip prefix-list

參考文件
Redistributing Routing Protocols

How Does the Passive Interface Feature Work in EIGRP

Filtering Routing Updates on Distance Vector IP Routing Protocols

How OSPF Injects a Default Route into a Normal Area

2010年5月22日 星期六

Lab 2-4ab EIGRP Frame Relay Hub and Spoke: Router Used As Frame Switch

Topology

image 

GNS檔案

FRSW
!
!Step 0: Basic Setting
conf
hostname FRS
no ip domain-lookup
!
!Step 2: Configuring the Frame Relay Switch
!啟用Frame-Realy Switch功能
frame-relay switching
!
!設定HQ to East Frame-Rleay route
!設定HQ to West Frame-Rleay route
interface Serial 1/1
description FR to HQ
no ip address
encapsulation frame-relay
clock rate 128000
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 102 interface Serial 1/2 201
frame-relay route 103 interface Serial 1/3 301
no shutdown
!
!設定East to HQ Frame-Rleay route
interface Serial 1/2
description FR to East
no ip address
encapsulation frame-relay
clock rate 64000
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 201 interface Serial 1/1 102
no shutdown
!
!設定West to HQ Frame-Rleay route
interface Serial 1/3
description FR to West
no ip address
encapsulation frame-relay
clock rate 64000
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 301 interface Serial 1/1 103
no shutdown 

HQ 
!
!Step 0: Basic Setting
conf terminal
hostname HQ
no ip domain-lookup
!
!Step 1: Addressing
interface Loopback1
ip address 10.1.1.1 255.255.224.0
interface Loopback33
ip address 10.1.33.1 255.255.224.0
interface Loopback65
ip address 10.1.65.1 255.255.224.0
interface Loopback97
ip address 10.1.97.1 255.255.224.0
interface Loopback129
ip address 10.1.129.1 255.255.224.0
interface Loopback161
ip address 10.1.161.1 255.255.224.0
!
!Step 3: Configuring the Frame Relay Endpoints
!設定介面IP/Frame-Relay Map
int s 0/0 
ip add 172.16.124.1 255.255.255.248 
encapsulation frame-relay ietf
!
!關閉dlci自動識別(需手動指令frame-relay map) 
no frame-relay inverse-arp
!
!Broadcast環境(自動識別鄰居)
frame-relay map ip 172.16.124.1 102 broadcast
frame-relay map ip 172.16.124.2 102 broadcast
frame-relay map ip 172.16.124.3 103 broadcast
!
!NonBroadcast環境(需手動指定鄰居)
frame-relay map ip 172.16.124.1 102
frame-relay map ip 172.16.124.2 102
frame-relay map ip 172.16.124.3 103

!
!Step 4: Setting Interface-Level Bandwidth
conf t
int s 0/0
bandwidth 128
end
!
!設定Frame-Relay介面上EIGRP最大允許使用頻寬百分比(40%)
int s 0/0
ip bandwidth-percent eigrp 1 40
end
!
!Step 5: Configuring EIGRP
router eigrp 1
network 172.16.0.0
network 10.0.0.0
no auto-summary
!
!關閉split-horizon機制讓East與West可以學到對方的路由
no ip split-horizon eigrp 1
end
!
!Step 6: Using Non-broadcast EIGRP Mode
!NonBroadcast環境下需手動指定eigrp鄰居
neighbor 172.16.124.2 Serial0/0
neighbor 172.16.124.3 Serial0/0

end
!
!Step 7: Implementing EIGRP Manual Summarization
!手動摘要eigrp要送出的路由資訊
ip summary-address eigrp 1 10.1.0.0 255.255.0.0 5
end


EAST
!
!Step 0: Basic Setting
conf terminal
hostname East
no ip domain-lookup
!
!Step 1: Addressing
interface Loopback1
ip address 10.2.1.1 255.255.224.0
interface Loopback33
ip address 10.2.33.1 255.255.224.0
interface Loopback65
ip address 10.2.65.1 255.255.224.0
interface Loopback97
ip address 10.2.97.1 255.255.224.0
interface Loopback129
ip address 10.2.129.1 255.255.224.0
interface Loopback161
ip address 10.2.161.1 255.255.224.0
!
!Step 3: Configuring the Frame Relay Endpoints
!設定介面IP/Frame-Relay Map
int s 0/0
ip add 172.16.124.2 255.255.255.248
encapsulation frame-relay ietf
!
!關閉dlci自動識別(需手動指令frame-relay map)  
no frame-relay inverse-arp
!
!Broadcast環境(自動識別鄰居)
frame-relay map ip 172.16.124.1 201 broadcast
frame-relay map ip 172.16.124.2 201 broadcast
frame-relay map ip 172.16.124.3 201 broadcast
!
!NonBroadcast環境(需手動指定鄰居)
frame-relay map ip 172.16.124.1 201
frame-relay map ip 172.16.124.2 201
frame-relay map ip 172.16.124.3 201

!
!Step 4: Setting Interface-Level Bandwidth
conf t
int s 0/0
bandwidth 128
end
!
!設定Frame-Relay介面上EIGRP最大允許使用頻寬百分比(40%)
int s 0/0
ip bandwidth-percent eigrp 1 40
end
!
!Step 5: Configuring EIGRP
router eigrp 1
network 172.16.0.0
network 10.0.0.0
no auto-summary
!
!Step 6: Using Non-broadcast EIGRP Mode
!NonBroadcast環境下需手動指定eigrp鄰居
neighbor 172.16.124.1 Serial0/0

end 
!
!Step 7: Implementing EIGRP Manual Summarization
!手動摘要eigrp要送出的路由資訊
ip summary-address eigrp 1 10.2.0.0 255.255.0.0 5
end

WEST
!
!Step 0: Basic Setting
conf terminal
hostname West
no ip domain-lookup
!
!Step 1: Addressing
interface Loopback1
ip address 10.3.1.1 255.255.224.0
interface Loopback33
ip address 10.3.33.1 255.255.224.0
interface Loopback65
ip address 10.3.65.1 255.255.224.0
interface Loopback97
ip address 10.3.97.1 255.255.224.0
interface Loopback129
ip address 10.3.129.1 255.255.224.0
interface Loopback161
ip address 10.3.161.1 255.255.224.0
!
!Step 3: Configuring the Frame Relay Endpoints
!設定介面IP/Frame-Relay Map(採用Broadcast方式自動識別鄰居)
int s 0/0
ip add 172.16.124.3 255.255.255.248
encapsulation frame-relay ietf
!
!關閉dlci自動識別(需手動指令frame-relay map) 
no frame-relay inverse-arp
!
!Broadcast環境(自動識別鄰居)
frame-relay map ip 172.16.124.1 301 broadcast
frame-relay map ip 172.16.124.2 301 broadcast
frame-relay map ip 172.16.124.3 301 broadcast

!
!NonBroadcast環境(需手動指定鄰居)
frame-relay map ip 172.16.124.1 301
frame-relay map ip 172.16.124.2 301
frame-relay map ip 172.16.124.3 301
!
!Step 4: Setting Interface-Level Bandwidth
conf t
int s 0/0
bandwidth 128
end
!
!設定Frame-Relay介面上EIGRP最大允許使用頻寬百分比(40%)
int s 0/0
ip bandwidth-percent eigrp 1 40
end
!
!Step 5: Configuring EIGRP
router eigrp 1
network 172.16.0.0
network 10.0.0.0
no auto-summary
end
!
!Step 6: Using Non-broadcast EIGRP Mode
!NonBroadcast環境下需手動指定eigrp鄰居
neighbor 172.16.124.1 Serial0/0

end
!
!Step 7: Implementing EIGRP Manual Summarization
!手動摘要eigrp要送出的路由資訊
ip summary-address eigrp 1 10.3.0.0 255.255.0.0 5 
end

Show指令
show frame-relay route
show frame-relay map
show ip route
show interface (介面 代號)
show ip protocol
show ip eigrp neighbors
show ip eigrp interface 
show ip eigrp topology

參考文件
Configuring Frame Relay Switching

Configuring Basic Frame Relay

Configuring Hub and Spoke Frame Relay

Configuration Notes for the Implementation of EIGRP over Frame Relay and Low Speed Links

Comprehensive Guide to Configuring and Troubleshooting Frame Relay