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 国际」许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
2022-12-21 SQL Server 2019性能测试