Project

General

Profile

1 Gb Ethernet

Objective

This example connects and verifies the 1 Gb Ethernet interface supplied on the Development Kit. The default configuration makes use of DHCP. Information on how to set a Static address is also provided.

Prerequisites

  • An ethernet cable, a switch.

Steps if a DHCP Server is present

  • If the network you are connecting to does not have a DHCP server, proceed to the next section
  • Have the Development kit powered up and have a terminal emulator attached to the USB-uart serial port.
  • Plug the ethernet cable into one of the two ethernet ports for Gb ethernet. Either port (eth0 or eth1) is fine.

  • Verify that an IP address has been assigned.
    root@mitysom-am62x:~# ip address
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether 34:08:e1:7e:58:f0 brd ff:ff:ff:ff:ff:ff
        inet 10.0.103.96/16 brd 10.0.255.255 scope global dynamic eth0
           valid_lft 6850sec preferred_lft 6850sec
        inet6 fe80::3608:e1ff:fe7e:58f0/64 scope link
           valid_lft forever preferred_lft forever
    3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether ae:15:8c:42:fa:cb brd ff:ff:ff:ff:ff:ff
    4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
        link/ether 02:42:ce:5e:c3:4d brd ff:ff:ff:ff:ff:ff
        inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
           valid_lft forever preferred_lft forever
    root@mitysom-am62x:~#
    

    Note the inet line for item number 2, eth0. The assigned ethernet address is 10.0.103.96. For this example, the left side (eth0) link was used. Using the right side (eth1) link would result in eth1 getting an address.
  • Verify that the link is working.
    • If connected to the internet, use ping to contact the ethernet address 8.8.8.8. (google DNS server)
      root@mitysom-am62x:~# ping 8.8.8.8
      PING 8.8.8.8 (8.8.8.8): 56 data bytes
      64 bytes from 8.8.8.8: seq=0 ttl=60 time=15.061 ms
      64 bytes from 8.8.8.8: seq=1 ttl=60 time=15.033 ms
      64 bytes from 8.8.8.8: seq=2 ttl=60 time=14.936 ms
      ^C
      --- 8.8.8.8 ping statistics ---
      3 packets transmitted, 3 packets received, 0% packet loss
      round-trip min/avg/max = 14.936/15.010/15.061 ms
      root@mitysom-am62x:~#
      
    • If not connected to the internet, use ping to contact one of your internal ethernet addresses. Please note that some Windows PCs are not configured to respond to ping requests by default as a security measure. (e.g. Windows 10 and 11)

Steps using a Static IP address

  • Follow the steps described in Setting Static IP Addresses with systemd
  • Use ping as described in the DHCP section.
    • You will probably need to make sure the gateway is configured to ping something external to your local network.

Conclusion

In this example you have verified that the 1Gb ethernet ports are working by letting DHCP assign an IP address or by assigning your own static IP address and then using ping to communicate with another system.

Go to top
Add picture from clipboard (Maximum size: 1 GB)