为何无法彻底关闭eth0?
发表于 : 2015-11-22 20:09
root@hwy:/home/debian8# ifconfig eth0 down
root@hwy:/home/debian8# route -nv
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
root@hwy:/home/debian8# ifconfig
eth0 Link encap:Ethernet HWaddr e0:3f:49:57:4b:d1
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::e23f:49ff:fe57:4bd1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:918 errors:0 dropped:0 overruns:0 frame:0
TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:195407 (190.8 KiB) TX bytes:29304 (28.6 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:496 errors:0 dropped:0 overruns:0 frame:0
TX packets:496 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:728348 (711.2 KiB) TX bytes:728348 (711.2 KiB)
wlan0 Link encap:Ethernet HWaddr 00:21:5d:26:c1:10
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::221:5dff:fe26:c110/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6556 errors:0 dropped:0 overruns:0 frame:0
TX packets:5709 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3528018 (3.3 MiB) TX bytes:999397 (975.9 KiB)
按照我的理解 eht0对应的ip不可以使用了吧,
奇怪的事情发生了,
root@hwy:/home/debian8# cat /etc/hosts
192.168.1.4 mywp.com
我的本机架设了一个wordpress ,里面说有的url 都是 http://mywp.com/wp/?p=2026 的形式。
eth0明明被关闭了哈 ifconfig eth0 down ,它对应的ip 192.168.1.4不可以使用了哈
为何,我的worpress可以正常在家庭局域网中被其他计算机浏览?
root@hwy:/home/debian8# route -nv
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
root@hwy:/home/debian8# ifconfig
eth0 Link encap:Ethernet HWaddr e0:3f:49:57:4b:d1
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::e23f:49ff:fe57:4bd1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:918 errors:0 dropped:0 overruns:0 frame:0
TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:195407 (190.8 KiB) TX bytes:29304 (28.6 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:496 errors:0 dropped:0 overruns:0 frame:0
TX packets:496 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:728348 (711.2 KiB) TX bytes:728348 (711.2 KiB)
wlan0 Link encap:Ethernet HWaddr 00:21:5d:26:c1:10
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::221:5dff:fe26:c110/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6556 errors:0 dropped:0 overruns:0 frame:0
TX packets:5709 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3528018 (3.3 MiB) TX bytes:999397 (975.9 KiB)
按照我的理解 eht0对应的ip不可以使用了吧,
奇怪的事情发生了,
root@hwy:/home/debian8# cat /etc/hosts
192.168.1.4 mywp.com
我的本机架设了一个wordpress ,里面说有的url 都是 http://mywp.com/wp/?p=2026 的形式。
eth0明明被关闭了哈 ifconfig eth0 down ,它对应的ip 192.168.1.4不可以使用了哈
为何,我的worpress可以正常在家庭局域网中被其他计算机浏览?