Saturday, April 18, 2009

RMON - Remote Monitoring

Before i detail the lab scenario a brief overview of RMON:

RMON is an IETF standard developed to enable network management stats to be gathered from remote sites without the overhead of SNMP constantly polling. When RMON is configured it gathers info and passes it back to management nodes. RMON is designed to work in conjunction with SNMP. Typically SNMP is enabled alongside RMON for an effective solution.

Lab scenario:
i) configure R1 to generate an SNMP trap whenever the output queue length (ifEntry.21.2) of its Serial0/0 interface exceeds 250 packets.
ii) This MIB value should be sampled every 30 seconds.
iii) When there are more than 250 packets in the output queue R1 should generate the message “WARNING: S1/0 Congested”.
iv) When the value falls back to 50 R1 should generate the message “INFO: S1/0returned to normal utilization”.
v) R1 should send SNMP traps to is 10.1.1.100 with the community string to be RICHTRAP

With RMON first configure the events and then configure the associated alarms

rmon alarm 1 ifEntry.21.2 60 absolute rising-threshold 250 1 falling-threshold 50 2
rmon event 1 trap IETRAP description "WARNING: S1/0 Congested"
rmon event 2 trap IETRAP description "INFO S1/0 returned to normal utilization"


Then configure the SNMP traps.

snmp-server host 10.1.1.100 IETRAP
snmp-server enable traps


As taken from the cisco doc:
For a host to receive notifications, at least one snmp-server enable command and the snmp-server host command for that host must be enabled.

Friday, April 17, 2009

CBAC - Context Based Access Control

CBAC performs a similar function to refelexive acls. With CBAC however there’s much more granular control on the type of sessions monitored, along with the allowed session thresholds and timers (see ip inspect ? For types of control allowed).


R1 (trusted) --------- FA0/0 R2 S1/0 ---------- R3 (untrusted)

In this example no inbound tcp sessions are allowed into the protected network however R1 is allowed tcp access out to the untrusted network (R3). A standard blocking acl is applied to the outside interface on R2

access-list 100 deny tcp any any
access-list 100 deny udp any any
access-list 100 permit icmp any any echo-reply
access-list 100 permit eigrp any any
access-list 100 deny ip any any

interface S1/0
ip access-group 100 in


With this config R1 can ping R3 but cannot telnet to it.

I create an inpsection rule to examine all tcp traffic. I apply the inspection rule to interface Ethernet0/0 to inspect traffic from users on the protected network. When CBAC detects tcp traffic from the protected network, CBAC will create a dynamic entry in access list 100 to allow return traffic.

Router_2(config)#ip inspect name RICH tcp
Router_2(config)#int fa0/0
Router_2(config-if)#ip inspect RICH in


Unlike reflexive acls there is no explicit reference required in the acl on the untrusted interface - initially a source of some confusion for me!!! CBAC will add dynamic entries and open up access without it.

With the above config R1 can now initiate a telnet connection to R3

Verification commands on R2

#show ip inspect all
#show access-list 100

Alternatively the inpsect rule can be applied on the untrusted interface in the out direction achieving the same net result.

Router_2(config)#int s1/0
Router_2(config-if)#ip inspect RICH out

Tuesday, April 14, 2009

Restricting telnet access

A lab requirement stated 'Allow telnet access to R6 on port 3005 and ensure standard telnet access on port 23 is not allowed'??

To fulfill this requirement requires use of the 'rotary' command on the vty ports.

line vty 0 4
rotary 5


The above enables telnet access on port 3005.

To fulfill the second requirement to restrict access on port 23 can be done via an ACL and access-class command...

ip access-list ext 101
deny tcp any any eq telnet
permit ip any any

line vty 0 4
access-list 101 in


To add an extra twist, a further requirement is added to ensure users entering via vty are prompted for local username and password. No login credentials are required for console access. This can be achieved with the following....

aaa new-model
aaa authentication login default none
aaa authentication login VTY local

line vty 0 4
login authentication VTY

Monday, April 13, 2009

