【Ubuntu】网口状态:DOWN、UP、RUNNING

对Ubuntu系统中网口不同状态的理解

一、 ip a

ip a可查看所有网口状态

二、ifconfig

ifconfig可查看被up起来的网口信息

三、DOWN、UP、RUNNING

当网口状态为DOWN时可用 ifconfig ens33 up 将网口up
网口状态必须为UP才能设置IP、子网掩码等
在这里插入图片描述
这个接口被标记为 UP(已启用)、BROADCAST(支持广播)和 MULTICAST(支持多播)。然而,它并没有显示 RUNNING 状态,这意味着该接口虽然已启用,但还未处于运行状态,并不能传输数据,此时应该检查是否给该网口接通网线至另一网口。
状态变为RUNNING才能传输数据
在这里插入图片描述

(个人理解,如有错误请评论或私信,感谢)

root@ubuntu2004:/etc# ethtool eth0 | grep -E 'Speed|Link' Speed: 100Mb/s Link detected: yes root@ubuntu2004:/etc# dmesg | grep eth0 [ 6.220483] rk_gmac-dwmac fe1c0000.ethernet eth0: PHY [stmmac-1:01] driver [YT8531 Gigabit Ethernet] (irq=POLL) [ 6.222530] rk_gmac-dwmac fe1c0000.ethernet eth0: No Safety Features support found [ 6.222538] rk_gmac-dwmac fe1c0000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported [ 6.222727] rk_gmac-dwmac fe1c0000.ethernet eth0: registered PTP clock [ 6.223021] rk_gmac-dwmac fe1c0000.ethernet eth0: configuring for phy/rgmii-rxid link mode [ 6.225289] 8021q: adding VLAN 0 to HW filter on device eth0 [ 8.264068] rk_gmac-dwmac fe1c0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 8.264096] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 8.271916] rk_gmac-dwmac fe1c0000.ethernet eth0: Link is Down [ 11.305339] rk_gmac-dwmac fe1c0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off root@ubuntu2004:/etc# root@ubuntu2004:/etc# root@ubuntu2004:/etc# ifconfig enP2p33s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.4.80 netmask 255.255.255.0 broadcast 192.168.4.255 inet6 fe80::e364:126f:fe80:833b prefixlen 64 scopeid 0x20<link> ether 5a:dc:7b:db:2a:6a txqueuelen 1000 (Ethernet) RX packets 2951 bytes 463118 (463.1 KB) RX errors 0 dropped 320 overruns 0 frame 0 TX packets 356 bytes 67669 (67.6 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 136 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether be:0c:0a:02:e1:41 txqueuelen 1000 (Ethernet) RX packets 569 bytes 48013 (48.0 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1502 bytes 128450 (128.4 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 80 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 244 bytes 26031 (26.0 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 244 bytes 26031 (26.0 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 60:48:9c:3f:d5:68 txqueuelen 1000 (Ethernet) RX packets 88 bytes 19267 (19.2 KB) RX errors 0 dropped 3 overruns 0 frame 0 TX packets 12 bytes 1339 (1.3 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 inet 10.15.248.212 netmask 255.255.255.248 destination 10.15.248.212 inet6 fe80::231:1195:a5d2:ea8d prefixlen 64 scopeid 0x20<link> unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC) RX packets 151 bytes 14265 (14.2 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 222 bytes 32968 (32.9 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 root@ubuntu2004:/etc# 如何解决
09-07
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值