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

Lab 7-1 Configuring Switches for IP Telephony Support

Topology
image

GNS檔案

DLS1
!
!Step 0: Basic Setting
configure terminal
no ip domain-lookup
hostname DLS1
enable secret cisco
line vty 0 15
password cisco
login
end
!
!Step 1: IP Addressing 
configure terminal
ip routing
interface vlan 1
ip address 172.16.1.3 255.255.255.0
no shutdown
interface vlan 100
ip address 172.16.100.3 255.255.255.0
no shutdown
interface vlan 200
ip address 172.16.200.3 255.255.255.0
no shutdown
end
!
!Step 2: Setting EtherChannels
!設定etherchannel建立channel-group1,2,3
configure terminal
interfacefa 1/7 - 12
shutdown
speed 100
duplex full
interfacefa 1/7 - 8
channel-group 1 mode on
channel-group 1 mode desirable
interfacefa 1/9 - 10
channel-group 2 mode on
channel-group 2 mode desirable
interfacefa 1/11 - 12
channel-group 3 mode on
channel-group 3 mode desirable
no shutdown
end
!
!設定etherchannel為trunk模式
configure terminal
interface port-channel1 – 3
switchport trunk encapsulation dot1q
switchport mode trunk
no shutdown
end
!
!Step 4: Setting VTP Server Mode
!設定VTP資訊(Server)
configure terminal
vtp domain SWPOD
vtp mode server
vtp version 2
!
!Step 5: Setting VLAN Information And Deploy To VTP Clinet
vlan 100
name CP-Data
exit
vlan 200
name Voice
exit
end
!
!Step 6: Setting HSRP
!設定HSRP(vlan1,vlan100為active,vlan200為standby)
configure terminal 
interfacevlan 1
standby 1 ip 172.16.1.1
standby 1 preempt
standby 1 priority 150
!
interfacevlan 100
standby 1 ip 172.16.100.1
standby 1 preempt
standby 1 priority 150
!
interfacevlan 200
standby 1 ip 172.16.200.1
standby 1 preempt
standby 1 priority 100
end
!
!Step 9: Setting Auto Qos Trust
!設定access與voice vlan及啟動auto qos
configure terminal
interfacefa 1/7 - 12
auto qos voip trust
end
!
!Step 10: Verify Auto Qos Trust
show auto qos interface
show mls qos interface fastethernet 0/7

DLS2
!
!Step 0: Basic Setting
configure terminal
no ip domain-lookup
hostname DLS2
enable secret cisco
line vty 0 15
password cisco
login
end
!
!Step 1: IP Addressing 
interface vlan 1
ip routing
configure terminal
ip address 172.16.1.4 255.255.255.0
no shutdown
interface vlan 100
ip address 172.16.100.4 255.255.255.0
no shutdown
interface vlan 200
ip address 172.16.200.4 255.255.255.0
no shutdown
end
!
!Step 2: Setting EtherChannels

!設定etherchannel建立channel-group1,2,3
configure terminal
interfacefa 1/7 - 12
shutdown
speed 100
duplex full
interfacefa 1/7 - 8
channel-group 1 mode on
channel-group 1 mode desirable
interfacefa 1/9 - 10
channel-group 2 mode on
channel-group 2 mode desirable
interfacefa 1/11 - 12
channel-group 3 mode on
channel-group 3 mode desirable
no shutdown
end
!
!設定etherchannel為trunk模式
configure terminal 
interface port-channel1 – 3
switchport trunk encapsulation dot1q
switchport mode trunk
no shutdown
end
!
!Step 4: Setting VTP Client Mode
!設定VTP資訊(Clinet)
configure terminal
vtp domain SWPOD
vtp mode client
end
!
!Step 6: Setting HSRP
!設定HSRP(vlan200為active,vlan1,vlan100為standby)
configure terminal
interfacevlan 1
standby 1 ip 172.16.1.1
standby 1 preempt
standby 1 priority 100
!
interfacevlan 100
standby 1 ip 172.16.100.1
standby 1 preempt
standby 1 priority 100
!
interfacevlan 200
standby 1 ip 172.16.200.1
standby 1 preempt
standby 1 priority 150
end
!
!Step 9: Setting Auto Qos Trust
!設定access與voice vlan及啟動auto qos
configure terminal
interfacefa 1/7 - 12
auto qos voip trust
end

