Skip to content
/ bfd Public

Experimental BFD implementation in Go. Incomplete and probably very wrong.

License

Notifications You must be signed in to change notification settings

davidcoles/bfd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BFD

Experimental Bidirectional Forwarding Detection implementation in Go. Incomplete and probably very wrong.

Partially implements:

This package will negotiate a BFD session with any directly connected peer that attempts to connect.

Only one session per peer is supported currently.

Example usage

func main() {
    ip := netip.MustParseAddr(os.Args[1])

    bfd := bfd.BFD{}
    err := bfd.Start()

    if err != nil {
	log.Fatal("Start: ", err)
    }

    for {
        fmt.Println(ip, bfd.Query(ip))
        time.Sleep(time.Second)
    }
}

If you were running this on 10.1.2.3 as go run main.go 10.1.2.4, and on host 10.1.2.4 you set BIRD up with:

protocol bfd {
    neighbor 10.1.2.3;
}

then you should see a BFD session come up:

root:~/bfd/cmd# go run main.go 10.1.2.4
10.1.2.4 false
10.1.2.4 true
10.1.2.4 true
10.1.2.4 true
...

About

Experimental BFD implementation in Go. Incomplete and probably very wrong.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages