不卡AV在线|网页在线观看无码高清|亚洲国产亚洲国产|国产伦精品一区二区三区免费视频

學習啦>學習電腦>網(wǎng)絡(luò)知識>路由器>路由器設(shè)置>cisco思科>

cisco設(shè)置方法步驟

時間: 春健736 分享

  思科(Cisco)路由器是一個集成多業(yè)務(wù)路由器,福利綜合服務(wù)網(wǎng)絡(luò)路由器,以及獲得回報的網(wǎng)絡(luò)路由器。cisco路由器怎么設(shè)置??有網(wǎng)友提到自己不會設(shè)置思科的設(shè)備,該怎么辦?學習啦小編在網(wǎng)上找了一些教程及命令,需要的朋友可以參考下。

  以下是cisco路由器設(shè)置具體命令

  一、 host到router

  1、實驗網(wǎng)絡(luò)拓撲:

  pc( client 4.01)---switch---router1720 ( access server)

  pc配置:

  ip:10.130.23.242/28

  gw:10.130.23.246

  1720接口ip:

  f0:10.130.23.246/28

  lo0:172.16.1.1/24

  1720的ios為c1700-k93sy7-mz.122-8.T5.bin

  2、步驟:

  1、配置isakmp policy:

  crypto isakmp policy 1

  encr 3des

  authen pre-share

  group 2

  2、配置 client地址池

  cry isa client conf address-pool local pool192

  ip local pool pool192 192.168.1.1 192.168.1.254

  3、配置 client有關(guān)參數(shù)

  cry isa client conf group vclient-group

  ####vclient-group就是在 client的連接配置中需要輸入的group authentication name。

  key vclient-key

  ####vclient-key就是在 client的連接配置中需要輸入的group authentication password。

  pool pool192 ####client的ip地址從這里選取

  ####以上兩個參數(shù)必須配置,其他參數(shù)還包括domain、dns、wins等,根據(jù)情況進行配置。

  4、配置ipsec transform-set

  cry ipsec trans vclient-tfs esp-3des esp-sha-hmac

  5、配置map模板

  cry dynamic-map template-map 1

  set transform-set vclient-tfs ####和第四步對應(yīng)

  6、配置map

  cry map map 1 ipsec-isakmp dynamic template-map

  #### 使用第?*腳渲玫?map 模板

  cry map map isakmp author list vclient-group ####使用第三步配置的參數(shù)authorization

  cry map map client conf address respond ####響應(yīng)client分配地址的請求

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

  ip route 192.168.1.0 255.255.255.0 fastethernet0

  3、說明幾點:

  (1)因為1720只有一個fastethernet口,所以用router1720上的lo0地址來模擬router內(nèi)部網(wǎng)絡(luò)。

  (2) client使用的ip pool地址不能與router內(nèi)部網(wǎng)絡(luò)ip地址重疊。

  (3)10.130.23.0網(wǎng)段模擬公網(wǎng)地址,172.16.1.0網(wǎng)段用于1720內(nèi)部地址,192.168.1.0網(wǎng)段用于通道。

  (4)沒有找到設(shè)置 client獲取的子網(wǎng)掩碼的辦法。看來是ios還不支持這個功能。

  (5)關(guān)于split tunnel。配置方法:首先,設(shè)置access 133 permit ip 172.16.1.0 0.0.0.255 any,允許1720本地網(wǎng)絡(luò)數(shù)據(jù)通過tunnel,然后在第三步驟中添加一個參數(shù):acl 133。

  4、附1720的完整配置:

  1720#sh run

  Building configuration...

  Current configuration : 1321 bytes

  !

  version 12.2

  service timestamps debug uptime

  service timestamps log uptime

  no service password-encryption

  !

  hostname 1720

  !

  enable secret 5 class="main">

cisco設(shè)置方法步驟

