Posts

Showing posts with the label ICND

Packet Tracer Simulation Lab Layer 2 Switching

Packet Tracer Simulation Lab Layer 2 Switching from Johnson Liu

Packet Tracer Simulation Lab Layer3 Routing

Packet Tracer Simulation Lab Layer3 Routing from Johnson Liu

Packet Tracer 5.3 Network

Image
如果各位正在上CCNA的課程或是在準備CCNA考試,但是平時可能手邊沒有設備可以練習的話,可以先考慮使用Packet Tracer來練習,以下是相關資源可以下載的地方: http://www.packettracernetwork.com/ Packet Tracer is a powerful network simulator that can be utilized in training for  CCNA TM  and CCNP TM  certification exam by allowing students to create networks with an almost unlimited number of devices and to experience troubleshooting without having to buy real Cisco TM routers or switches. The current version of Packet Tracer supports an array of simulated Application layer protocols (HTTP, DNS, …), as well as basic routing with RIP, OSPF, and EIGRP, to the extent required by the current CCNA TM  curriculum . With the introduction of version 5.3, several new features were added, including  BGP , which is part of the CCNP TM curriculum. While Packet Tracer aims to provide a realistic simulation of functional networks, the application itself utilizes only a small number of features found within the actual hardware ru...

Autonomous Switching vs Silicon Switching

• Autonomous switching With this type of switching, an incoming packet matches an entry in the autonomous-switching cache located on the interface processor. Autonomous switching provides faster packet switching by allowing the ciscoBus controller to switch packets independently without having to interrupt the system processor. It is available only on Cisco 7000 series routers and in AGS+ systems with high-speed network controller cards. • SSE switching.  With this type of switching, an incoming packet matches an entry in the silicon-switching cache located in the silicon switching engine (SSE) of the Silicon Switch Processor (SSP) module. This module is available only on Cisco 7000 series routers. Silicon switching provides very fast, dedicated packet switching by allowing the SSE to switch packets independently without having to interrupt the system processor. 

Configuration Register instructions

The Configuration Register is a 16 bit field that is converted into a hexadecimal value for convenience.  As you know each hexadecimal character represents 4 bits.  Hexadecimal numbers go from 0 to F and represent decimal numbers from 0 to 15.  Hexadecimal numbers generally are preceded by a 0x to clue us in on the fact that we are looking at a hexadecimal number.  By default a Cisco router has a Configuration Register setting of 0×0101 so the actual 16 bits would look like 0000000100000001 so now you see that finally there is a use for the hexadecimal numbering system!  The bits in the Configuration Register are numbered 0 to 15 and you start from the far right: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 So for every 4 bits we translate that into hex, observe the following typical Configuration Register: 2 1 0 2 0 ...

MTU manipulation

Image
以下這篇文章是轉載 PacketLife 的一篇文章,因為我發現有很多人事實上在準備CCNA/CCNP的過程中有時只著重在筆試的重點上,但是卻忽略了更重要的基礎理論,像這一篇就是介紹MSS(Maximum Segement Size)與MTU(Maximum Transmission Unit)差別,雖然沒有談很多,但是一圖勝過千言萬語,只要把底下那張圖片記在腦海裏,就不會搞不清楚MSS跟MTU的差別了。 Posted by stretch in Networking on Wednesday, 5 Nov 2008 at 2:26 a.m. GMT The Maximum Transmission Unit (MTU) is the maximum length of data that can be transmitted by a protocol in one instance. For example, the MTU of Ethernet (by default 1500) is the largest number of bytes that can be carried by an Ethernet frame (excluding the header and trailer). MTUs are found at various layers of the OSI model, and can often be tweaked to more efficiently transport large volumes of data. Ethernet The default Ethernet MTU is 1500 bytes, not including the header or trailer. Sometimes a slightly higher MTU is preferable to accommodate Q-in-Q tunneling or other encapsulation. The MTU can be raised on Cisco IOS with the system mtu command under global configuration: Switch(config)# system mtu ? ...

Distance vector versus link-state

Image
Posted by stretch in  Networking  on Thursday, 2 Oct 2008 at 3:36 a.m. GMT There are two major classes of routing protocol: distance vector and link-state. It's easy to remember which protocols belong to either class, but comprehending their differences between the two classes takes a bit more effort. Distance vector  routing is so named because it involves two factors: the  distance , or metric, of a destination, and the vector , or direction to take to get there. Routing information is only exchanged between directly connected neighbors. This means a router knows from which neighbor a route was learned, but it does not know where that neighbor learned the route; a router can't see beyond its own neighbors. This aspect of distance vector routing is sometimes referred to as "routing by rumor." Measures like split horizon and poison reverse are employed to avoid routing loops. Link-state  routing, in contrast, requires that all routers know about the paths reachable by...

