顯示具有 Cisco 標籤的文章。 顯示所有文章
顯示具有 Cisco 標籤的文章。 顯示所有文章

2022年2月16日 星期三

Cisco 3850 Recovery 回復方式

 

Cisco 3850 Recovery 回復方式

無法開機原因很多,這只是其中的一種,此案是因為韌體更新時,未按照官方的正常程序(導致無法開機,但我依照官方的正常程序也是開不起來,言歸正傳,我還是寫下來,免得日後自己用的到。

ISO版本:cat3k_caa-universalk9.16.06.09.SPA.bin,該版本是免SA帳號的

情境:

原本Switch的版本是 cat3k_caa-universalk9.16.06.09.SPA的版本

原模式Bundel欲轉Install Mode

參考官網提供的手冊後,造成無法開機出現如下圖的畫面,可能是沒從頭到尾的研讀官網文件造成。

官方文件:https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/software/release/16-6/release_notes/ol-16-6-3850.html#pgfId-1134103

發生狀況

模式轉換失敗後可能會出現的訊息,找不到開機檔,會出現下列訊息

Booting...

Interface GE 0 link down***ERROR: PHY link is down

The "IP_ADDR" environment variable is not set.

Getting rest of image

Reading full image into memory...flash:cat3k_caa-base.SPA.03.07.05E.pkg: no such file or directory

loading flash:packages.conf

Reading full image into memory....done

Copying 'cat3k_caa-base.SPA.03.07.05E.pkg' into the buffer

Failed to open file: no such file or directory

Getting rest of image

Reading full image into memory...flash:cat3k_caa-base.SPA.03.07.05E.pkg: no such file or directory

loading flash:packages.conf

Reading full image into memory....done

Copying 'cat3k_caa-base.SPA.03.07.05E.pkg' into the buffer

Failed to open file: no such file or directory

The system is unable to boot automatically. The

BOOT environment variable needs to be set to a

bootable image.

switch:

 

解決方式:

1.      找支隨身碟格式化為FAT32

2.      把從官網下載來的bin檔拷進隨身碟裡

3.      在接上交換機器

4.      先在Switch : 下執行,flash_init

5.      Switch: dir usbflash0:

應該會看到以下訊息:

Directory of usbflash0:/

4  -rw-  407542491  cat3k_caa-universalk9.16.06.09.SPA.bin

32080412672 bytes available (407617536 bytes used)

6.      Switch: boot usbflash0:cat3k_caa-universalk9.16.06.09.SPA.bin #指定從usbflash0載入開機檔

7.      若有開機成功,請先確認從USB 開機的版本是哪個版本?

 

Switch>en

Switch#sh version

 

Cisco IOS XE Software, Version 16.06.09

中間略

Technology Package License Information:

 

-----------------------------------------------------------------

Technology-package                   Technology-package

Current             Type             Next reboot 

------------------------------------------------------------------

ipbasek9            Permanent        ipbasek9

 

Base Ethernet MAC Address          : 00:56:2b:7a:50:00

Motherboard Assembly Number       : 73-16297-04

Motherboard Serial Number          : FOC20233B3C

Model Revision Number              : AA0

Motherboard Revision Number        : B0

Model Number                      : WS-C3850-24T

System Serial Number               : FCW2023D0NF

 

Switch Ports  Model          SW Version   SW Image                 Mode  

------  -----   -----             ----------      ----------                  ----  

* 1   32    WS-C3850-24T    16.6.9       CAT3K_CAA-UNIVERSALK9   BUNDLE

 

Configuration register is 0x102

 

接下來要做的是Bundle轉換 Install Mode

 

Switch#request platform software package clean switch all file flash:

 

This operation may take several minutes...

Running command on switch 1

Cleaning up unnecessary package files

Scanning boot directory for packages ... done.

Preparing packages list to delete ...

done.

The following files will be deleted:

[switch 1]:

/flash/cat3k_caa-guestshell.16.06.09.SPA.pkg

/flash/cat3k_caa-rpbase.16.06.09.SPA.pkg

/flash/cat3k_caa-rpcore.16.06.09.SPA.pkg

/flash/cat3k_caa-srdriver.16.06.09.SPA.pkg

/flash/cat3k_caa-universalk9.16.06.09.SPA.conf

/flash/cat3k_caa-webui.16.06.09.SPA.pkg

/flash/packages.conf

 

Do you want to proceed? [y/n]y

[switch 1]:

Deleting file flash:cat3k_caa-guestshell.16.06.09.SPA.pkg ... done.

Deleting file flash:cat3k_caa-rpbase.16.06.09.SPA.pkg ... done.

Deleting file flash:cat3k_caa-rpcore.16.06.09.SPA.pkg ... done.

Deleting file flash:cat3k_caa-srdriver.16.06.09.SPA.pkg ... done.

Deleting file flash:cat3k_caa-universalk9.16.06.09.SPA.conf ... done.

Deleting file flash:cat3k_caa-webui.16.06.09.SPA.pkg ... done.

Deleting file flash:packages.conf ... done.

 SUCCESS: Files deleted.

 

把韌體檔案從隨身碟拷進內建的Flash

Switch#copy usbflash0:cat3k_caa-universalk9.16.06.09.SPA.bin flash:

Destination filename [cat3k_caa-universalk9.16.06.09.SPA.bin]? 直接按下Enter

Copy in progress...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

中間略

407542491 bytes copied in 61.886 secs (6585375 bytes/sec)

Switch#dir flash:

Directory of flash:/

 

7746  -rw-          2097152  Feb 11 2022 14:28:12 +00:00  nvram_config

7747  -rw-        407542491  Feb 11 2022 14:36:52 +00:00  cat3k_caa-universalk9.16.06.09.SPA.bin

23233  drwx             4096  Feb 11 2022 14:25:13 +00:00  dc_profile_dir

38722  -rw-              616   Feb 7 2022 10:40:28 +00:00  vlan.dat

38723  -rw-             6170   Jun 7 2017 01:46:18 +00:00  startupconfig

15490  drwx             4096  Feb 11 2022 14:24:56 +00:00  .installer

38725  -rw-              555  Feb 11 2022 14:24:56 +00:00  bootloader_evt_handle.log

15492  drwx             4096   Feb 7 2022 14:00:43 +00:00  core

23235  drwx             4096   Feb 7 2022 13:49:32 +00:00  .prst_sync

38726  drwx             4096   Feb 7 2022 13:49:36 +00:00  .rollback_timer

69697  drwx             4096   Feb 7 2022 13:49:39 +00:00  gs_script

77442  drwx             4096   Feb 7 2022 13:49:39 +00:00  tech_support

38727  -rw-           128103  Feb 11 2022 14:25:34 +00:00  memleak.tcl

15493  drwx             4096   Feb 7 2022 15:00:02 +00:00  .dbpersist

38729  -rw-                0   Feb 7 2022 14:00:22 +00:00  rdope_out.txt

38730  -rw-               90   Feb 7 2022 14:00:34 +00:00  rdope.log

38731  -rw-          2097152  Feb 11 2022 14:28:12 +00:00  nvram_config_bkup

15494  drwx             4096   Feb 7 2022 14:00:40 +00:00  onep

 

1621966848 bytes total (1121218560 bytes free)

 

接著展開檔案

利用Switch all 更新所有在Stack上的交換機

利用 auto-copy .bin檔從Flash自動拷貝到在Stack上的其他switch

Switch#request platform software package expand switch all file flash: cat3k_caa-universalk9.16.06.09.SPA.bin auto-copy

[1]: Expanding file

 

*Feb 11 14:41:05.225: %IOSXE-5-PLATFORM: Switch 1 R0/0: Feb 11 14:41:05 packtool.sh: %INSTALL-5-OPERATION_START_INFO: Started expand package flash:cat3k_caa-universalk9.16.06.09.SPA.bin[1]: Finished expanding all-in-one software package in switch 1

SUCCESS: Finished expanding all-in-one software package.

 

*Feb 11 14:42:09.466: %IOSXE-5-PLATFORM: Switch 1 R0/0: Feb 11 14:42:09 packtool.sh: %INSTALL-5-OPERATION_COMPLETED_INFO: Completed expand package flash:cat3k_caa-universalk9.16.06.09.SPA.bin

 

清除開機參數

 

Switch#conf t

Switch(config)# no boot system

Switch(config)# boot system flash:packages.conf

Switch(config)# end

Switch#write memory

 

檢查開機參數值

Switch# show boot

---------------------------

Switch 1

---------------------------

Current Boot Variables:

BOOT variable = flash:packages.conf;

Boot Variables on next reload:

BOOT variable = flash:packages.conf;

Manual Boot = yes

Enable Break = yes

Switch#

 

檢查一下Flash裡有沒有packages.conf

可以把flash:下的packages.conf拷到隨身碟上,在拿到PC上去查看(notepad可開啟)

 

重新開機

Switch# reload

 

確認一下開機版本及模式

Switch# sh version

Cisco IOS XE Software, Version 16.06.09

中間略

Technology Package License Information:

 

-----------------------------------------------------------------

Technology-package                   Technology-package

Current             Type             Next reboot 

------------------------------------------------------------------

ipbasek9            Permanent        ipbasek9

 

Base Ethernet MAC Address          : 00:56:2b:7a:50:00

Motherboard Assembly Number       : 73-16297-04

Motherboard Serial Number          : FOC20233B3C

Model Revision Number              : AA0

Motherboard Revision Number        : B0

Model Number                      : WS-C3850-24T

System Serial Number               : FCW2023D0NF

 

Switch Ports  Model          SW Version   SW Image                 Mode  

------  -----   -----             ----------      ----------                  ----  

* 1   32    WS-C3850-24T    16.6.9       CAT3K_CAA-UNIVERSALK9   Install

 

Configuration register is 0x102

 

2018年7月26日 星期四

Cisco Port Channel設定

建立port channel
建立port channel 是為了對應多網卡搭配NIC Team增加頻寬及容錯,或是使用於連接user用的Edge switch 增加頻寬及容錯。
指令: 因為跨多個VLAN以及與Edge Switch 與L3之間換承載多的VLAN所以設定為Trunk
interface Port-channel1                                ;建立Port Channel 1
switchport trunk encapsulation dot1q       ;設定為802.1q
switchport mode trunk                                 ;設為Trunk
interface range FastEthernet1/0/47 - 48 進入實體的Port
channel-group 1 mode passive                      指定Channel Group 的模式
switchport trunk encapsulation dot1q
switchport mode trunk

2018年7月20日 星期五

Cisco 3750 Trunk Port設定

把Cisco 3750 的 48 Port設定為Trunk與下端的2960的48Port銜接
在3750上的設定
interface FastEthernet1/0/48
switchport trunk encapsulation dot1q
switchport mode trunk

在2960上的設定
interface GigabitEthernet0/48
switchport mode trunk

Cisco VLan ACL設定

任何網段要與Vlan 10 互通,但 Vlan 20~30不互通,方法有兩種可以參考

ip routing 啟動中

interface Vlan10
 ip address 192.168.10.254 255.255.255.0
!
interface Vlan20
 ip address 192.168.20.254 255.255.255.0
!
interface Vlan30
 ip address 192.168.30.254 255.255.255.0
!

方法一
vlan filter vlan20 vlan-list 20
vlan filter vlan30 vlan-list 30

vlan access-map vlan20 10
match ip address 103
action forward
vlan access-map vlan30 10
match ip address 104
action forward

定義ACL 編號及原則
access-list 103 deny   ip 192.168.20.0 0.0.0.255 192.168.30.0 0.0.0.255
access-list 103 permit ip any any
access-list 104 deny   ip 192.168.30.0 0.0.0.255 192.168.20.0 0.0.0.255
access-list 104 permit ip any any

用方法一設定,當兩個互不相通的網段互ping時,則會出現
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3



方法二
定義ACL 編號及原則
access-list 103 deny   ip 192.168.20.0 0.0.0.255 192.168.30.0 0.0.0.255
access-list 103 permit ip any any

access-list 104 deny   ip 192.168.30.0 0.0.0.255 192.168.20.0 0.0.0.255
access-list 104 permit ip any any

interface vlan 20 進到vlan 20裡
ip access-group 103 in 套用acl 編號103

interface vlan 30
ip access-group 104 in

用方法二設定,當兩個戶不相通的網段互ping,會出現以下訊息
Request timeout for icmp_seq 13
36 bytes from 192.168.20.254: Communication prohibited by filter
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
 4  5  00 5400 a3eb   0 0000  40  01 2267 192.168.20.10  192.168.30.252

Request timeout for icmp_seq 14
36 bytes from 192.168.20.254: Communication prohibited by filter
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
 4  5  00 5400 99fd   0 0000  40  01 2c55 192.168.20.10  192.168.30.252

2015年11月3日 星期二

Cisco 胖AP 的基本設定

Cisco 胖AP 的基本設定 (Autonomous AP Basic Config)
Part 1. 快速讓胖AP可用:

Step.1 設定802.11的無線SSID:

ap#config t

ap(config)#dot11 ssid MySSID

ap(config-ssid)#authentication open

ap(config-ssid)#guest-mode

設定的同時,也必需指令驗證方式,我們先用開放驗證(open)方式讓它通就好。而guest-mode是讓SSID進行廣播,可以方便初始化的連線,為了安全可以不用設定(Client端需要指定好SSID才能連線)

Step.2 指定無線訊號的SSID與開啟無線通訊:

下面是一顆1131AG的AP,所以有兩個協定802.11a與802.11g,分別在dot11Radio 0與dot11Radio 1,預設是關閉的,需要進去介面打開:

ap(config)#int dot11Radio 0

ap(config-if)#ssid MySSID

ap(config-if)#no shutdown

ap(config)#int dot11Radio 1

ap(config-if)#ssid MySSID

ap(config-if)#no shutdown

Step.3 設定BVI:

如果是DHCP的環境是可以略過這個步驟,因為預設會自已抓好,Fat AP是靠BVI(Bridge Virtual Interface)來讓實體網路與無線網路通訊,所以必需設定一個實體環境的IP給它:

ap(config-if)#int bvi 1

ap(config-if)#ip addr dhcp

或是以手動指定IP:

ap(config-if)#int bvi 1

ap(config-if)#ip addr 192.168.1.3 255.255.255.0

搞定!!把自已的電腦利用無線連看看!!


Part 2. 常用基本設定:

ARP Cache:
AP的運作就像Hub一樣,廣播是它們必做的事,開啟Arp-Cache,可以加快效能(雖然感受不到),
當AP收到一個ARP封包,會比對Cache裡的資料,如果不在Cache就不廣播把封包丟掉,以減少廣播封包。

ap(config)#dot11 arp-cache

Time:
可能希望與NTP Server同步時間

ap(config)#sntp server 220.130.158.82

或是直接設定時間

ap#clock set 12:21:00 3 Sep 2010

再show一下時間狀況

ap#show clock

DNS:
環境沒有DHCP Server的話,可以手動幫AP設定DNS Server

ap(config)#ip name-server 168.95.1.1

SNMP:
可能需要開SNMP給網管軟體看 -

最後面可以選擇ro(Read Only)或是rw(Read and Write)

ap(config)#snmp-server community public ro

Part 3. 基本加密驗證:
通常胖AP較常用的是WEP或是WPA-PSK這兩種驗證方式,說明如下

WEP:
首先我們先看一下Web的驗證方式,可以更了解為何這麼設定,
WEP驗證基本上是不看人的,只看那把Key,如下:

Client --------------------------------------------- AP

Authentication Request--> --> <--<--Authentication Response + Challenge Clear-text Use text to Encrypt (Association Request) -->--> <--<--Compare static WEP keys & Association Confirmation

從上面的驗證流程可以知道AP在第二個步驗會請Client輸入Cler-text,這就是我們在連線AP時,

會跳出一個畫面(或在連線的設定裡)要我們輸入一個passphase,輸入後就可以把資料加密送給AP,

AP收到後就用我們現在要設定的Key來解密碼看,可以解開就送Association Confirmation給Client。

了解流程後,在設定Cisco AP時要記住:

1.設定驗證放式是在SSID下

2.設定加密方式要在無線訊號(Radio)下

而設定順序一定要先設定加密方式,再設定驗證方式,因為要先有key,才可以在驗證方式裡選用key麻~下面就先到無線訊號下設定加密,設定WEP加密方式要先設定一個key1~4, size可以選擇40或128,設定40就需要設定十位元的文字(連線的密碼),設定128的話,需要設定26個字的密碼,如下的1234567890就是很Client連線要輸入的key.然後再指定模式為WEP

ap(config)#inter dot11Radio 0

ap(config-if)#encryption key 1 size 40 1234567890

ap(config-if)#encryption mode wep mandatory key-hash

然後再進到ssid裡面,指定驗證模式為開放

ap(config)#dot11 ssid abc

ap(config-ssid)#authentication open

如此就完成WEP的設定啦^^

凍一下~~~不是設定WEP嗎?怎麼驗證是用開放咧!!??

嘿~這就要從什麼是開放說起,下面是開放驗證流程:

Client ------------------------------------ AP Authentication Request-->--> <--<--Authentication Response Association Request -->--> <--<--Association Confirmation

再往上與WEP的流程比較一下,會發覺整個流程都一樣,說穿了WEP只是在開放驗證裡多了一個passphase的確認機制,所以Cisco認為WEP還是一個開放的認證(真是嚴格呀~)

Ps. 上面OPEN流程也可以說明為什麼在PartI時,我們只設authenticaion open,就可以不用輸入密碼使用AP了

WPA-PSK:
因為FAT AP通常不會結合到RADIUS等的認證平台,反而在導Thin AP時都需要與驗證平台做驗證,在沒有驗證平台的情況下,我們可以透過設定PreShareKey(PSK)來取代驗證平台,方法如下:
一樣,要先在無線頻道下指定加密方式,因為是WPA,會用TKIP來動態更改key加強安全

ap(config)#inter dot11Radio 0

ap(config-if)#encryption mode ciphers tkip

再進到ssid下面設定驗證方式,由於只是wpa-psk,所以不用設定EAP驗證,我們以開放式(open)驗證即可,而key-managemnet就是用WPA,最後再設定WPA的PreShareKey(即Client連線的密碼)就搞定啦!

ap(config)#dot11 ssid abc

ap(config-ssid)#authentication open

ap(config-ssid)#authentication key-management wpa

ap(config-ssid)#wpa-psk ascii 12345678

設完後你就會發覺,原來WPS-PSK的驗證流程,還是OPEN的四個方式,但比WEP還強的是,有TKIP的自動變更key機制,所以較為安全^^(我說的是…"較為")

2015年10月15日 星期四

cisco 2504 wireless controller 基本設定(三)


  1. 登入Controller 後,在WLANs -> WLAN ID下的數字 -> 在點選QoS 頁面 -> 把Application Visibility  Enabled勾選起來,在Monitor頁面才會顯示通訊種類 


  2. 在WIRELESS -> Access Points -> All APs -> Radios -> 802.11a/n/ac -> 選擇要調整的AP 右邊的Config選項
  3.  將頻寬選到 80MHz,另一個選項 Assignment Method 則改成Custom 選擇其中一個(153,149,157,161)  當AP位置靠的越近,頻率一定要調開,不然會干擾,若多個AP,則是AP位置離的越遠,頻率可以重複,由於距離變遠了,即使頻率相同,干擾會減少 
  4. 另外,如果內部網路已經確定沒有802.11ab的無線網卡的話,可以把一些用不到的頻率關掉,以減少干擾
    從WIRELESS -> 802.11a/n/ac -> High Throughput (802.11n/ac) 把右手邊54M 以下的通通關掉 

2015年10月8日 星期四

Cisco 瘦AP加入Controller的比較常用的方法如下

Cisco 瘦AP加入Controller的比較常用的方法如下:
1.區域廣播(Local IP Subnet Discovery):
原理:先用廣播的方式,找到環境內的Controller,也就是thin AP與Controller在同一個網段裡,這是最快也最簡單的方式。
方法:只要把AP插上電與網路即可。

2.空中廣播Over The Air Provisioning(OTAP):
原理:當從網路線上廣播找不到controller時,第二步透過空氣中的無線電廣播,找尋有沒有其它ap已經有controller的資訊,有的話就跟著去找到Controller
方法: 把AP放置在已加入controller的thin ap 附近。

3.Locally Stored Controller IP Address:
原理:如果從空氣中找不到其它AP的訊號,第三步就是找尋自已AP內是不是有設定過Controller的資訊?Controller 的IP地址,有的話即透過此IP地址去找Controller
方法:以console線接到ap,從CLI輸入下列指令
lwapp ap controller ip add x.x.x.x
上面指令即是告訴AP controller在哪裡,如果環境沒有dhcp先配方ip的話,需要先設定ip給thin ap,指令如下:
lwapp ap ip address x.x.x.x x.x.x.x

cisco 2504 wireless controller 基本設定(二)

  1. 利用瀏覽器連線到192.168.0.222,並登入剛剛設定的帳號及密碼

  2. 點選左上方的Advance

  3. 接著要修改SSID的驗證方式,請點選WLANs頁面 -> WLAN ID 的數字 1的地方

  4. General頁面中的Broadcast SSID 要勾選

  5. Security -> Layer 2 -> WPA Policy 及 WPA Encryption TKIP 要勾以及Authentication Key Management 要改選擇PSK 然後輸入Pre-Share Key

  6. 設定完之後請點選右上Apply
  7. 新增另一個SSID Name,點選右邊的Create NEW

  8. 輸入另一個SSID Name : Contoso-1,然後點選左上角的Apply
  9. 接著把 Contoso-1的status勾選起來
  10. 設定Contoso-1 SSID的 安全性,頁面選擇Security -> Layer 2 -> WPA Policy 及 WPA Encryption TKIP 要勾以及Authentication Key Management 要改選擇PSK 然後輸入Pre-Share Key

    按下畫面右上角的Apply 套用及右上的Save Config,完成SSID新增的工作

cisco 2504 wireless controller 基本設定(一)

控制器為 cisco 2504 wireless controller
建議把韌體版本更新到 Software Version 8.1.102.0 不然會搞死自己、不然會搞死自己、不然會搞死自己,因為很重要所以要說三次,尤其是在跟Cisco AP1702I 搭配時...
ip:192.168.0.222 / 255.255.255.0
GW :192.168.0.1
DNS : 192.168.0.2
兩個SSID :  Contoso 及 Contoso-1
WPA+WPA2密碼驗證


AP總共有2顆
AP Name : Contoso-AP1 及 Contoso-AP2
Contoso-AP1 IP: 192.168.0.219
Contoso-AP2 IP: 192.168.0.223

首先要對Controller做基本設定如下
 Would you like to terminate autoinstall? [yes]: yes
System Name [Cisco_be:72:24] (31 characters max): WLC2504
Enter Administrative User Name (24 characters max): cisco
Enter Administrative Password (3 to 24 characters): ********
Re-enter Administrative Password                 : ********

Enable Link Aggregation (LAG) [yes][NO]: yes
Management Interface IP Address: 192.168.0.222
Management Interface Netmask: 255.255.255.0
Management Interface Default Router: 192.168.0.1

Cleaning up Provisioning SSID

Error: failed to disable Day0 ssid. return Code : 7

Management Interface VLAN Identifier (0 = untagged): 0
Management Interface DHCP Server IP Address: 192.168.0.2

Virtual Gateway IP Address: 1.1.1.1

Multicast IP Address: 239.0.1.1

Mobility/RF Group Name: ContosoGroup

Network Name (SSID): Contoso

Configure DHCP Bridging Mode [yes][NO]: no

Allow Static IP Addresses [YES][no]: yes

Configure a RADIUS Server now? [YES][no]: no
Warning! The default WLAN security policy requires a RADIUS server.
Please see documentation for more details.

Enter Country Code list (enter 'help' for a list of countries) [US]: TW

Enable 802.11b Network [YES][no]: yes
Enable 802.11a Network [YES][no]: yes
Enable 802.11g Network [YES][no]: yes
Enable Auto-RF [YES][no]: yes
Enter the date in MM/DD/YY format: 10/08/15
Enter the time in HH:MM:SS format: 09:05:35
Would you like to configure IPv6 parameters[YES][no]: no

Configuration correct? If yes, system will save it and reset. [yes][NO]: yes
Cleaning up Provisioning SSID

Configuration saved!
Resetting system with new configuration...

Configuration saved!
Resetting system with new configuration...
重新開機過程略
Starting mDNS Services: ok
Starting Management Services:
   Web Server:    CLI:    Secure Web: ok

(Cisco Controller)

Enter User Name (or 'Recover-Config' this one-time only to reset configuration to factory defaults)

User:




重新開機完成,接續第二篇

2015年10月7日 星期三

Cisco 3850 Vlan 設定

需求:
要將預設的vlan 1 IP網段為192.168.0.X/24  VLAN Interface IP設定為192.168.0.54
Port 數為1~10 Fiber Port 1~4

新增第二個VLAN 2 名稱為 Server
網段為192.168.200.X /24 VLAN 2 Interface IP 設定為192.168.200.1
Port 數為11~24

Switch>en
Switch#conf t
Switch(config)#vlan 2
Switch(config-vlan)#name server
Switch(config-vlan)#exit
Switch(config)#interface range GigabitEthernet 1/0/11-24
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 2
Switch(config-if-range)#exit
Switch(config)#interfacr vlan 2

Switch(config-vlan)# ip address 192.168.200.1 255.255.255.0

以上為新增Vlan 2, IP 及指定PORT數

Switch(config)#vlan 1
Switch(config)#interface range gigaEthernet 1/0/1-10
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 1

Switch(config-if-range)#exit
Switch(config)#interfacr range GigabitEthernet1/1/1-4
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 1

Switch(config-if-range)#exit
Switch(config)#interfacr vlan 1
Switch(config-vlan)# ip address 192.168.0.54 255.255.255.0

以上為修改Vlan 1, IP 及指定PORT數
 
Switch(config)# ip routing

以上為讓兩個網段可以互通

2015年2月5日 星期四

Cisco 3560G + ASA 5505設定

架構圖:

環境說明:
在真實案例中,其內部網段均為真實ip,記錄在網站上改採虛擬ip記錄
客戶內部共有三個Class C 網段
網段一:192.168.11.0/24
網段二:192.168.12.0/24
網段三:192.168.13.0/24

ISP業者給對外路由IP為:192.168.1.10/24   Default GW:192.168.1.1

Cisco ASA 5505 為透通模式,為了控管內部機器上網用,不作NAT用

操作過程:
ASA 5505改透通模式:
ciscoasa# conf t
ciscoasa(config)# firewall transparent

給實體的網路卡分配Vlan ID
ciscoasa(config)# interface Ethernet 0/0
ciscoasa(config-if)# switchport access vlan 2
ciscoasa(config-if)# no shutdown
ciscoasa(config-if)# interface Ethernet 0/1(也可以多定義其他Port數)
ciscoasa(config-if)# switchport access vlan 1
ciscoasa(config-if)# no shutdown


幫VLAN 命名並建立一個橋接虛擬群組
ciscoasa(config-if)# interface vlan 2
ciscoasa(config-if)# nameif outside
INFO: Security level for "outside" set to 0 by default.
ciscoasa(config-if)# bridge-group 1
ciscoasa(config-if)# interface vlan 1
ciscoasa(config-if)# nameif inside
INFO: Security level for "inside" set to 100 by default.
ciscoasa(config-if)# bridge-group 1


給Brige 網卡一個ip位置,為了方便管理,由於ISP業者無法多給一組ip,因此採用另一組網段的虛擬IP
ciscoasa(config-if)# interface bvi 1
ciscoasa(config-if)# ip address 172.16.0.253

啟動 ASA 的HTTP服務及定義哪些ip可以管理ASA,在這邊是讓所有的機器都可以管
ciscoasa(config-if)# http server enable
ciscoasa(config)# http 0.0.0.0 0.0.0.0 inside


定義讓3560G VLAN1的內部網段的asdme管理軟體,可以存取到asa的路由表
ciscoasa(config)# route inside 192.168.11.0 255.255.255.0 172.16.0.254
ciscoasa(config)# route inside 192.168.12.0 255.255.255.0 172.16.0.254
ciscoasa(config)# route inside 192.168.13.0 255.255.255.0 172.16.0.254

定義3560G VLAN2 的第48 Port,可以存取到asa設備路由表
ciscoasa(config)# route inside 172.16.0.0 255.255.255.0 172.16.0.254

定義預設對外的路由表
ciscoasa(config)# route outside 0.0.0.0 0.0.0.0 192.168.1.1

寫入設定
ciscoasa(config)#wr

Cisco 3560G 部分:
首先要建立兩個VLAN,一個WAN(對外用),一個LAN(Default),但系統原先就有一個了,所以,只要在建立一個就可以了

Switch# configure terminalSwitch(config)# vlan 2
Switch(config-vlan)# name wan


定義第48Port為Vlan 2
Switch(config)#interface gigaethernet 0/48
Switch(config-if)#switchpoint mode access vlan 2
Switch(config-if)#end

定義VLAN 2 的主要及次要 IP
Switch# conf t
Switch(config)# interface vlan 2
Switch(config-if)# ip address 192.168.1.10 255.255.255.0(ISP業者提供的IP)
Switch(config-if)# ip address 172.16.0.254 255.255.255.0 secondary(為了跟asa同網段管理用ip)

定義VLAN 1 的 主要 IP 及次要的IP
Switch# conf t
Switch(config)# interface vlan 1
Switch(config-if)# ip address 192.168.11.254 255.255.255.0
Switch(config-if)# ip address 192.168.12.254 255.255.255.0 secondary
Switch(config-if)# ip address 192.168.13.254 255.255.255.0 secondary

定義預設對外的路由
Switch(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.1(ISP業者提供的GW)

啟動路由表,讓兩個VLAN可以通
Switch(config)#ip routing

寫入設定
Switch(config)#wr

測試情況,
Client端的用戶IP : 192.168.11.1 Ping 192.168.11~13.254(三個網段的Gateway),狀況OK
Client端的用戶IP : 192.168.11.1 Ping 192.168.1.10(Cisco 3560的48 Port[wan]),狀況OK
Client端的用戶IP : 192.168.11.1 Ping 172.16.0.254(Cisco 3560的48 Port[wan],第二組IP),狀況OK
Client端的用戶IP : 192.168.11.1 Ping 172.16.0.253(ASA的 0/1 Port[inside],asa的管理IP),狀況OK