| 27 | '''Note: This part is already done for you.''' |
| 28 | |
| 29 | === Cisco Router === |
| 30 | |
| 31 | Let's configure netflow on a cisco router |
| 32 | - Log in to the router and go to configuration mode |
| 33 | {{{ |
| 34 | Router>enable |
| 35 | Password: |
| 36 | #configure terminal |
| 37 | Router(config)# |
| 38 | }}} |
| 39 | |
| 40 | - Create an exporter profile with the IP Address of the server where you have configure the nfdump and the transport port. |
| 41 | {{{ |
| 42 | flow exporter EXPORTER-1 |
| 43 | description Export to nfdump |
| 44 | destination <IP Address> |
| 45 | transport udp <port> |
| 46 | template data timeout 60 |
| 47 | }}} |
| 48 | |
| 49 | - Define the flow monitor for IPv4 and call the created exporter. |
| 50 | {{{ |
| 51 | flow monitor FLOW-MONITOR-V4 |
| 52 | exporter EXPORTER-1 |
| 53 | record netflow ipv4 original-input |
| 54 | cache timeout active 300 |
| 55 | }}} |
| 56 | |
| 57 | - Define the flow monitor for IPv6 and call the created exporter. |
| 58 | {{{ |
| 59 | flow monitor FLOW-MONITOR-V6 |
| 60 | exporter EXPORTER-1 |
| 61 | record netflow ipv6 original-input |
| 62 | cache timeout active 300 |
| 63 | }}} |
| 64 | |
| 65 | - Add the moniter profile to the Interface that export the flows |
| 66 | {{{ |
| 67 | interface FastEthernet 0/0 |
| 68 | ip flow monitor FLOW-MONITOR-V4 input |
| 69 | ip flow monitor FLOW-MONITOR-V4 output |
| 70 | ipv6 flow monitor FLOW-MONITOR-V6 input |
| 71 | ipv6 flow monitor FLOW-MONITOR-V6 output |
| 72 | }}} |
| 73 | |
| 74 | - Save the configuration |
| 75 | |
| 76 | === HP Router === |
| 77 | |
| 78 | - Login to the router and go to Configure mode |
| 79 | {{{ |
| 80 | <Router>system-view |
| 81 | [Router] |
| 82 | }}} |
| 83 | |
| 84 | - Create the sflow agent and sflow source IP. (Interface IP of the interface that export the flow) |
| 85 | {{{ |
| 86 | sflow agent ip <IP Address> |
| 87 | sflow source ip <IP Address> |
| 88 | }}} |
| 89 | |
| 90 | - Define the sflow collector with the nfdump server IP and transport port. |
| 91 | {{{ |
| 92 | sflow collector 1 ip <IP Address> port <Port> description "Export to nfdump" |
| 93 | }}} |
| 94 | |
| 95 | - Call the sflow collector fromm the interface and define other parameters. |
| 96 | {{{ |
| 97 | interface GigabitEthernet0/0 |
| 98 | sflow flow collector 1 |
| 99 | sflow sampling-rate 4000 |
| 100 | sflow counter collector 1 |
| 101 | sflow counter interval 120 |
| 102 | }}} |
| 103 | |
| 104 | - Save the configuration |
| 105 | |