Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Duas placas de rede/two network predictable name
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Luiz Lisboa
n00b
n00b


Joined: 19 Jul 2013
Posts: 2
Location: Rio Grande do Sul/Brasil

PostPosted: Fri Jul 19, 2013 8:54 pm    Post subject: Duas placas de rede/two network predictable name Reply with quote

Estou configurando um servidor Gentoo com o kernel novo, depois de entender como funciona a nomenclatura nova das placas de rede, estou com o seguinte problema:

Tenho duas placas de rede uma onboard(enp5s0) e outra offboard(enp4s0), foi configurado um ip para cada uma das placas. O problema é que está carregando os dois ips em uma placa só, sempre a última que é "startada", sendo que não foi feito nenhuma configuração para sobrecarga de ip.

Segue configuração do arquivo /etc/conf.d/net

config_enp4s0=( "10.3.2.242 netmask 255.255.255.0 broadcast 10.3.2.255" )
routes_enp4s0=( "default via 10.3.2.1")

config_enp5s0=( "10.3.2.66 netmask 255.255.255.0 broadcast 10.3.2.255" )
routes_enp5s0=( "default via 10.3.2.1")

Não fiz nenhuma configuração de associação de nomes no udev, só peguei os nomes gerados pelo "ifconfig -a", não sei se é necessário com essas mudanças de kernel.

Ainda está confuso para mim essas alterações no kernel.

Grato por qualquer ajuda.

---------------------------------------------------------------------------

I'm setting up a Gentoo server with the new kernel, once you understand how the naming of the new network cards, I have the following problem:

I have two network cards, one onboard (enp5s0) and other offboard (enp4s0), was set an ip to each of the plates. The problem is that is carrying the two ips on a single plate, which is always the last "startada", which has not been done any configuration to overload ip.

The following configuration file / etc / conf.d / net

config_enp4s0 = ("10.3.2.242 netmask 255.255.255.0 broadcast 10.3.2.255")
routes_enp4s0 = ("default via 10.3.2.1")

config_enp5s0 = ("10.3.2.66 netmask 255.255.255.0 broadcast 10.3.2.255")
routes_enp5s0 = ("default via 10.3.2.1")

I made not no binding configuration names in udev, just picked the names generated by "ifconfig-a", do not know if it is necessary with these kernel changes.

It's still confusing to me these changes in the kernel.

Grateful for any help.
_________________
Grato por qualquer ajuda.
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Sat Jul 20, 2013 12:54 am    Post subject: Re: Duas placas de rede/two network predictable name Reply with quote

I think you are speaking Portuguese. I will try to help you. I try to keep my talk simple so that Google translate will work.

The translation of your question is bad.

I think you have a computer with two network cards.

Do you want two cards to behave as one card? The one card will be faster. We call that "bonding".

The strange names for your network cards is because of UDEV

Speak in short sentences and the translation is better 8)

Cheers
Jon

------------------------------------------------------------------
Eu acho que você está falando Português. Vou tentar ajudá-lo. Eu tento manter minha conversa simples, para que o Google Translate funciona.

A tradução da sua pergunta é ruim.

Acho que você tem um computador com duas placas de rede.

Você quer dois cartões para se comportar como um cartão? A uma placa será mais rápido. Chamamos isso de "bonding".

Os nomes estranhos para suas placas de rede é por causa do udev

Falar em frases curtas ea tradução é melhor 8)

Saúde
Jon
Back to top
View user's profile Send private message
Luiz Lisboa
n00b
n00b


Joined: 19 Jul 2013
Posts: 2
Location: Rio Grande do Sul/Brasil

PostPosted: Sat Jul 20, 2013 2:18 am    Post subject: Reply with quote

Hello,

necessary that each plate has an ip.

but only the last "started" is working, with two IPs

precise their active, each with an ip

sorry for the english
---------------------------------------------------------

Preciso que cada uma das placas de rede tenha um ip.

Porém apenas a última "startada" fica ativa, mas com os dois IPs.

Preciso das duas ativas cada uma com seu IP.
_________________
Grato por qualquer ajuda.
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Sat Jul 20, 2013 12:21 pm    Post subject: Reply with quote

I understand what you are trying to do.

I think you need to use "policy based routing".

You will need three routing tables. One routing table for the whole system. One routing table for each network card. Each routing table has an identity number and each route will have the source address set to the network card it belongs to.

You will also need a few ip rules to force data traffic to work with the routes.

Add something like this to the end of /etc/conf.d/net:

Code:

postup() {

    # Create routing table
    ip route add ....
    ip route add ....

    # Insert ip rules and link to routing tables
    if [ "${IFACE}" = "enp4s0" ]; then
       
        ip route add ....
        ip rule add ....
        ip rule add ....

    fi

    # Insert ip rules and link to routing tables
    if [ "${IFACE}" = "enp5s0" ]; then
       
        ip route add ....
        ip rule add ....
        ip rule add ....

    fi

    return 0;

}


You will also take the routes out of your existing configuration.

If you only want a faster network then it is much easier to enable "bonding" and have one IP address for both network cards. Bonding is documented in net.example.

The above example is incomplete and you should add postdown() as well.

I hope this helps you.

Sorry for my Portuguese

Jon

Luiz Lisboa wrote:
Hello,

necessary that each plate has an ip.

but only the last "started" is working, with two IPs

precise their active, each with an ip

sorry for the english
---------------------------------------------------------

Preciso que cada uma das placas de rede tenha um ip.

Porém apenas a última "startada" fica ativa, mas com os dois IPs.

Preciso das duas ativas cada uma com seu IP.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum