話說我最近都在做Raspberry Pi上相關應用的開發。當然,Raspberry Pi除了工作上的用途之外,我也延申其用途,例如用來做媒體撥放器使用。
輾轉找到xbian,對它的印象很好,當時搭配的是Raspberry Pi,一直穩定好用。於是Raspberry Pi 2上市之後,我又買了一台Pi2當撥放器用。但說也奇怪,一直不穩定。網路卡的IP不斷消失,導致撥放youtube時一直跳出...抽空用了一些時間來測試和解決,但一直沒有辦法完全的處理好。
這兩天撥了時間來查驗。我找了一台Pi1,發現用新的韌體無法開機,我看了flash的內容,發現只有一個config檔。於是我再退回用上一版,但同樣無法開機,查看flash,同樣只有config檔。於是我再退回上一版,發現燒錄後是有完整檔案的。我把有問題的iso檔解開,發現裡面只有一個img檔。我對照了我的Pi2的flash裡的檔案,也是有完整檔案的。
這讓我覺得奇怪,難道是映像檔的問題,於是我仔細看了官網,原來他有提供安裝程式(我之前都是自行下排ISO檔,再用軟體燒進flash的)。我之前一直以為那是他其它OS的介面程式...真是天大的誤會 (可見作的太快並不見得會帶來高效率)
於是我用它的安裝程式,來下載並安裝至Pi/Pi2再進行測試。
嗯,一切都很完美。不好的,只有我浪費的時間和精力。看來下次要慢一點了。
後記:最後確認是micro usb 的電源線品質問題...嗚 我的青春啊.
2015年5月14日 星期四
2015年5月13日 星期三
RIP 選徑規劃 Version 2
客戶的LAN 192.168.1.0/24
視訊 192.168.1.100
設計目的:192.168.1.100走E0/2,192.168.1.0/24走E0/1。
需求1:在E0/2斷線時會走回至E0/1。(視訊線路斷線時,能走回一般線路)
需求2:E0/1斷線時,要走回E0/2 (這可能做不出來)
補充說明:這是使用IOU模擬器作的,也許是因為是模擬的關係offset往不同interface設定ofset的功能一直測不出來。(老實說是不太穩定,偶爾會浮出來)
只好放棄用offset的作法,否則的話...我覺得需求2應該可以做的出來。
*****************************************************************
測試架構:
PE1 -------------- PE2 ------------------ CE ----------------LAN
PE1#show ip interface brief | exclude unas
Interface IP-Address OK? Method Status Protocol
Loopback1 192.168.2.1 YES NVRAM up up
PE2#show ip interface brief | e unass
Interface IP-Address OK? Method Status Protocol
Ethernet0/1 172.32.0.1 YES NVRAM up up
Ethernet0/2 172.32.0.5 YES NVRAM up up
CE#show ip interface brief | exclude unass
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 172.31.0.1 YES NVRAM up up
Ethernet0/1 172.32.0.2 YES NVRAM up up
Ethernet0/2 172.32.0.6 YES NVRAM up up
LAN#show ip interface brief | exclude unass
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 172.31.0.2 YES NVRAM up up
Loopback0 192.168.1.100 YES NVRAM up up
*****************************************
CE config:
interface Ethernet0/0
ip address 172.31.0.1 255.255.255.252
!
interface Ethernet0/1
ip address 172.32.0.2 255.255.255.252
!
interface Ethernet0/2
ip address 172.32.0.6 255.255.255.252
router rip
version 2
redistribute static
passive-interface default
no passive-interface Ethernet0/1
no passive-interface Ethernet0/2
network 172.32.0.0
distribute-list 1 out Ethernet0/1 (測試時發現若不在ACL 1加入deny 192.168.1.100,則會被帶入e0/1放過去對口,原因可能是因為192.168.1.100也是屬於192.168.1.0/24的關係,會被放行)
distribute-list 2 out Ethernet0/2 (不下這行的話,則192.168.1.0/24和192.168.1.100/32的路由表在對口e0/2都會學到)
no auto-summary
!
ip route 192.168.1.0 255.255.255.0 172.31.0.2
ip route 192.168.1.100 255.255.255.255 172.31.0.2
!
access-list 1 deny 192.168.1.100
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 2 permit 192.168.1.100
PE1#ping vrf test 192.168.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/16/16 ms
PE2#
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
R 192.168.1.0/24 [120/1] via 172.32.0.2, 00:00:13, Ethernet0/1
R 192.168.1.100/32 [120/1] via 172.32.0.6, 00:00:13, Ethernet0/2
**************************************************************************
測試1:
我們將CE e0/2 IP拿掉,經過一段時間後,測試正常!!
PE2:
R 192.168.1.0/24 [120/1] via 172.32.0.2, 00:00:29, Ethernet0/1
PE1#ping vrf test 192.168.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/15/16 ms
**************************************************************************
測試2:
我們將CE e0/1 IP拿掉。
但192.168.1.0/24就是浮不出來 (不過這個是一定的)
視訊 192.168.1.100
設計目的:192.168.1.100走E0/2,192.168.1.0/24走E0/1。
需求1:在E0/2斷線時會走回至E0/1。(視訊線路斷線時,能走回一般線路)
需求2:E0/1斷線時,要走回E0/2 (這可能做不出來)
補充說明:這是使用IOU模擬器作的,也許是因為是模擬的關係offset往不同interface設定ofset的功能一直測不出來。(老實說是不太穩定,偶爾會浮出來)
只好放棄用offset的作法,否則的話...我覺得需求2應該可以做的出來。
*****************************************************************
測試架構:
PE1 -------------- PE2 ------------------ CE ----------------LAN
PE1#show ip interface brief | exclude unas
Interface IP-Address OK? Method Status Protocol
Loopback1 192.168.2.1 YES NVRAM up up
PE2#show ip interface brief | e unass
Interface IP-Address OK? Method Status Protocol
Ethernet0/1 172.32.0.1 YES NVRAM up up
Ethernet0/2 172.32.0.5 YES NVRAM up up
CE#show ip interface brief | exclude unass
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 172.31.0.1 YES NVRAM up up
Ethernet0/1 172.32.0.2 YES NVRAM up up
Ethernet0/2 172.32.0.6 YES NVRAM up up
LAN#show ip interface brief | exclude unass
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 172.31.0.2 YES NVRAM up up
Loopback0 192.168.1.100 YES NVRAM up up
*****************************************
CE config:
interface Ethernet0/0
ip address 172.31.0.1 255.255.255.252
!
interface Ethernet0/1
ip address 172.32.0.2 255.255.255.252
!
interface Ethernet0/2
ip address 172.32.0.6 255.255.255.252
router rip
version 2
redistribute static
passive-interface default
no passive-interface Ethernet0/1
no passive-interface Ethernet0/2
network 172.32.0.0
distribute-list 1 out Ethernet0/1 (測試時發現若不在ACL 1加入deny 192.168.1.100,則會被帶入e0/1放過去對口,原因可能是因為192.168.1.100也是屬於192.168.1.0/24的關係,會被放行)
distribute-list 2 out Ethernet0/2 (不下這行的話,則192.168.1.0/24和192.168.1.100/32的路由表在對口e0/2都會學到)
no auto-summary
!
ip route 192.168.1.0 255.255.255.0 172.31.0.2
ip route 192.168.1.100 255.255.255.255 172.31.0.2
!
access-list 1 deny 192.168.1.100
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 2 permit 192.168.1.100
PE1#ping vrf test 192.168.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/16/16 ms
PE2#
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
R 192.168.1.0/24 [120/1] via 172.32.0.2, 00:00:13, Ethernet0/1
R 192.168.1.100/32 [120/1] via 172.32.0.6, 00:00:13, Ethernet0/2
**************************************************************************
測試1:
我們將CE e0/2 IP拿掉,經過一段時間後,測試正常!!
PE2:
R 192.168.1.0/24 [120/1] via 172.32.0.2, 00:00:29, Ethernet0/1
PE1#ping vrf test 192.168.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/15/16 ms
**************************************************************************
測試2:
我們將CE e0/1 IP拿掉。
但192.168.1.0/24就是浮不出來 (不過這個是一定的)
訂閱:
文章 (Atom)