ALS1
!
!Step 0: Basic Setting
configure terminal
no ip domain-lookup
hostname ALS1
enable secret cisco
line vty 0 15
password cisco
login
end
!
!Step 1: IP Addressing 
configure terminal
interface vlan 1
ip address 172.16.1.101 255.255.255.0
no shutdown
exit
ip default-gateway 172.16.1.1
end
!
!Step 2: Setting EtherChannels
!設定etherchannel建立channel-group1,2,3
configure terminal
interfacefa 1/7 - 12
shutdown
speed 100
duplex full
interfacefa 1/7 - 8
channel-group 1 mode on
channel-group 1 mode desirable
interfacefa 1/9 - 10
channel-group 2 mode on
channel-group 2 mode desirable
interfacefa 1/11 - 12
channel-group 3 mode on
channel-group 3 mode desirable
no shutdown
end
!
!設定etherchannel為trunk模式
configure terminal
interface port-channel1 - 3
switchport mode trunk
no show
end
!
!Step 3: Setting VTP Client Mode
!設定VTP資訊(Clinet)
configure terminal
vtp domain SWPOD
vtp mode client
end
!
!Step 7: Setting Auto Qos
!設定access與voice vlan及啟動auto qos
configure terminal
interfacefa 1/13 - 15
switchport access vlan 100
switchport voice vlan 200
auto qos voip
auto qos voip cisco-phone
end
!
!Step 8: Verity AutoQos Setting
show mls qos int fa 1/15
show run interface fastethernet 1/15
end
!
!Step 12: Setting Portfast Function 
!設定spanning-tree portfast
configure terminal
interfacefa 1/13 - 15
spanning-tree portfast
end

ALS2
!
!Step 0: Basic Setting 
configure terminal
no ip domain-lookup
hostname ALS2
enable secret cisco
line vty 0 15
password cisco
login
end
!
!Step 1: IP Addressing 
configure terminal
interface vlan 1
ip address 172.16.1.102 255.255.255.0
no shutdown
exit
ip default-gateway 172.16.1.1
end
!
!Step 2: Setting EtherChannels
!設定etherchannel建立channel-group1,2,3
configure terminal
interfacefa 1/7 - 12
shutdown
speed 100
duplex full
interfacefa 1/7 - 8
channel-group 1 mode on
channel-group 1 mode desirable
interfacefa 1/9 - 10
channel-group 2 mode on
channel-group 2 mode desirable
interfacefa 1/11 - 12
channel-group 3 mode on
channel-group 3 mode desirable
no shutdown
end 

!設定etherchannel為trunk模式
configure terminal
interface port-channel1 - 3
switchport mode trunk
no shutdown
end
!
!Step 3: Setting VTP Client Mode
!設定VTP資訊(Clinet)
configure terminal
vtp domain SWPOD
vtp mode client
end
!
!Step 7: Setting Auto Qos
!設定access與voice vlan及啟動auto qos
configure terminal
interfacefa 1/13 - 15
switchport access vlan 100
switchport voice vlan 200
auto qos voip
auto qos voip cisco-phone
end
!
!Step 11: Manual Setting interface COS Value
conf t
int fa 1/7
mls qos cos 3
end
!
!Step 12: Setting Portfast Function 
!設定spanning-tree portfast
configure terminal
interfacefa 1/13 - 15
spanning-tree portfast
end

showow指令
showip interfacebrief
show cdp neighbors
show etherchannel summary
show etherchannel detail
show vlan-switch
show vlan
show vtp status
show standby brief
show mls qos interface(介面 代號)
show auto qos interface

參考文件
Useing AutoQos

Understanding and Troubleshooting HSRP Problems in Catalyst Switch Networks

Understanding EtherChannel Load Balancing and Redundancy on Catalyst Switches

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

2010年5月15日 星期六

IP Precedence & DSCP 比較圖

IP Precedence & DSCP

Port Mirror/SPAN

 image   

使用Port Monitor的方式
1. 將fa0/1介面的流量轉送一份至fa0/23介面上
(conf)#int fa 0/23
(conf-int)#port monitor int fa 0/1

2. 將vlan1的流量轉送一份至 fa0/23介面上
(conf)#int fa 0/23
(conf)#port monitor vlan 1

驗證與除錯指令
show port monitor