時間: 春健736 分享

  !

  mmi polling-interval 60

  no mmi auto-configure

  no mmi pvc

  mmi snmp-timeout 180

  ip subnet-zero

  !

  !

  no ip domain-lookup

  !

  ip audit notify log

  ip audit po max-events 100

  !

  crypto isakmp policy 1

  encr 3des

  authentication pre-share

  group 2

  crypto isakmp client configuration address-pool local pool192

  !

  crypto isakmp client configuration group vclient-group

  key vclient-key

  domain test.com

  pool pool192

  !

  !

  crypto ipsec transform-set vclient-tfs esp-3des esp-sha-hmac

  !

  crypto dynamic-map template-map 1

  set transform-set vclient-tfs

  !

  !

  crypto map map isakmp authorization list vclient-group

  crypto map map client configuration address respond

  crypto map map 1 ipsec-isakmp dynamic template-map

  !

  !

  !

  !

  interface Loopback0

  ip address 172.16.1.1 255.255.255.240

  !

  interface FastEthernet0

  ip address 10.130.23.246 255.255.255.240

  speed auto

  crypto map map

  !

  interface Serial0

  no ip address

  shutdown

  !

  ip local pool pool192 192.168.1.1 192.168.1.254

  ip classless

  ip route 192.168.1.0 255.255.255.0 FastEthernet0

  no ip http server

  ip pim bidir-enable

  !

  !

  !

  !

  line con 0

  line aux 0

  line vty 0 4

  !

  no scheduler allocate

  end

   Client 4.01的配置:

  新建一個connection entry,參數(shù)中name任意起一個,host填入 access server的f0地址10.130.23.246,

  group auahentication中name填vclient-group,password填vclient-key.

  5、測試:

  (1)在pc上運行 client,連接 access server。

  (2)ipconfig/all,查看獲取到的ip地址與其他參數(shù)。

  (3)在router,show cry isa sa,看連接是否成功。

  (4)從router,ping client已經(jīng)獲取到的ip地址,通過。

  (5)從client,ping router的lo0配置的地址172.16.1.1,通過。

  (6)查看 client軟件的status--statistics,可以看到加密與解密的數(shù)據(jù)量。

  (7)1720上show cry ip sa, 也可以查看加密與解密的數(shù)據(jù)量。

  6、常用調(diào)試?

  show cry isakmp sa

  show cry ipsec sa

  clear cry sa

  clear cry isakmp

  debug cry isakmp #####這是最常用的debug命令,連接的基本錯誤都可以用它來找到

  debug cry ipsec

  二、easy client的配置(network-extension mode)

  實驗網(wǎng)絡(luò)拓撲:

  router3662( client)---switch---router1720 ( access server)

  pc ( client 4.01)------|

  3662接口ip:

  f0/0:10.130.23.244/28

  f0/1:172.16.2.1/24

  1720接口ip:

  f0:10.130.23.246/28

  lo0:172.16.1.1/24

  pc配置:

  ip:10.130.23.242/28

  gw:10.130.23.246

  1720的ios為c1700-k93sy7-mz.122-8.T5.bin

  3662的ios為c3660-jk9o3s-mz.123-1a.bin

  步驟:

  1、配置1720路由器,參照實驗一,設(shè)置為 server。

  2、配置3662路由器,設(shè)置 client參數(shù)

  cry ip client ez vclient ####定義crypto-ez name

  mode network-extension ####設(shè)置為網(wǎng)絡(luò)擴展模式

  group vclient-group key vclient-key ####設(shè)置登錄 server的組名與組口令

  peer 10.130.23.246 ####設(shè)置 server的ip地址,如果啟用dns,則可以用hostname

  connect auto ####設(shè)置為自動連接。如果設(shè)為手動,則必須使用cry ip client ez connect vclient命令來啟動通道。

  local-address F0/0 ####設(shè)置通道本地地址,選用f0/0,可以保證 server找到它

  3、定義加密數(shù)據(jù)入口,這里為f0/1

  inter f0/1

  cry ip client ez vclient inside

  4、定義加密數(shù)據(jù)出口,這里為連接 server的f0/0

  inter f0/0

  cry ip client ez vclient outside

  5、在1720上設(shè)置靜態(tài)路由,地址范圍為3662路由本地網(wǎng)絡(luò)的地址

  ip route 172.16.2.0 255.255.255.0 f0

  6、設(shè)置ip dhcp服務(wù) ####cisco推薦使用dhcp來進行本地網(wǎng)絡(luò)ip的分配。此步驟可選。

  service dhcp ####啟動dhcp 服務(wù)

  ip dhcp pool dhcppool ####定義dhcp pool name

  network 172.16.2.0 /24 ####定義可分配的IP地址段

  default-router 172.16.2.1 ####定義dhcp client的默認網(wǎng)關(guān)

  lease 1 0 0 ####設(shè)置ip保留時間

  import all ####如果配置了上級dhcp,server,則接受其所有參數(shù)

  ip dhcp excluded-address 172.16.2.1 ####將router上的地址排除

  測試:

  (1)配置好3662上的 client后,自動進行連接。可以通過debug cry isa、deb cry ip client ez、deb cry ip等debug命令輸出的信息查看過程與結(jié)果。

  (2)在1720上擴展ping,source 10.130.23.246 destination 172.16.2.1,通過。查看show cry ip sa,可以發(fā)現(xiàn)數(shù)據(jù)沒有進行加密。

  (3)在1720上擴展ping,source 172.16.1.1 destination 172.16.2.1,通過。查看show cry ip sa,可以發(fā)現(xiàn)數(shù)據(jù)通過加密進行傳輸。

  (4)在3660上擴展ping,source 172.16.2.1 destination 172.16.1.1,通過。查看show cry ip sa,可以發(fā)現(xiàn)數(shù)據(jù)通過加密進行傳輸。

  (5)在3660上擴展ping,source 10.130.23.244 destination 172.16.1.1,不通。查看show cry ip sa,可以發(fā)現(xiàn)數(shù)據(jù)不通過加密。

  (6)啟動pc client,ping 172.16.1.1,通過。在1720上查看show cry ip sa,可以看到數(shù)據(jù)通過加密進行傳輸。

  (7)在pc client,ping 172.16.2.1,通過。在1720和3662上查看show cry ip sa,可以看到數(shù)據(jù)通過加密進行傳輸。在1720上show cry isa sa,可以看到兩個連接。

  (8)在3660上擴展ping,source 172.16.2.1 destination 192.168.1.10(pc client獲得的ip),通過。查看show cry ip sa,可以發(fā)現(xiàn)數(shù)據(jù)通過加密進行傳輸。

  說明:

  (1)不同平臺,不同ios版本,easy client的配置有所不同。特別是加密數(shù)據(jù)入出接口的配置,配置接口前后,用show cry ip client ez來查看與驗證。

  (2)network-extension模式, server和 client兩端的內(nèi)部網(wǎng)絡(luò)之間可以通過ip地址互相訪問。

  (3)以上配置均沒有啟用split tunnel。設(shè)置split tunnel的方法:首先參考實驗(一),設(shè)置acl 133和cry isa client conf group中的參數(shù),完成后,可以實現(xiàn)測試(1)-(5)。要實現(xiàn)Pc client和3662 client 互通,即測試(6)-(8),還要在1720 的acl 133中添加兩條,分別是access 133 permit ip 192.168.1.0 0.0.0.255 any、access 133 permit ip 172.16.2.0 0.0.0.255 any。

  (4)修改1720配置后,需要復位通道,才可以起作用。在pc端,是通過disconnect再connect來實現(xiàn);在3662上,通過clear cry ip client ez來復位。

  常用調(diào)試命令:

  show cry ip client ez

  clear cry ip client ez

  deb cry ip client ez

  show cry ip sa

  deb cry isa

  show cry isa sa

  三、easy client的配置(client mode)

  實驗網(wǎng)絡(luò)拓撲同實驗(二)

  實驗步驟參考實驗(二),其中第二步,將mode network-extension改為mode client。

  測試:

  (1)配置好3662上的 client后,自動進行連接??梢酝ㄟ^debug cry isa、deb cry ip client ez、deb cry ip等debug命令輸出的信息查看過程與結(jié)果。

  (2)在1720上擴展ping,source 10.130.23.246 destination 172.16.2.1,不通。

  (3)在1720上擴展ping,source 172.16.1.1 destination 172.16.2.1,不通。這是因為3662端ip數(shù)據(jù)流是通過nat進行傳輸。

  (4)在3660上擴展ping,source 172.16.2.1 destination 172.16.1.1,通過。查看show cry ip sa,可以發(fā)現(xiàn)數(shù)據(jù)通過加密進行傳輸。在1720上打開deb ip icmp,可以看到echo reply信息的dst地址為192.168.1.19( client 從 server獲取的ip地址)。

  (5)在3660上擴展ping,source 10.130.23.244 destination 172.16.1.1,不通。

  說明:

  (1)client 模式, client端內(nèi)部網(wǎng)絡(luò)采用nat方式與 server進行通信, client端網(wǎng)絡(luò)可以訪問server端網(wǎng)絡(luò)資源,server端網(wǎng)絡(luò)不能訪問client端內(nèi)部網(wǎng)絡(luò)資源。

  (2)client與network-extension兩種模式,show cry ip sa,可以看到local ident是不同的。

  (3)client模式下,用show ip nat statistics,可以看到nat的配置與數(shù)據(jù)流量。

  (4)關(guān)于split tunnel,client模式的easy client,與pc的 client類似,配置split tunnel的方法也相同。

  常用調(diào)試命令:

  show cry ip client ez

  clear cry ip client ez

  deb cry ip client ez

  show cry ip sa

  deb cry isa

  show cry isa sa

  show ip nat statistics

  四、site to site 的配置(采用pre-share)

  實驗網(wǎng)絡(luò)拓撲:

  router3662---switch---router1720

  3662接口ip:

  f0/0:10.130.23.244/28

  f0/1:172.16.2.1/24

  1720接口ip:

  f0:10.130.23.246/28

  lo0:172.16.1.1/24

  1720的ios為c1700-k93sy7-mz.122-8.T5.bin

  3662的ios為c3660-jk9o3s-mz.123-1a.bin

  步驟:

  以1720為例進行配置

  (1)配置靜態(tài)路由 ####在配置之前,需要保證兩方的網(wǎng)絡(luò)可以互相訪問。

  ip route 172.16.2.0 255.255.255.0 10.130.23.244

  (2)定義加密數(shù)據(jù)的acl

  access 144 permit ip 172.16.1.0 0.0.0.255 172.16.2.0 0.0.0.255

  (3)定義isakmp policy

  cry isa policy 1

  authentication pre-share ####采用pre-share key進行驗證

  ####authentication參數(shù)必須配置,其他參數(shù)如group、hash、encr、lifetime等,如果進行配置,需要注意兩個路由器上的對應(yīng)參數(shù)配置必須相同。

  (4)定義pre-share key

  cry isa key pre-share-key address 10.130.23.244

  ####其中pre-share-key 為key,兩個路由器上要一樣

  ####其中10.130.23.244為peer路由器的ip地址。

  (5)定義transform-set

  cry ipsec transform-set -tfs esp-3des esp-sha-hmac

  ####其中-tfs為transform-set name,后面兩項為加密傳輸?shù)乃惴?/p>

  mode transport/tunnel #####tunnel為默認值,此配置可選

  (6)定義crypto map entry

  cry map -map 10 ipsec-isakmp

  ####其中-map為map name,10 是entry 號碼,ipsec-isakmp表示采用isakmp進行密鑰管理

  match address 144 ####定義進行加密傳輸?shù)臄?shù)據(jù),與第二步對應(yīng)

  set peer 10.130.23.244 ####定義peer路由器的ip

  set transform-set -tfs ####與第?*蕉雜?br />; ####如果一個接口上要對應(yīng)多個 peer,可以定義多個entry,每個entry對應(yīng)一個peer

  (7)將crypto map應(yīng)用到接諫?br />; inter f0 #####通道入口

  cry map -map

  (8)同樣方法配置3662路由器。

  1720的完整配置:

  1720#sh run

  Building configuration...

  Current configuration : 1217 bytes

  !

  version 12.2

  service timestamps debug uptime

  service timestamps log uptime

  no service password-encryption

  !

  hostname 1720

  !

  logging buffered 4096 debugging

  no logging rate-limit

  enable password CISCO

  !

  username vclient1 password 0 vclient1

  mmi polling-interval 60

  no mmi auto-configure

  no mmi pvc

  mmi snmp-timeout 180

  ip subnet-zero

  !

  !

  ip domain-name fjbf.com

  !

  ip audit notify log

  ip audit po max-events 100

  !

  crypto isakmp policy 1

  encr 3des

  authentication pre-share

  group 2

  crypto isakmp key pre-share-key address 10.130.23.244

  !

  !

  crypto ipsec transform-set -tfs esp-3des esp-sha-hmac

  !

  crypto map -map 10 ipsec-isakmp

  set peer 10.130.23.244

  set transform-set -tfs

  match address 144

  !

  !

  !

  !

  interface Loopback0

  ip address 172.16.1.1 255.255.255.0

  !

  interface FastEthernet0

  ip address 10.130.23.246 255.255.255.240

  speed auto

  crypto map -map

  !

  interface Serial0

  no ip address

  encapsulation ppp

  no keepalive

  no fair-queue

  !

  ip classless

  ip route 172.16.2.0 255.255.255.0 10.130.23.244

  no ip http server

  ip pim bidir-enable

  !

  !

  access-list 144 permit ip 172.16.1.0 0.0.0.255 172.16.2.0 0.0.0.255

  !

  !

  line con 0

  exec-timeout 0 0

  speed 115200

  line aux 0

  line vty 0 4

  login

  !

  end  以上內(nèi)容來自互聯(lián)網(wǎng),希望對大家有所幫助。

554278