N7K
- vPC will not allow traffic that was RECEIVED over a VPC peer-link to be sent out a vPC member port
This means any traffic from peer-link will not be sent out a VPC member port, doesn't matter it is from the same port channel or not.
For example traffic from vpc member 1 on switch 1 with switch 2 's mac as destination mac address. The traffic will send across peer link and then switch 2 will do the routing. If the traffic needs to go out the vpc member 2 on switch, the traffic will be drop even it is different vpc member.
Because VPC supports to use local VPC member to forwarding the traffic either L2 bridging or L3 routing.
http://www.ccierants.com/2012/03/vpc-gotchas-you-need-to-know.html
N5K
http://www.cisco.com/c/en/us/support/docs/switches/nexus-5000-series-switches/115900-l2mp-vpc-switch-00.html
This link provides details of the packet flow between peer link using fabricpath and how loop avoidance works in the new 5500.
Commands
peer-switch:
When peer-switch is enabled, each Nexus 7000 switch shares a virtual bridge ID, which allows both switches to act as root for the VLAN.
http://www.cisco.com/c/en/us/support/docs/routers/7000-series-routers/116140-config-nexus-peer-00.html
peer-gateway:
you can use the peer-gateway command to allow Cisco Nexus 5500 Platform switches to perform Layer 3 forwarding if the destination MAC of the incoming packet is the MAC of its vPC peer switch. The peer-gateway command avoids forwarding such packets to the vPC peer link.
You must configure the peer-gateway command on both vPC peer switches.