|
本帖最后由 BlueCode 于 2016-3-23 20:10 编辑
如题:最近小弟在做一款自己定制的路由器板子,配置如下:
板子图片:
系统使用:openwrt 15.05 【 (Chaos Calmer, r48205)】
目前uboot及固件以及正常加载,遇到一个问题,该主板只有一个物理网口, 想用来做WAN口使用, 可是查了多种资料,修改了无数次/etc/config/network的配置,依然无法连接上层的网络:
如下是配置文件
- root@RayBoxMaster:/# cat /etc/config/network
- config interface 'loopback'
- option ifname 'lo'
- option proto 'static'
- option ipaddr '127.0.0.1'
- option netmask '255.0.0.0'
- config globals 'globals'
- option ula_prefix 'fda0:9c2a:52d0::/48'
- config interface 'lan'
- option ifname 'eth0.1'
- option force_link '1'
- #option macaddr 'e6:c3:75:fa:c7:bd'
- option type 'bridge'
- option proto 'static'
- option ipaddr '192.168.61.1'
- option netmask '255.255.255.0'
- option ip6assign '60'
- config interface 'wan'
- option ifname 'eth0.2'
- #option force_link '1'
- #option macaddr 'e6:c3:75:fa:c7:be'
- option proto 'dhcp'
复制代码
如下是串口输出信息:
- root@RayBoxMaster:/# [ 2657.030000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link down
- [ 2660.920000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link up
- [ 2729.530000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link down
- [ 2732.070000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link up
- [ 2796.230000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link down
- [ 2798.770000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link up
- [ 2850.330000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link down
- [ 2854.180000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link up
- [ 2916.030000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link down
- [ 2918.590000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link up
- [ 2952.040000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link down
- [ 2954.630000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link up
- [ 3149.780000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link down
- [ 3153.680000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link up
- [ 3348.850000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link down
- [ 3351.330000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link up
- [ 3459.080000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link down
- [ 3461.770000] ralink_soc_eth 1e100000.ethernet eth0: port 4 link up
复制代码
把唯一的网口设置成wan口,死活连不上……
我发现eth0获取不到上层路由的IP,而且网口灯也不亮,但是网卡是正常的,之前从uboot刷固件是通过tftp用这个网卡和PC连接刷入的; 驱动应该也是没有问题,而且我拔掉网线的时候,TTL是有打印eth0 down掉的
这个应该怎么配,求大神们解惑啊{:soso_e134:}
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|