Russ

Author Archives: Russ

DC Fabric Segment Routing Use Case (2)

In the first post we covered a bit of the basics around segment routing in the data center. Let’s return to the first use case to see if we can figure out how we’d actually implement the type of traffic steering needed to segregate mouse and elephant flows. Let’s return to our fabric and traffic flows and think about how we could shape traffic using segment routing.

benes-segment

There are two obvious ways to shape traffic in this way—

IGP-Prefix segments

The first way would be to impose a label stack that forces traffic along a path that touches, or passes through, each of the devices along the path. In this case, that would mean imposing a path on the traffic originating behind the ToR at A so it must pass through [F,G,D,E]. The flow of traffic through the data center will look something like—

  • Somehow classify the traffic as belonging to the flow that should be shaped to follow only the [F,G,D,E] path
  • Impose the path as a label stack, so the SR header (really just a label stack in this situation, remember?) will contain [F,G,D,E]
  • Forward the packet, with the label, to the next hop in the stack, Continue reading

snaproute Go BGP Code Dive (5): Starting a Peer

Last time we looked at the snaproute BGP code, we discovered the peer bringup process is a finite state machine. With this in mind, let’s try to unravel the state machine into a set of calls, beginning from our original starting point, a debug message that prints on the screen when a new peering relationship is established. The key word in the debug message was ConnEstablished, which led to:

func (fsm *FSM) ConnEstablished() {
fsm.logger.Info(fmt.Sprintln("Neighbor:", fsm.pConf.NeighborAddress, "FSM", fsm.id, "ConnEstablished - start"))
fsm.Manager.fsmEstablished(fsm.id, fsm.peerConn.conn)
fsm.logger.Info(fmt.Sprintln("Neighbor:", fsm.pConf.NeighborAddress, "FSM", fsm.id, "ConnEstablished - end"))
}

From here, we searched for calls to ConnEstablished, and found—

func (fsm *FSM) ChangeState(newState BaseStateIface) {
...
if oldState == BGPFSMEstablished && fsm.State.state() != BGPFSMEstablished {
fsm.ConnBroken()
} else if oldState != BGPFSMEstablished && fsm.State.state() == BGPFSMEstablished {
fsm.ConnEstablished()
}
}

Looking for ChangeState leads us to a lot of different calls, but only one that seems to relate to establishing a new peer, as evidenced by a state that relates to established in some way. This, in turn, leads to—

func (st *OpenConfirmState) processEvent(event BGPFSMEvent, data Continue reading