网络基础概念

// 网路分层:

 

// 私有地址:  <== 内网地址

A类:10.0.0.0 - 10.255.255.255

B类:172.16.0.0 - 172.31.255.255.255

C类:192.168.0.0 - 192.168.255.255

 

// 网络地址转换:

路由器上记住了私有地址的请求,然后通过公有发出去,回来的信息通过路由再交给私有地址。

 

// ping 和 telnet

ping:验证IP的可达性

telnet:验证服务的可用性

 

// 抓包工具:

wireshark  ==>>   https://www.wireshark.org/

 

// 机子端口:

本机输入

 ifconfig  或者  ip a

会得到类似:

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:94:7a:66:8c  txqueuelen 0  (Ethernet)
        RX packets 374  bytes 33367 (32.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 377  bytes 820747 (801.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.214.33.41  netmask 255.255.192.0  broadcast 10.214.63.255
        ether 52:54:00:48:44:82  txqueuelen 1000  (Ethernet)
        RX packets 769041  bytes 448588768 (427.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 545504  bytes 72076154 (68.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Local Loopback)
        RX packets 130  bytes 10662 (10.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 130  bytes 10662 (10.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vetha0624c7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 5e:ff:a7:45:9f:ff  txqueuelen 0  (Ethernet)
        RX packets 129  bytes 12703 (12.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 154  bytes 12302 (12.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

—— lo 即回环地址,为127.0.0.1

—— eth0 即物理网卡

—— docker0 即 docker 服务的地址,之后 docker 每开一个容器,都会分配一个 私有 IP 地址给该容器。

 

 

 

 

 

 

 

 

 

————占位符

 

posted @ 2018-12-15 22:44  小寒1206  阅读(209)  评论(0编辑  收藏  举报