How to add mac address to eth0?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to add mac address to eth0?

1,201 Views
gurumoorthirasi
Contributor IV

Dear All,

I am using imx25 board where having two ethernet adapter one is from debug and another one is from personality board.

now i am load the file through nfs using debug board adapter. after loaded os fully then i give the ifconfig -a command to work with

personality board eth adapter . it is showing like below. how can i use the on board eth adapter for my use. the problem is eth0 doesnt have Hwaddr and ip and etc .

how can i activate it ?

eth0  Link encap:Ethernet  HWaddr 00:00:00:00:00:00 
      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)
      Base address:0xa000

eth1  Link encap:Ethernet  HWaddr 00:04:9F:00:F6:21 
      inet addr:10.169.42.100  Bcast:10.255.255.255  Mask:255.0.0.0
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:2897 errors:0 dropped:171 overruns:0 frame:0
      TX packets:1882 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:2542760 (2.4 MiB)  TX bytes:321928 (314.3 KiB)

Please some one give me the solution ASAP.

Regards,

Guru

Labels (2)
0 Kudos
Reply
3 Replies

913 Views
rickchu
Contributor IV

ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

0 Kudos
Reply

913 Views
gurumoorthirasi
Contributor IV

Hi i tried the above things but terminal get hanging ...please give some solution ..

0 Kudos
Reply

913 Views
SergioSolis
NXP Employee
NXP Employee

Can you try the following?:

1) sudo gedit /etc/network/interfaces

2) you should see the following:

auto eth0

iface eth0 inet dhcp

3) add a line with the new macadress right after the lines in step 2:

hwaddress ether 01:02:03:04:05:06

4) sudo /etc/init.d/networking restart

let me know if it works...

0 Kudos
Reply