[Linux]ubuntu1404 中ifconfig -a只有lo的问题

本文解决Ubuntu1404系统下Intel网卡无法上网的问题,通过lspci命令确认网卡型号为Intel Corporation Device 15bc,提供详细的驱动安装步骤,包括下载、解压、编译和加载驱动。
新装的 ubuntu 1404 无法上网, 执行ifconfig 只看到 lo, 怀疑是没有装网卡驱动。


lspci | grep -i net

00:1f.6 Ethernet controller: Intel Corporation Device 15bc (rev 10)

 

网卡类型是

有线网Intel Corporation Device 驱动.

然后可以去下载驱动:https://downloadcenter.intel.com/download/15817

tar -zxvf e1000e-3.4.2.1.tar.gz


cd e1000e-3.4.2.1/src

make install
modprobe e1000e

到这里就可以上网。

 

 

 

 

<think> Hmm, the user is asking about the meaning of "dm-1052bb67d0c0" appearing in the ifconfig output on Ubuntu. Interesting - this looks like a Docker-related network interface name. First, let me recall what ifconfig normally shows: standard network interfaces like eth0, wlan0, or lo. The "dm-" prefix is the giveaway here - Docker uses "dm-" for device mapper names. The hexadecimal part is likely the container ID or volume hash. The user seems comfortable with Ubuntu commands based on their reference to citation [1] about directory creation and system info commands. They're probably troubleshooting network configuration and stumbled upon this unfamiliar interface name. I should explain that this is normal Docker behavior but also warn about potential pitfalls: if Docker assigns random names like this, it might cause issues in scripts expecting consistent interface names. The solution would be using Docker's --name flag or network aliases. Oh, and I must remember to generate related questions - probably about Docker network management and persistent naming solutions. The user appears technical enough to benefit from those. </think> 在Ubuntu系统中,`ifconfig`命令输出中出现的`dm-1052bb67d0c0`这类以`dm-`开头的接口名称,通常与**Docker容器网络**有关。其含义和背景如下: ### 1. **命名规则解析** - `dm-`前缀:表示该接口由Docker管理的**设备映射(Device Mapper)** 创建 - `1052bb67d0c0`部分:对应Docker容器的**唯一哈希标识符**的前12位 (完整容器ID可通过`docker ps --no-trunc`查看) ### 2. **产生原因** 当Docker容器使用`bridge`网络模式时(默认模式),Docker守护进程会: 1. 为每个容器创建虚拟网络接口 2. 通过Linux内核的`macvlan`或`veth`技术实现网络隔离 3. 自动分配以`dm-`开头的接口名(较新Docker版本特性) ### 3. **技术特征** | 特性 | 说明 | |---------------------|-----------------------------| | 临时性 | 容器停止时接口自动消失 | | 桥接网络 | 通过`docker0`虚拟网桥连接主机网络 | | IP分配 | 通常使用`172.17.0.0/16`网段 | | 作用 | 实现容器间及容器-主机的网络通信 | ### 4. **查看关联容器** ```bash # 查找对应容器 docker ps -q | xargs docker inspect --format '{{.Id}} {{.Name}} {{.NetworkSettings.SandboxKey}}' ``` 输出示例: ``` 1052bb67d0c0... /my_container /var/run/docker/netns/dm-1052bb67d0c0 ``` ### 5. **注意事项** - **脚本兼容性问题**:这类动态名称可能导致脚本失效(建议改用`ip link`命令获取稳定设备ID) - **Docker版本差异**: - v20.10+ 默认使用该命名规则 - 旧版本可能显示为`vethxxxx`形式 - **网络隔离**:该接口属于容器专用命名空间,通过`nsenter`命令可进入查看: ```bash nsenter -t $(docker inspect -f '{{.State.Pid}}' 1052bb67d0c0) -n ifconfig ``` > ⚠️ 若需固定接口名,可在运行容器时指定网络别名: > `docker run --network-alias=myapp-net ...` --- ### 相关问题 1. 如何永久自定义Docker容器的网络接口名称? 2. `veth`接口与`dm-`接口在Docker网络中有何区别? 3. 容器停止后遗留的`dm-`接口该如何清理? 4. 如何排查Docker容器与宿主机的网络连通性问题? 5. 使用`macvlan`和`ipvlan`网络驱动时接口命名规则有何不同?
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值