www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / 101 CCNP Labs Solutions / CCNP Lab 065 Solution: NetFlow and Accounting Lab

CCNP Lab 065 Solution: NetFlow and Accounting Lab

Lab Objective:

The focus of this lab is to understand Cisco IOS NetFlow implementation and configuration in Cisco IOS routers. Additional technologies include Cisco IOS IP Accounting.

Lab Topology:

department665

 

IMPORTANT NOTE

If you are using the www.howtonetwork.net racks, please bring up the LAN interfaces connected to the routers by issuing the no shutdown command on the connected switches. If you are using a home lab with no
Switches, you can bring up the LAN interfaces using the following configurations on your routers:

interface fastethernet 0/0
no keepalive
loopback
no shutdown

Alternately, you can simply connect the interfaces to a hub or switch if you have one available in your own lab.

 

Task 1

Configure hostnames and IP address on all routers as illustrated in the topology.

Task 2

Configure OSPF on all routers as illustrated in the topology. Verify your configuration using the appropriate commands.

Task 3

Configure Cisco IOS IP accounting on all router WAN interfaces. All routers should store IP accounting information for all packets egressing the WAN interfaces. Verify your IP accounting configuration using the appropriate commands.

Task 4

Configure Cisco IOS NetFlow on all routers. All routers should collect forward statistics for all ingress flows to host 192.168.1.254 using NetFlow version 5 and a destination port of 8000. This traffic should be sourced from the FastEthernet 0/0 interface of all routers.

 

 

Task 5

Assume that R1 is a core Internet router. To ensure that as much NetFlow information is stored, configure the router to store up to 128K (131072) entries in the cache. Additionally, configure Cisco IOS NetFlow on this router so that export statistics include the originating autonomous system (AS) for the source and destination. And finally, because R1 will be receiving traffic from multiple hosts on the LAN subnet, configure Cisco IOS NetFlow so that the router captures the MAC addresses of the incoming source and the outgoing destination from the first Layer 2 frame in the flow. Verify your configuration.

Lab Validation

Task 1

Please refer to previous labs for basic IPv4, IPv6 addressing and hostname configuration. This will not be included in this section to avoid being redundant.

Task 2

Please refer to previous labs for basic EIGRP configuration. Following this, verify your OSPF configuration using the show ip ospf neighbor and show ip route commands. Following this configuration, your route tables should show the following route information:

R1#show ip route ospf
10.0.0.0/30 is subnetted, 2 subnets
O 10.0.0.8 [110/128] via 10.0.0.2, 00:14:34, Serial0/0
150.2.0.0/24 is subnetted, 1 subnets
O 150.2.2.0 [110/65] via 10.0.0.2, 00:14:34, Serial0/0
150.3.0.0/24 is subnetted, 1 subnets
O 150.3.3.0 [110/129] via 10.0.0.2, 00:14:34, Serial0/0
R2#show ip route ospf
150.1.0.0/24 is subnetted, 1 subnets
O 150.1.1.0 [110/65] via 10.0.0.1, 00:14:39, Serial0/0
150.3.0.0/24 is subnetted, 1 subnets
O 150.3.3.0 [110/65] via 10.0.0.10, 00:14:39, Serial0/1
R3#show ip route ospf
10.0.0.0/30 is subnetted, 2 subnets
O 10.0.0.0 [110/845] via 10.0.0.9, 00:14:36, Serial1/1
150.1.0.0/24 is subnetted, 1 subnets
O 150.1.1.0 [110/846] via 10.0.0.9, 00:14:36, Serial1/1
150.2.0.0/24 is subnetted, 1 subnets
O 150.2.2.0 [110/782] via 10.0.0.9, 00:14:36, Serial1/1

Task 3

While not as granular and detailed as Cisco IOS NetFlow, Cisco IOS IP accounting can be a very powerful troubleshooting tool. IP accounting allows administrators to configure the router to record the number of bytes (IP header and data) and packets switched through the system on a source and destination IP address basis. Only transit IP traffic is measured and only on an outbound basis; traffic generated by the router access server or terminating in this device is not included in the accounting statistics. This task is completed as follows:

