我正在做一个网络项目,需要有 eth0 接口。执行 ifconfig 时,我看到的是这个。
anuvrattiku@anuvrattiku-Inspiron-13-7368:~$ ifconfig
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:14335 errors:0 dropped:0 overruns:0 frame:0
TX packets:14335 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:1743272 (1.7 MB) TX bytes:1743272 (1.7 MB)
wlp1s0 Link encap:Ethernet HWaddr 68:07:15:23:f2:f8
inet addr:192.168.0.16 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::5fff:b2a0:e985:b475/64 Scope:Link
inet6 addr: 2601:646:8501:c10:f91:29b7:c0fd:3ebb/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:315519 errors:0 dropped:0 overruns:0 frame:0
TX packets:64909 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:391223230 (391.2 MB) TX bytes:9020230 (9.0 MB)
有什么方法可以让 eth0 启动吗?我尝试将 eth0 添加到 /etc/network/interfaces 文件,但没有用。
这是错误。
[BroControl] > start
starting bro (was crashed) ...
bro terminated immediately after starting; check output with "diag"
[BroControl] > diag
[bro]
Bro 2.4.1
Linux 4.4.0-36-generic
==== No reporter.log
==== stderr.log
fatal error: problem with interface eth0 (eth0: SIOCETHTOOL(ETHTOOL_GET_TS_INFO) ioctl failed: No such device)
==== stdout.log
max memory size (kbytes, -m) unlimited
data seg size (kbytes, -d) unlimited
virtual memory (kbytes, -v) unlimited
core file size (blocks, -c) unlimited
==== .cmdline
-i eth0 -U .status -p broctl -p broctl-live -p standalone -p local -p bro local.bro broctl broctl/standalone broctl/auto
这里有什么解决方法吗?
答案1
您遇到的错误是因为您没有eth0
接口。您有一个wlp1s0
接口。您必须编辑程序才能使用您已有的设备(或安装新的硬件设备)。
查看 github 站点,有一个node.cfg
配置此内容的示例文件。
更改文件中的行node.cfg
:
更改自:
[bro]
type=standalone
host=localhost
interface=eth0
改成:
[bro]
type=standalone
host=localhost
interface=wlp1s0