AM620-Q1: Process to assign static IP addresses.

Part Number: AM620-Q1

Tool/software:

What is the process to assign static addresses to each ethernet port?  I was at a customer site and I wasn’t able to ping using a direct ethernet cable (however, they did not have a cross over cable for me to use).  I assigned an IP using ifconfig eth0 192.168.1.1 (for example).  After this command I again executed “ifconfig” and eth0 seem to be assigned 192.168.1.1 but I was not able to “ping”.  Do I need to disable “auto-negotiate” and if so, what is the best way to do that?

The ethernet ports work perfectly on our network when they auto-negotiate an IP.

  • Hello Jim,

    In this response, I will just be talking about manually setting a static IP address for debugging. Setting a static IP address for general runtime is different steps.

    Setting a static IP for debug

    I actually only use static IP addresses for my local network between my Linux PC and the EVMs.

    First, everything needs to be on the same subnet (e.g., 192.168.1.x in your case).

    I set my linux PC to be 192.168.1.100

    And then I set the EVM port like this:

    root@am62xx-evm:~# uname -a
    Linux am62xx-evm 6.6.32-g6de6e418c80e-dirty #1 SMP PREEMPT Thu Oct 24 17:56:25 CDT 2024 aarch64 GNU/Linux
    
    // let's double check with port is getting TX and RX packets from the PC
    // it should be eth0 from the earlier terminal output
    root@am62xx-evm:~# [592897.955621] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow[2/8080]
     rx/tx
    
    root@am62xx-evm:~# ifconfig -a
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet6 fe80::1e63:49ff:fe0f:6d12  prefixlen 64  scopeid 0x20<link>
            ether 1c:63:49:0f:6d:12  txqueuelen 1000  (Ethernet)
            RX packets 1  bytes 335 (335.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 19  bytes 3127 (3.0 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eth1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            ether a6:33:b4:28:51:cd  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 8  bytes 1158 (1.1 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 8  bytes 1158 (1.1 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    // bring the port down
    root@am62xx-evm:~# ifconfig eth0 down
    [592991.236158] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    
    // bring the port back up, and initialize it with the static IP
    root@am62xx-evm:~# ifconfig eth0 192.168.1.162
    [593001.874024] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    [593001.883457] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    root@am62xx-evm:~# [593004.963618] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control
     rx/tx
    
    // now we can communicate
    root@am62xx-evm:~# ping 192.168.1.100
    PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
    64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=0.472 ms
    64 bytes from 192.168.1.100: icmp_seq=2 ttl=64 time=0.284 ms
    64 bytes from 192.168.1.100: icmp_seq=3 ttl=64 time=0.276 ms
    ^C
    --- 192.168.1.100 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2031ms
    rtt min/avg/max/mdev = 0.276/0.344/0.472/0.090 ms
    

    Regards,

    Nick

  • Nick,

    OK!  I'll follow up when I've tried it!  Thanks!

    Thanks!

  • Nick,

    That did the trick!  Thanks!