• centOS


    第一项: 克隆

    方法一、

    1.注释掉eth0这一行,将第二条配置中的eth1改成eth0

    vi /etc/udev/rules.d/70-persistent-net.rules
    # PCI device 0x8086:0x100f (e1000)
    #SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:55:c1:c4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"     #<==注释该行
     
     
    # PCI device 0x8086:0x100f (e1000)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:33:c1:47", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"     #<==将eth1改为eth0
    

     2.删除vi /etc/sysconfig/network-script/ifcfg-eth0下的HWADDR

    vi /etc/sysconfig/network-script/ifcfg-eth0
    DEVICE=eth0
    TYPE=Ethernet
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=dhcp
    

     3.shutdown -r now重启生效

    方法二:

    1.ifconfig -a 查看所有网卡信息

    2.更改eth1网卡信息

    vi /etc/sysconfig/network-script/ifcfg-eth0
    DEVICE=eth1      #<==将eth0改为eth1
    TYPE=Ethernet
    HWADDR=00:0C:29:33:C1:47    #<==更改为eth1的mac地址
    ONBOOT=yes
    BOOTPROTO=dhcp
    

     3.重启网卡生效

    service network restart

     

  • 相关阅读:
    Elastic 技术栈之快速入门
    JDK8 指南(译)
    Intellij IDEA 使用小结
    面向对象1
    函数总结
    Python中i = i + 1与i + = 1的区别
    python中变量的交换
    python的数据类型的有序无序
    对列表里的字典按年龄从小到大排序
    centos7安装python3
  • 原文地址:https://www.cnblogs.com/blue-tadpole/p/9608268.html
Copyright © 2020-2023  润新知