2015年7月29日

Cisco FastEthernet1 VRF aware設定

Fa1 Interface and mgmtVrf


Caution The Ethernet management port is intended for out-of-band access only. Like the console port, the Ethernet management port has direct access to critical resources on the switch. Connecting this port to an in-band network might cause performance degradation and vulnerability to a denial of service attack.

All features that use fa1 now need to be VRF-aware.

Note You cannot configure any other interface in the same routing domain and you cannot configure a different routing domain for the Fa1 interface.

On bootup the fa1 port assumes the following default configuration:
ip unicast-routing 
ip vrf mgmtVrf 
!
interface FastEthernet1
 ip vrf forwarding mgmtVrf
speed auto
duplex auto 
Switch# show ip vrf 
  Name                             Default RD          Interfaces
  mgmtVrf                                                   Fa1 
Because the management port is placed in mgmtVrf, you should be aware of the VRF aware commands required for the following tasks:
Ping
Telnet
TFTP
FTP
SSH

Note Command usage specific to the mgmtVrf are mentioned below. The additional configuration needed to make the feature work needs to be configured.

Ping

If you want to ping an IP address that is reachable through an fa1 port, enter the following command:
Switch# ping vrf  mgmtVrf ip address
  
For example,
Switch# ping vrf mgmtVrf 20.20.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

TraceRoute

Switch# traceroute vrf mgmtVrf ip address
Eg: Switch# traceroute vrf mgmtVrf 20.20.20.1
Type escape sequence to abort.
Tracing the route to 20.20.20.1
 1 20.20.20.1 0 msec 0 msec *

Telnet

If you want to Telnet to a remote switch through the Fa1 port, enter the following command:
Switch# telnet  /vrf mgmtVrf
word  IP address or hostname of a remote system
An example
Switch# telnet 20.20.20.1 /vrf mgmtVrf
Trying 20.20.20.1 ... Open
User Access Verification
Password: 
switch> en
Password: 
switch#

TFTP

If you want to use Fa1 port for TFTP operation, configure the Fa1 port as the source interface for TFTP as follows:
Switch# ip tftp source-interface fastEthernet1

FTP

If you want to use an Fa1 port for an FTP operation, configure the Fa1 port as the source interface for FTP as follows:
Switch# ip ftp source-interface fastEthernet1

SSH

If you want initiate SSH from your switch through the Fa1 port, enter the following command:
Switch# ssh -l <login name> -vrf mgmtVrf <ip address>
For example,
Switch# ssh -l xyz -vrf mgmtVrf 20.20.20.1

2015年2月9日

Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.

Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.


解決方法:
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk

2014年7月2日

Exchange 2010 Management Shell 匯出範例

查網路上的匯出範本
http://community.spiceworks.com/topic/151529-list-of-all-mailboxes-on-exchange-2010-sp1

結果中文姓名是問號

export-csv後面要加參數 -encoding utf8即可解決

get-mailbox | select-object displayname, SamAccountName, Organization, OrganizationalUnit, HiddenFromAddressListsEnabled, PrimarySmtpAddress, RecipientType, RecipientTypeDetails | export-csv -path c:\test.csv -encoding utf8



Get-Mailbox -ResultSize Unlimited | ForEach-Object {Get-MailboxStatistics -Identity $_.Identity | Select-Object DisplayName, TotalItemSize}

2013年9月13日

手動更新Exchange Server 2010離線通訊錄

Exchange Management Console-->組織組態-->信箱-->離線通訊錄-->右鍵-->更新

或按右鍵內容可以設定排程

2012年4月25日

設定httpd遇到的錯誤訊息

DocumentRoot must be a directory  -->關閉selinux

echo 0 > /selinux/enforce


httpd apr_sockaddr_info_get() failed --> /etc/hosts 設定主機名稱

httpd start failed without error message -->  logs資料夾不存在






2012年4月10日

VNC在Win7無法使用Ctrl+Alt+Del登入

開啟 本機群組原則管理器->電腦設定->系統管理範本->Windows元件->Windows登入選項->停用或啟用軟體Secure Attention Sequence->啟用

2012年2月17日

VSFTPD設定

不讓某帳號離開家目錄
修改vsftpd.conf
chroot_list_enable=yes //啟動chroot_list_file檔案的功能
chroot_list_file=/etc/vsftpd.chroot_list //列在裡面的使用者,無法離開家目錄

預設讓所有帳號不能離開家目錄,只有特定的帳號才行
chroot_local_user=yes
chroot_list_enable=yes //啟動chroot_list_file檔案的功能
chroot_list_file=/etc/vsftpd.chroot_list //列在裡面的使用者,可離開家目錄

追蹤者