Knowledge Search


×
 

Add entry to hosts file on STRM

  [KB16499] Show Article Properties


Summary:
The /etc/hosts file on STRM allows you to map hostnames to IP addresses
Symptoms:
  • How to add entry to /etc/hosts file on STRM
  • Entries in /etc/hosts file are lost
Solution:
On every Deploy and Reboot the /etc/hosts file is over-written with contents from /etc/hosts.default file.  If you need to add hosts this need to be done in the /etc/hosts.default file

Sample /etc/hosts.default file

[root@strm-104 jars]# cat /etc/hosts.default
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.85.34.104 strm-104.juniper.net strm-104
10.85.34.1 strm-gw.jnpr.net
[root@strm-104 jars]#
Related Links: