|
0:00:13
|
The next IP service topic that we have here is
|
|
0:00:16
|
NetFlow which is used to collect information on
|
|
0:00:19
|
traffic flows that are either leaving the router's interface
|
|
0:00:22
|
or entering the router's interface.
|
|
0:00:26
|
So if we wanted to collect usage statistics of how
|
|
0:00:29
|
much bandwidth is being used and what are the different
|
|
0:00:32
|
applications that are being used like how much of our
|
|
0:00:35
|
flows are web traffic versus FTP or peer-to-peer file sharing
|
|
0:00:39
|
applications, that's what NetFlow is going to be used for.
|
|
0:00:44
|
Now in order to actually sort through the data, it then implies
|
|
0:00:47
|
that we need to export this to some external collection station.
|
|
0:00:52
|
So the NetFlow configuration on the router is fairly straightforward
|
|
0:00:56
|
the only thing we need to do is tell it to collect the statistics
|
|
0:00:59
|
either in or out of the interface, then specify where we actually
|
|
0:01:04
|
are going to send this to which is the IP flow export destination.
|
|
0:01:08
|
Now before exporting the flows, we would need to know
|
|
0:01:13
|
what is the particular version that the collection station supports
|
|
0:01:17
|
where typically this is going to be either version 5 or 9
|
|
0:01:21
|
but it depends on the NetFlow collection station itself.
|
|
0:01:26
|
So within the scope of the routing and switching exam
|
|
0:01:29
|
if you were to get a question on this, again you should be able
|
|
0:01:31
|
to piece it together based on the documentation and
|
|
0:01:35
|
these different types of information like what is the
|
|
0:01:37
|
version, what is the destination, this stuff
|
|
0:01:39
|
they would simply have to specify in the question.
|
|
0:01:44
|
Now we can also do class based NetFlow sampling
|
|
0:01:48
|
which would allow you to do separate manual
|
|
0:01:52
|
sampling flows based on the module of the quality of service
|
|
0:01:55
|
or a flow sampler map, so if I wanted in my MQC
|
|
0:02:00
|
to say look at a particular web flow from a source to a
|
|
0:02:03
|
destination, match that in an access list and then apply
|
|
0:02:07
|
the NetFlow sampler to it
|
|
0:02:11
|
otherwise, I could apply it just on the interface level
|
|
0:02:13
|
with the IP flow egress and the IP flow ingress.
|
|
0:02:16
|
Another useful feature for this is to check the
|
|
0:02:19
|
statistics locally where if you don't have an
|
|
0:02:23
|
actual collection station you can configure the router
|
|
0:02:26
|
to keep the NetFlow data local, then you can sort through
|
|
0:02:30
|
it to figure out who are the noisiest talkers in the
|
|
0:02:34
|
network, so who are the sources and destinations that are
|
|
0:02:36
|
sending the most traffic which is known as the
|
|
0:02:40
|
NetFlow top talkers feature.
|
|
0:02:43
|
But for most of this configuration if you go to the documentation
|
|
0:02:48
|
this is going to be under the NetFlow documentation
|
|
0:02:53
|
itself, so it has a separate configuration guide.
|
|
0:02:57
|
If we look at the configuration guides, this would be configuring
|
|
0:03:00
|
NetFlow and Netflow export.
|
|
0:03:02
|
And I don't believe the top talkers is located in this
|
|
0:03:10
|
document, so this one is talking about just how do you collect the
|
|
0:03:13
|
statistics and then where do you send it.
|
|
0:03:17
|
So if we look at the configuration examples, it says example configuring
|
|
0:03:21
|
egress NetFlow accounting, so simply at the link level
|
|
0:03:24
|
we say ip flow egress
|
|
0:03:28
|
so it's only one command.
|
|
0:03:31
|
For incoming traffic, we say ip flow ingress
|
|
0:03:34
|
then to figure out where do we actually want to send
|
|
0:03:36
|
it, the ip flow destination, typically the port is going to be 9991
|
|
0:03:43
|
You can specify that if the collection station is using
|
|
0:03:46
|
a non-standard port or by default it's going to be using
|
|
0:03:49
|
UDP 9991
|
|
0:04:00
|
For some of the advanced features you can track traffic based on the
|
|
0:04:04
|
BGP autonomous system
|
|
0:04:06
|
so if you're used as a transit AS, you can figure out where
|
|
0:04:09
|
the most, the majority of your traffic is coming from.
|
|
0:04:13
|
Typically this is used for service providers to
|
|
0:04:15
|
negotiate their peering agreements
|
|
0:04:17
|
to see how much traffic is coming from one provider versus another.
|
|
0:04:23
|
MPLS enabled NetFlow
|
|
0:04:25
|
would be doing statistics based on the label values
|
|
0:04:29
|
because in the transit path of an MPLS network, we
|
|
0:04:32
|
can't do classification based on IP.
|
|
0:04:34
|
We'd have to do it based on the MPLS label value.
|
|
0:04:40
|
Then again, the other one that's useful here is the
|
|
0:04:42
|
NetFlow top talkers.
|
|
0:04:45
|
So if we look at simply the configuration example for this
|
|
0:04:58
|
this is using SNMP, that's not what I want to see.
|
|
0:05:03
|
Configuring NetFlow top talkers
|
|
0:05:09
|
Once NetFlow is on in global config we say ip flow top talkers
|
|
0:05:13
|
what's the number of statistics that we want to keep
|
|
0:05:17
|
so how many entries do we want to keep, then do we
|
|
0:05:20
|
sort it by the number of bytes or the number of packets.
|
|
0:05:28
|
So let's look at an example of this here on Router 5
|
|
0:05:32
|
where it's used for the transit of anything going to
|
|
0:05:34
|
switch 2 and switch 4 towards the rest of the network.
|
|
0:05:40
|
So on our connection to the frame relay interface
|
|
0:05:42
|
which is serial 0/0/0
|
|
0:05:47
|
I'll say that I want to collect NetFlow stats for flows that go out
|
|
0:05:53
|
and flows that come in.
|
|
0:05:57
|
If I don't want to set these to a flow, the ip flow export
|
|
0:06:04
|
destination, so again this would be for an external
|
|
0:06:07
|
collection station
|
|
0:06:12
|
otherwise, I'm simply going to enable the local feature which
|
|
0:06:14
|
is going to be the NetFlow top talkers.
|
|
0:06:18
|
So I'll say ip flow-top talkers
|
|
0:06:26
|
how many entries do I want to keep?
|
|
0:06:29
|
Let's say I'll keep the top 10
|
|
0:06:31
|
I want to sort this by the number of packets.
|
|
0:06:39
|
So now let's send some traffic through the network let's say
|
|
0:06:41
|
from switch 2 I'll start pinging Router 1's loopback
|
|
0:06:47
|
from switch 4 I'll telnet over to
|
|
0:06:53
|
let's say to Router 6
|
|
0:06:55
|
telnet 150.28.6.6
|
|
0:07:02
|
Then once we're on Router 6 we'll say show tech support
|
|
0:07:04
|
is going to generate a bunch of telnet traffic.
|
|
0:07:08
|
So now from Router 5 if we look at the show ip flow
|
|
0:07:11
|
top talkers
|
|
0:07:15
|
we can see the traffic is coming from the 58.100 address
|
|
0:07:19
|
which is actually what we allocated through DHCP previously.
|
|
0:07:25
|
It tells us what the IP protocol number is
|
|
0:07:29
|
which protocol number 1 is going to be for our pings.
|
|
0:07:35
|
Then we have packets coming from 108.10 going to
|
|
0:07:39
|
150.28.6.6
|
|
0:07:43
|
which this protocol number here this is in hex
|
|
0:07:48
|
so protocol number 58
|
|
0:07:50
|
if we said 58 in hex
|
|
0:07:53
|
is actually 88 in decimal which means it's EIGRP
|
|
0:07:58
|
So we could see that routers 1 through 4 are running EIGRP
|
|
0:08:01
|
destination interface is null it means it's going locally to the router
|
|
0:08:05
|
itself.
|
|
0:08:08
|
Then the source IP or the source port and the
|
|
0:08:11
|
destination port these are in hex as well.
|
|
0:08:14
|
So we can see destination port 17 in hex
|
|
0:08:21
|
I said 17 in decimal is 23
|
|
0:08:26
|
So you could potentially use this locally. It's obviously
|
|
0:08:29
|
not going to be as detailed as the information that you can
|
|
0:08:31
|
send to an external collection station, but this is used for
|
|
0:08:36
|
if you're trying to track down some sort of
|
|
0:08:38
|
maybe denial of service attack in the network
|
|
0:08:40
|
or there's some sort of worm or virus that's infected
|
|
0:08:44
|
hosts, then you can simply enable NetFlow in and out the
|
|
0:08:49
|
interface, turn on top talkers and then you're
|
|
0:08:51
|
going to know who is sending either the most number of packets
|
|
0:08:55
|
or the most number of bytes.
|