子網路切割範例(三)

問:210.100.0.0/23進行子網路切割變成/27 答: (1)請問總共產生多少個子網路? 所謂的子網路切割意義就是將現有的Host Bits借給Network Bits,以本題為例,就是從原有的Host Bits(32-23=9)借了4個Bits給Network Bits 計算子網路的公式如下: 2^(27-23)=2^4 (2)請問每個子網路擁有多少的Host IP? 在計算Host IP時必須扣除Network IP(1st)和Broadcast IP(Last),所以記得要減2 將IP總位元數32減去新的Network Bits數量就是新的Host Bits數量=>32-27=5 計算公式如下: 2^(32-27) - 2 = 2^5 - 2 (3)請問前四個合法網段為何? 首先我們先算出來新的/27轉成十進位後的子網路遮罩為/255.255.255.224 然後我們用256減去最後一個不為零的數字=>256 - 224 = 32 我們就知道每個網段都是32個IP為一組 因為我們可以得知合法的子網路如下: 1. 210.100.0.0/27 2. 210.100.0.32/27 3. 210.100.0.64/27 4. 210.100.0.96/27

子網路切割範例(二)

問:192.128.64.0/22進行子網路切割,每個子網路至少要100個Host IP。 答: 2^n - 2 >= 100 => n=7 (子網路切割後剩餘的Host bits的數量) 因此新的Host Bits = 7,新的Network Bits = 32 - 7 = 25 子網路遮罩為 /255.255.255.128 => 我們用256減去最後一個不為0的數字 128 = 128 所以新的subnet分別為: 1. 192.128.64. 0 /25 2. 192.128.64. 128 /25 3. 192.128.65. 0 /25 4. 192.128.65. 128 /25 5. 192.128.66. 0 /25 6. 192.128.66. 128 /25 7. 192.128.67. 0 /25 8. 192.128.67. 128 /25

Public IP vs Private IP

很多人對於真正的所謂"合法"/"非法"/"公開"/"私有"/"真實"/"虛擬"IP的定義並不清楚,因此我今天來幫各位介紹一下IP Address的範圍劃分。 以英文正式的字眼來表示IP的屬性,通常我們習慣使用"Public"/"Private" IP來表示。所以建議各位以這兩個英文單字為基礎來翻譯比較妥當。 IP Address是32-bits所組成的位址,所以理論上可使用的範圍為0.0.0.0 ~ 255.255.255.255,但是IANA為了管理方便,針對IP Address的前幾個位元制定了以下原則: Class A: (第一個bit為0) Default Mask:255.0.0.0(/8) From 0000 0000.0000 0000.0000 0000.0000 0000 (0.0.0.0) To 0111 1111.1111 1111.1111 1111.1111 1111 (127.255.255.255) Class B: (第一、二個bit分別為10) Default Mask:255.255.0.0(/16) From 1000 0000.0000 0000.0000 0000.0000 0000 (128.0.0.0) To 1011 1111.1111 1111.1111 1111.1111 1111 (191.255.255.255) Class C: (第一、二、三個bit分別為110) Default Mask:255.255.255.0(/24) From 1100 0000.0000 0000.0000 0000.0000 0000 (192.0.0.0) To 1101 1111.1111 1111.1111 1111.1111 1111 (223.255.255.255) 在目前Internet只有Class A/B/C這三個範圍合法使用,所以各位如果在公司有使用Firewall的話,如果沒有其他Multicast額外的應用,大可將其他的IP範圍阻擋,避免一些惡意假造來源IP的UDP攻擊。 Class D: (第一、二、三、四個bit分別為1110) Reserv...

漫談Unicast/Broadcast/Multicast

Image
1.Unicast(單點傳播) 通常指的是特定的目的地位址,一般是主機之間互相傳遞封包的方式,也是最常見的網路通訊方式。 因此我們有時稱之為One-to-One的通訊方式。 2.Broadcast(廣播) 通常發生於MultiAccess網路媒介中,例如區域網路(Local Area Network)。在Layer 2中表頭的MAC目的地位址通常是FF-FF-FF-FF-FF-FF,在Layer 3中表頭的IP目的地位址通常是255.255.255.255。連接至同一個網段(Segment)網路媒介上的所有主機及網路設備都會接收到這個封包並進行處理。因此我們稱之為One-to-All的通訊方式。 3.Multicast(多播/群播) 一般應用於相同的來源資料要同時傳送給一群特定的接收者(Multicast Group Client),但是來源端只要發送一份資料,因此頻寬的使用量不會因為接收者增加而增加,是網路視訊(如VoD/遠距教學/視訊會議)的最佳解決方案。因此我們稱之為One-to-Many(or Many-to-Many)的通訊方式。

