Ads 468x60px

Saturday, August 14, 2010

Cisco ACL and Route Map

Today we will discuss about basics, Everybody is aware about ACL and Route-maps. But then also some confusion, Here in this post I will share some information about ACL and route-maps. Which can help you to understand these two terms more…

ACL :
The Cisco ACL  are used for filtering traffic based on a given filtering criteria on a router or switch interface. Based on the configured ACL, a packet is allowed or blocked from interface.

Cisco ACLs are available for several types of routed protocols including IP, IPX, AppleTalk, XNS, DECnet, and others.
Majorly we are using TCP/IP

ACLs for TCP/IP traffic filtering are classified into two types:
  • Standard Access Lists, and
  • Extended Access Lists
Standard Access Control Lists: 
Standard IP ACLs range from 1 to 99. A Standard Access List  allows you to permit or deny traffic FROM specific IP address ( source). We can’t filter packet on destination basis.

Syntax: access-list access-list-number {permit|deny} {host|source source-wildcard|any}

Standard ACL example:
access-list 10 permit 10.1.1.0 0.0.0.255
This list allows traffic from all addresses in the range 10.1.1.0 to 10.1.1.255
There is an implicit deny added to every access list at last.

show access-list 10

The output looks like:
access-list 10 permit 10.1.1.0 0.0.0.255
access-list 10 deny any

Extended Access Control Lists:
 Extended IP ACLs allow you to permit or deny traffic from specific IP addresses to a specific destination IP address and port. It also allows you to have granular control by specifying controls for different types of protocols such as ICMP, TCP, UDP, etc within the ACL statements.
the access-list-number can be 101 to 199. In Cisco IOS Software Release 12.0.1, extended ACLs begin to use additional numbers (2000 to 2699)

access-list access-list-number {deny | permit} protocol source source-wildcard destination destination-wildcard [precedence precedence]

Extended ACL example:
access-list 110 permit tcp 10.1.1.0 0.0.0.255 any eq 80

ACL 110 permits traffic originating from any address on the 10.1.1.0 network. The 'any' statement means that the traffic is allowed to have any destination address with the limitation of going to port 80.

Applying an ACL to a router interface:
After the ACL is defined, it must be applied to the interface (inbound or outbound). The syntax for applying an ACL to a router interface is given below:
interface
ip access-group {number|name} {in|out}

An Access List may be specified by a name or a number. "in" applies the ACL to the inbound traffic, and "out" applies the ACL on the outbound traffic.

Example:
To apply the standard ACL created in the previous example, use the following commands:
Rouer(config)#interface serial 0
Rouer(config-if)#ip access-group 10 out


Route-map
Route-maps have many features in common with widely known access control lists (ACLs). These are some of the traits common to both mechanisms:
They are an ordered sequence of individual statements; each has a permit or deny result. Evaluation of ACL or route-maps consists of a list scan, in  order, and an evaluation of the criteria of each statement that matches. A list scan is aborted once the first statement match is found and an action associated with the statement match is performed.
These are some of the differences between route-maps and ACLs:
Route-maps frequently use ACLs as matching criteria.
The result from an access list is a yes or no answer—an ACL either permits or denies input data. Applied to redistribution, an ACL determines if a particular route can (route matches ACLs permit statement) or cannot (matches deny statement) be redistributed.
Typical route-maps not only permit redistributed routes but also modify information associated with the route, when it is redistributed into another protocol.

route-map ospf-to-eigrp deny 10
 match tag 6
 match route-type external type-2
!
route-map ospf-to-eigrp permit 20
 match ip address 110
 set metric 20000 2000 255 1 1500
!
route-map ospf-to-eigrp permit 30
 set tag 8
!
router eigrp 1
 redistribute ospf 1 route-map ospf-to-eigrp
 default-metric 20000 2000 255 1 1500

Route-maps are more flexible than ACLs and can verify routes based
on criteria which ACLs can not verify. For example, a route-map can verify if
the type of route is internal or if it has a specific tag.
Each ACL ends with an implicit deny statement, there is no similar
convention for route-maps. If the end of a route-map is reached during matching
attempts, the result depends on the specific application of the route-map.Route-maps
that are applied to redistribution behave the same way as ACLs: if the route
does not match any clause in a route-map then the route redistribution is
denied, as if the route-map contained deny statement at the end

Route-maps is used in BGP, redistribution,etc.

In BGP :
  • Route-map can match on:
    • A network number and subnet mask match with an IP prefix list
    • Route originator
    • BGP next hop address
    • BGP origin
    • Tag attached to IGP route
    • AS-path
    • BGP community
    • IGP route type (internal/external)
  • Route-maps can also change the attributes of BGP routes
  • Route-maps can set
    • Origin
    • BGP community
    • BGP next hop
    • Local preference
    • Weight
    • MED

Hope this information will help you.


