Atribuir 2 ips em 1 placa de rede

1. Atribuir 2 ips em 1 placa de rede

Kleber Pimentel
viniciusrrbv

(usa Ubuntu)

Enviado em 30/09/2008 - 17:59h

Olá pessoal, preciso da ajuda de vcs...utilizo em meu servidor o ubuntu 7.04 e atribui mais 1 ip na minha placa de rede interna (etho) para criar uma subrede, onde minha rede principal é 192.168.1.0 e a subrede 192.168.2.0.
Mais o problema, é q o meu dhcp não está distribuindo os ips dinamicamente, mesmo eu adicionando o ip+mac, para minha subrede 192.168.2.0.
Gostaria da ajuda de vcs...
Obrigado.


  


2. Re: Atribuir 2 ips em 1 placa de rede

Antero.A.
lostsoul

(usa Slackware)

Enviado em 30/09/2008 - 20:08h

basta fazer ifconfig eth0 192.168.1.1 e ifconfig eth0:0 192.168.2.1


3. Re: Atribuir 2 ips em 1 placa de rede

Jakson Galeti
jgaleti

(usa Ubuntu)

Enviado em 01/10/2008 - 08:31h

Cara nos mostre como esta o seu /etc/dhcp.conf.
Deve estar parecido com o abaixo:

[root@teste root]# cat /etc/dhcpd.conf
server-identifier teste.br;
ddns-update-style ad-hoc;
default-lease-time 600;
max-lease-time 7200;
option broadcast-address 192.168.2.255;
option domain-name "teste.br";
option domain-name-servers 192.168.1.3, 192.168.1.5;
option routers 192.168.1.1, 192.168.2.1;
option subnet-mask 255.255.255.0;

subnet 192.168.1.0 netmask 255.255.255.0{
range 192.168.1.10 192.168.1.250;
default-lease-time 86400;
max-lease-time 172800;
option domain-name "teste.br";
option domain-name-servers 192.168.1.3, 192.168.1.5;
option netbios-name-servers 192.168.1.9;
option netbios-node-type 0x4;
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option smtp-server 192.168.1.3;
}
##ips reservados por mac.
host info58 {
hardware ethernet 00:FF:0e:EE:5E:07;
fixed-address 192.168.1.66;
}

subnet 192.168.2.0 netmask 255.255.255.0{
range 192.168.2.10 192.168.2.250;
default-lease-time 86400;
max-lease-time 172800;
option domain-name "teste.br";
option domain-name-servers 192.168.1.3, 192.168.1.5;
option netbios-name-servers 192.168.1.9;
option netbios-node-type 0x4;
option routers 192.168.2.1;
option subnet-mask 255.255.255.0;
option smtp-server 192.168.1.3;
}


4. Meu dhcp.conf

Kleber Pimentel
viniciusrrbv

(usa Ubuntu)

Enviado em 01/10/2008 - 09:18h

##Segue meu DHCP.CONF##

ddns-update-style none;

authoritative;

default-lease-time 604800;

max-lease-time 720000;

### option subnet-mask 255.255.255.0;

option routers 192.168.1.4;

option domain-name "objetivo.local";
option domain-name-servers 192.168.1.4, 200.255.255.65, 200.255.255.70;

#option domain-name-servers 192.168.2.4, 200.255.255.65, 200.255.255.70;

#########################################
## NEGAR ACESSO DE MACS NÃO CADASTRADOS##
deny unknown-clients;

## Rede local (eth0 - rede interna)
# subnet 192.168.1.0 netmask 255.255.255.0 {
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.20 192.168.1.254;
# option broadcast-address 192.168.1.255;
option broadcast-address 192.168.1.255;
# Laboratorio
group {
host lab01 {
fixed-address 192.168.1.51;
hardware ethernet 00:16:ec:f5:31:31;
}
host lab03 {
fixed-address 192.168.1.53;
hardware ethernet 00:14:D1:10:CE:1C;
}
host lab04 {
fixed-address 192.168.1.54;
hardware ethernet 00:14:D1:10:DD:F0;
}
host lab05 {
fixed-address 192.168.1.55;
hardware ethernet 00:14:D1:10:DD:EE;
}
host lab06 {
fixed-address 192.168.1.56;
hardware ethernet 00:08:54:DD:93:06;
}
host lab07 {
fixed-address 192.168.1.57;
hardware ethernet 00:14:D1:10:DB:52;
}
host lab08 {
fixed-address 192.168.1.58;
hardware ethernet 00:14:D1:10:D8:41;
}
host lab10 {
hardware ethernet 00:14:D1:10:DA:30;
fixed-address 192.168.1.60;
}
host lab11 {
hardware ethernet 00:14:D1:10:DD:ED;
fixed-address 192.168.1.61;
}
host lab12 {
hardware ethernet 00:14:D1:10:CF:E2;
fixed-address 192.168.1.62;
}
host lab13 {
hardware ethernet 00:14:d1:10:ce:1f;
fixed-address 192.168.1.63;
}
host lab14 {
hardware ethernet 00:14:D1:10:CC:CC;
fixed-address 192.168.1.64;
}
host lab15 {
hardware ethernet 00:14:D1:10:CE:20;
fixed-address 192.168.1.65;
}
host lab16 {
hardware ethernet 00:14:D1:10:D8:40;
fixed-address 192.168.1.66;
}
host lab17 {
hardware ethernet 00:14:D1:10:CF:E1;
fixed-address 192.168.1.70;
}
host lab18 {
hardware ethernet 00:14:D1:10:DD:F1;
fixed-address 192.168.1.68;
}
host lab19 {
hardware ethernet 00:08:54:17:69:69;
fixed-address 192.168.1.69;
}
host plutao {
hardware ethernet 00:04:75:b2:da:42;
fixed-address 192.168.1.102;
}
host lab02 {
hardware ethernet 00:14:D1:10:DB:51;
fixed-address 192.168.1.52;
}
host linux-educacional {
hardware ethernet 00:19:21:42:1e:8f;
fixed-address 192.168.2.100;
}
host linuxedu01 {
hardware ethernet 00:14:D1:10:DA:33;
fixed-address 192.168.1.201;
}
host lab09 {
hardware ethernet 00:14:D1:10:DA:32;
fixed-address 192.168.1.59;
}
}
# Servidores
group {
host jupiter {
hardware ethernet 00:14:2A:5A:AA:0F;
fixed-address 192.168.1.5;
}
host servidor {
hardware ethernet 00:11:43:FC:C3:4F;
fixed-address 192.168.1.1;
}
}
# GTI
group {
host digitacao01 {
hardware ethernet 00:08:54:d5:29:b7;
fixed-address 192.168.1.25;
}
host mw {
hardware ethernet 00:16:36:f8:74:5b;
fixed-address 192.168.1.24;
}
host laptop01 {
hardware ethernet 00:15:f2:22:04:cf;
fixed-address 192.168.1.22;
}
host dizinho-laptop {
hardware ethernet 00:13:a9:a3:b3:a7;
fixed-address 192.168.1.70;
}
# #Sub-rede para criação de máquinas virtuais e servidores virtuais##
host netuno {
hardware ethernet 00:19:21:42:1e:8f;
fixed-address 192.168.1.240;
}
}
# Administração
group {
host contabilidade {
hardware ethernet 00:04:75:b2:ef:20;
fixed-address 192.168.1.31;
}
host caixa {
hardware ethernet 00:0a:e6:8c:e0:fa;
fixed-address 192.168.1.30;
}
host diretoria01 {
hardware ethernet 00:0a:e6:67:dc:09;
fixed-address 192.168.1.32;
}
host recep01 {
hardware ethernet 00:08:54:dd:91:c2;
fixed-address 192.168.1.33;
}
host recep02 {
hardware ethernet 00:19:21:2d:40:cb;
fixed-address 192.168.1.34;
}
host recep03 {
hardware ethernet 00:19:21:46:26:6d;
fixed-address 192.168.1.35;
}
host rh01 {
hardware ethernet 00:0a:e6:67:e7:1f;
fixed-address 192.168.1.36;
}
host rh02 {
hardware ethernet 00:50:fc:5d:a4:58;
fixed-address 192.168.1.37;
}
}
# Escolar
group {
host digitacao02 {
hardware ethernet 00:0a:e6:68:61:cf;
fixed-address 192.168.1.40;
}
host emedio {
hardware ethernet 00:14:2a:5a:aa:56;
fixed-address 192.168.1.41;
}
host infantil01 {
hardware ethernet 00:0a:0d:d4:79:2d;
fixed-address 192.168.1.42;
}
host prof01 {
hardware ethernet 00:1c:25:a7:a1:ac;
fixed-address 192.168.1.43;
}
host prof02 {
hardware ethernet 00:1c:25:a7:d4:aa;
fixed-address 192.168.1.44;
}
host prof03 {
hardware ethernet 00:1c:25:a7:f2:f4;
fixed-address 192.168.1.45;
}
host sec01 {
hardware ethernet 00:16:ec:f6:28:a2;
fixed-address 192.168.1.46;
}
host sec02 {
hardware ethernet 00:0a:e6:69:11:9c;
fixed-address 192.168.1.47;
}
host dirpe01 {
hardware ethernet 00:e0:4d:82:08:6b;
fixed-address 192.168.1.254;
}
}
}

### Para Configurar as Maquinas que terao ip fixo, descomentar as linhas
### abaixo, e preencher com o endereco MAC das placas de rede e o ip
### desejado.
###
#host netuno.objetivo.local {
#hardware ethernet 00:19:21:42:1e:8f;
#fixed-address 192.168.1.240;
#}

## Enderecos IPs fixo emitidos pelo DHCP


host WBR-2310 {
hardware ethernet 00:1b:11:73:21:5b;
fixed-address 192.168.1.252;
}
host jefferson {
hardware ethernet 00:13:a9:c8:be:39;
fixed-address 192.168.1.250;
}
host kleber {
hardware ethernet 00:1d:72:48:d8:6e;
fixed-address 192.168.1.100;
}
host contabilidade01 {
hardware ethernet 00:08:54:18:eb:80;
fixed-address 192.168.1.21;
}
host teste01 {
hardware ethernet 00:48:54:1e:e0:5f;
fixed-address 192.168.1.202;
}
# subnet 192.168.2.0 netmask 255.255.255.0 {
#subnet 192.168.2.0 netmask 255.255.255.0 {
# range 192.168.2.10 192.168.2.254;
# }
# subnet 192.168.2.0 netmask 255.255.255.0 {
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.20 192.168.2.254;
option routers 192.168.2.4;

# Subrede 192.168.2.1
group {
}
}








Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts