IP别名与多网卡绑定(RHEL5/RHEL6)

RHEL6的网络管理与RHEL5的有比较大的改变。
虽然在RHEL5、6中均安装有NetworkManager,在RHEL5中2、3、4、5级别中默认是不启用的。
但在RHEL6中,默认是启用的,NetworkManager会一直监控网卡状态,修改网卡参数立即生效不用重启服务。 
 
  1. [root@rhel5 ~]# chkconfig --list NetworkManager   #默认开机不自动启动NetworkManager服务
  2. NetworkManager  0:off  1:off  2:off  3:off  4:off  5:off  6:off  
  3. [root@rhel6 ~]# chkconfig --list NetworkManager   #默认开机自动启动NetworkManager服务
  4. NetworkManager  0:off  1:off  2:on   3:on   4:on   5:on   6:off  

· IP别名

 
  1. RHEL5 
  2. [root@rhel5 ~]# /etc/init.d/NetworkManager status 
  3. NetworkManager 已停 
  4.  
  5. [root@rhel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 
  6. # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) 
  7. DEVICE=eth0 
  8. ONBOOT=yes 
  9. TYPE=Ethernet 
  10. BOOTPROTO=none 
  11. IPADDR=192.168.1.90 
  12. NETWORK=255.255.255.0 
  13. GATEWAY=192.168.1.1 
  14. DNS1=8.8.8.8 
  15. DNS2=8.8.4.4 
  16. [root@rhel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:1  #配置IP别名需要添加虚拟网卡eht0:1
  17. # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) 
  18. DEVICE=eth0:1 
  19. ONBOOT=yes 
  20. TYPE=Ethernet 
  21. BOOTPROTO=none 
  22. IPADDR=192.168.2.90 
  23. NETWORK=255.255.255.0 
  24. DNS1=8.8.8.8 
  25. DNS2=8.8.4.4 
  26.  
  27. [root@rhel5 ~]# ip add show eth0 
  28. 7: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue  
  29.     link/ether 00:0c:29:db:14:10 brd ff:ff:ff:ff:ff:ff 
  30.     inet 192.168.1.90/24 brd 192.168.1.255 scope global eth0 
  31.     inet 192.168.2.90/24 brd 192.168.2.255 scope global eth0:1 
  32.  
  33. RHEL6 
  34. [root@rhel6 ~]# /etc/init.d/NetworkManager status 
  35. NetworkManager (pid  2808) is running... 
  36.  
  37. [root@rhel6 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0  
  38. DEVICE=eth0 
  39. ONBOOT=yes 
  40. NM_CONTROLLED=yes 
  41. TYPE=Ethernet 
  42. BOOTPROTO=none 
  43. HWADDR=00:0C:29:BF:45:80 
  44. IPADDR=192.168.1.119 
  45. NETWORK=255.255.255.0 
  46. GATEWAY=192.168.1.1 
  47. IPADDR2=192.168.2.119  #配置IP别名可直接在eth0中添加IP地址
  48. NETWORK=255.255.255.0 
  49. DNS1=8.8.8.8                    #可直接在/etc/resolv.conf中写入"nameserver 8.8.8.8" 
  50. DNS2=8.8.4.4             
  51.  
  52. [root@rhel6 ~]# ip add show eth0 
  53. 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 
  54.     link/ether 00:0c:29:bf:45:80 brd ff:ff:ff:ff:ff:ff 
  55.     inet 192.168.1.119/24 brd 192.168.1.255 scope global eth0 
  56.     inet 192.168.2.119/24 brd 192.168.2.255 scope global eth0 

· 多网卡绑定 bonding 

  • RHEL5
 
  1. [root@rhel5 ~]# cat /etc/modprobe.conf 
  2. alias bond0 bonding 
  3. options bonding miimon=100 mode=1  #每隔100ms监测一次链路状态,HA模式
  4.  
  5. [root@rhel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0  
  6. DEVICE=bond0 
  7. ONBOOT=yes 
  8. TYPE=Ethernet 
  9. BOOTPROTO=none 
  10. IPADDR=192.168.1.90 
  11. NETMASK=255.255.255.0 
  12. [root@rhel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 
  13. DEVICE=eth0 
  14. ONBOOT=yes 
  15. TYPE=Ethernet 
  16. BOOTPROTO=none 
  17. MASTER=bond0 
  18. SLAVE=yes 
  19. [root@rhel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 
  20. DEVICE=eth1 
  21. ONBOOT=yes 
  22. TYPE=Ethernet 
  23. BOOTPROTO=none 
  24. MASTER=bond0 
  25. SLAVE=yes 
  26.  
  27. [root@rhel5 ~]# ifconfig 
  28. bond0     Link encap:Ethernet  HWaddr 00:0C:29:DB:14:10   
  29.           inet addr:192.168.1.90  Bcast:192.168.1.255  Mask:255.255.255.0 
  30.           inet6 addr: fe80::20c:29ff:fedb:1410/64 Scope:Link 
  31.           UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1 
  32.           RX packets:1229 errors:0 dropped:0 overruns:0 frame:0 
  33.           TX packets:589 errors:0 dropped:0 overruns:0 carrier:0 
  34.           collisions:0 txqueuelen:0  
  35.           RX bytes:92885 (90.7 KiB)  TX bytes:78052 (76.2 KiB
  36.  
  37. eth0      Link encap:Ethernet  HWaddr 00:0C:29:DB:14:10   
  38.           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1 
  39.           RX packets:530 errors:0 dropped:0 overruns:0 frame:0 
  40.           TX packets:291 errors:0 dropped:0 overruns:0 carrier:0 
  41.           collisions:0 txqueuelen:0  
  42.           RX bytes:40654 (39.7 KiB)  TX bytes:40137 (39.1 KiB
  43.  
  44. eth1      Link encap:Ethernet  HWaddr 00:0C:29:DB:14:10   
  45.           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1 
  46.           RX packets:714 errors:0 dropped:0 overruns:0 frame:0 
  47.           TX packets:310 errors:0 dropped:0 overruns:0 carrier:0 
  48.           collisions:0 txqueuelen:1000  
  49.           RX bytes:53177 (51.9 KiB)  TX bytes:39827 (38.8 KiB
  50.  
  51. [root@rhel5 ~]# cat /proc/net/bonding/bond0
  52. Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)
  53.  
  54. Bonding Mode: fault-tolerance (active-backup) #HA模式
  55. Primary Slave: None
  56. Currently Active Slave: eth0 #主网卡:eth0
  57. MII Status: up
  58. MII Polling Interval (ms): 100 #检测时间:100ms
  59. Up Delay (ms): 0
  60. Down Delay (ms): 0
  61.  
  62. Slave Interface: eth0
  63. MII Status: up
  64. Link Failure Count: 0
  65. Permanent HW addr: 00:0c:29:db:14:10
  66.  
  67. Slave Interface: eth1
  68. MII Status: up
  69. Link Failure Count: 0
  70. Permanent HW addr: 00:0c:29:db:14:1a
  • RHEL6
 
  1. [root@rhel6 ~]# cat /etc/modprobe.d/bonding.conf   #区别于RHEL5的/etc/modprobe.conf
  2. alias bond0 bonding 
  3. [root@rhel6 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0     
  4. DEVICE=bond0 
  5. ONBOOT=yes 
  6. BOOTPROTO=none 
  7. NM_CONTROLLED=no 
  8. IPADDR=192.168.1.119 
  9. NETMASK=255.255.255.0 
  10. BONDING_OPTS="MODE=0 MIIMON=1000"  #1000ms监测一次链路状态,LB模式
  11. [root@rhel6 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 
  12. DEVICE=eth0 
  13. ONBOOT=yes 
  14. NM_CONTROLLED=no 
  15. TYPE=Ethernet 
  16. BOOTPROTO=none 
  17. MASTER=bond0 
  18. SLAVE=yes 
  19. [root@rhel6 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 
  20. DEVICE=eth1 
  21. ONBOOT=yes 
  22. NM_CONTROLLED=no 
  23. TYPE=Ethernet 
  24. BOOTPROTO=none 
  25. MASTER=bond0 
  26. SLAVE=yes 
  27.  
  28. [root@rhel6 ~]# ifconfig 
  29. bond0     Link encap:Ethernet  HWaddr 00:0C:29:BF:45:80   
  30.           inet addr:192.168.1.119  Bcast:192.168.1.255  Mask:255.255.255.0 
  31.           inet6 addr: fe80::20c:29ff:febf:4580/64 Scope:Link 
  32.           UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1 
  33.           RX packets:3133 errors:0 dropped:0 overruns:0 frame:0 
  34.           TX packets:619 errors:0 dropped:0 overruns:0 carrier:0 
  35.           collisions:0 txqueuelen:0  
  36.           RX bytes:275036 (268.5 KiB)  TX bytes:86282 (84.2 KiB
  37.  
  38. eth0      Link encap:Ethernet  HWaddr 00:0C:29:BF:45:80   
  39.           inet addr:192.168.1.119  Bcast:192.168.1.255  Mask:255.255.255.0 
  40.           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1 
  41.           RX packets:2317 errors:0 dropped:0 overruns:0 frame:0 
  42.           TX packets:309 errors:0 dropped:0 overruns:0 carrier:0 
  43.           collisions:0 txqueuelen:1000  
  44.           RX bytes:207976 (203.1 KiB)  TX bytes:48317 (47.1 KiB
  45.  
  46. eth1      Link encap:Ethernet  HWaddr 00:0C:29:BF:45:8A   
  47.           inet addr:192.168.1.119  Bcast:192.168.1.255  Mask:255.255.255.0 
  48.           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1 
  49.           RX packets:816 errors:0 dropped:0 overruns:0 frame:0 
  50.           TX packets:312 errors:0 dropped:0 overruns:0 carrier:0 
  51.           collisions:0 txqueuelen:1000  
  52.           RX bytes:67060 (65.4 KiB)  TX bytes:38801 (37.8 KiB)
  53. [root@rhel6 ~]# cat /proc/net/bonding/bond0
  54. Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
  55.  
  56. Bonding Mode: load balancing (round-robin) #LB模式
  57. MII Status: up
  58. MII Polling Interval (ms): 1000 #监测时间1000ms
  59. Up Delay (ms): 0 Down Delay (ms): 0
  60.  
  61. Slave Interface: eth0
  62. MII Status: up
  63. Speed: 1000 Mbps
  64. Duplex: full Link
  65. Failure Count: 0
  66. Permanent HW addr: 00:0c:29:bf:45:80
  67. Slave queue ID: 0
  68.  
  69. Slave Interface: eth1
  70. MII Status: up
  71. Speed: 1000 Mbps
  72. Duplex: full
  73. Link Failure Count: 0
  74. Permanent HW addr: 00:0c:29:bf:45:8a
  75. Slave queue ID: 0  

 以下是摘自Red Hat Enterprise Linux 6 Essentials eBook 

 
  1. 1.For example, if two Ethernet interfaces are being channel bonded, both eth0 and eth1 may look like the following example: DEVICE=eth<N>  
  2. BOOTPROTO=none  
  3. ONBOOT=yes  
  4. MASTER=bond0  
  5. SLAVE=yes  
  6. USERCTL=no  
  7.   
  8. 2.cp /etc/sysconfig/network-script/ifcfg-eth0 /etc/sysconfig/network-script/ifcfg-bond0 
  9. DEVICE=bond0  
  10. IPADDR=192.168.1.1  
  11. NETMASK=255.255.255.0  
  12. ONBOOT=yes  
  13. BOOTPROTO=none  
  14. USERCTL=no  
  15. BONDING_OPTS="<bonding parameters separated by spaces>" 
  16.    
  17. 3.As root, create a new file named <bonding>.conf in the /etc/modprobe.d/ directory. Note that you can name this file anything you like as long as it ends with a .conf extension. Insert the following line in this new file: 
  18.   alias bond<N> bonding  
  19.   
  20. 4.You can configure each bond individually by manipulating the files located in the /sys/class/net/bond<N>/bonding/ directory. First, the bond you are configuring must be taken down:
  21. # ifconfig bond0 down 
  22. As an example, to enable MII monitoring on bond0 with a 1 second interval, you could run (as root): 
  23.   # echo 1000 > /sys/class/net/bond0/bonding/miimon 
  24. To configure bond0 for balance-alb mode, you could run either: 
  25.   # echo 6 > /sys/class/net/bond0/bonding/mode 
  26. ...or, using the name of the mode: 
  27.   # echo balance-alb > /sys/class/net/bond0/bonding/mode  
  28.   
  29. Mode of operation : 0 for balance-rr, 1 for active-backup, 2 for balance-xor, 3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, 6 for balance-alb (charp) 
  • 切换测试:
 
  1. 1). 切断eth0的连接前,eth1处于Slave状态,通过以下命令可监测链路统计信息,发现eth1无数据的收发(只接收来自eth0的监测报文) 
  2. [root@rhel6 ~]# watch 'ip -s link show eth1'        #默认每隔2s运行一次'ip -s link show eth1' 
  3. Every 2.0s: ip -s link show eth1                                  Wed Nov 21 02:13:48 2012 
  4.  
  5. 3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000 
  6.     link/ether 00:0c:29:db:14:10 brd ff:ff:ff:ff:ff:ff 
  7.     RX: bytes  packets  errors  dropped overrun mcast 
  8.     137357     1916     0       0       0       0 
  9.     TX: bytes  packets  errors  dropped carrier collsns 
  10.     41562      441      0       0       0       0 
  11.  
  12. 2). 切断eth0的连接后,eth1立即自动切换为Active状态(通过客户端ping -t 192.168.1.90 未出现丢包现象),可发现eth1出现了数据的收发 
  13. [root@rhel5 ~]# ifdown eth0 
  14. [root@rhel5 ~]# ifconfig  
  15. bond0     Link encap:Ethernet  HWaddr 00:0C:29:DB:14:10   
  16.           inet addr:192.168.1.90  Bcast:192.168.1.255  Mask:255.255.255.0 
  17.           inet6 addr: fe80::20c:29ff:fedb:1410/64 Scope:Link 
  18.           UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1 
  19.           RX packets:13276 errors:0 dropped:0 overruns:0 frame:0 
  20.           TX packets:890 errors:0 dropped:0 overruns:0 carrier:0 
  21.           collisions:0 txqueuelen:0  
  22.           RX bytes:874191 (853.7 KiB)  TX bytes:96900 (94.6 KiB) 
  23.  
  24. eth1      Link encap:Ethernet  HWaddr 00:0C:29:DB:14:10   
  25.           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1 
  26.           RX packets:13276 errors:0 dropped:0 overruns:0 frame:0 
  27.           TX packets:890 errors:0 dropped:0 overruns:0 carrier:0 
  28.           collisions:0 txqueuelen:1000  
  29.           RX bytes:874191 (853.7 KiB)  TX bytes:96900 (94.6 KiB) 
  30.  
  31. [root@rhel5 ~]# cat /proc/net/bonding/bond0  
  32. Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008) 
  33.  
  34. Bonding Mode: fault-tolerance (active-backup) 
  35. Primary Slave: None 
  36. Currently Active Slave: eth1 
  37. MII Status: up 
  38. MII Polling Interval (ms): 100 
  39. Up Delay (ms): 0 
  40. Down Delay (ms): 0 
  41.  
  42. Slave Interface: eth1 
  43. MII Status: up 
  44. Link Failure Count: 0 
  45. Permanent HW addr: 00:0c:29:db:14:1a 
  46.  
  47. 3). 重新连接上eth0后,eth0不会自动切换到Active状态,且不会有数据的收发 
  48. [root@rhel5 ~]# ifup eth0 
  49. [root@rhel5 ~]# ifconfig eth0 
  50. eth0      Link encap:Ethernet  HWaddr 00:0C:29:DB:14:10   
  51.           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1 
  52.           RX packets:2 errors:0 dropped:0 overruns:0 frame:0 
  53.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
  54.           collisions:0 txqueuelen:0  
  55.           RX bytes:120 (120.0 b)  TX bytes:0 (0.0 b) 
  56. [root@rhel5 ~]# cat /proc/net/bonding/bond0  
  57. Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008) 
  58.  
  59. Bonding Mode: fault-tolerance (active-backup) 
  60. Primary Slave: None 
  61. Currently Active Slave: eth1 
  62. MII Status: up 
  63. MII Polling Interval (ms): 1000 
  64. Up Delay (ms): 0 
  65. Down Delay (ms): 0 
  66.  
  67.  
  68. Slave Interface: eth1 
  69. MII Status: up 
  70. Link Failure Count: 0 
  71. Permanent HW addr: 00:0c:29:db:14:1a 
  72.  
  73. Slave Interface: eth0 
  74. MII Status: up 
  75. Link Failure Count: 0 
  76. Permanent HW addr: 00:0c:29:db:14:10 

      本文转自Vnimos51CTO博客,原文链接:http://blog.51cto.com/vnimos/1065384,如需转载请自行联系原作者


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/279978.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

基于.NetCore开发博客项目 StarBlog - (25) 图片接口与文件上传

1前言上传文件的接口设计有两种风格&#xff0c;一种是整个项目只设置一个接口用来上传&#xff0c;然后其他需要用到文件的地方&#xff0c;都只存一个引用ID&#xff1b;另一种是每个需要文件的地方单独管理各自的文件。这俩各有优劣吧&#xff0c;本项目中选择的是后者的风格…

pta7-7旅游规划(dijkstra算法)

题目链接&#xff1a;https://pintia.cn/problem-sets/1101307589335527424/problems/1101314114762387456 题意&#xff1a;给n给城市&#xff0c;m条公路&#xff0c;公路是双向的&#xff0c;起点S&#xff0c;终点D&#xff0c;并给出每条公路连接的两个city的编号以及路费…

context:annotation-config vs context:component-scan

<context:annotation-config> 用来注入已经在上下文注册的bean&#xff0c;无论bean是定义在XML中还是被 package scanning。 <context:component-scan>仅scans packages 去注册应用上线文中的Bean。 example&#xff1a; Lets start with a basic setup of three …

Cactiz中文版安装使用

#----------------------------------------------------------# # > 红色字体 -特指煮酒个人所见。加粗则为需要重点注意。 ## > 蓝色加粗 -特指与本文相关人员&#xff0c;包括参与修正的朋友。 ## > 煮酒品茶 -Http://cwtea.blog.51cto.com # #----------…

如何在OS X中打开或关闭鼠标定位器

OS X 10.11 El Capitan includes a new “mouse locator” feature. If you lose your mouse pointer, just shake the mouse or move your finger on the touch pad vigorously, and the mouse pointer will temporarily grow very large so you can see it. OS X 10.11 El Ca…

微软宣布 Win10 设备数突破8亿,距离10亿还远吗?

百度智能云 云生态狂欢季 热门云产品1折起>>> 微软高管 Yusuf Mehdi 昨天在推特发布了一条推文&#xff0c;宣布运行 Windows 10 的设备数已突破 8 亿&#xff0c;比半年前增加了 1 亿。 根据之前的报道&#xff0c;两个月前 Windows 10 的全球市场份额才首次超越 W…

UI自动化web端框架path.py代码

import os,sysBASE_PATH os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))sys.path.insert(0, BASE_PATH)# 配置文件CONF_PATH BASE_PATH os.path.sep conf os.path.sep config.json# 日志的路径WEB_LOG_PATH BASE_PATH os.path.sep lo…

snapchat为什么_我的Snapchat朋友旁边的表情符号是什么意思?

snapchat为什么Next to some of your Snapchat friends, you’ll see little emoji. 在您的某些Snapchat朋友旁边&#xff0c;您会看到小的表情符号。 Each of these emoji has a specific meaning. Let’s look at what they are. 这些表情符号都有特定的含义。 让我们看看它们…

暴力打表之hdu 2089

题目链接&#xff1a;http://acm.hdu.edu.cn/showproblem.php?pid2089 有两种方法&#xff1a; 1.数位DP算法 2.暴力打表——真是个好法子&#xff01;&#xff01;&#xff01; 接下来是注意点&#xff1a; 1.一般这种数组中的一个数减去一个数组的另一个数&#xff0c;sum[i…

最全的正则表达式大全

很多不太懂正则的朋友&#xff0c;在遇到需要用正则校验数据时&#xff0c;往往是在网上去找很久&#xff0c;结果找来的还是不很符合要求。所以我最近把开发中常用的一些正则表达式整理了一下&#xff0c;在这里分享一下。给自己留个底&#xff0c;也给朋友们做个参考。 一、校…

关于移动应用APP数据安全的一点见解

2019独角兽企业重金招聘Python工程师标准>>> 项目沟通中过程客户反复在强调&#xff0c;大数据的安全性&#xff0c; 言下之意&#xff0c;用了大数据&#xff0c;就不安全了&#xff0c;就有漏洞了。所以花了些时间&#xff0c;针对大数据的安全设计做了一个总结&a…

2022年底C# 解压zip文件遇到的一个Bug

本文由网友投稿。作者&#xff1a;江湖人士原文标题&#xff1a;2022年底C# 解压zip文件遇到的一个bug原文链接&#xff1a;https://jhrs.com/2022/46060.html最近在排查一个上传功能时&#xff0c;客户端上传的是zip文件&#xff0c;到服务器端后使用C# 解压zip文件的代码将上…

如何关闭mcafee软件_如何摆脱McAfee的通知和捆绑软件

如何关闭mcafee软件McAfee, like most other modern antivirus programs, doesn’t stay out of your way. It installs browser extensions and shows various alert messages you might not want to see. If McAfee came with your PC, you may regularly see messages that …

mfs使用指引

客户端工具集 mfsgetgoal #设定副本数mfssetgoal #获取副本数mfscopygoal # mfsgetsclass mfssetsclass mfscopysclass mfsxchgsclass mfslistsclass mfsgettrashtime #设定回收站时间 mfssettrashtime #设定回收站时间 mfscopytrashtime mfsgeteattr #设置权限 mfsseteattr…

【命名规范】.NET中的枚举类型,要以Enum结尾吗?

“首先要给它一个名字&#xff0c;然后你才能描述它。”图片&#xff1a;北京的晚霞 摄影师&#xff1a;刘先生这个话题源于公司《.NET技术规范》中的一条&#xff1a;【强制】枚举声明应以Enum结尾我对此并不认同&#xff1a;首先&#xff0c;引用一下微软官方文档中&#xff…

Linux中防火墙(一)

一&#xff1a;前言防火墙&#xff0c;其实说白了讲&#xff0c;就是用于实现Linux下访问控制的功能&#xff0c;它分为硬件的或者软件的防火墙两种。无论是在哪个网络中&#xff0c;防火墙工作的地方一定是在网络的边缘。而我们的任务就是需要去定义到底防火墙如何工作&#x…

macos安全性偏好设置_如何更改macOS系统偏好设置的布局

macos安全性偏好设置If you don’t care for the way the System Preferences appear in macOS, you can change them by hiding certain preference panels or by rearranging them alphabetically. 如果您不喜欢系统偏好设置在macOS中的显示方式&#xff0c;则可以通过隐藏某…

机器视觉技术在表面缺陷检测方面的发展趋势

导读&#xff1a;机器视觉技术在表面缺陷检测方面的发展趋势如何&#xff1f;很多人都不了解&#xff0c;据悉&#xff0c;目前工业中应用的机器视觉检测绝大部分执行的是二维检测任务&#xff0c;三维机器视觉检测仍处于理论研究和试验阶段。除此之外&#xff0c;机器视觉检测…

J.U.C之AQS

AQS是J.U.C的核心 AQS(AbstractQueuedSynchronizer)队列同步器&#xff0c;AQS是JDK下提供的一套用于实现基于FIFO等待队列的阻塞锁和相关的同步器的一个同步框架。 同步器面向的是锁的实现者&#xff0c;它简化了锁的实现方式&#xff0c;屏蔽了同步状态管理、线程的排队、等待…

.NET周报【12月第3期 2022-12-23】

由于众所周知的原因&#xff0c;大佬们纷纷加入羊群&#xff0c;笔者也未能幸免&#xff0c;体验下来这绝对不是普通感冒的症状&#xff0c;身体不适&#xff0c;熬了几天&#xff0c;所以本周更新比较晚&#xff1b;另外精力有限&#xff0c;对于国际板块只有链接没有简介&…