Tweaks network segments guide.

This commit is contained in:
James Phillips 2017-09-01 11:19:39 -07:00
parent f41a3fe6c0
commit 745537fed4
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
2 changed files with 11 additions and 5 deletions

View File

@ -1061,7 +1061,8 @@ Consul will not enable TLS for the HTTP API unless the `https` port has been ass
[`-segment` command-line flag](#_segment). [`-segment` command-line flag](#_segment).
* <a name="segments"></a><a href="#segments">`segments`</a> (Enterprise-only) This is a list of nested objects that allows setting * <a name="segments"></a><a href="#segments">`segments`</a> (Enterprise-only) This is a list of nested objects that allows setting
the bind/advertise information for network segments. This can only be set on servers. the bind/advertise information for network segments. This can only be set on servers. See the
[Network Segments Guide](/docs/guides/segments.html) for more details.
* <a name="segment_name"></a><a href="#segment_name">`name`</a> - The name of the segment. Must be a string between * <a name="segment_name"></a><a href="#segment_name">`name`</a> - The name of the segment. Must be a string between
1 and 64 characters in length. 1 and 64 characters in length.
* <a name="segment_bind"></a><a href="#segment_bind">`bind`</a> - The bind address to use for the segment's gossip layer. * <a name="segment_bind"></a><a href="#segment_bind">`bind`</a> - The bind address to use for the segment's gossip layer.

View File

@ -10,8 +10,9 @@ description: |-
segment. segment.
--- ---
# Partial LAN Connectivity # Network Segments
## Configuring Network Segments
## Partial LAN Connectivity with Network Segments
[//]: # ( ~> The network segment functionality described here is available only in ) [//]: # ( ~> The network segment functionality described here is available only in )
[//]: # ( [Consul Enterprise](https://www.hashicorp.com/products/consul/) version 0.9.3 and later. ) [//]: # ( [Consul Enterprise](https://www.hashicorp.com/products/consul/) version 0.9.3 and later. )
@ -34,7 +35,7 @@ This guide will cover the basic configuration for setting up multiple segments,
how to configure a prepared query to limit service discovery to the services in the local agent's how to configure a prepared query to limit service discovery to the services in the local agent's
network segment. network segment.
## Network Segments ## Configuring Network Segments
All Consul agents are part of the default network segment, `""`, unless a segment is specified in All Consul agents are part of the default network segment, `""`, unless a segment is specified in
their configuration. In a standard cluster setup all agents will normally be part of this default their configuration. In a standard cluster setup all agents will normally be part of this default
@ -44,10 +45,14 @@ on the servers. Each desired segment must be given a name and port, as well as o
bind and advertise address for that segment's gossip listener to bind to on the server. bind and advertise address for that segment's gossip listener to bind to on the server.
A few things to note: A few things to note:
1. Servers will be a part of all segments they have been configured with. They are the common point 1. Servers will be a part of all segments they have been configured with. They are the common point
linking the different segments together. linking the different segments together. The configured list of segments is specified by the
[`segments`](/docs/agent/options.html#segments) option.
2. Client agents can only be part of one segment at a given time, specified by the [`-segment`] 2. Client agents can only be part of one segment at a given time, specified by the [`-segment`]
(/docs/agent/options.html#_segment) option. (/docs/agent/options.html#_segment) option.
3. Clients can only join agents in the same segment as them. If they attempt to join a client in 3. Clients can only join agents in the same segment as them. If they attempt to join a client in
another segment, or the listening port of another segment on a server, they will get a segment mismatch error. another segment, or the listening port of another segment on a server, they will get a segment mismatch error.