In the last session of snaproute BGP code dive—number 8, in fact— I started looking at how snaproute’s BGP moves from connect to open. This is the chain of calls from that post— st.fsm.StopConnectRetryTimer() st.fsm.SetPeerConn(data) st.fsm.sendOpenMessage() st.fsm.SetHoldTime(st.fsm.neighborConf.RunningConf.HoldTime, st.fsm.neighborConf.RunningConf.KeepaliveTime) st.fsm.StartHoldTimer() st.BaseState.fsm.ChangeState(NewOpenSentState(st.BaseState.fsm)) The past post covered the first two steps in this process, so this post will…
Last week we left off with our BGP peer in connect state after looking through what this code, around line 261 of fsm.go in snaproute’s Go BGP implementation— func (st *ConnectState) processEvent(event BGPFSMEvent, data interface{}) { switch event { …. case BGPEventConnRetryTimerExp: st.fsm.StopConnToPeer() st.fsm.StartConnectRetryTimer() st.fsm.InitiateConnToPeer() …. What we want to do this week is pick…
In last week’s post, we looked at how snaproute’s implementation of BGP in Go moves into trying to connect to a new peer—we chased down the connectRetryTimer to see what it does, but we didn’t fully work through what the code does when actually moving to connect. To jump back into the code, this is…
In our last post on BGP code, we unraveled the call chain snaproute’s Go BGP implementation uses to bring a peer up. Let’s look at this call chain a bit more to see if we can figure out what it actually does—or rather, how it actually works. I’m going to skip the actual beginning of…
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…
In the last three episodes of this series, we discussed getting a copy of SnapRoute’s BGP code using Git, we looked at the basic structure of the project, and then we did some general housekeeping. At this point, I’m going to assume you have the tools you need installed, and you’re ready to follow along…
This week, I want to do a little more housekeeping before we get into actually asking questions of the bgp code. First there is the little matter of an editor. I use two different editors most of the time, Notepad++ and Atom. Notepad++ is a lightweight, general purpose text editor that I use for a…
Now that you have a copy of BGP in Go on your machine—it’s tempting to jump right in to asking the code questions, but it’s important to get a sense of how things are structured. In essence, you need to build a mental map of how the functionality of the protocol you already know is…
I often tell network engineers they need to learn to code—and they sometimes take my advice and run off to buy a book, or start an online program (which reminds me, I’m way, way behind in my own studies about right now). But learning to code, and being able to use that skill for anything…
- « Previous
- 1
- 2