-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d044222
commit 73d035b
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
content/post/What-happens-type-url-into-browser-and-press-enter.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: What-happens-type-url-into-browser-and-press-enter | ||
date: 2021-09-11T16:21:12+08:00 | ||
tags: ["network", "interrput", "dns"] | ||
--- | ||
|
||
## dns query | ||
|
||
get the ip of the target domain | ||
|
||
### browser cache | ||
|
||
firefox(about:networking#dns) | ||
|
||
### /etc/hosts | ||
|
||
### os cache | ||
|
||
1. macos 查看 dns 请求日志 sudo log stream --predicate 'process == "mDNSResponder"' --info | ||
|
||
|
||
### dns resolver | ||
|
||
/etc/resolv.conf | ||
|
||
1. arp -a 查看有没有 dns 服务器的 mac 地址 | ||
2. ARP request for the nameserver | ||
3. send dns query to get the ip of the domain | ||
|
||
## arp 获取 gateway 的 mac 地址 | ||
|
||
## References | ||
|
||
1. [keyborad-interrput](http://www.science.smith.edu/~nhowe/262/oldlabs/keyboard.html) | ||
2. [Chrome 是怎么判断地址栏输入的东西是不是网址? -omnibox](https://www.zhihu.com/question/560616439/answer/2722866208) | ||
3. [firefox dns](about:networking#dns) | ||
4. [ARP](https://www.fortinet.com/resources/cyberglossary/what-is-arp) |