Skip to content

Commit 4acedf3

Browse files
committed
add localhost & 127.0.0.1
1 parent cc41819 commit 4acedf3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

network.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
3、什么是VxLAN?
2727
(tips:扩展版的VLAN,具体作用后面再补充)
2828

29+
4、localhost和127.0.0.1有啥区别
30+
(tips: 当前系统在初始化时会在/etc/hosts中预先配置好 localhost 将被解析到127.0.0.1,
31+
如果手动删掉这一行,则会向DNS server请求解析localhosts。ping localhost 和 ping 127.0.0.1
32+
的区别就是前者多了一步查询/etc/hosts的步骤,对应的ICMP数据包依然需要通过loopback网卡进行转发,
33+
使用 tcpdump -i any 可以抓到对应的包)
34+
2935
// UDP
3036

3137
1、UDP 可以使用connect吗?

0 commit comments

Comments
 (0)