eth0 始终具有 192.168.1.1,并忽略了具有 DHCP 服务器的网络

eth0 始终具有 192.168.1.1,并忽略了具有 DHCP 服务器的网络

我的网络接口(eth0)很少总是有:

    $ ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr aa:00:04:00:0a:04  
              inet addr:10.100.1.198  Bcast:10.100.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a800:4ff:fe00:a04/64 Scope:Link
              UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
              RX packets:300017 errors:0 dropped:0 overruns:0 frame:0
              TX packets:125399 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:131522946 (125.4 MiB)  TX bytes:13330040 (12.7 MiB)
              Interrupt:43 Base address:0x8000

    $ route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
    169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0

当我连接到有 DHCP 服务器的网络时,一切正常,它给我 10.100.1.198 地址,我可以访问网络,但是当我想查看我的 IP 地址时,总是返回:192.168.1.1

怎么了?


更新:我使用 debian wheezy 并且我有这个:

    $ tree -L 2 /etc/network
    /etc/network
    ├── if-down.d
    │   ├── avahi-autoipd
    │   ├── bind9
    │   ├── openvpn
    │   ├── sendmail
    │   └── wpasupplicant -> ../../wpa_supplicant/ifupdown.sh
    ├── if-post-down.d
    │   ├── avahi-daemon -> ../if-up.d/avahi-daemon
    │   ├── bridge -> /lib/bridge-utils/ifupdown.sh
    │   ├── sendmail
    │   ├── vde2
    │   ├── vlan
    │   ├── wireless-tools
    │   └── wpasupplicant -> ../../wpa_supplicant/ifupdown.sh
    ├── if-pre-up.d
    │   ├── bridge -> /lib/bridge-utils/ifupdown.sh
    │   ├── ethtool
    │   ├── vde2
    │   ├── vlan
    │   ├── wireless-tools
    │   └── wpasupplicant -> ../../wpa_supplicant/ifupdown.sh
    ├── if-up.d
    │   ├── avahi-autoipd
    │   ├── avahi-daemon
    │   ├── bind9
    │   ├── ethtool
    │   ├── ip
    │   ├── mountnfs
    │   ├── openssh-server
    │   ├── openvpn
    │   ├── sendmail
    │   └── wpasupplicant -> ../../wpa_supplicant/ifupdown.sh
    ├── interfaces
    └── run -> /run/network

    5 directories, 29 files

相关内容