Friday, December 28, 2018

C3850-48P-L Switch 升级固件


Cisco IOS-XE 3.x

1. 下载 IOS-XE .bin 文件,链接https://software.cisco.com/download/home/284455380/type/282046477/release/3.6.9E(须先登录 Cisco 账户)

2. 通过 TFTP 传输 .bin 文件到交换机 flash
copy tftp://192.168.1.10/cat3k_caa-universalk9.SPA.03.06.09.E.152-2.E9.bin cat3k_caa-universalk9.SPA.03.06.09.E.152-2.E9.bin
3.  Install 模式升级
software install file flash:cat3k_caa-universalk9.SPA.03.06.09.E.152-2.E9.bin
4. 清理
software clean

若要升级到 Cisco IOS-XE 16.x 版本,遇到兼容性检测提示未满足包依赖
Candidate package compatibility checks failed because the following
package dependencies were not satisfied. Operation aborted.
则可尝试在安装命令后添加 new force
software install file flash:cat3k_caa-universalk9.16.06.04a.SPA.bin new force


Cisco IOS-XE 16.x

1. Install 模式升级 
request platform software package install switch all file flash:cat3k_caa-universalk9.16.06.04a.SPA.bin
2. 清理
request platform software package clean switch all file flash:
    或者
request platform software package clean 
注:  16.x 版本无 software install / software clean 命令,这里 switch all 指的是所有 switch

参考:
https://www.cisco.com/c/en/us/support/docs/switches/catalyst-3850-series-switches/117552-technote-cat3850-00.html
https://www.booches.nl/2016/03/cisco-ios-xe-16-x/
https://community.cisco.com/t5/switching/unable-to-use-quot-software-quot-command-on-cisco-catalyst-3850/td-p/2978615
https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/software/release/16-3/release_notes/ol-16-3-3850.html

Thursday, December 27, 2018

WPF 问题记录之 DataGridCell 的 TextBlock.Padding 属性不生效


修改 DataGridCell 的 TextBlock.Padding 属性或者 Padding 属性不生效


方案1,修改ControlTemplate
参考:
https://stackoverflow.com/questions/5246745/set-a-padding-on-datagridcells-in-wpf


方案2 ,修改 DataGridTextColumn 的 ElementStyle 属性
参考同一个贴子最上面的楼主回复
1  ok, I accepted your answer though I found an other way (a bit more of a hack, but easier in my case): Set up the margin property on the cell's content by using the ElementStyle property. Your solution is nicer though.
ElementStyle 属性用法参考:
https://blogs.msdn.microsoft.com/vinsibal/2008/08/19/wpf-datagrid-stock-and-template-columns/

Thursday, December 20, 2018

激活 Windows Server 2016 虚拟机里的系统

1. 查看当前系统(评估版本)可以升级到的版本
DISM /online /Get-TargetEditions

2.升级
DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula


Guest Operating System Key
Windows Server 2012 R2 Essentials K2XGM-NMBT3-2R6Q8-WF2FK-P36R2
Windows Server 2012 R2 Standard DBGBW-NPF86-BJVTX-K3WKJ-MTB6V
Windows Server 2012 R2 Datacenter Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW
Windows Server 2016 Essentials B4YNW-62DX9-W8V6M-82649-MHBKQ
Windows Server 2016 Standard C3RCX-M6NRP-6CXC9-TW2F2-4RHYD
Windows Server 2016 Datacenter TMJ3Y-NTRTM-FJYXT-T22BY-CWG3J


ProductKey 参考:https://www.altaro.com/hyper-v/hyper-v-automatic-virtual-machine-activation-windows-server-2016/

参考:
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj574204(v=ws.11)
https://social.technet.microsoft.com/Forums/windows/en-US/7e10693b-4317-4a48-b3a5-80744b96a816/windows-2012-r2-standard-evaluation-to-licenced-version?forum=winserver8setup

Tuesday, December 11, 2018

查看FortiGate防火墙硬件参数

查看FortiGate防火墙硬件参数:CPU, RAM, Flash, Hard Disk

Dashboard -> CLI Console:
get hardware status

把多个png文件转换成支持多个分辨率的ico文件

工具:ImageMagick 命令:magick convert -background transparent sample*.png sample.ico