Page tree
Skip to end of metadata
Go to start of metadata


接口说明

i2X-GW-6U网关提供两路以太网接口,两个以太网均为100Mbps网口。连接器物理形式为双网口RJ45插座,每个网口均有两个LED指示灯,用来指示以太网的工作情况。指示灯在不接入网线时均不亮,当接入网线后,黄灯亮,表示连接正常,当有数据传输时,绿灯闪烁。

接口实物图如下:


Linux系统接口定义

外壳丝印Linux系统中设备
ETH0eth0
ETH1eth1


网络常用命令

查看系统中的网络设备

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr c2:83:23:40:bf:7b
          inet6 addr: fde3:c0c9:1c0a:0:c083:23ff:fe40:bf7b/64 Scope:Global
          inet6 addr: fe80::c083:23ff:fe40:bf7b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20 errors:0 dropped:12 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2132 (2.0 KiB)  TX bytes:8406 (8.2 KiB)

eth1      Link encap:Ethernet  HWaddr 2e:ec:c8:cc:a2:fb
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


配置IP地址

# ifconfig eth0 192.168.1.100


配置网关

# route add default gw 192.168.1.1


配置DNS域名解析服务

# echo "nameserver 8.8.8.8" > /etc/resolv.conf
# echo "nameserver 114.114.114.114" >> /etc/resolv.conf


配置完成后就可以使用ping命令来测试开发板与互联网的连通性。

# ping bing.com
PING bing.com (204.79.197.200): 56 data bytes
64 bytes from 204.79.197.200: icmp_seq=0 ttl=118 time=12.205 ms
64 bytes from 204.79.197.200: icmp_seq=1 ttl=118 time=12.017 ms
64 bytes from 204.79.197.200: icmp_seq=2 ttl=118 time=11.565 ms
64 bytes from 204.79.197.200: icmp_seq=3 ttl=118 time=12.116 ms
  • No labels
Write a comment…