深圳云计算学习:网络管理基础

深圳云计算学习:网络管理基础

====================================================================================
Network interface names

Traditionally, network interfaces in Linux are enumerated as eth0, eth1, eth2, and so on. However, the mechanism which
sets these names can cause changes to which interface gets which name as devices are added and removed.
The default naming behavior in Red Hat Enterprise Linux 7 is to assign fixed names based on firmware, device topology,
and device type.

Interface names have the following characters:
Ethernet interfaces begin with en, WLAN interfaces begin with wl, and WWAN interfaces begin with ww.
The next character(s) represents the type of adapter with an o for on-board, s for hotplug slot, and p for PCI geographic location.
Not used by default but also available to administrators, an x is used to incorporate a MAC address.
Finally, a number N is used to represent an index, ID, or port.
If the fixed name cannot be determined, the traditional names such as ethN will be used.

For example, the first embedded network interface may be named eno1 and a PCI card network interface may be named enp2s0.
The new names make it easier to distinguish the relationship between a port and its name if the user knows both, but the
trade off is that users cannot assume a system with one interface calls that interface eth0.
使用NetworkManager管理网络

网络管理器(NetworkManager)是一个动态网络的控制器与配置系统,它用于当网络设备可用时保持设备和连接开启并激活
默认情况下,CentOS/RHEL 7 已安装网络管理器,并处于启用状态。

device 设备,物理设备 例如enp2s0,virbr0,team0
connection 连接,逻辑设置 指的是一套具体配置方案
多个connection可以应用到同一个device,但同一时间只能启用其中一个connection。
这样的好处是针对一个网络接口,可以设置多个网络连接,比如静态IP和动态IP,再根据需要up相应的connection

NetworkManager提供的工具
nmcli, nmtui, nm-connect-editor

  1. 方法一: 修改ip/netmask/dns/gateway[了解]
    [root@tianyun ~]# nmcli connection add con-name enp2s0-auto autoconnect yes ifname enp2s0 type ethernet
    [root@tianyun ~]# nmcli connection add con-name enp2s0-

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
程序实例使用的是读者朋友们比较关注的三层架构所编写,应用的开发环境是VS2008自带的AJAX无刷新环境,并且对于网站安全通过无解密MD5单向加密技术来实现。 读者朋友们在运行本实例时可以先以超级管理员的身份(用户名:mr 密码:mrsoft)来登录,然后可以设置考生ID号和教师ID号,之后便可以以考生或教师身份来登录,这里管理员有权限设置功能。 三层架构小知识: 下面对这几层进行介绍。 1、表示层,它负责响应用户的请求,对于这一层一般代码量很少。大量的处理工作交给其他的层完成。 2、业务逻辑层,用来对数据进行有效性验证,牵涉到对敏感数据的操作都需要经过业务逻辑层做判断,然后才能决定操作是否合法。 3、数据层,封装对数据库的操作。可以做一个通用的数据访问层,以后开发项目时,可以直接拿过来用,并且可以提高工作效率。另外,进行参数传值时,数据都用自定义实体类代替,这样可以实现数据访问层对其它层的完全透明。自定义实体类封装了所有与数据库表结构相关的代码。 4、Common层,用来封装一些常用的功能性代码,主要用来为其它层服务的。还有存放一些自定义实体类型和自定义实体类型集合。用于各层次之间数据交互的承载体。 说明:本书为了适合不同用户群的使用并不是所有程序实例都采用三层架构来设计,网站开发的三层架构并不适合于所有网站开发,应根据实际项目开发情况而定,如果读者朋友们喜欢三层架构模式可以根据本实例的编写将本书中其他未用三层架构的实例也改成三层架构模式。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值