OSI 7層參考模式

各個國際標準組織如CCITT, IAB/Internet Society, IEEE, ISO等,無不投注極多人力及物力來推動標準化的工作。例如IAB/Internet Society的TCP/IP已成工業標準,並為目前世界上最廣泛使用的電腦網路通訊協定。此外,如ISO 的OSI (Open System Interconnection) 也為學、研各界及各國政府極力推廣成為網路通信的標準規範。 國際標準組織(ISO)為了促進網路通訊協定的標準化,於 1983 年制訂了開放式系統連接(Open System Interconnection,簡稱 OSI)標準,以作為網路開發者在發展軟硬體設備時共同遵循的規範。OSI 參考模式具備階層式協定(Layered Protocol),總共定義了7個不同層級,其中愈上層編號愈大,愈下層編號愈小。 7 應用層(Application Layer) 6 表達層(Presentation Layer) 5 會議層(Session Layer) 4 傳輸層(Transport Layer) 3 網路層(Network Layer) 2 資料鏈結層(Data Link Layer) 1 實體層(Physical Layer) ◎應用層(Application Layer): 支援使用者應用作業,如檔案傳輸、電子郵件、虛擬終端、名錄服務、訊息處理系統。 相關網路設備:Firewall、L7 Switch ◎表現層(Presentation Layer) : 確認使用者應用作業格式以使其能夠彼此交換資料,如將 ASCII 轉換成 EBCDIC、內碼轉換、壓縮與解壓縮、加密與解密 ◎會談層(Session Layer): 提供使用者應用作業同步及控制。此階層提供會談連結的建立,建立會談以及終止會談。建立傳輸規則 ◎傳輸層(Transport Layer): 確保資料輸送的品質及可靠性,提供兩個系統間一可靠穩定並無錯誤的資料傳輸管道,如Connection management、Flow control、End-to-end error control 相關網路設備:L4 Switch(Load-Balance Device) ◎網路層(Network Layer): 指定使用者資料轉送至網路的界面,負責資料的包封及傳輸途徑的設定。如:Addr...

何謂"Trunking"?

您知道三層交換機技術中常提到的TRUNK是什麼意思嗎? 在技術領域中把TRUNK翻譯為中文是“主幹、幹線、中繼線、長途線”,不過一般不翻譯,直接用原文。同樣的名詞在不同場合中有不同的解釋: 1、 在網路的分層結構和頻寬的分配方面,TRUNK被解釋為“端口匯聚”,是頻寬擴展和鏈路備份的一個重要途徑。TRUNK把多個物理端口捆綁在一起當作一個邏輯端口使用,可以把多組端口的頻寬累加起來使用。TRUNK技術可以實現TRUNK內部多條鏈路互為備份的功能,即當一條鏈路出現故障時,不影響其他鏈路的工作,同時多鏈路之間還能實現流量負載均衡。 2、在電信網路的語音級的線路中,Trunk指的是“主幹網路、電話幹線”,即兩個交換局或交換機之間的連接電路或信道,它能夠在兩端之間進行轉接,並提供必要的訊號和終端設備傳輸。 3、 在Routing & Switching領域中,VLAN的端口聚合有的叫TRUNK,不過大多數都叫TRUNKING ,如CISCO。所謂的TRUNKING是用來在不同的交換機之間進行連接,以保證在跨越多個交換機上建立的同一個VLAN的成員能夠相互通訊。其中交換機之間互聯用的端口就稱為TRUNK端口。 TRUNKING是基於OSI第二層技術,如果你在2個交換機上分別劃分了多個VLAN(VLAN也是基於Layer2的),那麼分別在兩個交換機上的VLAN10和VLAN20的各自的成員如果要互通,就需要在A交換機上設為VLAN10的端口中取一個和交換機B上設為VLAN10的某個端口利用一條實體線路相連接。 那麼如果交換機上設定了10個VLAN就需要分別使用10條實體線路來跟另一個交換機上10個不同VLAN的端口互相連結。相對來說使用效率低落而且管理不易。如果交換機支援TRUNKING的話,事情就簡單多了,只需要2個交換機之間有一條實體連線,並將對應的端口設置為Trunk,這條線路就可以承載交換機上所有VLAN的資訊。這樣的話,就算交換機上設了上百個個VLAN也只要用1個端口就可以解決了。 如果交換機上相同VLAN的主機要相互通信,那麼可以通過共用的trunk端口就可以實現;如果是不同VLAN的主機之間要相互通信,就必需要通過第三方的路由功能的設備來實現。這也就是所謂的Inter-VLAN Routing。 【例】假設有兩個VLAN,分別為VLAN 1(Switch F...

Cisco IOS Upgrade/Recovery Process

在Cisco目前的正式課程中並沒有讓各位實作IOS upgrade的練習,因此我把這個動作相關的指令寫出來: 1.首先你需要一台TFTP Server,如果沒有的話,可以利用Cisco Router/Switch來充當,不過IOS必須存放於即將成為TFTP Server的Router/Switch Flash中。 Router_A# sh flash: System flash directory: File Length Name/status 1 16299836 c2600-ik9o3s3-mz.123-15.bin [16299900 bytes used, 477312 available, 16777212 total] 16384K bytes of processor board System flash (Read/Write) 2.Router_A#conf t Router_A(config)# ip tftp source-interface fastEthernet 0/0 !指定TFTP Server將會使用那個介面上的IP當Source Interface Router_A(config)# tftp-server flash:c2600-ik9o3s3-mz.123-15.bin !設定此Router提供那一個檔案開放TFTP下載 3.假設今天是在RouterB要昇級IOS或是Flash不小心被清空了(請千萬不要Reload…否則會無法開機): RouterB#copy tftp: flash: =>從TFTP上複製檔案到Flash: Address or name of remote host []? 10.1.1.1 => Router_A FastEthernet 0/0 IP Address Source filename []? c2600-ik9o3s3-mz.123-15.bin Destination filename [c2600-ik9o3s3-mz.123-15.bin]? 4.為了確保IOS檔案正確性,建議使用以下指令在重新開機前,請使用以下指令: RouterB# verify flash:c2600-ik9o3s3-mz.123-15.bin

Network Bits vs Host Bits

IPv4 IP Address共有32個bits 大致分為兩個部份 -Network Bits -Host Bits 主要的劃分則是以 mask 為依據 如16.0.0.0/17 IP: 0001 0000.0000 0000.0000 0000.0000 0000 Mask: 1111 1111.1111 1111.1000 0000.0000 0000 這就代表IP前面17個bits為Network Bits => 因此/8 => /17,將會有2^(17-8)個subnets 後面15個bits為Host Bits => 因此每個subnets都有2^(32-17)-2個IP 為何16.0.0.0/17的範圍是16.0.0.0~16.0.127.255 因為16.0.0.0/17中前面17個bits是Network bits,因此不可變 後面15個bits是Host bits,你利用0 and 1任意排列組合出來的結果就會是 0001 0000.0000 0000.0000 0000.0000 0000(16.0.0.0) 0001 0000.0000 0000.0000 0000.0000 0001(16.0.0.1) 0001 0000.0000 0000.0000 0000.0000 0010(16.0.0.2) 0001 0000.0000 0000.0000 0000.0000 0011(16.0.0.3) ... 0001 0000.0000 0000.0111 1111.1111 1111(16.0.127.255) 那麼下一個IP是什麼呢? 也就是下一個網段的第一個IP 我想應該不用我再多說了。 以上就是Network Bits與Host Bits的意義與區別!

子網路切割範例(一)

問:172.25.0.0/16進行子網路切割,至少要有12個以上的子網路。 答: 2^n > 12 => n=4 (Host bits被借去成為Network bits的數量),共可產生2^4 = 16個子網路 因此新的Network Bits = 16 + 4= 20,新的Host Bits = 32 – (16 + 4) = 12 子網路遮罩為 /255.255.240.0 => 我們用256減去最後一個不為0的數字 240 = 16 所以新的subnet分別為: 1. 172.25.0.0/20 2. 172.25.16.0/20 3. 172.25.32.0/20 4. 172.25.48.0/20 5. 172.25.64.0/20 6. 172.25.80.0/20 7. 172.25.96.0/20 8. 172.25.112.0/20 9. 172.25.128.0/20 10. 172.25.144.0/20 11. 172.25.160.0/20 12. 172.25.176.0/20 13. 172.25.192.0/20 14. 172.25.208.0/20 15. 172.25.224.0/20 16. 172.25.240.0/20

Understanding and Configuring PPP CHAP Authentication

Image
Introduction The Challenge Handshake Authentication Protocol (CHAP) (defined in RFC 1994 ) verifies the identity of the peer by means of a three-way handshake. These are the general steps performed in CHAP: After the LCP (Link Control Protocol) phase is complete, and CHAP is negotiated between both devices, the authenticator sends a challenge message to the peer. The peer responds with a value calculated through a one-way hash function (Message Digest 5 (MD5)). The authenticator checks the response against its own calculation of the expected hash value. If the values match, the authentication is successful. Otherwise, the connection is terminated. This authentication method depends on a "secret" known only to the authenticator and the peer. The secret is not sent over the link. Although the authentication is only one-way, you can negotiate CHAP in both directions, with the help of the same secret set for mutual authentication. For more information on the advantages and disadv...

Configuring Lock-and-Key Security (Dynamic Access Lists)

Benefits of Lock-and-Key Lock-and-key provides the same benefits as standard and static extended access lists (these benefits are discussed in the chapter "Access Control Lists: Overview and Guidelines"). However, lock-and-key also has the following security benefits over standard and static extended access lists: Lock-and-key uses a challenge mechanism to authenticate individual users. Lock-and-key provides simpler management in large internetworks. In many cases, lock-and-key reduces the amount of router processing required for access lists. Lock-and-key reduces the opportunity for network break-ins by network hackers. With lock-and-key, you can specify which users are permitted access to which source and destination hosts. These users must pass a user authentication process before they are permitted access to their designated hosts. Lock-and-key creates dynamic user access through a firewall, without compromising other configured security restrictions. When to Use Lock-an...

IP Access List Entry Sequence Numbering

Benefits The ability to apply sequence numbers to IP access list entries simplifies access list changes. Prior to the IP Access List Entry Sequence Numbering feature, there was no way to specify the position of an entry within an access list. If a user wanted to insert an entry (statement) in the middle of an existing list, all of the entries after the desired position had to be removed, then the new entry was added, and then all the removed entries had to be reentered. This method was cumbersome and error prone. This feature allows users to add sequence numbers to access list entries and resequence them. When a user adds a new entry, the user chooses the sequence number so that it is in a desired position in the access list. If necessary, entries currently in the access list can be resequenced to create room to insert the new entry. Sequence Numbering Behavior For backward compatibility with previous releases, if entries with no sequence numbers are applied, the first entry is assigne...

MTU(Maximum Transmission Unit) is not factored into the EIGRP metric calculation

自從我成為Cisco講師以來,一直有一個無解的問題在我腦海中,那就是EIGRP Metric的計算公式與課本中所提到相關EIGRP會考慮到的相關參數一直無法搭配上去。 課本教材裏(不論是ICND 2.3 or BSCI 3.0)都提到了EIGRP Metric有五個參數(Bandwidth, Delay, Reliability, Load, MTU),其中預設會使用的參數是Bandwidth & Delay(因為在EIGRP Metric計算公式中預設K1=K3=1,K2=K4=K5=0),因此其他的參數在預設情況之下並不會納入考量。 以下就是EIGRP的Metric計算公式: metric = [K1 * bandwidth + (K2 * bandwidth) / (256 - load) + K3 * delay] * [K5 / (reliability + K4)] 因此問題就浮現了…在這個公式運算中根本沒有看到MTU這個參數的存在,但是翻遍Cisco Documents & Course Material就是找不到任何一段正式的說明直接表示MTU雖然屬於EIGRP Metric交換的一部份但是在EIGRP Metric的計算過程中並未加入計算。 今晚我在準備新版ICND2 1.0的教材時,終於看到了一段話: "Note: Although MTU is exchanged in EIGRP packets between neighbor routers, MTU is not factored into the EIGRP metric calcaulation." 除此之外,我覺得CCNA這次的大改版其實在內容上相較於CCNP 3.0改版來說在內容是比較紮實的...尤其是ICND1,所談論的領域大幅地增加(有好也有壞,因為談得愈多就愈不深入…),不過在許多文字敘述上及觀點的糾正有很多改進(如: show vtp status中VTP Version常常讓人誤解的意思/VTP Domain Name會自動學習的特色/設備之間改口建議使用FIX手動設定SPEED/Duplex的註解..)都有助於導正學生因為文字上的說明不清而誤解意義。 PS:EIGRP計算metric中的Delay,所使用的單位比較特別,是將mili...