Linux 交换eth0和eth1

一、参考文档:
    如何交换eth0和eth1?
        http://bbs.chinaunix.net/archiver/tid-2026056.html   

二、具体操作
    #echo `ifconfig -a` 
    ifconfig eth0 down
    ifconfig eth1 down
    ip link set dev eth0 name eth2
    ip link set dev eth1 name eth0
    ip link set dev eth2 name eth1
    ifconfig eth0 up
    ifconfig eth1 up
    #echo `ifconfig -a`

三、修改过后OK335xS上遇到的问题:
    1. 设置了以上内容以后,在串口的调试口上的eth0、eth1是没有变换的;
    2. 在使用Qt应用程序上获取网卡设置的时候,eth0、eth1是换了的;
    3. 目前原因未知,可能是因为环境变量导致的问题。

 

posted on 2015-11-05 11:18  zengjf  阅读(1304)  评论(0编辑  收藏  举报

导航