在IOS设备上配置Netflow输出, 并且需要在各端口上执行ip route-cache flow 命令,则可执行以下命令:
ip route-cache flow infer-fields
该命令将在流中包含路由信息,不需要为每个接口输入ip route-cache flow命令。
switch>(enable)ip flow-export destination 192.168.9.101 9996 switch>(enable)ip flow-export version 7 switch>(enable)ip flow-export source FastEthernet 0/1 switch>(enable)ip flow-cache timeout active 1 switch>(enable)ip route-cache flow infer-fields
switch>(enable)ip flow-export destination 192.168.9.101 9996
switch>(enable)ip flow-export version 7 switch>(enable)ip flow-export source FastEthernet 0/1 switch>(enable)ip flow-cache timeout active 1 switch>(enable)ip route-cache flow infer-fields