4 comments:

Syed said...

Hi,
below is the output of cache flow, shows unwanted traffic to unknown destination & port(0800) due to which LAn is getting choked.
request to please revert solution for the same.

Fa0/0 172.19.55.34 Se0/1/0 172.19.55.160 01 0000 0800 1

Fa0/0 172.19.55.34 Se0/1/0 172.19.55.161 01 0000 0800 1

Fa0/0 172.19.55.34 Se0/1/0 172.19.55.162 01 0000 0800 1

Fa0/0 172.19.55.34 Se0/1/0 172.19.55.163 01 0000 0800 1

Fa0/0 172.19.55.34 Se0/1/0 172.19.55.164 01 0000 0800 1

Fa0/0 172.19.55.34 Se0/1/0 172.19.55.165 01 0000 0800 1

Fa0/0 172.19.55.34 Se0/1/0 172.19.55.166 01 0000 0800 1

Uttamkumar said...

Hi,
You can configure a extended access-list and block the concern port. Same time verify that whether this port is useful in your network or not. As per your information from a Cisco
router I also wondered what port 2048/icmp would mean. The ICMP Protocol doesn't implement ports ,but the headers are similar to TCP and UDP. ICMP uses specific Types and codes instead of ports. If you code "2048" to HEX, you get 0x8000, this means ICMP type 8, code 0, in words "echo request" aka "ping".

I think these are ordinary pings. Plz check with NMS or Wireshark,Am i right or not ? But They will cause heavy load to Netflow based accounting.
I hope this information will help you, Plz let me know your inputs

Syed said...

****Configuration****

interface FastEthernet0/0
description ***MMFSL LAN ***
ip address 10.195.25.185 255.255.255.248 secondary
ip address 172.19.122.126 255.255.255.128
standby 1 ip 172.19.122.1
standby 1 preempt
!
interface FastEthernet0/1
description ***MRHFL LAN ***
ip address 172.20.6.254 255.255.255.0
ip policy route-map MRHFL


interface Serial0/0/0
description ***MRHFL 128 Kbps Link***
bandwidth 128
ip address 10.195.50.162 255.255.255.252
service-policy output MFL_VOIP
!
interface Serial0/0/1
description ***MMFSL 128 Kbps Link***
ip address 10.195.144.194 255.255.255.252
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Serial0/0/0
ip route 0.0.0.0 0.0.0.0 Serial0/0/1

ip access-list extended MRHFL
permit ip 172.20.6.0 0.0.0.255 172.30.0.0 0.0.255.255
permit ip 172.30.0.0 0.0.255.255 172.20.6.0 0.0.0.255

route-map MRHFL permit 10
match ip address MRHFL
set interface Serial0/0/1

________________________________________________________________________
MMFSL-Secunderabad#traceroute
Protocol [ip]:
Target IP address: 172.30.0.36
Source address: 172.19.122.126
Numeric display [n]: y
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 172.30.0.36

1 10.195.144.193 64 msec
10.195.50.161 68 msec
10.195.144.193 68 msec
2 10.138.144.125 52 msec 48 msec 36 msec
3 * * *
4 172.30.1.180 32 msec 40 msec 36 msec
5 172.30.0.36 40 msec 32 msec 36 msec
MMFSL-Secunderabad#traceroute
Protocol [ip]:
Target IP address: 172.30.0.36
Source address: 172.19.122.126
Numeric display [n]: y
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 172.30.0.36

1 10.195.50.161 12 msec
10.195.144.193 16 msec
10.195.50.161 12 msec
2 10.138.144.125 48 msec 36 msec 40 msec
3 * * *
4 172.30.1.180 32 msec 32 msec 36 msec
5 172.30.0.36 32 msec 36 msec 32 msec

Syed said...

MMFSL-Secunderabad#traceroute
Protocol [ip]:
Target IP address: 172.30.0.36
Source address: 172.20.6.254
Numeric display [n]: y
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 172.30.0.36

1 10.195.144.193 16 msec
10.195.50.161 40 msec
10.195.144.193 16 msec
2 10.138.144.125 76 msec 40 msec 32 msec
3 * * *
4 172.30.1.180 28 msec 32 msec 36 msec
5 172.30.0.36 36 msec 28 msec 36 msec
MMFSL-Secunderabad#traceroute
Protocol [ip]:
Target IP address: 172.30.0.36
Source address: 172.20.6.254
Numeric display [n]: y
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 172.30.0.36

1 10.195.50.161 12 msec
10.195.144.193 20 msec
10.195.50.161 12 msec
2 10.138.144.125 40 msec 32 msec 40 msec
3 * * *
4 172.30.1.180 36 msec 32 msec 36 msec
5 172.30.0.36 32 msec 36 msec 28 msec

Post a Comment

Related Posts Plugin for WordPress, Blogger...