Skip to content

Commit

Permalink
backport of commit 22b70dd
Browse files Browse the repository at this point in the history
  • Loading branch information
blake committed Sep 19, 2023
1 parent 1580027 commit a8e04bf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions website/content/docs/services/discovery/dns-static-lookups.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ If a service registered with Consul is configured with an explicit IP address or

In the following example, the `rabbitmq` service is registered with an explicit IPv4 address of `192.0.2.10`.

<CodeTabs>

```hcl
node_name = "node1"
Expand All @@ -247,6 +249,9 @@ services {
address = "192.0.2.10"
port = 5672
}
```

```json
{
"node_name": "node1",
"services": [
Expand All @@ -259,6 +264,8 @@ services {
}
```

</CodeTabs>

The following example SRV query response contains a single record with a hostname written as a hexadecimal value:

```shell-session
Expand All @@ -275,6 +282,8 @@ $ echo -n "c000020a" | perl -ne 'printf("%vd\n", pack("H*", $_))'

In the following example, the `rabbitmq` service is registered with an explicit IPv6 address of `2001:db8:1:2:cafe::1337`.

<CodeTabs>

```hcl
node_name = "node1"
Expand All @@ -283,6 +292,9 @@ services {
address = "2001:db8:1:2:cafe::1337"
port = 5672
}
```

```json
{
"node_name": "node1",
"services": [
Expand All @@ -295,6 +307,8 @@ services {
}
```

</CodeTabs>

The following example SRV query response contains a single record with a hostname written as a hexadecimal value:

```shell-session
Expand Down

0 comments on commit a8e04bf

Please sign in to comment.