#Vlan in Debian Ubuntu Ionel Mocanu Vlan-uri in Ubuntu — Ionel Mocanu
Skip to content
 

Vlan-uri in Ubuntu

Se instaleaza vlan:

root@EAST:~# apt-get install vlan

Se incarca modulul 8021q in kernel:

root@EAST:~# modprobe 8021q

root@EAST:~# sh -c 'grep -q 8021q /etc/modules || echo 8021q >> /etc/modules'

Se editeaza fisierul /etc/network/interfaces

# The loopback network interface

auto lo

iface lo inet loopback

# The primary network interface

auto eth1

iface eth1 inet static

address 192.168.102.101

netmask 255.255.255.0

network 192.168.102.0

broadcast 192.168.102.255

gateway 192.168.102.254

dns-nameserver 8.8.8.8

# VLAN 4

auto vlan4

iface vlan4 inet static

address 172.16.40.25

netmask 255.255.255.248

network 172.16.40.24

broadcast 172.16.40.31

vlan_raw_device eth2

# VLAN 5

auto vlan5

iface vlan5 inet static

address 10.0.0.1

netmask 255.255.255.0

network 10.0.0.0

broadcast 10.0.0.255

mtu 1500

vlan_raw_device eth2

root@EAST:~# /etc/init.d/networking restart

* Reconfiguring network interfaces...

ssh start/running, process 1400

Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config

Added VLAN with VID == 4 to IF -:eth2:-

ssh stop/waiting

ssh start/running, process 1465

Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config

Added VLAN with VID == 5 to IF -:eth2:-

ssh stop/waiting

ssh start/running, process 1530

[ OK ]

Vlan-urile sunt vizibile:

root@EAST:~# cat /proc/net/vlan/config

VLAN Dev name | VLAN ID

Name-Type: VLAN_NAME_TYPE_PLUS_VID_NO_PAD

vlan4 | 4 | eth2

vlan5 | 5 | eth2

2 Comments

  1. […] This post was mentioned on Twitter by Mihai, Poolix Marx. Poolix Marx said: Vlan-uri in Ubuntu http://t.co/lccQ1zP […]

  2. Bungust says:

    5 motive pentru Ubuntu in loc de windows? Daca sunt suficient de bune, ma convertesc.

Leave a Reply to Tweets that mention Vlan in Debian Ubuntu | Ionel Mocanu -- Topsy.com