There was an interesting request on the Silicon Valley Cisco User Group mailing list the other day regarding how to get a Cisco switch to do a continuous ping, similar to how you do ping -t via the windows command line.
The idea I mentioned was using Cisco IP SLA's to do the same function and simply watch the statistics of the SLA to determine if things are working as expected. I had just set this up to keep an IPSec tunnel up and tested for a client so it seemed timely.
In addition to that, you can use this to watch IPSec tunnels or other links and change routing behavior based on the tunnel status using the track command.
A bit of code to get you started:
! - define an SLA
ip sla 1
icmp-echo {IP to ping} source-ip {IP to source traffic from}
timeout 1000
!
! - set up a schedule for the SLA to run - this will run forever
ip sla schedule 1 life forever start-time now
!
! - set up a track and make it's status dependent on the SLA
track 1 ip sla 1
!
To see the statistics simply do:
show ip sla statistics 1
That is it, simple but effective. Great tool to use if you are doing site to site tunnels with a firewall that is not participating in routing, it allows you to route around tunnels being down so you can have a semi-dynamic failover.
- Ed
Tuesday, December 22, 2009
Monday, December 21, 2009
Remote network console hardware options
There are a lot of good options available today in the remote network console management devices. I think the following are some pretty common manufactures out there and some brief thoughts on each, the opinions are my own so do your own homework!
On the high end is Uplogix who has tailored solutions for remote Cisco automated management and recovery plus remote console management. They have an excellent solution that is great for enterprise customers who need the sort of features and support that their product provides. As a result they have a tendency to be a more expensive solution but you get what you pay for in this case.
On the flexible and cool side is Opengear who have some of the most cost effective remote console management devices out there and they are also running open source code. They allow you to script and do lots of other nice things due to their openness. A great option for labs or if you have time to invest to write the scripts to automate things. So you can do much of what Uplogix is doing but you have to create it on your own. Their advanced console unit even includes storage space to store IOS images and configurations files.
There is also APC which has nice integration with their PDU solutions. They have been around a long time but their console management is only a portion of a much bigger solution so I don't think it gets as much attention as the likes of Opengear or others.
Avocent purchased Cyclades several years ago and Cyclades has been in use in data centers for years and years. Avocent has kept the Cyclades product line and has done a good job maintaining it. It is a getting a bit long in the tooth now but it is still an excellent console management device.
To round it out, Raritan, to be honest I haven't used them much and don't see them deployed very often as console management. I see them a lot for remote KVM. I am sure their solution is a workable one I just don't have any experience with it.
- Ed
On the high end is Uplogix who has tailored solutions for remote Cisco automated management and recovery plus remote console management. They have an excellent solution that is great for enterprise customers who need the sort of features and support that their product provides. As a result they have a tendency to be a more expensive solution but you get what you pay for in this case.
On the flexible and cool side is Opengear who have some of the most cost effective remote console management devices out there and they are also running open source code. They allow you to script and do lots of other nice things due to their openness. A great option for labs or if you have time to invest to write the scripts to automate things. So you can do much of what Uplogix is doing but you have to create it on your own. Their advanced console unit even includes storage space to store IOS images and configurations files.
There is also APC which has nice integration with their PDU solutions. They have been around a long time but their console management is only a portion of a much bigger solution so I don't think it gets as much attention as the likes of Opengear or others.
Avocent purchased Cyclades several years ago and Cyclades has been in use in data centers for years and years. Avocent has kept the Cyclades product line and has done a good job maintaining it. It is a getting a bit long in the tooth now but it is still an excellent console management device.
To round it out, Raritan, to be honest I haven't used them much and don't see them deployed very often as console management. I see them a lot for remote KVM. I am sure their solution is a workable one I just don't have any experience with it.
- Ed
Saturday, December 19, 2009
Henry M. Gunn High School makes US News top 100 school list
Seems my HS is still making the US News and World Report top 100 school list. Proud to see they are still keeping high standards even in the face of all the recent suicide issues, state cutbacks, etc. I hope it can weather through and continue to do well.
Go Titans!
- Ed
Go Titans!
- Ed
Friday, December 18, 2009
Cisco DMVPN - useful commands
Once you have a Cisco dmvpn deployment up and running there are some useful commands that you should know to figure out what is going on. Primarily these are no different then the routing and vpn command sets you already know and use. Commands like:
show ip interface brief
show ip eigrp neighbor
show crypto isakmp sa
show crypto ipsec sa
show ip route
The dmvpn specific commands would be:
show dmvpn {detail}
sh ip nhrp {brief}
If you have multiple dmvpn tunnel configuration on the router (the spoke is connected to two different dmvpn hubs) then:
show dmvpn interface tunnel {number}
is a useful command to know what peers and routes are coming from which dynamic tunnel.
I think one of the toughest things with dmvpn compared to a static ipsec/gre/eigrp configuration is that you don't have a specific logical tunnel for each remote router that is connecting. This can cause two problems, it is tough to know what sites are having issues and it is hard to get specific bw parameters out of the router without watching crypto maps. With a static ipsec/gre/eigrp configuration you can graph the tunnel interface and know how much traffic that tunnel is consuming at any given moment. With dmvpn this is a much tougher thing to do as the tunnel are transit and only up when they are needed between spoke locations. The only constant is the tunnel between the spoke and the hub/hubs.
To be honest, the thing I love the most about dmvpn is the fact that it behaves from a routing perspective very much like a fullmesh mpls deployment which are very common today. So a dmvpn solution is an excellent mpls backup solution that leverages local Internet access connections while not requiring odd routing tricks to make the sites behave correctly. For voice deployments with remote offices or soho sites it is an excellent solution and gives the remote site all the characteristics and advantages of a fullmesh site but with the cost effective bw of high speed Internet access available today.
- Ed
show ip interface brief
show ip eigrp neighbor
show crypto isakmp sa
show crypto ipsec sa
show ip route
The dmvpn specific commands would be:
show dmvpn {detail}
sh ip nhrp {brief}
If you have multiple dmvpn tunnel configuration on the router (the spoke is connected to two different dmvpn hubs) then:
show dmvpn interface tunnel {number}
is a useful command to know what peers and routes are coming from which dynamic tunnel.
I think one of the toughest things with dmvpn compared to a static ipsec/gre/eigrp configuration is that you don't have a specific logical tunnel for each remote router that is connecting. This can cause two problems, it is tough to know what sites are having issues and it is hard to get specific bw parameters out of the router without watching crypto maps. With a static ipsec/gre/eigrp configuration you can graph the tunnel interface and know how much traffic that tunnel is consuming at any given moment. With dmvpn this is a much tougher thing to do as the tunnel are transit and only up when they are needed between spoke locations. The only constant is the tunnel between the spoke and the hub/hubs.
To be honest, the thing I love the most about dmvpn is the fact that it behaves from a routing perspective very much like a fullmesh mpls deployment which are very common today. So a dmvpn solution is an excellent mpls backup solution that leverages local Internet access connections while not requiring odd routing tricks to make the sites behave correctly. For voice deployments with remote offices or soho sites it is an excellent solution and gives the remote site all the characteristics and advantages of a fullmesh site but with the cost effective bw of high speed Internet access available today.
- Ed
Thursday, December 17, 2009
Cisco DMVPN sample spoke script
Now that you have the hub script lets set up a spoke. This configuration will get the remote site up and connected to the hub via ipsec/gre/eigrp so you can actually see your routing neighbor peers with commands like:
show ip eigrp neighbor
!#####
! - DMVPN Spoke script - sample 2811 router 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 - Spoke configuration
bandwidth {set to the same as the internet bw - like 1544}
ip address 10.100.100.2 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 {Public IP of Hub}
ip nhrp map 10.100.100.1 {Public IP of Hub}
ip nhrp network-id {some id - match it to the eigrp AS}
ip nhrp holdtime 300
ip nhrp nhs 10.100.100.1
ip virtual-reassembly
ip tcp adjust-mss 1360
no ip mroute-cache
load-interval 60
delay 400
keepalive 5 4
tunnel source FastEthernet0/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 FastEthernet0/0
description ***Internal LAN connection to switching core***
ip address {LAN IP} 255.255.255.0
no ip redirects
ip virtual-reassembly
duplex auto
speed auto
no shut
!
interface FastEthernet0/1
description ***External Internet connection to outside switch***
ip address {Public IP of Spoke} {Subnet of Public IP}
ip access-group inet in
no ip redirects
ip virtual-reassembly
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 spoke} eq non500-isakmp
permit udp any host {public IP of spoke} eq isakmp
permit esp any host {public IP of spoke}
permit ahp any host {public IP of spoke}
permit gre any host {public IP of spoke}
! allow ssh to the public interface
permit tcp {remote public ip} {inverse public subnet} host {public IP of spoke} 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
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
!
!#####
As with the previous hub script this doesn't have any CBAC or Zone Based firewalling in the script for the same rational. This is also using preshared keys and the router has to do an enrollment process to do certificates which I will cover in a later post. As before, this is provided as is, it isn't perfect but should get you started in getting something up and running with minimal effort.
- Ed
show ip eigrp neighbor
! - DMVPN Spoke script - sample 2811 router 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 - Spoke configuration
bandwidth {set to the same as the internet bw - like 1544}
ip address 10.100.100.2 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 {Public IP of Hub}
ip nhrp map 10.100.100.1 {Public IP of Hub}
ip nhrp network-id {some id - match it to the eigrp AS}
ip nhrp holdtime 300
ip nhrp nhs 10.100.100.1
ip virtual-reassembly
ip tcp adjust-mss 1360
no ip mroute-cache
load-interval 60
delay 400
keepalive 5 4
tunnel source FastEthernet0/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 FastEthernet0/0
description ***Internal LAN connection to switching core***
ip address {LAN IP} 255.255.255.0
no ip redirects
ip virtual-reassembly
duplex auto
speed auto
no shut
!
interface FastEthernet0/1
description ***External Internet connection to outside switch***
ip address {Public IP of Spoke} {Subnet of Public IP}
ip access-group inet in
no ip redirects
ip virtual-reassembly
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 spoke} eq non500-isakmp
permit udp any host {public IP of spoke} eq isakmp
permit esp any host {public IP of spoke}
permit ahp any host {public IP of spoke}
permit gre any host {public IP of spoke}
! allow ssh to the public interface
permit tcp {remote public ip} {inverse public subnet} host {public IP of spoke} 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
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
!
!#####
As with the previous hub script this doesn't have any CBAC or Zone Based firewalling in the script for the same rational. This is also using preshared keys and the router has to do an enrollment process to do certificates which I will cover in a later post. As before,
Subscribe to:
Posts (Atom)