国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦>學(xué)習(xí)電腦>網(wǎng)絡(luò)知識>路由器>路由器設(shè)置>cisco思科>

    解讀CISCO路由器基本設(shè)置方法

    時間: 玉鳳635 分享

      歡迎來到學(xué)習(xí)啦,本文為大家提供解讀CISCO路由器基本設(shè)置方法,歡迎大家閱讀學(xué)習(xí)。

      一、配置靜態(tài)路由

      通過配置靜態(tài)路由,用戶可以人為地指定對某一網(wǎng)絡(luò)訪問時所要經(jīng)過的路徑,在網(wǎng)絡(luò)結(jié)構(gòu)比較簡單,且一般到達(dá)某一網(wǎng)絡(luò)所經(jīng)過的路徑唯一的情況下采用靜態(tài)路由。

      任務(wù) 命令

      建立靜態(tài)路由 ip route prefix mask {address | interface} [distance] [tag tag] [permanent]

      Prefix :所要到達(dá)的目的網(wǎng)絡(luò)

      mask :子網(wǎng)掩碼

      address :下一個跳的IP地址,即相鄰路由器的端口地址。

      interface :本地網(wǎng)絡(luò)接口

      distance :管理距離(可選)

      tag tag :tag值(可選)

      permanent :指定此路由即使該端口關(guān)掉也不被移掉

      二、基本設(shè)置方式

      一般來說,可以用5種方式來設(shè)置路由器:

      1.Console口接終端或運(yùn)行終端仿真軟件的微機(jī);

      2.AUX口接MODEM,通過電話線與遠(yuǎn)方的終端或運(yùn)行終端仿真軟件的微機(jī)相連;

      3.通過Ethernet上的TFTP服務(wù)器;

      4.通過Ethernet上的TELNET程序;

      5.通過Ethernet上的SNMP網(wǎng)管工作站。

      但路由器的第一次設(shè)置必須通過第一種方式進(jìn)行,此時終端的硬件設(shè)置如下:

      波特率 :9600

      數(shù)據(jù)位 :8

      停止位 :1

      奇偶校驗(yàn): 無

      三、配置IP尋址

      1. IP地址分類

      2. 分配接口IP地址

      3. 使用可變長的子網(wǎng)掩碼

      4. 使用網(wǎng)絡(luò)地址翻譯(NAT)

      1. IP地址分類

      IP地址分為網(wǎng)絡(luò)地址和主機(jī)地址二個部分,A類地址前8位為網(wǎng)絡(luò)地址,后24位為主機(jī)地址,B類地址16位為網(wǎng)絡(luò)地址,后16位為主機(jī)地址,C類地址前24位為網(wǎng)絡(luò)地址,后8位為主機(jī)地址,網(wǎng)絡(luò)地址范圍如下表所示:

      種類 網(wǎng)絡(luò)地址范圍

      A 1.0.0.0 到126.0.0.0有效 0.0.0.0 和127.0.0.0保留

      B 128.1.0.0到191.254.0.0有效 128.0.0.0和191.255.0.0保留

      C 192.0.1.0 到223.255.254.0有效 192.0.0.0和223.255.255.0保留

      D 224.0.0.0到239.255.255.255用于多點(diǎn)廣播

      E 240.0.0.0到255.255.255.254保留 255.255.255.255用于廣播

      2. 分配接口IP地址

      任務(wù) 命令

      接口設(shè)置 interface type slot/number

      為接口設(shè)置IP地址 ip address ip-address mask

      掩瑪(mask)用于識別IP地址中的網(wǎng)絡(luò)地址位數(shù),IP地址(ip-address)和掩碼(mask)相與即得到網(wǎng)絡(luò)地址。

      3. 使用可變長的子網(wǎng)掩碼

      通過使用可變長的子網(wǎng)掩碼可以讓位于不同接口的同一網(wǎng)絡(luò)編號的網(wǎng)絡(luò)使用不同的掩碼,這樣可以節(jié)省IP地址,充分利用有效的IP地址空間。

      如下圖所示:

      Router1 和Router2的E0端口均使用了C類地址192.1.0.0作為網(wǎng)絡(luò)地址,Router1的E0的網(wǎng)絡(luò)地址為192.1.0.128,掩碼為 255.255.255.192, Router2的E0的網(wǎng)絡(luò)地址為192.1.0.64,掩碼為255.255.255.192,這樣就將一個C類網(wǎng)絡(luò)地址分配給了二個網(wǎng),既劃分了二個子網(wǎng),起到了節(jié)約地址的作用。

      4. 使用網(wǎng)絡(luò)地址翻譯(NAT)

      NAT(Network Address Translation)起到將內(nèi)部私有地址翻譯成外部合法的全局地址的功能,它使得不具有合法IP地址的用戶可以通過NAT訪問到外部Internet.

      當(dāng)建立內(nèi)部網(wǎng)的時候,建議使用以下地址組用于主機(jī),這些地址是由Network Working Group(RFC 1918)保留用于私有網(wǎng)絡(luò)地址分配的.

      l Class A:10.1.1.1 to 10.254.254.254

      l Class B:172.16.1.1 to 172.31.254.254

      l Class C:192.168.1.1 to 192.168.254.254

      命令描述如下:

      任務(wù) 命令

      定義一個標(biāo)準(zhǔn)訪問列表 access-list access-list-number permit source [source-wildcard]

      定義一個全局地址池 ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length} [type rotary]

      建立動態(tài)地址翻譯 ip nat inside source {list {access-list-number | name} pool name [overload] | static local-ip global-ip}

      指定內(nèi)部和外部端口 ip nat {inside | outside}

      如下圖所示,

      路由器的Ethernet 0端口為inside端口,即此端口連接內(nèi)部網(wǎng)絡(luò),并且此端口所連接的網(wǎng)絡(luò)應(yīng)該被翻譯,Serial 0端口為outside端口,其擁有合法IP地址(由NIC或服務(wù)提供商所分配的合法的IP地址),來自網(wǎng)絡(luò)10.1.1.0/24的主機(jī)將從IP地址池 c2501中選擇一個地址作為自己的合法地址,經(jīng)由Serial 0口訪問Internet。命令ip nat inside source list 2 pool c2501 overload中的參數(shù)overload,將允許多個內(nèi)部地址使用相同的全局地址(一個合法IP地址,它是由NIC或服務(wù)提供商所分配的地址)。命令 ip nat pool c2501 202.96.38.1 202.96.38.62 netmask 255.255.255.192定義了全局地址的范圍。

      設(shè)置如下:

      ip nat pool c2501 202.96.38.1 202.96.38.62 netmask 255.255.255.192

      interface Ethernet 0

      ip address 10.1.1.1 255.255.255.0

      ip nat inside

      !

      interface Serial 0

      ip address 202.200.10.5 255.255.255.252

      ip nat outside

      !

      ip route 0.0.0.0 0.0.0.0 Serial 0

      access-list 2 permit 10.0.0.0 0.0.0.255

      ! Dynamic NAT

      !

      ip nat inside source list 2 pool c2501 overload

      line console 0

      exec-timeout 0 0

      !

      line vty 0 4

      end

      四、設(shè)置對話過程

      1. 顯示提示信息

      2. 全局參數(shù)的設(shè)置

      3. 接口參數(shù)的設(shè)置

      4. 顯示結(jié)果

      利用設(shè)置對話過程可以避免手工輸入命令的煩瑣,但它還不能完全代替手工設(shè)置,一些特殊的設(shè)置還必須通過手工輸入的方式完成。

      進(jìn)入設(shè)置對話過程后,路由器首先會顯示一些提示信息:

      --- System Configuration Dialog ---

      At any point you may enter a question mark '?' for help.

      Use ctrl-c to abort configuration dialog at any prompt.

      Default settings are in square brackets '[]'.

      這是告訴你在設(shè)置對話過程中的任何地方都可以鍵入“?”得到系統(tǒng)的幫助,按ctrl-c可以退出設(shè)置過程,缺省設(shè)置將顯示在‘[]’中。然后路由器會問是否進(jìn)入設(shè)置對話:

      Would you like to enter the initial configuration dialog? [yes]:

      如果按y或回車,路由器就會進(jìn)入設(shè)置對話過程。首先你可以看到各端口當(dāng)前的狀況:

      First, would you like to see the current interface summary? [yes]:

      Any interface listed with OK? value "NO" does not have a valid configuration

      Interface IP-Address OK? Method Status Protocol

      Ethernet0 unassigned NO unset up up

      Serial0 unassigned NO unset up up

      ……… ……… … …… … …

      然后,路由器就開始全局參數(shù)的設(shè)置:

      Configuring global parameters:

      1.設(shè)置路由器名:

      Enter host name [Router]:

      2.設(shè)置進(jìn)入特權(quán)狀態(tài)的密文(secret),此密文在設(shè)置以后不會以明文方式顯示:

      The enable secret is a one-way cryptographic secret used

      instead of the enable password when it exists.

      Enter enable secret: cisco

      3.設(shè)置進(jìn)入特權(quán)狀態(tài)的密碼(password),此密碼只在沒有密文時起作用,并且在設(shè)置以后會以明文方式顯示:

      The enable password is used when there is no enable secret

      and when using older software and some boot images.

      Enter enable password: pass

      4.設(shè)置虛擬終端訪問時的密碼:

      Enter virtual terminal password: cisco

      5.詢問是否要設(shè)置路由器支持的各種網(wǎng)絡(luò)協(xié)議:

      Configure SNMP Network Management? [yes]:

      Configure DECnet? [no]:

      Configure AppleTalk? [no]:

      Configure IPX? [no]:

      Configure IP? [yes]:

      Configure IGRP routing? [yes]:

      Configure RIP routing? [no]:

      ………

      6.如果配置的是撥號訪問服務(wù)器,系統(tǒng)還會設(shè)置異步口的參數(shù):

      Configure Async lines? [yes]:

      1) 設(shè)置線路的最高速度:

      Async line speed [9600]:

      2) 是否使用硬件流控:

      Configure for HW flow control? [yes]:

      3) 是否設(shè)置modem:

      Configure for modems? [yes/no]: yes

      4) 是否使用默認(rèn)的modem命令:

      Configure for default chat script? [yes]:

      5) 是否設(shè)置異步口的PPP參數(shù):

      Configure for Dial-in IP SLIP/PPP access? [no]: yes

      6) 是否使用動態(tài)IP地址:

      Configure for Dynamic IP addresses? [yes]:

      7) 是否使用缺省IP地址:

      Configure Default IP addresses? [no]: yes

      8) 是否使用TCP頭壓縮:

      Configure for TCP Header Compression? [yes]:

      9) 是否在異步口上使用路由表更新:

      Configure for routing updates on async links? [no]: y

      10) 是否設(shè)置異步口上的其它協(xié)議。

      接下來,系統(tǒng)會對每個接口進(jìn)行參數(shù)的設(shè)置。

      1.Configuring interface Ethernet0:

      1) 是否使用此接口:

      Is this interface in use? [yes]:

      2) 是否設(shè)置此接口的IP參數(shù):

      Configure IP on this interface? [yes]:

      3) 設(shè)置接口的IP地址:

      IP address for this interface: 192.168.162.2

      4) 設(shè)置接口的IP子網(wǎng)掩碼:

      Number of bits in subnet field [0]:

      Class C network is 192.168.162.0, 0 subnet bits; mask is /24

      在設(shè)置完所有接口的參數(shù)后,系統(tǒng)會把整個設(shè)置對話過程的結(jié)果顯示出來:

      The following configuration command script was created:

      hostname Router

      enable secret 5 class="main">

    解讀CISCO路由器基本設(shè)置方法

    時間: 玉鳳635 分享

      enable password pass

      …………

      請注意在enable secret后面顯示的是亂碼,而enable password后面顯示的是設(shè)置的內(nèi)容。

      顯示結(jié)束后,系統(tǒng)會問是否使用這個設(shè)置:

      Use this configuration? [yes/no]: yes

      如果回答yes,系統(tǒng)就會把設(shè)置的結(jié)果存入路由器的NVRAM中,然后結(jié)束設(shè)置對話過程,使路由器開始正常的工作。

    150460