zoukankan      html  css  js  c++  java
  • rhel7网络管理

    实验-禁用网卡命名规则:

    在GRUB_CMDLINE_Linux=“rd.lvm.lv=rhel/root  vconsole.keymap=us vconsole.font=latarcyheb-sunl6 crashkernel=auto rhgb quiet net.ifnames=0 bios sdevname=0"行尾的引号内部加入 net.ifnames=0 biosdevname=0 参数

    grub2-mkconfig - o /boot/grub2/grub.cfg

    重启后系统将不采用网卡命名规则而是采用原RHEL6的命名规则

    实验临时修改IP:

    ifconfig eno16777736 100.100.100.100/16

    ifconfig 

    nmcli connection down eno16777736;nmcli connection up eno16777736

    ifconfig

    实验-修改网络参数官方推荐版:

    nmcli connection modify eno167..   ipv4.method manual ipv4.addresses "192.168.100.1/24 192.168.100.1"  ipv4.dns 192.168.100.1 connection.autoconnect yes

    nmcli connection modify eno167..   +ipv4.addresses 10.0.0.1/8

    nmcli connection down eno1677..  ;nmcli connection up  eno1677..

    实验添加IPV6的地址:

    nmcli connection modify eno167..   ipv6.method manual ipv6.addresses  '2001::1/64  2001::1 '  ipv6.dns 2001::1

    nmcli connection down eno1677..  ;nmcli connection up  eno1677..

    ping6 2001::1

    实验-多配置文件管理网卡:

    nmcli connection add type ethernet con-name home ifname eno 1677..

    nmcli connection  modify home ipv4.method manual ipv4.addresses "10.0.0.1/24 10.0.0.1" ipv4.dns 10.0.0.1

    nmcli connection down eno1677..

    nmcli connection   up   home

    查看地址已经更改

    实验-单配置文件增加::信息

    vim /etc/sysconfig/network-scripts/ifcfg-eno16...

    IPADDR1=10.0.0.1

    PREFIX1=8

    GATEWAY1=10.0.0.1

    DNS2=10.0.0.1

    systemctl restart NetworkManager

    ip addr show

    实验-新增网卡

    新添加一块网卡

    nmcli device show 可以发现新增了一块网卡

    nmcli connection add type ethernet en0.... ifname eno....

    nmcli connection modify en0.... ipv4.method manual ipv4.addresses "192.168.100.1/24 192.168.100.1" ipv4.dns 192.168.100.1 connection.autoconnect yes

    systemctl restart NetworkManager

    ifconfig

  • 相关阅读:
    获取资源文件 r.drawable中的图片转换为drawable、bitmap
    Android 启动白屏或者黑屏闪现解决
    Android应用截图方法
    史上最全的变量、作用域和内存问题
    RunLoop总结:RunLoop的应用场景(四)
    poj3436 ACM Computer Factory, 最大流,输出路径
    android开发——从相冊中选择图片不裁剪
    <html>
    poj3073
    poj 2482 Stars in Your Window (线段树扫描线)
  • 原文地址:https://www.cnblogs.com/dianzixiaoming/p/5593949.html
Copyright © 2011-2022 走看看