免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1627 | 回复: 2
打印 上一主题 下一主题

[网络管理] LINUX网络管理的新知识 [复制链接]

求职 : Linux运维
论坛徽章:
19
CU大牛徽章
日期:2013-03-13 15:15:0815-16赛季CBA联赛之山东
日期:2016-10-31 10:40:10综合交流区版块每日发帖之星
日期:2016-07-06 06:20:00IT运维版块每日发帖之星
日期:2016-02-08 06:20:00数据库技术版块每日发帖之星
日期:2016-01-15 06:20:00IT运维版块每日发帖之星
日期:2016-01-15 06:20:00IT运维版块每日发帖之星
日期:2016-01-10 06:20:00黄金圣斗士
日期:2015-11-24 10:45:10IT运维版块每日发帖之星
日期:2015-09-01 06:20:00IT运维版块每日发帖之星
日期:2015-08-13 06:20:00IT运维版块每日发帖之星
日期:2015-07-30 09:40:012015年亚洲杯之巴勒斯坦
日期:2015-05-05 10:19:03
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-06-04 23:39 |只看该作者 |倒序浏览
自LINUX系统普遍采用NetworkManager 管理网路设备一来。到目前为止,CENTOS、DEBIAN8.0均已开始使用,其中nmcli 工具提供了不少新功能和用途。不过nmcli提供的命令nmcli connection modify命令需要设置<setting>.<property> 参数,不过只有在使用了DEBIAN8.0的时候才可以使用TAB命令不全的方式获得这些参数的详细名称。推荐给各位LINUX系统爱好者,希望对你们有用
第一条命令是千兆有线网卡及相关可以配置参数:                        
root@AkBirdofpreyAlienware:~# nmcli connection modify Wired\ connection\ 1
802-3-ethernet.auto-negotiate         connection.gateway-ping-timeout       ipv4.addresses                        ipv6.addresses
802-3-ethernet.cloned-mac-address     connection.id                         ipv4.dhcp-client-id                   ipv6.dhcp-hostname
802-3-ethernet.duplex                 connection.interface-name             ipv4.dhcp-hostname                    ipv6.dns
802-3-ethernet.mac-address            connection.master                     ipv4.dhcp-send-hostname               ipv6.dns-search
802-3-ethernet.mac-address-blacklist  connection.permissions                ipv4.dns                              ipv6.ignore-auto-dns
802-3-ethernet.mtu                    connection.read-only                  ipv4.dns-search                       ipv6.ignore-auto-routes
802-3-ethernet.port                   connection.secondaries                ipv4.ignore-auto-dns                  ipv6.ip6-privacy
802-3-ethernet.s390-nettype           connection.slave-type                 ipv4.ignore-auto-routes               ipv6.may-fail
802-3-ethernet.s390-options           connection.timestamp                  ipv4.may-fail                         ipv6.method
802-3-ethernet.s390-subchannels       connection.type                       ipv4.method                           ipv6.never-default
802-3-ethernet.speed                  connection.uuid                       ipv4.never-default                    ipv6.routes
connection.autoconnect                connection.zone                       ipv4.routes                           
                           
