Merge branch 'master' into 40_crypto_docs
Conflicts: site/how-it-works.md
This commit is contained in:
commit
e04e2ab769
4 files changed
+21
-17
No files matched your search
@@ -486,13 +486,14 @@ func (conn *LocalConnection) receiveTCP(decoder *gob.Decoder, usingPassword bool
|
||||
// request full update
|
||||
conn.SendTCP(ProtocolFetchAllByte)
|
||||
continue
|
||||
} else if conn.CheckFatal(err) != nil {
|
||||
}
|
||||
if conn.CheckFatal(err) != nil {
|
||||
return
|
||||
}
|
||||
if len(newUpdate) == 0 {
|
||||
continue
|
||||
if len(newUpdate) != 0 {
|
||||
conn.Router.Topology.RebuildRoutes()
|
||||
conn.local.BroadcastTCP(Concat(ProtocolUpdateByte, newUpdate))
|
||||
}
|
||||
conn.local.BroadcastTCP(Concat(ProtocolUpdateByte, newUpdate))
|
||||
} else if msg[0] == ProtocolPMTUVerified {
|
||||
conn.verifyPMTU <- int(binary.BigEndian.Uint16(msg[1:]))
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -389,13 +389,13 @@ func (peer *Peer) handleConnectionEstablished(conn *LocalConnection) {
|
||||
}
|
||||
|
||||
func (peer *Peer) handleBroadcastTCP(msg []byte) {
|
||||
peer.Router.Topology.RebuildRoutes()
|
||||
peer.ForEachConnection(func(_ PeerName, conn Connection) {
|
||||
conn.(*LocalConnection).SendTCP(msg)
|
||||
})
|
||||
}
|
||||
|
||||
func (peer *Peer) broadcastPeerUpdate(peers ...*Peer) {
|
||||
peer.Router.Topology.RebuildRoutes()
|
||||
peer.handleBroadcastTCP(Concat(ProtocolUpdateByte, EncodePeers(append(peers, peer)...)))
|
||||
}
|
||||
|
||||
|
||||
+13
-7
@@ -5,6 +5,19 @@ layout: default
|
||||
|
||||
## How does it work?
|
||||
|
||||
A weave network consists of a number of 'peers' - weave routers
|
||||
residing on different hosts. Each peer has a name, which tends to
|
||||
remain the same over restarts, and a unique identifier (UID) which is
|
||||
different each time it is run. These are opaque identifiers as far as
|
||||
the router is concerned, although the name defaults to a MAC address.
|
||||
|
||||
Weave routers establish TCP connections to each other, over which they
|
||||
perform a protocol handshake and subsequently exchange topology
|
||||
information (see below). These connections are encrypted if so
|
||||
configured. Peers also establish UDP "connections", possibly
|
||||
encrypted, which carry encapsulated network packets. These
|
||||
"connections" are duplex and can traverse firewalls.
|
||||
|
||||
Weave creates a network bridge on the host. Each container is
|
||||
connected to that bridge via a veth pair, the container side of which
|
||||
is given the IP address & netmask supplied in 'weave run'. Also
|
||||
@@ -26,13 +39,6 @@ peer. The topology information captures which peers are connected to
|
||||
which other peers; weave can route packets in partially connected
|
||||
networks with changing topology.
|
||||
|
||||
Weave routers establish TCP connections to each other, over which they
|
||||
perform a protocol handshake and subsequently exchange topology
|
||||
information. These connections are encrypted if so configured. Peers
|
||||
also establish UDP "connections", possibly encrypted, for the
|
||||
aforementioned packet forwarding. These "connections" are duplex and
|
||||
can traverse firewalls.
|
||||
|
||||
### <a name="encapsulation"></a>Encapsulation
|
||||
|
||||
When the weave router forwards packets, the encapsulation looks
|
||||
|
||||
@@ -83,11 +83,8 @@ Reconnects:
|
||||
The terms used here are explained further at
|
||||
[how it works](how-it-works.html).
|
||||
|
||||
A 'peer' on the weave network is a weave router; one per host. Each
|
||||
peer has a name, which tends to remain the same over restarts, and a
|
||||
unique identifier (UID) which is different each time it is run. These
|
||||
are opaque identifiers as far as the router is concerned, although the
|
||||
name defaults to a MAC address.
|
||||
The 'Our name' line identifies the local weave router as a peer in the
|
||||
weave network.
|
||||
|
||||
The 'Sniffing traffic' line shows details of the virtual ethernet
|
||||
interface that weave is using to receive packets on the local
|
||||
|
||||
Reference in new issue
Block a user