# How I make NIC config and DHCP presistent?

**URL:** <https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853>\
**Category:** NXP LX2160\
**Created:** [July 1, 2024, 2:10am UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853 "2024-07-01T02:10:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morta](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Morta](https://community.solid-run.com/u/Morta)\
**Post date:** [July 1, 2024, 2:10am UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853/1 "2024-07-01T02:10:40Z")

</div>

Hi

How I can enable dhclient and show up at least one NIC up automatically?

systemctl enable dhclient.service doesn’t work and I have to do on every reboot ls-addni dpmac.16 or similar

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [July 1, 2024, 5:10am UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853/2 "2024-07-01T05:10:52Z")

</div>

which hardware platform and distribution are you using?

To enable an interface automatically a MAC needs to be connected to a NIC in the dpl device-tree that is loaded into the mcbin firmware. Then Linux needs a device-tree entry to initialize the device and bind the dpaa2 driver to it.

---

<div class="post-metadata">

**Author:** ![Morta](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Morta](https://community.solid-run.com/u/Morta)\
**Post date:** [July 1, 2024, 5:16am UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853/3 "2024-07-01T05:16:41Z")

</div>

I use Clearfog LX2162a with a prebuilt Image from SolidRun Ubuntu 20.04 LTS

---

<div class="post-metadata">

**Author:** ![Morta](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Morta](https://community.solid-run.com/u/Morta)\
**Post date:** [July 4, 2024, 9:06am UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853/4 "2024-07-04T09:06:27Z")

</div>

git clone [GitHub - SolidRun/mc-utils: Mirror of codeaurora qoriq mc-utils](https://github.com/SolidRun/mc-utils.git)

cd mc-utils/config/lx2160a/CEX/

vim dpl-eth.8x10g.19.dts

adjusted content as follow

```auto
connections {
                connection@1 {
                        endpoint1 = "dpni@0";
                        endpoint2 = "dpmac@5";
                };
                connection@2 {
                        endpoint1 = "dpni@1";
                        endpoint2 = "dpmac@3";
                };
                connection@3 {
                        endpoint1 = "dpni@2";
                        endpoint2 = "dpmac@6";
                };
                connection@4 {
                        endpoint1 = "dpni@3";
                        endpoint2 = "dpmac@4";
                };
                connection@5 {
                        endpoint1 = "dpni@4";
                        endpoint2 = "dpmac@16";
                };
                connection@6 {
                        endpoint1 = "dpni@5";
                        endpoint2 = "dpmac@15";
                };
                connection@7 {
                        endpoint1 = "dpni@6";
                        endpoint2 = "dpmac@13";
                };
                connection@8 {
                        endpoint1 = "dpni@7";
                        endpoint2 = "dpmac@14";
                };
                connection@9 {
                        endpoint1 = "dpni@8";
                        endpoint2 = "dpmac@12";
                };
                connection@10 {
                        endpoint1 = "dpni@9";
                        endpoint2 = "dpmac@11";
                };
                connection@11 {
                        endpoint1 = "dpni@10";
                        endpoint2 = "dpmac@17";

                };
                connection@12 {
                        endpoint1 = "dpni@11";
                        endpoint2 = "dpmac@18";
                };

        };
};

```

cd mc-utils

make -C config/

reboot  
but has no effect its doesn’t showing up automattlicy eth0-11

Why?

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [July 4, 2024, 9:15am UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853/5 "2024-07-04T09:15:17Z")

</div>

did you rebuild the image, or dd the .dtb onto the boot medium at the proper offset?

---

<div class="post-metadata">

**Author:** ![Morta](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Morta](https://community.solid-run.com/u/Morta)\
**Post date:** [July 6, 2024, 2:00pm UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853/6 "2024-07-06T14:00:40Z")

</div>

[MACs.csv](https://community.solid-run.com/uploads/short-url/fViRHe6e8SPWe3Z6zpUgZFu0gjU.csv) (996 Bytes)

[http://temp.sh/ITbNg/clearfog-s1\_3-s2\_9-dpc.dts](http://temp.sh/ITbNg/clearfog-s1_3-s2_9-dpc.dts)

I want just adjust clearfog-s1\_3-s2\_dpc.dts with the MAC from the CSV file and rebuild the image with docker.

How I know which MAC goes to @mac3 etc?

I can’t see any port number in the csv file

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [July 6, 2024, 2:57pm UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853/7 "2024-07-06T14:57:09Z")

</div>

our BSP actually reads a base MAC address from the eeprom in TLV format and then increments them based on the number set in the same eeprom. This is per the ONIE specification. You can use the tlv\_eeprom command to inspect and change the configuration.

As per which MAC address overrides which between the .dpc and the eeprom, I would have to look at the code again to see which one is preferred.

---

<div class="post-metadata">

**Author:** ![Morta](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Morta](https://community.solid-run.com/u/Morta)\
**Post date:** [July 6, 2024, 3:07pm UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853/8 "2024-07-06T15:07:13Z")

</div>

Ok thank you have a look to the code.

So if execute on a existing system the tlv\_eeprom command to see which MAC is on a existing port and then adjust dpc file with the rights MAC address.

I need also to adjust [Temp.sh | clearfog-s1\_3-s2\_9-dpl.dts](http://temp.sh/ORhWY/clearfog-s1_3-s2_9-dpl.dts) the connection function like this?

```auto
connections {
                connection@1 {
                        endpoint1 = "dpni@0";
                        endpoint2 = "dpmac@5";
                };
                connection@2 {
                        endpoint1 = "dpni@1";
                        endpoint2 = "dpmac@3";
                };
                connection@3 {
                        endpoint1 = "dpni@2";
                        endpoint2 = "dpmac@6";
                };
                connection@4 {
                        endpoint1 = "dpni@3";
                        endpoint2 = "dpmac@4";
                };
                connection@5 {
                        endpoint1 = "dpni@4";
                        endpoint2 = "dpmac@16";
                };
                connection@6 {
                        endpoint1 = "dpni@5";
                        endpoint2 = "dpmac@15";
                };
                connection@7 {
                        endpoint1 = "dpni@6";
                        endpoint2 = "dpmac@13";
                };
                connection@8 {
                        endpoint1 = "dpni@7";
                        endpoint2 = "dpmac@14";
                };
                connection@9 {
                        endpoint1 = "dpni@8";
                        endpoint2 = "dpmac@12";
                };
                connection@10 {
                        endpoint1 = "dpni@9";
                        endpoint2 = "dpmac@11";
                };
                connection@11 {
                        endpoint1 = "dpni@10";
                        endpoint2 = "dpmac@17";

                };
                connection@12 {
                        endpoint1 = "dpni@11";
                        endpoint2 = "dpmac@18";
                };

        };
};

```

---

<div class="post-metadata">

**Author:** ![Morta](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Morta](https://community.solid-run.com/u/Morta)\
**Post date:** [July 6, 2024, 3:31pm UTC](https://community.solid-run.com/t/how-i-make-nic-config-and-dhcp-presistent/853/9 "2024-07-06T15:31:10Z")

</div>

I feel little bit stupid but when I DON’T adjust the dpl files and build the images with docker and the option clearfog-s1\_3-s2\_9 and flash the SPI and eMMC so would the Interfaces presistent?
