cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
375 Views
Registered: ‎01-15-2019

IP Address -> how to change it on PetaLinux?

Hi All,

How can I reconfig IP Address on the Zynq 7045?

When I run the ifconfig, I receive the following:

eth1      Link encap:Ethernet  HWaddr 00:E0:23:00:00:00
          inet addr:172.16.10.173  Bcast:172.16.10.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:23ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21925 errors:0 dropped:799 overruns:0 frame:0
          TX packets:1437 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9054931 (8.6 MiB)  TX bytes:119527 (116.7 KiB)
          Interrupt:149 Base address:0xc000

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:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

It seems that the inet addr:172.16.10.173 was configured in BSP. But now how can I force the Zynq to ask for a new IP when I connected to a new Ethernet Switch? 

I tried the dhcpcd -k command, but received the following:

-sh: dhcpcd: not found

And one another question: How can I know the PetaLinux, which Zynq currently runs?

Thank you!

 

0 Kudos
4 Replies
Highlighted
Moderator
Moderator
344 Views
Registered: ‎06-27-2017

Re: IP Address -> how to change it on PetaLinux?

Hi @ldm.eth 

Once you run ifconfig, you will get the ethernet interface like eth0 or eth1

Your ethernet interface is eth1

 

1. Run below command to up the ip address you desire

   ifconfig <IP> eth1 up

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Mentor
Mentor
337 Views
Registered: ‎06-16-2013

Re: IP Address -> how to change it on PetaLinux?

Hi @ldm.eth 

 

> How can I know the PetaLinux, which Zynq currently runs?

 

Would you execute the following command on linux ?

 

$ dmesg | grep CPU

 

You can find CPU number on this output message.

 

Best regards,

0 Kudos
Highlighted
Explorer
Explorer
326 Views
Registered: ‎01-15-2019

Re: IP Address -> how to change it on PetaLinux?

 

Here is an output from the dmesg | grep CPU command:

%> dmesg | grep CPU
Booting Linux on physical CPU 0x0
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
CPU: All CPU(s) started in SVC mode.

So, how can I know what's OS (what's PetaLinux) currently running on the Zynq?

 

0 Kudos
Highlighted
Moderator
Moderator
287 Views
Registered: ‎07-31-2012

Re: IP Address -> how to change it on PetaLinux?

Give the command - ifconfig <IP> eth1 up


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos