24h購物| | PChome| 登入
2008-04-04 20:54:49 | 人氣1,016| 回應0 | 上一篇 | 下一篇
推薦 0 收藏 0 轉貼0 訂閱站台

Cisco 2691 Router setup

網際網路交換技術-實習課程

  • 實習目的

                     學習使用 Cisco 2691 Router及 MPLS 功能設定

  • 實習項目

實習一 - Cisco 2691 Router 基本介紹及使用

實習目的:Cisco 2691 Router簡介及基本操作

  • Cisco 2691 的實體介面

Cisco 2691 Physical Interfaces

說 明

有二個Fast Ethernet,三個WAN Interface card slots (Serial0~1),如上圖所示。

編號方式

interface-type   Slot-number / Interface-number

Ethernet 0/0為Slot0上的 Port 0;Serial 1/1為Slot1上的 Port 1

 

  • 使用Console Port 進入 2691內部進行設定

        使用Cisco專屬的 Console Port 連接線(如下圖)

,分別接在 cisco 2691 的 Console Port 上與電腦的 RS-232 埠後,使用終端機模擬程式(參數設定:Baud 9600, No Parity , Data Bits 8 , Stop bit 1)便能直接進入 2691 。

 

 

透過下圖的線來連結serial port:

 

 

  • Cisco IOS (Internetwork Operating system)基本操作

        Cisco 的 IOS 軟體提供 Command Line Interface ( CLI )誏使用者來設定與管理 Cisco。 IOS 的指令為階層式架構,如系統相關設定存於 configure 命令階層之下;而 configure 之下,又分 Interface 、ip 等階層。下表為基本且常用的指令說明。

 

指  令

用     法

說                            明

show show [選項]

顯示某些設定狀態, show ? 可以得到更多說明。

在一般使用者模式可以 show 出來的資料有限,若要取得更多資料,必須進入特權模式(Privilege Mode)便能得到更多資訊。

show version:顯示 IOS 版本資訊。

show running-config:顯示目前系統正在執行的設定。

show startup-config:顯示系統在 NVRAM 中儲存的設定。

? ? 為 Help 指令,可列出目前所有可用的命令。若加在指令後面(如 show ?)則會列出所有可用參數的提示。
exit exit 跳到上一層命令目錄。
end end 跳出 configure 模式。
enable enable 進入特權模式(Privilege Mode),以便進行系統設定。
disable disable 跳出特權模式。
configure

configure [選項]

memory

使用在 NVRAM 中的設定。
network 設定 TFTP 環境。
overwrite-network 利用 TFTP 將設定檔讀入。
terminal 利用終端機介面來做設定。
no no [選項] 當設定錯誤時,可在原來指令前下" no"清除之前的設定,如:                    no network 10.1.1.0 0.0.0.3 area 0                                                                          no ip addr 192.168.5.1 255.255.255.252
ping ping [IP Address] ping指令
write write 將目前的設定寫到 NVRAM 中。
reload reload 重新啟動系統。

 

CLI 的四種操作模式

  1. User EXEC Mode (使用者執行模式)-只能觀看Router 的基本狀態與資訊, 無法對Router 的設定做任何修改。

  2. Privileged EXEC Mode (特權執行模式)-可以使用所有的指令,進入特權執行模式通常需要輸入密碼。

  3. Global Configuration Mode (整體組態模式)-對Router做整體的設定。

  4. Interface Configuration Mode (介面組態模式)-可針對某一張介面卡做設定。

        使用者可根據提示符號後面的 > 或是 # 來判斷目前是屬於那種模式。一開始進入 Cisco 2691 的 CLI 時即在 User EXEC Mode,若要進入 Privileged EXEC Mode則輸入 enable,指令如下:

Router> enable
Password:
Router#

若要進入Global Configuration Mode做設定則輸入configure terminal,指令如下:

Router# configure terminal
Router(config)#

 

 

實習二 - Cisco 2691 基本網路組態設定

實習目的:設定 Router的網路基本組態。

實驗架構圖:

  • 設定 Fast Ethernet及serial 介面
    在 config 模式下,使用 interface 指令來選定要設定的介面。

     Router-A(config)#interface FastEthernet 0/0
     Router-A(config-if)#

     Router-A(config)#interface Loopback 0
     Router-A(config-if)#

    接下來設定 IP 位址,指令為 ip address

     Router-A(config-if)#ip address 192.168.5.1 255.255.255.252

     Router-A(config-if)#no shutdown

  • 設定 IP Routing - OSPF
    Router-B(config)#router ospf 1
    Router-B(config-router)#router-id 10.10.10.1
    Router-B(config-router)#network 192.168.1.0 0.0.0.3 area 0
    Router-B(config-router)#network 192.168.2.0 0.0.0.3 area 0
    Router-B(config-router)#network 10.1.1.0 0.0.0.3 area 0
    Router-B(config-router)#network 10.10.10.1 0.0.0.0 area 0 
  • 測試
    設定完成後,可利用 ping 指令來測試網路功能是否正常運作。

    ping 192.168.1.2

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 140.113.1.1, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/8 ms

    若顯示 "." 表示目的端未有回應,請檢查相關設定是否有設定錯誤。

 

 

實習三 - Cisco 2691 MPLS VPN 設定

