完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
|
相关推荐
1个回答
|
|
常用命令
ifconfig eth0 up 打开eth0 网卡 ifconfig eth0 down 关闭eth0 网卡 ifconfig eth0 promisc 设置网卡eth0为混杂模式 ifconfig eth0 -promisc 取消网卡eth0的混杂模式 ifconfig eth0 192.168.1.100 设置ip地址 ifconfig eth0 hw ether 4A:13:E4:F9:79:74 设置mac地址 ifconfig eth0 192.168.1.100 设置静态ip地址 udhcpc -i eth0 动态获取ip地址 代码路径 内核代码 gmac代码: gmac代码: drivers/net/ethernet/allwinner/ sunxi-gmac.c sunxi_gmac_ops.c phy代码:(一般用内核generic的代码) linux-4.9/drivers/net/phy phy.c phy_device.c mdio_bus.c ... 配置代码 linux-4.9的适配 board.dts 730 gmac0: eth@05020000 { 731 phy-rst = <&r_pio PH 19 1 1 1 0>; 732 use_ephy25m = <1>; 733 phy-mode = "rgmii"; 734 tx-delay = <7>; 735 rx-delay = <0>; 736 status = "okay"; 737 }; 调试工具 1.ethtool ethtool -s eth0 speed 1000 duplex full autoneg on //设置1000M全双工自适应 2.brctl root@TinaLinux:/# brctl --help BusyBox v1.27.2 () multi-call binary. Usage: brctl COMMAND [BRIDGE [INTERFACE]] Manage ethernet bridges Commands: show Show a list of bridges addbr BRIDGE Create BRIDGE delbr BRIDGE Delete BRIDGE addif BRIDGE IFACE Add IFACE to BRIDGE delif BRIDGE IFACE Delete IFACE from BRIDGE setageing BRIDGE TIME Set ageing time setfd BRIDGE TIME Set bridge forward delay sethello BRIDGE TIME Set hello time setmaxage BRIDGE TIME Set max message age setpathcost BRIDGE COST Set path cost setportprio BRIDGE PRIO Set port priority setbridgeprio BRIDGE PRIO Set bridge priority stp BRIDGE [1/yes/on|0/no/off] STP on/off root@TinaLinux:/# brctl addif br-lan eth0 [ 4312.718522] br-lan: port 1(eth0) entered blocking state [ 4312.724433] br-lan: port 1(eth0) entered disabled state [ 4312.730790] device eth0 entered promiscuous mode root@TinaLinux:/# brctl delif br-lan eth0 [ 4270.518067] device eth0 left promiscuous mode [ 4270.523335] br-lan: port 1(eth0) entered disabled state eth0加入和移除网桥时都会有混杂模式的打印 br-lan网桥的配置 > Networking support > Networking options <*> 802.1d Ethernet Bridging //CONFIG_BRIDGE=y |
|
|
|
只有小组成员才能发言,加入小组>>
2588 浏览 0 评论
为了学习内核开发,大佬手搓了一个轻量级操作系统YiYiYa OS
2546 浏览 0 评论
1243 浏览 0 评论
1383 浏览 0 评论
1192 浏览 0 评论
【开源硬件大赛】基于全志V853设计的全功能BTB学习开发板
3430浏览 8评论
3078浏览 5评论
1853浏览 4评论
全志V85x硬件设计大赛作品精选第二期,快来Pick你心目中的最佳方案
87543浏览 3评论
3591浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-10 13:58 , Processed in 0.713680 second(s), Total 78, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号