Chinaunix首页 | 论坛 | 博客
  • 博客访问: 443452
  • 博文数量: 184
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 594
  • 用 户 组: 普通用户
  • 注册时间: 2013-12-17 16:24
个人简介

我是一只小小鸟

文章分类

全部博文(184)

文章存档

2016年(1)

2015年(55)

2014年(127)

2013年(1)

分类: LINUX

2015-05-27 17:59:15

1 查看系统网卡对应的硬件地址HWADDR:
# ifconfig | grep HWaddr
br100     Link encap:Ethernet  HWaddr 00:25:90:F0:05:8D  
eth0      Link encap:Ethernet  HWaddr 00:25:90:F0:05:8C  
eth1      Link encap:Ethernet  HWaddr 00:25:90:F0:05:8D  
virbr0    Link encap:Ethernet  HWaddr 52:54:00:F3:BE:46  
vnet0     Link encap:Ethernet  HWaddr FE:16:3E:A0:2A:19  
vnet1     Link encap:Ethernet  HWaddr FE:16:3E:AA:D1:6B  
vnet2     Link encap:Ethernet  HWaddr FE:16:3E:F4:01:E4  
vnet3     Link encap:Ethernet  HWaddr FE:16:3E:F0:E3:F6  
vnet4     Link encap:Ethernet  HWaddr FE:16:3E:6F:F7:16
怎样查看识别码UUID

2 硬盘或者虚拟机迁移后会重启network,报错:
 Restarting network (via systemctl):  Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
定位:配置文件中的HWADDR(即网卡的MAC地址)与实际网卡地址不符(迁移虚拟机时只复制了虚拟机磁盘,系统会给新虚拟机重新分配MAC地址),查找到新的MAC地址并改正确就好了。
使用ip addr查找指定网卡的新的MAC地址,更改即可。

点击(此处)折叠或打开

  1. [root@compute_power ~]# cat /etc/sysconfig/network-scripts/ifcfg-enP3p9s0f0
  2. # Generated by IBM powerkvm installer
  3. IPADDR=192.168.8.56
  4. GATEWAY=192.168.8.254
  5. HWADDR=40:f2:e9:5a:f6:88
  6. NETMASK=255.255.255.0
  7. BOOTPROTO=static
  8. DEVICE=enP3p9s0f0
  9. TYPE=Ethernet
  10. ONBOOT=yes


点击(此处)折叠或打开

  1. [root@compute_power ~]# ip addr
  2. 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
  3.     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  4.     inet 127.0.0.1/8 scope host lo
  5.        valid_lft forever preferred_lft forever
  6.     inet6 ::1/128 scope host
  7.        valid_lft forever preferred_lft forever
  8. 2: enP3p9s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
  9.     link/ether 40:f2:e9:5a:f6:88 brd ff:ff:ff:ff:ff:ff
  10.     inet 192.168.8.56/24 brd 192.168.8.255 scope global enP3p9s0f0
  11.        valid_lft forever preferred_lft forever
  12.     inet6 fe80::42f2:e9ff:fe5a:f688/64 scope link
  13.        valid_lft forever preferred_lft forever
  14. 3: enP3p5s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
  15.     link/ether 40:f2:e9:5a:f6:89 brd ff:ff:ff:ff:ff:ff
  16. 4: enP3p5s0f2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
  17.     link/ether 40:f2:e9:5a:f6:8a brd ff:ff:ff:ff:ff:ff
  18. 5: enP3p5s0f3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
  19.     link/ether 40:f2:e9:5a:f6:8b brd ff:ff:ff:ff:ff:ff
  20. 6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
  21.     link/ether ae:43:d8:51:8c:19 brd ff:ff:ff:ff:ff:ff
  22.     inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
  23.        valid_lft forever preferred_lft forever
  24. 7: virbr1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
  25.     link/ether 86:1a:27:eb:0a:9d brd ff:ff:ff:ff:ff:ff
  26.     inet 192.168.121.1/24 brd 192.168.121.255 scope global virbr1
  27.        valid_lft forever preferred_lft forever



阅读(2307) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~