Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2874903
  • 博文数量: 200
  • 博客积分: 2413
  • 博客等级: 大尉
  • 技术积分: 3067
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-01 22:07
文章分类

全部博文(200)

文章存档

2018年(2)

2017年(8)

2016年(35)

2015年(14)

2014年(20)

2013年(24)

2012年(53)

2011年(44)

分类: LINUX

2015-07-06 13:46:32

今天,修改测试数据库的eth1网卡ip,修改后重启network看似正常。

  1. # service network restart
  2. Shutting down interface eth0: Device state: 3 (disconnected)
  3.                                                            [ OK ]
  4. Shutting down interface eth1: Error: Device 'eth1' (/org/freedesktop/NetworkManager/Devices/1) disconnecting failed: This device is not active
  5.                                                            [FAILED]
  6. Shutting down loopback interface: [ OK ]
  7. Bringing up loopback interface: [ OK ]
  8. Bringing up interface eth0: Active connection state: activated
  9. Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/13
  10.                                                            [ OK ]
  11. Bringing up interface eth1: Active connection state: activated
  12. Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/14
  13.                                                            [ OK ]

但是,ifconfig命名的返回结果中,eth1网卡没有ip地址。


  1. # ifconfig
  2. eth0 Link encap:Ethernet HWaddr 00:50:56:93:60:98
  3.           inet addr:10.2.5.198 Bcast:10.2.5.255 Mask:255.255.255.0
  4.           inet6 addr: fe80::250:56ff:fe93:6098/64 Scope:Link
  5.           UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  6.           RX packets:427351 errors:0 dropped:10 overruns:0 frame:0
  7.           TX packets:361592 errors:0 dropped:0 overruns:0 carrier:0
  8.           collisions:0 txqueuelen:1000
  9.           RX bytes:630539714 (601.3 MiB) TX bytes:42207347 (40.2 MiB)

  10. eth1 Link encap:Ethernet HWaddr 00:50:56:93:7B:0B
  11.           inet6 addr: fe80::250:56ff:fe93:7b0b/64 Scope:Link
  12.           UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  13.           RX packets:7118 errors:0 dropped:6 overruns:0 frame:0
  14.           TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
  15.           collisions:0 txqueuelen:1000
  16.           RX bytes:535725 (523.1 KiB) TX bytes:746 (746.0 b)

  17. lo Link encap:Local Loopback
  18.           inet addr:127.0.0.1 Mask:255.0.0.0
  19.           inet6 addr: ::1/128 Scope:Host
  20.           UP LOOPBACK RUNNING MTU:16436 Metric:1
  21.           RX packets:19693 errors:0 dropped:0 overruns:0 frame:0
  22.           TX packets:19693 errors:0 dropped:0 overruns:0 carrier:0
  23.           collisions:0 txqueuelen:0
  24.           RX bytes:12561302 (11.9 MiB) TX bytes:12561302 (11.9 MiB)

解决办法:重启NetworkManager服务器即可

  1. # service NetworkManager restart
  2. Stopping NetworkManager daemon: [ OK ]
  3. Setting network parameters... [ OK ]
  4. Starting NetworkManager daemon: [ OK ]


  5. # ifconfig
  6. eth0 Link encap:Ethernet HWaddr 00:50:56:93:60:98
  7.           inet addr:10.2.5.198 Bcast:10.2.5.255 Mask:255.255.255.0
  8.           inet6 addr: fe80::250:56ff:fe93:6098/64 Scope:Link
  9.           UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  10.           RX packets:430159 errors:0 dropped:13 overruns:0 frame:0
  11.           TX packets:364250 errors:0 dropped:0 overruns:0 carrier:0
  12.           collisions:0 txqueuelen:1000
  13.           RX bytes:630942088 (601.7 MiB) TX bytes:42548107 (40.5 MiB)

  14. eth1 Link encap:Ethernet HWaddr 00:50:56:93:7B:0B
  15.           inet addr:192.168.1.208 Bcast:192.168.1.255 Mask:255.255.255.0
  16.           inet6 addr: fe80::250:56ff:fe93:7b0b/64 Scope:Link
  17.           UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  18.           RX packets:1 errors:0 dropped:6 overruns:0 frame:0
  19.           TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
  20.           collisions:0 txqueuelen:1000
  21.           RX bytes:60 (60.0 b) TX bytes:258 (258.0 b)



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