第二条命令是无线网卡及相关可以配置参数:
root@AkBirdofpreyAlienware:~# nmcli connection modify CU_5BBN
802-11-wireless.band                          802-11-wireless-security.wep-key2             ipv4.dhcp-client-id
802-11-wireless.bssid                         802-11-wireless-security.wep-key3             ipv4.dhcp-hostname
802-11-wireless.channel                       802-11-wireless-security.wep-key-flags        ipv4.dhcp-send-hostname
802-11-wireless.cloned-mac-address            802-11-wireless-security.wep-key-type         ipv4.dns
802-11-wireless.hidden                        802-11-wireless-security.wep-tx-keyidx        ipv4.dns-search
802-11-wireless.mac-address                   802-11-wireless.seen-bssids                   ipv4.ignore-auto-dns
802-11-wireless.mac-address-blacklist         802-11-wireless.ssid                          ipv4.ignore-auto-routes
802-11-wireless.mode                          802-11-wireless.tx-power                      ipv4.may-fail
802-11-wireless.mtu                           connection.autoconnect                        ipv4.method
802-11-wireless.rate                          connection.gateway-ping-timeout               ipv4.never-default
802-11-wireless-security.auth-alg             connection.id                                 ipv4.routes
802-11-wireless-security.group                connection.interface-name                     ipv6.addresses
802-11-wireless-security.key-mgmt             connection.master                             ipv6.dhcp-hostname
802-11-wireless-security.leap-password        connection.permissions                        ipv6.dns
802-11-wireless-security.leap-password-flags  connection.read-only                          ipv6.dns-search
802-11-wireless-security.leap-username        connection.secondaries                        ipv6.ignore-auto-dns
802-11-wireless-security.pairwise             connection.slave-type                         ipv6.ignore-auto-routes
802-11-wireless-security.proto                connection.timestamp                          ipv6.ip6-privacy
802-11-wireless-security.psk                  connection.type                               ipv6.may-fail
802-11-wireless-security.psk-flags            connection.uuid                               ipv6.method
802-11-wireless-security.wep-key0             connection.zone                               ipv6.never-default
802-11-wireless-security.wep-key1             ipv4.addresses                                ipv6.routes

一下命令是为Wired connection 1千兆网卡添加DNS设置。
root@AkBirdofpreyAlienware:~# nmcli connection modify Wired\ connection\ 1 ipv4.dns 8.8.4.4
root@AkBirdofpreyAlienware:~# nmcli connection modify Wired\ connection\ 1 +ipv4.dns 8.8.8.8

通过一下命令可以看到配置添加进来NetworkManager/system-connections目录下的相关网卡配置文件中
root@AkBirdofpreyAlienware:~# vi /etc/NetworkManager/system-connections/Wired\ connection\ 1
文件显示 包含的如下行就是我们实际用nmcli添加产生的:
[ipv4]
method=auto
dns=8.8.4.4;8.8.8.8;

论坛徽章:
40
水瓶座
日期:2013-08-15 11:26:422015年辞旧岁徽章
日期:2015-03-03 16:54:152015年亚洲杯之乌兹别克斯坦
日期:2015-03-27 14:01:172015年亚洲杯之约旦
日期:2015-03-31 15:06:442015亚冠之首尔
日期:2015-06-16 23:24:37IT运维版块每日发帖之星
日期:2015-07-01 22:20:002015亚冠之德黑兰石油
日期:2015-07-08 09:32:07IT运维版块每日发帖之星
日期:2015-08-29 06:20:00IT运维版块每日发帖之星
日期:2015-08-29 06:20:00IT运维版块每日发帖之星
日期:2015-10-10 06:20:00IT运维版块每日发帖之星
日期:2015-10-11 06:20:00IT运维版块每日发帖之星
日期:2015-11-10 06:20:00
2 [报告]
发表于 2015-06-05 14:10 |只看该作者
嗯 详细的参数 偶尔可能会用到

求职 : Linux运维
论坛徽章:
19
CU大牛徽章
日期:2013-03-13 15:15:0815-16赛季CBA联赛之山东
日期:2016-10-31 10:40:10综合交流区版块每日发帖之星
日期:2016-07-06 06:20:00IT运维版块每日发帖之星
日期:2016-02-08 06:20:00数据库技术版块每日发帖之星
日期:2016-01-15 06:20:00IT运维版块每日发帖之星
日期:2016-01-15 06:20:00IT运维版块每日发帖之星
日期:2016-01-10 06:20:00黄金圣斗士
日期:2015-11-24 10:45:10IT运维版块每日发帖之星
日期:2015-09-01 06:20:00IT运维版块每日发帖之星
日期:2015-08-13 06:20:00IT运维版块每日发帖之星
日期:2015-07-30 09:40:012015年亚洲杯之巴勒斯坦
日期:2015-05-05 10:19:03
3 [报告]
发表于 2015-06-16 06:12 |只看该作者
按照UNIX以及模块化设计原则,某组件就负责干好某功能的事情;对网络设备的管理NetWorkManager 确实以及干的非常好了。目前已经可以管理所有的网络设备,比如3G网卡,在NetWorkManager看来也是一个设备,这就是功能模块化的很好的例子。这样的设计,第一是简单,第二也为升级带来了很大的方便和好处。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP