Internet和internet
internet意思是用一个共同的协议族把多个网络连接在一起. 而Internet指的是世界范围内通过TCP/IP互相通信的所有主机集合
Internet是一个internet,但internet不等于Internet
……凡世的喧嚣与明亮,世俗的快乐和幸福,如同清亮的溪涧,在风里,在我眼前,汨汨而过,温暖如同泉水一样涌出来。我没有奢望,我只要你快乐,不要悲伤。
internet意思是用一个共同的协议族把多个网络连接在一起. 而Internet指的是世界范围内通过TCP/IP互相通信的所有主机集合
Internet是一个internet,但internet不等于Internet
……ip link命令格式
命令实例
ip link add link eth0 name eth0.10 type vlan id 10
命令实例 | 解释 |
---|---|
ip link add link eth0 name eth0.10 type vlan id 10 | 在设备eth0上创建新的vlan设备eth0.10 |
ip link set eth0 up 或:ifconfig eth0 up | 开启eth0网卡 |
ip link set eth0 down或:ifconfig eth0 down | 关闭eth0网卡 |
ip link set eth0 promisc on | 开启网卡的混合模式 |
ip link set eth0 promisc off | 关闭网卡的混合模式 |
ip link set eth0 txqueuelen 1200 | 设置网卡队列长度 |
ip link set eth0 mtu 1400 | 设置网卡最大传输单元 |
ip link show | 显示网络接口信息 |
ip link show eht0 | 显示eth0网卡的网络接口信息 |
ip link show type vlan | 显示vlan类型设备 |
ip link delete dev eth0.10 | 删除设备 |
|
|
k8siptable 了解
https://blog.csdn.net/qq_36183935/article/details/90734847
iptables是采用数据包过滤机制工作的,所以它会对请求的数据包的包头进行分析,并根据我们预先设定的规则进行匹配来决定是否可以进入主机。
① 防火墙是一层一层过滤的。实际是按照配置规则的顺序从上到下,从前到后进行过滤的; ② 如果匹配上规则,即明确表明阻止还是通过,此时数据包就不再向下匹配新规则了; ③ 如果所有规则中没有明确表明是阻止还是通过这个数据包,也就是没有匹配上规则,则按照默认策略进行处理; ④ 防火墙的默认规则是对应的链的所有的规则执行完成后才会执行的;
……
前面我们从pod的原理到生命周期介绍了pod的一些使用,作为kubernetes中最核心的对象,最基本的调度单元,我们可以发现pod中的属性还是非常繁多的,前面我们使用过一个volumes的属性,表示声明一个数据卷,我们可以通过命令kubectl explain pod.spec.volumes
去查看该对象下面的属性非常多,前面我们只是简单的使用了hostpath和empryDir{}这两种模式,其中还有一种叫做downwardAPI这个模式和其他模式不一样的地方在于它不是为了存放容器的数据也不是用来进行容器和宿主机的数据交换的,而是让pod里的容器能够直接获取到这个pod对象本身的一些信息。
tmp是temporary的缩写,这个目录是用来存放一些临时文件。/tmp
是Linux下的临时文件夹。
该文件夹中的内容一般不会删除,以redhat为例,系统自动清理/tmp
文件夹的默认时限是30天。30天不访问的/tmp
下的文件会被系统自动删除。
/tmp
-临时文件目录,能够被任何用户,任何程序访问,一般用来存放程序的临时文件,所以应该定期清理一下。FHS甚至建议在开机时,应该要将/tmp
下的数据都删除,临时目录还有/var/tmp
。
|
|
/etc/locale.conf 修改:LANG=“zh_CN.UTF-8” ==> LANG=“en_US.UTF-8” ,然后重启生效
……参考图:
……shell 中 =~ 的用法
我们先看一个脚本,该脚本的功能是搜索当前目录下文件中的指定字符串
|
|
if [[ $aexp =~ all ]]
其中 ~是对后面的正则表达式匹配的意思,如果匹配就输出1,不匹配就输出0
In Source Network Address Translation (SNAT), the NAT router modifies the IP address of the sender in IP packets. SNAT is commonly used to enable hosts with private addresses to communicate with servers on the public Internet.
RFC 1918 reserves the following three subnets as private addresses:
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
In Destination Network Address Translation (DNAT), the NAT router modifies the IP address of the destination in IP packet headers.
OpenStack uses DNAT to route packets from instances to the OpenStack metadata service. Applications running inside of instances access the OpenStack metadata service by making HTTP GET requests to a web server with IP address 169.254.169.254. In an OpenStack deployment, there is no host with this IP address. Instead, OpenStack uses DNAT to change the destination IP of these packets so they reach the network interface that a metadata service is listening on.
……