# Networking with the new baselayout.

## schiotz

A while ago, I saw a reference here to a guide for how to set up networking with the 1.11-series baselayout (written by UberLord?).  Now that this baselayout has finally gone stable, I wanted to read that documentation, but I can find it nowhere on the Gentoo web pages.  :Sad: 

Can someone post a link?  Even better, can it be added to the documentation pages?

Best regards

Jakob

----------

## chl

http://dev.gentoo.org/~uberlord/net-book/hb_part1_chap1.html

Have fun!

CHL

----------

## schiotz

Answering my own post: It is in the new Gentoo Handbook, where it belongs.

----------

## UberLord

My dev space will always try and contain a revised guide for ~ARCH baselayout though - the handbook is purely for stable stuff really.

----------

## schiotz

 *UberLord wrote:*   

> My dev space will always try and contain a revised guide for ~ARCH baselayout though - the handbook is purely for stable stuff really.

 

It is very useful!  Thanks for the great documentation.  And if you are one of the architects behind the new baselayout: thanks for the great work, it makes wireless a lot easier!

----------

## UberLord

 *schiotz wrote:*   

> It is very useful!  Thanks for the great documentation.  And if you are one of the architects behind the new baselayout: thanks for the great work, it makes wireless a lot easier!

 

Glad you like it  :Smile: 

And yes, I maintain baselayout - specifically the networking, but I touch other parts as well.

----------

## orick

Dear Friends,

I am trying to adapt to the new baselayout.

With the old-style /etc/conf.d/net I  could get one address from the dhcp server and then define aliases like this:

```

iface_eth0="dhcp"

alias_eth0="192.168.1.80 192.168.1.81 192.168.1.104 192.168.1.105"

```

which worked fine

with the new-style /etc/conf.d/net I can't get the same working, defining

```

config_eth0=( "dhcp" )

config_eth0=(

      "192.168.1.80/24"

      "192.168.1.81/24"

      "192.168.1.104/24"

      "192.168.1.105/24"

)

```

That way I only get the aliases but not the address from the dhcp server. When I state only

```

config_eth0=( "dhcp" )

```

I get correctly the address from the dhpc server

How is this to be configurated?

Thank's for you help

----------

## UberLord

```

config_eth0=(

                "dhcp" 

      "192.168.1.80/24"

      "192.168.1.81/24"

      "192.168.1.104/24"

      "192.168.1.105/24"

)

```

Easy  :Smile: 

----------

## orick

Thank's a lot Uberlord,

It now works fine.

Maybe it's useful to mention that you don't have to set up the gateway, when you get you address via dhcp.

See these links:

https://forums.gentoo.org/viewtopic-t-347256-highlight-gateway.html

https://forums.gentoo.org/viewtopic-t-348175-highlight-gateway.html?sid=1ee5e893a6d39da883efdbcf32578deb

Could this be discussed in the next update of the manual?

----------

## UberLord

Lol

Actually you can setup a DHCP server not to provide a default route (gateway) so in that instance you would need one.

But I'll try and put something in explaining DHCP in a bit more detail when I get around to updating it  :Smile: 

----------

## pleusicles

Hi,

I have yet another network-related question. Is it possible to set a different MAC address for the same interface in "normal" and fallback mode? I have a laptop which connects sometimes to my desktop, sometimes to my isp; the latter allows only a given MAC address, so I would have to re-register it every time I use the internet from my laptop (updating gentoo on it, mainly).

So, I think of a "normal" mode (connect to isp) with probing for dhcp and setting the MAC to that of the NIC in my desktop machine, and resetting the real MAC of the laptop NIC and set a manual IP in fallback mode (connect to desktop).

Thanks for any help (and for the work on the networking scripts, Uberlord!  :Smile: )

----------

## UberLord

With the current version - no

With the development version - no

You will be able to do this when we introduce profile support (for whole of the RC system - not just networking), but I'm not sure when that's going to happen.

In the mean time, why not just set the MAC address to that of your ISP requirements for the interface and just leave it at that?

----------

## pleusicles

Thanks for the answer!

 *UberLord wrote:*   

> In the mean time, why not just set the MAC address to that of your ISP requirements for the interface and just leave it at that?

 

Because the MAC my isp wants is that of the desktop NIC, so if I connect the laptop to the desktop, both NICs would have the same hw address  :Sad: 

But I'm thinking of a semi-automatic solution now: I will try creating two runlevels ("isp" and "desktop") and checking for it in preup() to set the MAC accordingly... Selection at boot is fine and enough for me.

----------

