nmcli
来源:互联网 发布:上海婚纱摄影推荐知乎 编辑:程序博客网 时间:2024/05/16 18:26
Part 1: nmcli查看网络信息
[root@server ~]nmcli con show[root@server ~]nmcli con show --active
[root@server ~]nmcli con show "eno16777736"
[root@server ~]# nmcli con show eno16777736
connection.id: eno16777736
connection.uuid: e51e8116-c7f0-4007-81e6-d433b005b122
connection.interface-name: –
connection.type: 802-3-ethernet
connection.autoconnect: yes
connection.timestamp: 1461337868
connection.read-only: no
connection.permissions:
connection.zone: –
connection.master: –
connection.slave-type: –
connection.secondaries:
connection.gateway-ping-timeout: 0
802-3-ethernet.port: –
802-3-ethernet.speed: 0
802-3-ethernet.duplex: –
802-3-ethernet.auto-negotiate: yes
802-3-ethernet.mac-address: 00:0C:29:07:59:08
802-3-ethernet.cloned-mac-address: –
802-3-ethernet.mac-address-blacklist:
802-3-ethernet.mtu: auto
802-3-ethernet.s390-subchannels:
802-3-ethernet.s390-nettype: –
802-3-ethernet.s390-options:
ipv4.method: manual
ipv4.dns: 192.168.124.2
ipv4.dns-search:
ipv4.addresses: { ip = 192.168.124.80/24, gw = 192.168.124.2 }
ipv4.routes: { dst = 192.168.124.2/24, nh = 192.168.124.2, mt = 0 }
……
[root@server ~]nmcli dev status[root@server ~]nmcli dev show eno16777736
Part 2 : nmcli配置网络连接
为现有连接添加一个额外ip
[root@server ~]nmcli connection modify eno16777736 +ipv4.addresses 192.168.124.82/24[root@server ~]nmcli connection show eno16777736 |grep ipv4
定义一个名为exam-con的新连接,给予ip地址,网关和dns,使用静态ip
[root@server ~]nmcli connection add con-name exam-con ifname eno16777736 type ethernet ip4 10.0.8.11/24 gw4 10.0.8.254[root@server ~]nmcli connection modify exam-con ipv4.dns 10.0.8.253
检查结果
禁止自动启动
[root@server ~]# nmcli connection modify exam-con connection.autoconnect no[root@server ~]# nmcli connection modify eno16777736 connection.autoconnect yes
检查结果
- nmcli
- nmcli、pkcon、systemctl
- nmcli 工具---待整理
- centos 7 nmcli 常用命令
- nmcli双网卡绑定
- 使用nmcli配置网络
- nmcli命令集
- ubuntu使用nmcli 控制wifi
- CentOS7 网络设置-nmcli/nmtui
- Nmcli 网络管理命令行工具
- CentOS使用nmcli配置网络
- nmcli中的几种模式
- nmcli的设备和连接
- RedHat7中nmcli和nmtui说明
- Nmcli 网络管理命令行工具基础
- Nmcli 网络管理命令行工具基础
- Centos7 通过nmcli team实现网卡绑定
- nmcli 网卡链路绑定team
- 安装Baidu Eclipse插件
- 【codevs】基础合集(二)
- oracle数据库学习1
- redis持久化探究
- Cable master(假定一个解并判断是否可行)(POJ NO.1064)
- nmcli
- HDU 5674 Function
- 七.Linux系统中关机和重启命令
- elgg数据表结构
- Photoshop去除半透明水印技巧
- android全屏显示
- Laravel的Linux容器Vagrant+Homestead+Composer+Yaml环境搭建
- Android studio 开发ActionBar
- 实例变量与属性:私有变量与私有方法