使用Monitor Session的方式
1. 將fa0/1介面的流量轉送一份至fa0/23介面上
(conf)#monitor session 1 source interface fastethernet 0/1
(conf)#monitor session 1 destination interface fastethernet 0/23

2. 將vlan1的流量轉送一份至fa0/23介面上
(conf)#monitor session 1 source vlan 1
(conf)#monitor session 1 destination interface fastethernet 0/23

驗證與除錯指令
show monitor session 1

image  

使用Monitor Session to VLAN的方式
1. 設定SW1為VTP Server
(conf)#vtp domain cisco
(conf)#vtp version 2
(conf)#vtp mode server
(conf)#vtp password cisco
(conf)#vlan 1
(conf-vlan)#name Management-VLAN
(conf-vlan)#exit
(conf)#vlan 88
(conf-vlan)#name Monitor-VLAN
(conf-vlan)#exit
(conf)#int fa 0/22
(conf-int)#switchport mode trunk
(conf-int)#exit

2. 設定SW2為VTP Clinet
(conf)#vtp domain cisco
(conf)#vtp version 2
(conf)#vtp mode client
(conf)#vtp password cisco
(conf)#int fa 0/22
(conf-int)#switchport mode trunk
(conf-int)#exit


3. 將SW2上vlan1的流量轉送到vlan88上
(conf)#monitor session 1 source vlan 1
(conf)#monitor session 1 destination remote vlan 88

4.將SW1上vlan88的流量轉送到fa0/23介面上
(conf)#vlan 88
(conf-vlan)#remote-span 
(conf)#monitor session 1 source remote vlan 88
(conf)#monitor session 1 destination interface fastethernet 0/23

驗證與除錯指令
show monitor session 1

參考文件
http://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a008015c612.shtml

2010年5月14日 星期五

查詢Router/Switch的型號/序號/模組

1. 查詢一般Router/Switch設備的型號與序號
#show inventory

(這邊會顯示設備的機型跟序號)
NAME: "2811 chassis", DESCR: "2811 chassis"
PID: CISCO2811         , VID: V07, SN: FTX1226A1WN

(這邊會顯示安裝的模組名稱/安裝位置/型號/序號)
NAME: "WAN Interface Card - Serial 2T on Slot 0 SubSlot 0", DESCR: "WAN Interface Card - Serial 2T"
PID: WIC-2T=           , VID: 1.0, SN: 17253347  

2. 查詢模組類型Router/Switch設備的型號與序號,如7200,4500,6500
#show module

(這邊會顯示安裝的 "主" 模組名稱/型號/序號)
Mod  Ports         Card Type                                         Model                     Serial No.
--- ----- -------------------------------------- ------------------ -----------
  3   48  CEF720 48 port 1000mb SFP                     WS-X6748-SFP         SAL10421C0W
  5    2   Supervisor Engine 720 (Active)                 WS-SUP720-3B         SAL10330NGA
  7   48  48-port 10/100/1000 RJ45 EtherModule    WS-X6148A-GE-TX    SAL51392UH6

(這邊會顯示模組的MAC位址範圍/硬體版本/韌體版本/軟體版本/狀態)
Mod      MAC addresses                          Hw    Fw              Sw                  Status
--- ---------------------------------- ------ ------------ ------------ -------
  3  0018.b98c.c514 to 0018.b98c.c543   1.8   12.2(14r)S5  12.2(18)SXF5   Ok
  5  0017.9441.b3c4 to 0017.9441.b3c7   5.2   8.4(2)          12.2(18)SXF5   Ok
  7  0019.55b4.2140 to 0019.55b4.216f   1.5   8.4(1)          8.5(0.46)RFW  Ok

(這邊會顯示主模組上的 "次" 模組名稱/型號/序號/硬體版本/狀態)
Mod     Sub-Module                         Model              Serial              Hw    Status
---- --------------------------- ------------------ ----------- ------- -------
  3  Centralized Forwarding Card   WS-F6700-CFC   SAL52457H6F  3.0     Ok
  5  Policy Feature Card 3             WS-F6K-PFC3B    SAL12860MU2  2.3    Ok
  5  MSFC3 Daughterboard            WS-SUP720         SAL14460L8Y  2.5     Ok

(這邊會顯示主模組的狀態)
Mod  Online Diag Status
---- -------------------
  3  Pass
  5  Pass
  7  Pass