Enviado em 22/12/2015 - 13:38h
Pessoal, tudo bem?
DEVICE=eth0
TYPE=Ethernet
UUID=c2f9a57c-c890-4ac2-a2d5-3ddbac85d6da
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
HWADDR=00:0C:29:BF:68:E6
IPADDR=192.168.0.10
PREFIX=24
GATEWAY=192.168.0.1
DNS1=192.168.0.20
DNS2=192.168.0.1
DNS3=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
DEVICE=eth0.10
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.0.10
PREFIX=24
GATEWAY=192.168.10.1
DNS1=192.168.0.20
DNS2=192.168.0.1
DNS3=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0.10
VLAN=yes
VLAN=yes
NETWORKING=yes
HOSTNAME=local
GATEWAY=192.168.0.1
DHCPDARGS="eth0 eth0.10";
#!/bin/bash
VCONFIG=/sbin/vconfig
$VCONFIG add eth0 10
ifconfig eth0.10 192.168.10.1 netmask 255.255.255.0 up
route add default gw 192.168.0.1
echo "Criado rota DEFAULT"
route add -net 192.168.10.0/24 gw 192.168.0.1
echo "Criado rota VLAN 10"
service network restart
service dhcpd restart
exit 0
eth0 Link encap:Ethernet Endereço de HW 00:0C:29:BF:68:E6
inet end.: 192.168.0.10 Bcast:192.168.0.255 Masc:255.255.255.0
endereço inet6: fe80::20c:29ff:febf:68e6/64 Escopo:Link
UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1
RX packets:3011 errors:0 dropped:0 overruns:0 frame:0
TX packets:1169 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:1000
RX bytes:317391 (309.9 KiB) TX bytes:195895 (191.3 KiB)
eth0.10 Link encap:Ethernet Endereço de HW 00:0C:29:BF:68:E6
inet end.: 192.168.0.10 Bcast:192.168.0.255 Masc:255.255.255.0
endereço inet6: fe80::20c:29ff:febf:68e6/64 Escopo:Link
UP BROADCASTRUNNING MULTICAST MTU:1500 Métrica:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
colisões:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:900 (900.0 b)
ddns-update-style none;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
log-facility local7;
option domain-name "local";
option domain-name-servers 192.168.0.20, 192.168.0.1, 8.8.8.8;
# Configurando escopo DHCP.
##PLACA PRINCIPAL DHCP ETH0
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.199;
option subnet-mask 255.255.255.0;
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
}
## VLAN 10 - ADMINISTRATIVO
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.100 192.168.10.199;
option subnet-mask 255.255.255.0;
option routers 192.168.10.1;
option broadcast-address 192.168.10.255;
}
Configuração de IP do Windows
Adaptador Ethernet OnBoad:
Sufixo DNS específico de conexão. . . . . . : local
Endereço IPv4. . . . . . . . . . . . . . : 192.168.0.101
Máscara de Sub-rede . . . . . . . . . . . . : 255.255.255.0
Gateway Padrão. . . . . . . . . . . . . . . : 192.168.0.1
Adaptador Ethernet OffBoard:
Sufixo DNS específico de conexão. . . . . . : local
Endereço IPv4. . . . . . . . . . . . . . . : 192.168.10.100
Máscara de Sub-rede . . . . . . . . . . . . : 255.255.255.0
Gateway Padrão. . . . . . . . . . . . . . . : 192.168.10.1