Page:
Glibc IPv4
Pages
APT WhatProvides
Apache wpadmin
Arch Default Kernel
Arch Kernel Order
Bash Add fd
Bash Dump History
Bash Trim Whitespace
CPU Stats
CSS Reset
DB2 Info
Debian Upgrade
Dell OpenManage
Diff Lines
Favicon Things
Find Examples
Forgejo Syntax Highlight
Git Combine Repos
Git Multi SSH
Git Quickstart
Git Rewrite User
GitLab Anchors
Gitea Mirror
Glibc IPv4
GnuPG Things
Home
IMAP Sync
IPv4 Default Gateway
IPv4 Default IP
KRB5 Empty Keytab
Kernel Boot Debug
Kernel Decompress
LICENSE
LUKS Encrypted Partitions
Linux Valid Usernames
Loopback FS
MP3 Get Tags
MX Tarpit
Makefile Template
Markdown Samples
Mount OVA
Mount qcow2
MySQL Connections
NFS 10G Tuning
Netcat Replacements
PAM Namespace
Postfix Headers
Proxmox Doodads
RPM Info
Radeon Temperature
Recover Deleted ext3
Recursive Unzip
Roku Info
SSH RSA Support
SSL Certgen
Samba OSX
Server Notes
Smem Datamash
Split Disk
TCP Kill
Thunderbird LDAP AD
Weechat Quickstart
YTM to Textbox
YUM Disablerepos
systemd PID1
uBlock Filters
udev Hide Partitions
No results
1
Glibc IPv4
tengel edited this page 2024-03-20 11:55:03 -05:00
Glibc provides the capability per RFC 3484 to allow the sysadmin to specify the sort order of returned calls to getaddrinfo() via the /etc/gai.conf file. This is a handy way to have IPv4 preferred over IPv6 returned addresses:
precedence ::ffff:0:0/96 100
The presence of a single precedence line in the configuration file causes the default table to not be used. The /etc/gai.conf is typically either empty or missing; if configured in the file the default table would look like:
/etc/gai.conf (RFC defaults)
label ::1/128 0
label ::/0 1
label 2002::/16 2
label ::/96 3
label ::ffff:0:0/96 4
precedence ::1/128 50
precedence ::/0 40
precedence 2002::/16 30
precedence ::/96 20
precedence ::ffff:0:0/96 10
When adding the IPv4 precedence, change the last line to indicate 100 (larger number == higher precedence):
/etc/gai.conf (IPv4 preferred)
label ::1/128 0
label ::/0 1
label 2002::/16 2
label ::/96 3
label ::ffff:0:0/96 4
precedence ::1/128 50
precedence ::/0 40
precedence 2002::/16 30
precedence ::/96 20
precedence ::ffff:0:0/96 100
Index
- APT WhatProvides
- Apache wpadmin
- Arch Default Kernel
- Arch Kernel Order
- Bash Add fd
- Bash Dump History
- Bash Trim Whitespace
- CPU Stats
- CSS Reset
- DB2 Info
- Debian Upgrade
- Dell OpenManage
- Diff Lines
- Favicon Things
- Find Examples
- Forgejo Syntax Highlight
- Git Combine Repos
- Git Multi SSH
- Git Quickstart
- Git Rewrite User
- Gitea Mirror
- GitLab Anchors
- Glibc IPv4
- GnuPG Things
- IMAP Sync
- IPv4 Default Gateway
- IPv4 Default IP
- KRB5 Empty Keytab
- Kernel Boot Debug
- Kernel Decompress
- LUKS Encrypted Partitions
- Linux Valid Usernames
- Loopback FS
- MP3 Get Tags
- MX Tarpit
- Makefile Template
- Markdown Samples
- Mount OVA
- Mount qcow2
- MySQL Connections
- NFS 10G Tuning
- Netcat Replacements
- PAM Namespace
- Postfix Headers
- Proxmox Doodads
- RPM Info
- Radeon Temperature
- Recover Deleted ext3
- Recursive Unzip
- Roku Info
- SSH RSA Support
- SSL Certgen
- Samba OSX
- Server Notes
- Smem Datamash
- Split Disk
- systemd PID1
- TCP Kill
- Thunderbird LDAP AD
- uBlock Filters
- udev Hide Partitions
- Weechat Quickstart
- YTM to Textbox
- YUM Disablerepos
- SPDX-License-Identifier: CC-BY-SA-4.0
- SPDX-License-Identifier: MIT