LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to set Routing and DNS for VLAN? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-set-routing-and-dns-for-vlan-4175509398/)

paulus89 06-27-2014 10:12 AM

how to set Routing and DNS for VLAN?
 
Dear All,

I have my Eth0+Eth1 (Bond0) bonding as follow:

== bond0
BOOTPROTO=none
NAME=""
BONDING_OPTS=mode=0
NM_CONTROLLED=no
MACADDR=""
IPV6INIT=no
DEVICE=bond0
MTU=""
NETMASK=255.255.255.0
BROADCAST=10.100.100.255
IPADDR=10.100.100.3
NETWORK=10.100.100.0
DNS1=10.100.100.6
USERCTL=no
ONBOOT=yes

== eth0
BOOTPROTO=none
MASTER=bond0
USERCTL=no
ONBOOT=yes
SLAVE=yes
DEVICE=eth0

== eth1
BOOTPROTO=none
MASTER=bond0
USERCTL=no
ONBOOT=yes
SLAVE=yes
DEVICE=eth1

and I also create VLAN in Eth0 as follow:

=== eth0.1
NAME=""
BOOTPROTO=none
MACADDR=""
IPV6INIT=no
DEVICE=eth0.1
MTU=""
NETMASK=255.255.255.192
BROADCAST=192.168.2.63
IPADDR=192.168.2.3
VLAN=yes
NETWORK=192.168.2.0
ONBOOT=yes
USERCTL=no


how to set Routing and DNS for VLAN?

Please help

Thanks

Pau

canussie 06-27-2014 10:58 AM

In the interface configruation file set "GATEWAY=<your router>"

Put the DNS information in /etc/resolv.conf.

paulus89 06-27-2014 11:58 AM

Thank you..

LAN 192.168.1.0/24 Gateway 192.168.1.1 (Server DHCP, Squid, DNS are in the same box @192.168.1.1)
VLAN 192.168.2.0/24

User on LAN 192.168.1.0/24 are allowed for internet browsing neither do for VLAN User (192.168.2.0/24)

Server and VLAN are in the same Managed Switch and there is a jumper cable to UnManaged Switch to connect LAN Users to the server

Currently, LAN users are unable to do internet browsing.. what's wrong?..
Could you or any body please help..?

Note. I am using Managed Switch HP Switch 1810-8G v2.

Thank you
Pau


All times are GMT -5. The time now is 06:23 AM.