R1(config)#interface serial 0/0
R1(config-if)#ip accounting output-packets
R1(config-if)#exit
R2(config)#interface serial 0/0
R2(config-if)#ip accounting output-packets
R2(config-if)#exit
R2(config)#interface serial 0/1
R2(config-if)#ip accounting output-packets
R2(config-if)#exit
R3(config)#interface serial 1/1
R3(config-if)#ip accounting output-packets
R3(config-if)#exit

Next, verify your configuration using the show ip accounting command. Keep in mind that IP accounting does not capture traffic generated by the local router. Only transit traffic statistics are kept. Therefore, to test, you can ping and Telnet, etc, between R1 and R3 and then verify the statistics on R2 as the traffic will transit that router.

R2#show ip accounting output-packets
Source Destination Packets Bytes
150.1.1.1 10.0.0.10 100 150000
10.0.0.10 150.1.1.1 100 150000
150.3.3.3 10.0.0.1 105 50500
10.0.0.1 150.3.3.3 105 50500

Task 4

This task is straightforward and is completed as follows:

R1(config)#interface fastethernet 0/0
R1(config-if)#ip flow ingress
R1(config-if)#exit
R1(config)#ip flow-export destination 192.168.1.254 8000
R1(config)#ip flow-export version 5
R1(config)#ip flow-export source fastethernet 0/0
R2(config)#interface fastethernet 0/0
R2(config-if)#ip flow ingress
R2(config-if)#exit
R2(config)#ip flow-export destination 192.168.1.254 8000
R2(config)#ip flow-export version 5
R2(config)#ip flow-export source fastethernet 0/0
R3(config)#interface fastethernet 0/0
R3(config-if)#ip flow ingress
R3(config-if)#exit
R3(config)#ip flow-export destination 192.168.1.254 8000
R3(config)#ip flow-export version 5
R3(config)#ip flow-export source fastethernet 0/0

Next, verify your configuration using the show ip cache flow command. If you have hosts that are connected to one of the LAN subnets on any of the routers, you can generate some traffic, e.g. pings, Telnet, HTTP, etc, to view information on traffic statistics that will be sent to the NetFlow Collector specified in the previous lab tasks:

R1#show ip cache flow
IP packet size distribution (322 total packets):
1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480
.000 .183 .000 .099 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000

512 544 576 1024 1536 2048 2560 3072 3584 4096 4608
.000 .000 .000 .717 .000 .000 .000 .000 .000 .000 .000

IP Flow Switching Cache, 278544 bytes
1 active, 4095 inactive, 12 added
462 ager polls, 0 flow alloc failures
Active flows timeout in 30 minutes
Inactive flows timeout in 15 seconds
IP Sub Flow Cache, 21640 bytes
1 active, 1023 inactive, 12 added, 12 added to flow
0 alloc failures, 0 force free
1 chunk, 1 chunk added
last clearing of statistics never
Protocol Total Flows Packets Bytes Packets Active(Sec) Idle(Sec)
——– Flows /Sec /Flow /Pkt /Sec /Flow /Flow
TCP-Telnet 4 0.0 13 42 0.0 1.8 4.9
TCP-WWW 1 0.0 1 44 0.0 0.0 15.0
UDP-other 1 0.0 231 604 0.0 312.0 15.5
ICMP 5 0.0 6 100 0.0 0.7 15.7
Total: 11 0.0 29 454 0.0 29.4 11.7

SrcIf SrcIPaddress DstIf DstIPaddress Pr SrcP DstP Pkts
Fa0/0 150.1.1.252 Se0/0 10.0.0.10 06 2AFA 0017 24
Fa0/0 150.1.1.252 Se0/0 10.0.0.2 06 2AFC 0050 3

Task 5

The requirements in this task are straightforward. In order to change the default cache size from 65535 (64K) to a new value, you need to disable NetFlow on all interfaces first or reboot the router following the change. If not, the router will print the following message on the console:

R1(config)#ip flow-cache entries 131072
%The change in number of entries will take effect after either
the next reboot or when netflow is turned off on all interfaces.

 

By default, with Cisco IOS NetFlow, values from Layer 2 and Layer 3 fields are not captured. This default behavior, however, can be changed by using the ip flow-capture <option> command in global configuration mode. This task is completed as follows:

R1(config)#interface fastethernet 0/0
R1(config-if)#no ip flow ingress
R1(config-if)#exit
R1(config)#ip flow-cache entries 131072
R1(config)#ip flow-export version 5 origin-as
R1(config)#ip flow-capture mac-addresses
R1(config)#interface fastethernet 0/0
R1(config-if)#ip flow ingress
R1(config-if)#exit

Next, verify your configuration using the show ip cache verbose flow command:

R1#show ip cache verbose flow
IP packet size distribution (342 total packets):
1-32 64 96 128 160 192 224 256 288 320 352 384 416 448 480
.000 .230 .000 .093 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000 .000

512 544 576 1024 1536 2048 2560 3072 3584 4096 4608
.000 .000 .000 .675 .000 .000 .000 .000 .000 .000 .000

IP Flow Switching Cache, 8913408 bytes
1 active, 131071 inactive, 19 added
551 ager polls, 0 flow alloc failures
Active flows timeout in 30 minutes
Inactive flows timeout in 15 seconds
IP Sub Flow Cache, 672392 bytes
2 active, 32766 inactive, 23 added, 19 added to flow
0 alloc failures, 0 force free
1 chunk, 2 chunks added
last clearing of statistics never
Protocol Total Flows Packets Bytes Packets Active(Sec) Idle(Sec)
——– Flows /Sec /Flow /Pkt /Sec /Flow /Flow
TCP-Telnet 4 0.0 13 42 0.0 1.8 4.9
TCP-WWW 8 0.0 2 41 0.0 0.6 11.9
UDP-other 1 0.0 231 604 0.0 312.0 15.5
ICMP 5 0.0 6 100 0.0 0.7 15.7
Total: 18 0.0 18 428 0.0 18.2 11.6

SrcIf SrcIPaddress DstIf DstIPaddress Pr TOS Flgs Pkts
Port Msk AS Port Msk AS NextHop B/Pk Active
Fa0/0 150.1.1.252 Se0/0 10.0.0.2 06 C0 10 1 
2AFE /24 0 0050 /30 0 10.0.0.0 40 0.0
MAC: 0007.8432.dd00 0000.0000.0000

 

Final Router Configurations

R1

 

R1#term len 0
R1#sh run
Building configuration…

Current configuration : 1135 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
ip flow-cache entries 131072
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 150.1.1.1 255.255.255.0
ip flow ingress
duplex auto
speed auto
!
interface Serial0/0
ip address 10.0.0.1 255.255.255.252
ip accounting output-packets
clock rate 2000000
!
interface Serial0/1
no ip address
shutdown
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
ip forward-protocol nd
!
ip flow-capture mac-addresses
ip flow-export source FastEthernet0/0
ip flow-export version 5 origin-as
ip flow-export destination 192.168.1.254 8000
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
!
end

R1#

R2

 

R2#term len 0
R2#sh run
Building configuration…

Current configuration : 1101 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 150.2.2.2 255.255.255.0
ip flow ingress
duplex auto
speed auto
!
interface Serial0/0
ip address 10.0.0.2 255.255.255.252
ip accounting output-packets
!
interface Serial0/1
ip address 10.0.0.9 255.255.255.252
ip accounting output-packets
!
router ospf 2
router-id 2.2.2.2
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
ip forward-protocol nd
!
ip flow-export source FastEthernet0/0
ip flow-export version 5
ip flow-export destination 192.168.1.254 8000
!
ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
!
end

R2#

R3

 

R3#term len 0
R3#sh run
Building configuration…

Current configuration : 1402 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 150.3.3.3 255.255.255.0
ip flow ingress
duplex auto
speed auto
!
interface Serial1/0
no ip address
shutdown
clock rate 128000
!
interface Serial1/1
ip address 10.0.0.10 255.255.255.252
ip accounting output-packets
clock rate 128000
!
interface Serial1/2
no ip address
shutdown
clock rate 128000
!
interface Serial1/3
no ip address
shutdown
!
interface Serial1/4
no ip address
shutdown
!
interface Serial1/5
no ip address
shutdown
!
interface Serial1/6
no ip address
shutdown
!
interface Serial1/7
no ip address
shutdown
!
router ospf 3
router-id 3.3.3.3
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
ip forward-protocol nd
!
ip flow-export source FastEthernet0/0
ip flow-export version 5
ip flow-export destination 192.168.1.254 8000
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
!
end

R3#

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.