Tuesday, July 12, 2011

Cisco IOS clock settings

set correct time zone:

clock timezone PCTime -8

 

set summer time old ios:

clock summer-time PCTime date Mar 13 2011 2:00 Nov 6 2011 2:00

 

New IOS have other nice settings, it's need setup just one time:

clock summer-time CDT recurring

 

set ntp server:

ntp server XXX.XXX.XXX.XXX

 

set clock:

clock set 10:30:00 Jul 12 2011

 

show clock:

show clock

Monday, July 11, 2011

VPN syslog error

If vpn is up but you have errors log

%CRYPTO-4-PKT_REPLAY_ERR: decrypt: replay check failed

 

for fix it add to router

crypto ipsec security-association replay window-size 1024

Friday, July 8, 2011

Change your Windows MTU

Example how to find your correct MTU
 
1. Find your Windows MTU:
netsh interface ipv4 show subinterfaces 
 
2. Find your ISP MTU:
ping yourISPgatewayIP -f -l 1400
incrice size until you get:
Packet needs to be fragmented but DF set.
Last sucsess ping size+28 is you correct MTU
 
3. For set MTU:
netsh interface ipv4 set subinterface "Local Area Connection" mtu=1472 store=persistent
 

 

 

  

Flexible NetFlow for IOS

 

If you use vpn links standart netflow don't work with vpn links. You need use flexible netflow.

It works well with vpn links. Update your IOS if your router don't support it.   

 

Example:

 

flow exporter NETFLOW1-EXPORTER

 

 description NetFlow Analyzer

 destination 172.16.0.1

 source Loopback0

 output-features

 transport udp 9996

 export-protocol netflow-v9

!

!

flow exporter NETFLOW2-EXPORTER

 description Scrutinizer

 destination 172.16.0.2

 source Loopback0

 output-features

 transport udp 9996

 export-protocol netflow-v9

!

!

flow monitor NETFLOW1

 record netflow-original

 exporter NETFLOW2-EXPORTER

 exporter NETFLOW1-EXPORTER

 cache timeout active 1

!

!

interface Tunnel12

 ip flow monitor NETFLOW1 input

 ip flow monitor NETFLOW1 output

!

!

interface FastEthernet1

 ip flow monitor NETFLOW1 input

 ip flow monitor NETFLOW1 output

 

 

link: http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6555/ps6601/ps6965/prod_white_paper0900aecd804be1cc.html

 

Sunday, June 19, 2011

ssh and MyEnTunnel

I use putty for configure my routers and some time for ssh tunnels for access to home network.

However putty need reconnect every time. MyEnTunnel can reconnect automatically and make your life easy. You can setup a lot of ports. 

For example for 3 RD for home network:
3310:192.168.1.10:3389
3311:192.168.1.11:3389
3312:192.168.1.12:3389

MyEnTunnel is free and you can download it from http://nemesis2.qx.net/pages/MyEnTunnel

Wednesday, March 30, 2011

Cisco router as dhcp client

Sometimes ISP provide only dhcp ip for branch offices.  When you use firewall, I hope you use it Smile, you need use rule for open dhcp traffic  in your firewall.



interface FastEthernet0/0
ip address dhcp
ip access-group ISP in


ip access-list extended ISP
permit udp any eq bootps any eq bootpc

Sunday, March 13, 2011

Bat file for reboot PC remotely

Sometimes you need reboot pc at night. It help you.

@echo off 
dsquery computer ou=workstations,dc=contoso,dc=com -o rdn > pc_workstations.txt
for /F "tokens=*" %%i in (pc_workstations.txt) do call :reboot %%i%
goto Ready

:Reboot
set remotepc=%1%
set remotepc=%remotepc:~1,-1%
shutdown /f /r /c "Reboot by administrator" /m \\%remotepc%
goto :EOF

:Ready