Frame Relay - Load Interval

Whenever the show interface command is used by default the 5 minute input and output rate is displayed along with the load over this interval

Show interface s2/0
…. output omitted ….
reliability 255/255, txload 2/255, rxload 2/255
…. output omitted ….
5 minute input rate 16000 bits/sec, 18 packets/sec
5 minute output rate 16000 bits/sec, 18 packets/sec
…..output omitted …..

This default behaviour can be changed using the interface command load-interval.

int se2/0
load-interval 30


N.B. The minimum is 30 seconds and can be any multiple of 30 up to 10 mins.

Frame Relay - Broadcast Queue

The Cisco IOS creates a broadcast queue for interfaces running frame-relay. This queue performs 2 functions: it ensures routing traffic is dealt with as a priority but it also limits the bandwidth that can be consumed by such traffic.

When an interface has many DLCIs the overhead of replicating routing traffic can be significant.

The interface has the following default settings

size: 64 packets
byte-rate: 256000 bytes per second
packet-rate: 36 packets per second

To change the settings the following interface command can be used

frame-relay broadcast-queue {x} {y} {z}

The following example specifies a broadcast queue to hold 80 packets, to have a maximum byte transmission rate of 240000 bytes per second, and to have a maximum packet transmission rate of 160 packets per second:

frame-relay broadcast-queue 80 240000 160

The actual limit in any second is the first rate limit that is reached I.e. byte or packet.

To examine how the broadcast queue is performing simply use the show interface command:-

Rack1R1#show int s2/0
Serial2/0 is up, line protocol is up
{… output omitted …..}
Broadcast queue 0/64, broadcasts sent/dropped 83/0, interface broadcasts 86

Thursday, April 9, 2009

BGP - ORF (Outbound Route Filtering)

The standard method for BGP to filter routes entering the BGP table is to apply prefix-list filtering on incoming updates. For example

R1
ip prefix-list rich permit 10.1.1.0/24
neighbor 1.2.3.4 prefix-list rich in

In the above example R1 will only allow the 10.1.1.0/24 route into its BGP table.

The flaw with the above is that R1 must receive ALL routes from the 1.2.3.4 neighbor. Upon receipt R1 then allows only the required routes to enter the local BGP table. The problem here is that R1 must first receive the whole BGP table advertised by its neighbor.

It is exactly this BGP characteristic that ORF was designed to improve. With ORF enabled on neighboring routers, only the required routes are sent in the first place. Hence link bandwidth and the local routers memory are then spared unnecessary overhead.

An important note i made to myself is that the above config still applies i.e. route filtering is set up exactly as when ORF is not enabled. The required ORF functionality is then simply configured on top of this configuration.

N.B. Running Version 12.3(23) i noticed the config would only take hold if i applied under the address-family ipv4 sub command prompt.

R1
router bgp 200
address-family ipv4
neighbor 1.2.3.4 capability orf prefix-list send

R2
router bgp 100
address-family ipv4
neighbor 4.3.2.1 capability orf prefix-list receive

Once applied i ran debug ip bgp updates and was able to see the router only received the required routes. Before applying the ORF capability i was able to see all routes arriving and then the router denying those not allowed in the prefix-list.

Saturday, March 21, 2009

BGP no-prepend and local-as


The no-prepend and local-as options have been made available to support the 'neighbor a.b.c.d local-as' feature.

Put into my own words the 'local-as' feature allows internal as numbers to be changed, but still allowing partner BGP routers to peer with an old AS number. Hence this enables BGP AS to be changed without affecting partner BGP configuration.

One downstream affect of this is that the by default partnering AS systems still see both old and new as numbers in the path.

With the no-prepend option the 'local-as' number is NOT prepended to downstream BGP neighbors (except for the partner who is peering with the 'local-as' number).

With the 'replace-as' option the real bgp as number is not sent to the BGP partner that peers with the 'local-as'.


I found an excellent article on this at
http://wiki.nil.com/Network_migration_or_merger_with_BGP_Local-AS_feature