The GW102 gateway provides two Ethernet interfaces, both Ethernet support 10/100Mbps rate network port. The Ethernet is a dual port RJ45 connector, and each port has two LEDs to indicate the working condition of the Ethernet. None of the LEDs are lit when the network cable is not connected; when the cable is connected, the yellow light is on to indicate a normal connection, and the green light blinks when there is data transmission.

Pictures of the real thing are as follows:
gw102-ethernets.png

 

Shell Silkscreen NameLinux deviceDefault IP Address
NET2eth1192.168.2.188
NET1eth0192.168.1.188

 

Common Network Commands

View network devices on your system

# 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)

Configure the IP address

  1. Interim configuration
    The IP address configured by this method is for temporary use and will not be stored in the system; a reboot will restore the configuration.

# ifconfig eth0 192.168.1.100
  1. Persistent configuration

The configuration needs to take effect after a reboot. It is necessary to write the configuration information into the configuration file.。

  • eth0 config file is /etc/systemd/network/eth0.network

  • eth1 config file is /etc/systemd/network/eth1.network

The default static IP configuration parameters are as follows

[Match]
Name = eth0

[Network]
Address = 192.168.1.188/24
Gateway = 192.168.1.1

The dynamic DHCP configuration parameters are as follows

[Match]
Name = eth0

[Network]
DHCP = yes

 

Configuring the network gateway

# route add default gw 192.168.1.1

Configuring DNS Domain Name Resolution Service

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

Once the configuration is complete, you can use the ping command to test the board's connectivity to the Internet.。

# 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

SSH service

GW102 supports SSH remote connection function, you can use the client software that supports SSH protocol to connect to the gateway via IP address. The connection parameters are as follows

  • Protocol: SSH

  • User name: root

  • Password: empty

作者:SteveChen  创建时间:2025-04-22 22:47
最后编辑:SteveChen  更新时间:2025-04-23 00:49
上一篇:
下一篇: