Documentation ¶
Index ¶
Constants ¶
const ( // LLDPTxInterval is set to 10 seconds in /etc/lldpd.d/tx-interval.conf on each leaf. LLDPTxInterval = 15 * time.Second // LLDPTxIntervalTimeout is set to double of tx-interval of lldpd on the switch side. // This ensures we get all lldp pdu`s. // We add 2 seconds to be on the save side. LLDPTxIntervalTimeout = (2 * LLDPTxInterval) + 2 )
const MTU = 9000
We expect to have storage and MTU of 9000 supports efficient transmission. In our clos topology MTU 9000 (non vxlan)/9216 (vxlan) is status quo.
Variables ¶
This section is empty.
Functions ¶
func InternalIP ¶
func InternalIP() string
InternalIP returns the first ipv4 ip of a eth* interface.
Types ¶
type Ethtool ¶
type Ethtool struct {
// contains filtered or unexported fields
}
Ethtool to query/set ethernet interfaces
func NewEthtool ¶
func NewEthtool() *Ethtool
NewEthtool create a new Ethtool with the default command
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host collects lldp neighbor information's.
type LLDPClient ¶
type LLDPClient struct {
Host *Host
}
LLDPClient act as a small wrapper about low level lldp primitives.
func NewLLDPClient ¶
func NewLLDPClient(interfaces []string, minimumInterfaces, minimumNeighbors int, timeout time.Duration) *LLDPClient
NewLLDPClient create a lldp client.
type Network ¶
type Network struct { IPAddress string Started time.Time MachineUUID string LLDPClient *LLDPClient }
Network provides networking operations.
func (*Network) Neighbors ¶
func (n *Network) Neighbors(name string) ([]*models.ModelsV1MachineNicExtended, error)
Neighbors of a interface, detected via ip neighbor detection
func (*Network) UpAllInterfaces ¶
UpAllInterfaces set all available eth* interfaces up to ensure they do ipv6 link local autoconfiguration and therefore neighbor discovery, which is required to make all local mac's visible on the switch side.