Wednesday, December 16, 2009

Cisco DMVPN sample hub script

I've done enough dmvpn turn ups now that having some scripts is really useful. The first one is for the hub configuration. I have left it with an eigrp routing protocol configuration but it isn't that different to use ospf and it will give you something to look up and figure out. I'll post a separate entry for the spoke configuration next.

!#####
! - DMVPN Hub script - sample 2821/51 or 3825/45 routers running 12.2.x ios code
!
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
!
hostname {router hostname}
!
logging count
logging message-counter syslog
logging buffered 4096
!
no aaa new-model
clock timezone PST -8
clock summer-time PDT recurring
!
no ip source-route
!
ip cef
!
no ip domain lookup
ip domain name {example.com}
no ipv6 cef
!
username {name} privilege 15 secret {some super secret password}
!
crypto isakmp policy 1
encr aes
authentication pre-share
group 2
crypto isakmp key {some long preshared key} address 0.0.0.0 0.0.0.0
crypto isakmp invalid-spi-recovery
crypto isakmp keepalive 10
!
crypto ipsec transform-set {some string like companyname-tset} esp-aes esp-sha-hmac
!
crypto ipsec profile {some string like companyname-prof}
set transform-set {same string like companyname-tset}
!
interface Loopback0
ip address {loopback IP} 255.255.255.255
no shut
!
interface Tunnel0
description - DMVPN Tunnel Interface - Hub configuration
bandwidth {set to the same as the internet bw - like 1544}
ip address 10.100.100.1 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp authentication {some string - has to match on the spokes}
ip nhrp map multicast dynamic
ip nhrp network-id {some id - match it to the eigrp AS}
ip nhrp holdtime 300
ip virtual-reassembly
ip tcp adjust-mss 1360
no ip split-horizon eigrp {eigrp AS number}
no ip mroute-cache
load-interval 60
delay 400
keepalive 5 4
tunnel source GigabitEthernet0/1
tunnel mode gre multipoint
tunnel key {some number - needs to match the hub}
tunnel protection ipsec profile {same string like companyname-prof}
no shut
!
interface GigabitEthernet0/0
description ***Internal LAN connection to switching core***
ip address {LAN IP} 255.255.255.0
no ip redirects
! - sample summary route statement
! ip summary-address eigrp 10.10.0.0 255.255.0.0 5
duplex auto
speed auto
no shut
!
interface GigabitEthernet0/1
description ***External Internet connection to outside switch***
ip address {Public IP of Hub} {Subnet of Public IP}
ip access-group inet in
no ip redirects
duplex auto
speed auto
no shut
!
router eigrp {eigrp AS number}
redistribute connected route-map redistribute-connected-rm
network 10.100.100.0 0.0.0.255
network {LAN IP} 0.0.0.255
no auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 {DG of Public IP}
no ip http server
no ip http secure-server
!
ip access-list standard redistribute-connected
permit {Lookback IP}
!
ip access-list standard vty_access
! - permit remote IP's
permit {public ip} {inverse public subnet} log
! - permit internal IP's
permit 10.0.0.0 0.255.255.255 log
!
ip access-list extended inet
remark Access list for Internet interface - permits DMVPN
permit udp any host {public IP of hub} eq non500-isakmp
permit udp any host {public IP of hub} eq isakmp
permit esp any host {public IP of hub}
permit ahp any host {public IP of hub}
permit gre any host {public IP of hub}
! allow ssh to the public interface
permit tcp {remote public ip} {inverse public subnet} host {public IP of hub} eq 22
! allow icmp if you want
permit icmp any any echo
permit icmp any any echo-reply
permit icmp any any time-exceeded
permit icmp any any unreachable
deny ip any any
!
snmp-server community {some string} RO
snmp-server location {some location}
snmp-server contact {some contact and number}
!
route-map redistribute-connected-rm permit 10
match ip address redistribute-connected
!
banner login ^

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


{Some Company Name}

{some threatening statement telling people to go away}

{some statement claiming everything is being logged}


----------------------------------------------------------------------------
^
!
alias exec st sh ip int brief
!
line con 0
login local
line aux 0
login local
line vty 0 4
access-class vty_access in
exec-timeout 10 0
login local
transport input ssh
line vty 5 15
access-class vty_access in
exec-timeout 10 0
login local
transport input ssh
!
ntp server {public NTP server IP}
end
!
!#####

The script doesn't have any CBAC or Zone Based Firewalling configured on it - honestly that is easier to set up after you have the dmvpn up and working. This is for a preshared key configuration which is the easiest to get up and running but is nowhere near as secure as certificate based dmvpn deployments. Just setting up the certificate server on the router deserves its own post so I will wait on that one. This is provided as is, it isn't perfect but should get you started in getting something up and running with minimal effort.
- Ed

Tuesday, December 15, 2009

Network Troubleshooting - some thoughts

After doing several late night and weekend cutover and integration projects I realized that much of my network troubleshooting ability is not based on a specific checklist of items (though I am going to build one) but on disciplines that I learned while in engineering school.

Specifically, much of my time is spent gathering known variables, quickly writing up what the problem statement and conditions are and then forming a hypothesis that I can work off of to solve the problem at hand. Often, keeping the scope of the problems small and discrete helps, utilizing the engineering principle of KISS (Keep It Simple Stupid) minimize the impact of feeling overwhelmed by an issue. This is especially true when you are in a stressful situation due to limited time or the inability to rollback a solution - both are to be avoid at all cost but often in the world of consulting they are why you are brought into a project in the first place. I guess that goes with the territory.

There are lots of great resources out there that define the principles of engineering so I won't bother with links to those. I have found that the major process I use is not so different from the design principles you use to design and deploy networks. Cisco has a whole methodoly build around this and those that have suffered through their study materials know the PPDIOO mantra.

I think I prefer the more classic engineering school outline, something like:
Identify and understand the problem
Gather information
Generate several solutions
Choose the best of those solutions (KISS)
Prototype the solution
Deploy the solution
Redesign/Retest
Report on results

Each problem you face can be broken down and solved with this method, the difference between those who do network troubleshooting well and those who do not seems to be in the ability to quickly gather and analysis a situation, pick the best solution and then rapidly deploy and tweek the solution. This often comes with age and experience but I am amazed at how many colleagues I have watched over the years who do not follow any of these principles while troubleshooting problems. I primarily have noticed the lack of the engineering principle trait in those who did not go through formal engineer school or a technical trade. I have found that those with a military background adhere to a similar principle though slightly adjusted to the function the military provides. They seem to function well in solving these sort of technical problems also so clearly there is a reason I meet some many former military in the networking field.

Another funny item I have noticed over the years is the fact that no matter how much planning and scripting you do it is the small things that seem to get you. I am not entirely sure why this is, perhaps they are easily overlooked while planning and deploying. Regardless, to catch them the KISS principle is remarkably useful in ferreting out those small problems.

I by no means claim that my engineering degree makes me a better troubleshooter than some of my peers who do not have one, I have meet some amazing people in this field and clearly some people simply have the native instinct and problem solving skills needed to outperform others.
- Ed

Sunday, December 13, 2009

Shrew Soft - 2.1.5 vpn client released

From my previous posts about 64-bit vpn clients there is a good addition to the list of options outside of Cisco for Windows 7 64-bit OS and that is Shrew Soft who just released an update to their client which supports Windows 7. The best part is the fact you can import Cisco PCF files. I've had good success when using it will Cisco ASA and PIX vpn configurations and some mixed results with Cisco VPN 3000 concentrator.
The current version is 2.1.5 but the 2.1.4 release worked on my Windows 7 64-bit client also. I have several clients also using it and they have not had any issues either. Hats off to the folks at Shrew Soft - appreciate having a working 64-bit IPsec client that is easy to use for Windows 7.
- Ed

Saturday, November 28, 2009

Cisco AnyConnect Client

For those that are still using the older AnyConnect Client there are several reasons to upgrade to the newer 2.4.0202 release or at a minimum the 2.3.2016 release. The 2.3.2016 fixed some issues with passcode vs password prompts within the Client windows when logging in. If you are using RSA SecurID I would recommend moving to 2.3.2016 or 2.4.0202 to avoid the sort of confusion the older client presents for end users.

The release notes for AnyConnect 2.4.0202 are here. Note that this version officially supports Microsoft Windows 7 32 and 64 bit and Apple OS X 10.6 and 10.6.1 both 32 and 64 bit.

One of the more interesting features they added was the Trusted Network Detection (TND) which in essence allows the AnyConnect client to determine when it is already on a trusted network and disconnect from the VPN or if it is NOT on a trusted network to initiate the VPN connection. I think this feature might need a bit of time before it works out all the kinks but it looks promising. I see it as an attempt by Cisco to address the unique abilities of Microsoft's DirectAccess feature without having to engineer anything new.
- Ed

Cisco ASA ASDM update

Cisco has had ASA 8.2.1(11) code out for about 2 months. I have several customers running it now because it addressed a lot of problems with the 8.2.1 code release that came out in May (the release notes are here - login may be required.) I recommend running it, it has been stable.

There is also a new ASDM version 6.2.3 that just came out in the beginning of Nov. I think 6.2.1 has been a good stable version so far with no major problems that I have encountered however I can never find a lot of release notes for the ASDM software for some odd reason. I haven't installed 6.2.3 yet on a production ASA deployment so no formal thoughts about it yet.

I also thought Cisco was going to keep ASA code and ASDM code releases in lock step with each other so it would be easier to tell which release of ASDM code would go with which release of ASA code but I guess that only goes for the first minor number and not the sub of interim releases. A shame because it does make life easier for people who don't use and/or install the ASA products on a regular basis to figure out the code they should be running and what works together. If you need PSIRT images they are available here. Even if you are not on a current contract you can download and use these versions as they address major security vulnerabilities that Cisco considers important enough to give out the code to fix the issue. The most recent code release under that PSIRT is 8.2.1(3) which is pretty new (June of 2009.)

I have not noticed any specific Java issues with any of the newer ASDM releases, looks like Cisco is paying more attention to that problem and making sure ASDM just works instead of having to fiddle around with Java versions and such.

On a side note, 8.2 code on the 5510's can be a problem and Cisco is recommending a memory upgrade for the 5510 series so that it can run without major performance problems. There is no problem installing and running the code on the 5510's at all, it is just an issue of how much memory is consumed depending on how much stuff you are doing on the ASA. Something to keep in mind, I really prefer the 5520 model because of this reason plus all the interfaces on the 5520's are Gigabit with the exception of the Management interface (which just seems to be a cheap cost cutting measure) which is 10/100.
- Ed