Cisco – vPC traffic flow question

ciscocisco-nexusospfswitchvpc

This is going to be new network in my datacenter and i have question related vPC, as you can see i have A1/A2 switch (L3/L2 routing) in aggregation layer and C1/C2 switches for Core (L3 routing). I am planning to implement vPC between TOR and Aggregation layer to avoid STP and utilize full bandwidth.

Question: If TOP switch send traffic to Aggr layer switch and it will send traffic to both link using hash algorithm in that case how A2 switch will send traffic to upstream core switch (L3)? Does A2 switch send traffic to A1 using trunk or it will send traffic directly to C2 switch and then C2 switch forward to C1 (because C1 is primary BGP switch)

I am new in vPC so trying to understand how switch will handle upstream traffic.

enter image description here

EDIT:

Question:

  • Should i create vPC between Core C1/2 and Aggr A1/A2 to resolve this routing loop?

Best Answer

It depends on whether you have a vPC between the aggregation and core layers.

If the connection between (A1, A2) and (C1, C2) is a vPC, then the switch always prefers "local forwarding". That is, any packet that is received on A1 will be sent to C1, and any packet that is received on A2 will be send to C2. The idea is to have the packet pass through only one ASIC in the data path; if a packet that was received on A2 were sent to C1 via A1, then it would have to pass through two ASICs thereby increasing latency. It would also consume bandwidth on the A1-A2 link.

If the connection between (A1, A2) and (C1, C2) is a normal OSPF topology, i.e. does not use vPC, then the packet will follow usual L3 forwarding rules. If the packet was received on A2 but the route lookup yields C1 as the next hop, then the packet will go to A1 and from there to C1.

The interesting case here is a load-balanced route, with both C1 and C2 as possible next-hops. In this case you will have to ask Cisco what will happen because this is dictated by internal ASIC behaviour: i.e. will A2 always "prefer" the directly connected hop (i.e. C2), or will the normal L3 hashing logic anyway kick in, and send packets to both C1 (via A1) and C2 (directly) based on the flow.