2010年6月24日 星期四

虛擬化版本與功能比較表

VMWare Vsphere

image

Citrix Xen Server

image

Citrix vs VMWare 版本與功能對應比較表

image

Citrix vs VMWare 價格比較表

範例一

image

範例二

image

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年6月9日 星期三

修復XenServer重開機後無法掛載Openfiler iSCSI LUN

系統版本 Openfiler 2.3

1. 使用root身分登入openfiler

2. vi /etc/rc.sysinit (將333-337行的內容註解掉)

#       if [ -x /sbin/lvm.static ]; then  
#               if /sbin/lvm.static vgscan --mknodes --ignorelockingfailure > /dev/null 2>&1 ; then  
#                    action $"Setting up Logical Volume Management:" /sbin/lvm.static vgchange -a y -ignorelockingfailure  
#               fi  
#       fi

3. vi /etc/lvm/lvm.conf (修改53行的內容)

   filter = [ "r|/dev/dm-*|", "r|/dev/VG_XenStorage*|", "r|/dev/sr/iscsi|", "a/.*/" ]

4. 輸入下列指令 
service aoe force-stop

5. 重開機
init 6

參考文件 https://forums.openfiler.com/viewtopic.php?id=2280&p=2

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 (會讓設備重新競選路由,請小心使用)

參考文件