Open
Description
It seems that the host file has a hard limit of 256 characters per line.
If adding a number of hosts that exceed a maximum line size of 256 characters, the values are ignored.
Example 1: Large number of hosts
$ cat /etc/hosts
127.0.0.1 www1.mysite.com www2.mysite.com www3.mysite.com www4.mysite.com www5.mysite.com www6.mysite.com www7.mysite.com www8.mysite.com www9.mysite.com www10.mysite.com www11.mysite.com www12.mysite.com www13.mysite.com www14.mysite.com www15.mysite.com www16.mysite.com www17.mysite.com www18.mysite.com www19.mysite.com www20.mysite.com
$ ping www11.mysite.com
PING www11.mysite.com (13.X.X.X): 56 data bytes
64 bytes from 13.X.X.X: icmp_seq=0 ttl=117 time=18.003 ms
Example 2: Single host
$ cat /etc/hosts
127.0.0.1 www11.mysite.com
$ ping www11.mysite.com
PING www11.mysite.com (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.070 ms
Metadata
Metadata
Assignees
Labels
No labels