在ubuntu 12.04中重新排序网络接口

时间:2016-10-05 05:14:31

标签: ubuntu networking interface ip

这是一个很长的故事,但是你知道是否有可能在/ sbin / ip addr上重新排序Ubuntu 12.04上的网络接口?

这是我的一台机器上的/ sbin / ip addr输出给我的(ip地址已被混淆):

256: veth1722901: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether fe:00:aa:bb:cc:2c brd ff:ff:ff:ff:ff:ff
    inet 172.29.0.2/30 brd 172.29.0.3 scope global veth1722901
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP qlen 1000
    link/ether 06:ff:48:67:4a:11 brd ff:ff:ff:ff:ff:ff
    inet 10.16.27.5/26 brd 10.16.27.5 scope global eth0

我需要按此顺序:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc pfifo_fast state UP qlen 1000
    link/ether 06:ff:48:67:4a:11 brd ff:ff:ff:ff:ff:ff
    inet 10.16.27.5/26 brd 10.16.27.5 scope global eth0
10: veth1722901: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether fe:00:aa:bb:cc:2c brd ff:ff:ff:ff:ff:ff
    inet 172.29.0.2/30 brd 172.29.0.3 scope global veth1722901

干杯谢谢。

0 个答案:

没有答案