Loading

Windows:域名文件和域名缓存刷新

域名文件#

文件的路径:C:\Windows\System32\drivers\etc\hosts,可以根据需要在此文件中手动添加静态域名和IP的映射关系

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost


域名缓存刷新#

由于历史访问过的域名对应的ip会被保存缓存中,下一次访问相同的域名直接从缓存中获取对应的ip,这样可以较快访问速度。但域名和ip的映射关系改变了,客户端通过之前的ip访问出错,这时候需要刷新缓存,重新获取域名对应的相关信息。

多重dns缓存的优先级别:浏览器缓存 > 操作系统缓存 > 网关设备缓存 > DNS服务器

刷新dns缓存命令:ipconfig /flushdns

作者:caojun97

出处:https://www.cnblogs.com/caojun97/p/17919308.html

版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。

posted @   eiSouthBoy  阅读(94)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
历史上的今天:
2022-12-21 SQL Server 2019性能测试
点击右上角即可分享
微信分享提示
more_horiz
keyboard_arrow_up dark_mode palette
选择主题
menu