sFlow scenario 2

我n this scenario, two hosts connected to different switches send sFlow traffic to a collector. A LAG is used to connect the two switches.The physical topology of the network looks like this:

Procedure

  1. Configure switch 1.
    1. Enable sFlow globally.

      switch#config

      switch(config)#sflow

    2. Set the sFlow agent IP address to10.10.12.1.

      switch(config)#sflow agent-ip 10.10.12.1

    3. Set the sFlow collector IP address to10.10.12.2.

      switch(config)#sflow收集器10.10.12.2

    4. Configure sFLow sampling rate and polling interval.

      switch(config)#sflow sampling 5000

      switch(config)#sflow polling 10

    5. Create VLAN8.

      switch(config)#vlan 8

      switch(config-vlan-8)#no shutdown

      switch(config)#exit

    6. Define LAG100and assign VLANvlan 8to it.

      switch(config)#interface lag 100

      switch(config-lag-if)#no shutdown

      switch(config-lag-if)#no routing

      switch(config-lag-if)#vlan access 8

      switch(config-lag-if)#lacp mode active

    7. Configure interface1/1/1.

      switch(config)#interface 1/1/1

      switch(config-if)#no shutdown

      switch(config-lag-if)#no routing

      switch(config-if)#vlan access 8

    8. Configureinterface1/1/2and1/1/3as members of LAG100.

      switch# (config)#interface 1/1/2

      switch(config-if)#no shutdown

      switch(config-if)#滞后100

      switch(config-if)#exit

      switch(config)#interface 1/1/3

      switch(config-if)#no shutdown

      switch(config-if)#滞后100

      switch(config-if)#exit

    9. Configure interface1/1/4with IP address10.10.12.1/24.

      switch# (config)#interface 1/1/4

      switch(config-if)#no shutdown

      switch(config-if)#ip address 10.10.12.1/24

      switch(config-if)#quit

    10. Verify sFlow configuration.

    switch# show sflow

    sFlow Global Configuration

    -----------------------------------------

    sFlow enabled

    Collector IP/Port/Vrf 10.10.10.2/6343/default

    Agent Address 10.0.0.1

    Sampling Rate 1024

    Polling Interval 30

    Header Size 128

    Max Datagram Size 1400

    sFlow Status

    -----------------------------------------

    运行——是的

    sFlow enabled on Interfaces:

    -----------------------------------------

    lag100

    sFlow Statistics

    -----------------------------------------

    Number of Samples 200

  2. Configure switch 2.
    1. Create VLAN8.

      switch(config)#vlan 8switch(config-vlan-8)#no shutdownswitch(config)#exit

    2. Define LAG100and assign VLANvlan 8to it.

      switch(config)#interface lag 100

      switch(config-lag-if)#no shutdown

      switch(config-lag-if)#no routing

      switch(config-lag-if)#vlan access 8

      switch(config-lag-if)#lacp mode active

    3. Configure interface1/1/1.

      switch(config)#interface 1/1/1

      switch(config-if)#no shutdown

      switch(config-lag-if)#no routing

      switch(config-if)#vlan access 8

    4. Configure interface1/1/2and1/1/3as members of LAG100.

      switch# (config)#interface 1/1/2

      switch(config-if)#no shutdown

      switch(config-if)#滞后100

      switch(config-if)#exit

      switch(config)-if#interface 1/1/3

      switch(config-if)#no shutdown

      switch(config-if)#滞后100

      switch(config-if)#exit