# Migration of /etc/conf.d/net

## mhaller

Hey,

i've updated to baselayout-2.0.2 and am now confronted with the migration of the /etc/conf.d/net configuration file.

However, what I'm missing in the migration guide or the net.example is information on how multiple entries are done in the new format.

To illustrate my problem, this is what my old configuration looks like:

```

modules_eth0=(

        "iproute2"

        "!plug"

)

config_eth0=(

        "66.198.53.138/27 brd +"     # primary

        "66.198.97.18/29  brd + label eth0:18"

        "66.198.97.19/29  brd + label eth0:19"

        "68.47.170.226/27 brd + label eth0:226" # host1.example.org

        "68.47.170.227/27 brd + label eth0:227"

        "68.47.170.228/27 brd + label eth0:228"

        "68.47.170.229/27 brd + label eth0:229"

        "68.47.170.230/27 brd + label eth0:230"

        "68.47.170.231/27 brd + label eth0:231"

        "68.47.170.232/27 brd + label eth0:232"

        "68.47.170.233/27 brd + label eth0:233" # host2.example.org

        "68.47.170.234/27 brd + label eth0:234"

        "68.47.170.235/27 brd + label eth0:235"

        "68.47.170.236/27 brd + label eth0:236"

        "68.47.170.237/27 brd + label eth0:237"

)

routes_eth0=(

        "default via 66.198.53.129"

        "table  50 default via 66.198.97.17  dev eth0"

        "table 100 default via 68.47.170.225 dev eth0"

)

```

What I'm unsure about is how to migrate

 Multiple IP adresses configured on multiple lines

 The "brd" attribute, the "+" flag and the label attributes. Do they need to be migrated, too?

 How to replace the newline-delimiter if the new file format wants to have everything on the same line

 The old file had comments for documentation purposes. How to do the comments in the new format?

Is it really just removing the quotes and brackets and everything is fine or do I need to make more changes?

----------

## gerdesj

This should get you started.  You specify iproute2 so I don't understand the alias style labelling.  I also don't understand the brd + bit.

```

config_eth0="

        66.198.53.138/27

        66.198.97.18/29

        66.198.97.19/29

        68.47.170.226/27

        68.47.170.227/27

        68.47.170.228/27

        68.47.170.229/27

        68.47.170.230/27

        68.47.170.231/27

        68.47.170.232/27

        68.47.170.233/27

        68.47.170.234/27

        68.47.170.235/27

        68.47.170.236/27

        68.47.170.237/27"

routes_eth0=

        "default via 66.198.53.129

        table  50 default via 66.198.97.17  dev eth0

        table 100 default via 68.47.170.225 dev eth0"

```

I'm not so sure on the policy routes though - its been a while.  You do have iprules as well?

Cheers

Jon

----------

## cach0rr0

since you're using static IP's, check out /etc/conf.d/network

heaps of comments in there, and that's the "openrc way" of doing things (though, some of the baselayout-1 stuff still works in bl2/openrc)

----------

## bombcar

I have a similar question, so I'll put it here.

I used to have:

```
config_eth0=(

   "172.20.20.21/24"

   "2001:ffff:ffff:ffff::2/64"

   "2001:ffff:ffff:ffff::1:{1..100}/64"

)

```

but that doesn't work anymore. It gave me 100 IPv6 addresses, I'd like to get the same 100 without having to put 100 lines in the config file.

Is there an easy way to do this?

----------

