VLAN on OpenSuse 11 then DHCP Query

hi all

basing on the research and trial and error which am still on the trial stage with errors:|
here’s the scenario

We have 5 VLAN’s with and existing Windows DHCP
Server, that serves 5 Scopes for the 5 VLAN’s 192.168.100.x and 192.168.200.x IP Addressess

evrything works well on our Windows DHCP server, what i want to do is replace our windows dhcp server with a linux box , with one NIC , ive read about VLAN on linux 802.xx something and VLAN Tagging am already confused on what to do…

what i want to ask you guys is an assistance implementation the vLAN on linux then the dhcpd.conf

hope its not too much to ask…

thanks in advance

btw

You should set up Linux to be on the VLANs as if they were physical interfaces. As indicated in the VLAN tutes you need to put Linux on a trunking port on the switch. Other than the fact that the interfaces are virtual, it should be exactly like having multiple physical interfaces, i.e. each interface has its own address, and you should be able to ping other hosts in each of the subnets.

Then set up the DHCP server to listen on all of those virtual interfaces.

i can ping the vlans i created but im having issues after the restart it wont save the configs

ive done some research like this
YaST/Network/11.0-vlan - openSUSE

but how can this machine serve ip’s when it has no ip address

also tried this but still i can’t save the configs (VLANS Created)

1. Connect the eth0 interface of your linux machine to the switch.
2. Remove the IP Address information on the eth0 interface

# ifconfig eth0 0.0.0.0
# ifconfig eth0 up

3. Configure 2 VLANs on the eth0 interface using vconfig as follows (100,200 are the VLAN id's). If the 8021q.o module is not loaded, the vconfig command (when invoked first time) will automatically load the module.

# vconfig add eth0 100
# vconfig add eth0 200 

4. Configure IP on the VLAN interfaces 

# ifconfig eth0.100 xxx.xxx.xxx.xxx netmask 255.255.252.0 up
# ifconfig eth0.200 yyy.yyy.yyy.yyy netmask 255.255.255.0 up

5. Preserve the vlan configuration across reboots by adding it to configuration files. Create the appropriate ifcfg files for eth0, eth0.100 and eth0.200 in /etc/sysconfig/network-scripts/

# cd /etc/sysconfig/network-scripts/

Contents of ifcfg-eth0
DEVICE=eth0
ONBOOT=no
TYPE=Ethernet

Contents of ifcfg-eth0.100
DEVICE=eth0.100
IPADDR=xxx.xxx.xxx.xxx
NETMASK=255.255.252.0
VLAN=yes
ONBOOT=yes
BOOTPROTO=none

Contents of ifcfg-eth0.200
DEVICE=eth0.200
IPADDR=yyy.yyy.yyy.yyy
NETMASK=255.255.0.0
VLAN=yes
ONBOOT=yes
BOOTPROTO=none

Update /etc/sysconfig/network file to make the GATEWAYDEV use the public vlan interface.

Contents of /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=un1xf00
GATEWAY=xxx.xxx.xxx.1
DOMAINNAME=dev.un1xf00.com
GATEWAYDEV=eth0.100


6. The VLAN configuration on the server can be verified in the file /proc/net/vlan/config. Sample contents are shown below.

VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.100 | 100 | eth0
eth0.200 | 200 | eth0
    	  	

The server has multiple IP addresses, the ones you assigned to the virtual interfaces. Addresses are not tied to machines, they are tied to interfaces.

YaST/Network/11.0-vlan - openSUSE

so am on the right track here? on this link?

problem next is how to save the vlans after a restart or # service network restart command

If the command “ip addr” shows multiple virtual interfaces, each with its own IP address, and you can ping the subnets then I would say you have it configured.

oki sir ill give it a try tomorrow and post feedbacks…

hi sirs

still no luck

after i restart the network services all my vlans disappear , tried editing/created ifcfg-eth0.vlanxx (XX-vlan id)

but still after a service network restart command all is gone

as of now am stuck here…:’( …
no retreat no surrender;)

Question sirs

Do i need to implement Linux VLAN or just DHCPD?

on my issue?

You have two problems to solve.

  1. How to persist the VLAN configuration
  2. Setting up DHCPD to listen on the virtual interfaces

The latter is no different from DHCPD on multiple interfaces, so essentially you have only one problem.

okey sir

So this 1st? = 1. How to persist the VLAN configuration = ???

:’( :’(:’(

That I don’t know. Is it deleting the virtual interface config files, or just ignoring them? You might want to look at the scripts that bring up network interfaces to see if the interfaces have to be named in a certain way. Perhaps eth0-100 or something like that? Don’t believe everything you read in tutes. Verify the facts yourself.

Use Yast - Network Devices - Network Settings.
Set networking to ifup, if not already done so. Your device(s) should be visible in the Overview tab. Click Add, select VLAN for the device. Configure to your needs, accept, OK, reboot and the changes should be persisten, with VLAN devices configured.
This just from looking in Yast, don’t know your details.

i will try this again on YAST sirs

YaST/Network/11.0-vlan - openSUSE on this tute

but how will i add this to the physical NIC when only 1 vlan can be added to the NIC

Surely you just repeat the process for the second, third and so on VLAN IDs? I don’t see where it states that you can only attach one VLAN per NIC.

oki trying this out again tomorrow…ill stick to the YAST adding vlans,

so i dont put static ip on the eth0? ryt?

ill post screenshots