實習目的:使用MPLS技術建立 VPN 

實驗架構圖:

  • 先依照實驗二將 Router-C的Fast Ethernet、Serial等相關介面設定完成。

  • 因為CEF是唯一使用FIB表的第三層交換機制,因此,所有執行MPLS的路由器都要啟動CEF

Router-B(config)#ip cef
  • 在 globally模式下enable MPLS及label protocol  LDP

Router-B(config)#mpls ip
Router-B(config)#mpls label protocol ldp
  • 開啟tag-switching於需要交換MPLS label的介面

Router-B(config)#interface s0/0
Router-B(config-if)#tag-switching ip
  • Configure VPN

        為了讓Router-B上能區分是哪個本地介面上送來的VPN用戶路由,在Router-B上建立虛擬路由器,每個虛擬路由器都有各自的路由表和轉發表,這些路由表和轉發表統稱為VRF(VPN Routing and Forwarding instances)

Router-B(config)#ip vrf vpn1
Router-B(config-vrf)# rd 1:1
Router-B(config-vrf)# route-target export 1:1
Router-B(config-vrf)# route-target import 1:1
Router-B(config-vrf)#exit
Router-B(config)#interface fasethernet0/1
Router-B(config-if)#ip vrf forwarding vpn1
Router-B(config-if)#ip address 192.168.2.1 255.255.255.252
  • Configure MP-BGP

         由於正常的BGP4協議能只傳遞IPv4的路由,於是在原來的基礎上再加上新定義的屬性,透過對BGP修改,把BGP4擴展成MP-BGP。在MP-IBGP鄰居間傳遞VPN用戶路由時加上RD,將VPN用戶傳來的IPv4路由轉變為VPNv4路由,保證VPN用戶的路由可到達對端的Edge上。

Router-B(config)#router bgp 100
Router-B(config-router)#neighbor 10.10.10.3 remote-as 100
Router-B(config-router)#neighbor 10.10.10.3 update-source loopback0
Router-B(config-router)#neighbor 10.10.10.3 activate
Router-B(config-router)#address-family vpnv4
Router-B(config-router-af)#neighbor 10.10.10.3 activate
Router-B(config-router-af)#neighbor 10.10.10.3 send-community both
Router-B(config-router)#address-family ipv4 vrf vpn1
Router-B(config-router-af)#redistribute connected

 

  • 當一切都設定完成可以使用show running-config來查看是否設定完成,以下三個檔案為正確之config檔:

               router-arouter-drouter-c 

  • 測試

  • 輸入show mpls ip binding,執行畫面如下:
router-b#show mpls ip binding 
10.1.1.0/30 
in label: imp-null 
out label: imp-null lsr: 10.10.10.2:0 
10.1.1.4/30 
in label: 18 
out label: imp-null lsr: 10.10.10.2:0 
10.10.10.1/32 
in label: imp-null 
out label: 17 lsr: 10.10.10.2:0 
10.10.10.2/32 
in label: 17 
out label: imp-null lsr: 10.10.10.2:0 
10.10.10.3/32 
in label: 16 
out label: 16 lsr: 10.10.10.2:0 
192.168.1.0/30 
in label: imp-null 
out label: 18 lsr: 10.10.10.2:0 
192.168.4.0/30 
in label: 22 
out label: 19 lsr: 10.10.10.2:0 
  • 輸入show mpls forwarding-table,執行畫面如下:
Local    Outgoing        Prefix                    Bytes   tag Outgoing  Next Hop 
tag        tag or VC    or Tunnel Id          switched      interface 
16             16          10.10.10.3/32               0           Se0/0         point2point 
17           Pop tag    10.10.10.2/32               0           Se0/0         point2point 
18           Pop tag    10.1.1.4/30                   0           Se0/0         point2point 
21          Aggregate 192.168.2.0/30[V]     776 
22             19          192.168.4.0/30            0            Se0/0         point2point 
  • 輸入ping vrf vpn1 192.168.5.2
  • 亦可在host(192.168.2.2)的dos模式下,輸入ping 192.168.5.2
 Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 140.113.1.1, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/8 ms

    若顯示 "." 表示目的端未有回應,請檢查相關設定是否有設定錯誤。

 

 

 

  • cisco模擬器下載
  1. Cisco 模擬器 

  2. Cisco 模擬器 Web 板本  ( router_config_full_setup.swf )

  3. Cisco 模擬器 Web 板本 ( router_config_step_by_step.swf ) -- 僅提供說明無法自行操作模擬器

請注意!!!模擬器上的routing protocol為RIP,實驗二、三使用的routing protocol 為OSPF。

OSPF設定在上面實驗二"設定 IP Routing"有說明。

  • cisco指令參考文件下載
  1. Cisco Router.ppt

  2. simulator_sol.pdf

  • MPLS-參考網址及書目
  1. MPLS與VPN架構徹底研究 - 林慶德譯   旗標出版

  2. http://www.cisco.com/warp/public/105/mplsteisis.html

  3. http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/121t3/traffeng.htm

台長: Kenny
人氣(1,016) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 數位資訊(科技、網路、通訊、家電) | 個人分類: 網路相關 |
此分類下一篇:CISCO路由器配置完全手冊
此分類上一篇:MSI文件制作全过程

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文