Linux/Ubuntu2011. 11. 5. 23:55
vlan은 우분투에서 vlan 패키지로 vconfig라는 프로그램을 제공하게 된다.

$ vconfig
'vconfig' 프로그램은 현재 설치되어 있지 않습니다.  다음을 입력하여 이를 설치할 수 있습니다:
sudo apt-get install vlan

$ sudo apt-get install vlan
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음 새 패키지를 설치할 것입니다:
  vlan
0개 업그레이드, 1개 새로 설치, 0개 지우기 및 2개 업그레이드 안 함.
40.3k바이트 아카이브를 받아야 합니다.
이 작업 후 180k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu/ lucid/main vlan 1.9-3ubuntu3 [40.3kB]
내려받기 40.3k바이트, 소요시간 0초 (242k바이트/초)
전에 선택하지 않은 vlan 패키지를 선택합니다.
(데이터베이스 읽는중 ...현재 185765개의 파일과 디렉토리가 설치되어 있습니다.)
vlan 패키지를 푸는 중입니다 (.../vlan_1.9-3ubuntu3_i386.deb에서) ...
man-db에 대한 트리거를 처리하는 중입니다 ...
vlan (1.9-3ubuntu3) 설정하는 중입니다 ...

$ vconfig
Expecting argc to be 3-5, inclusive.  Was: 1

Usage: add             [interface-name] [vlan_id]
       rem             [vlan-name]
       set_flag        [interface-name] [flag-num]       [0 | 1]
       set_egress_map  [vlan-name]      [skb_priority]   [vlan_qos]
       set_ingress_map [vlan-name]      [skb_priority]   [vlan_qos]
       set_name_type   [name-type]

* The [interface-name] is the name of the ethernet card that hosts
  the VLAN you are talking about.
* The vlan_id is the identifier (0-4095) of the VLAN you are operating on.
* skb_priority is the priority in the socket buffer (sk_buff).
* vlan_qos is the 3 bit priority in the VLAN header
* name-type:  VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
              DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
* FLAGS:  1 REORDER_HDR  When this is set, the VLAN device will move the
            ethernet header around to make it look exactly like a real
            ethernet device.  This may help programs such as DHCPd which
            read the raw ethernet packet and make assumptions about the
            location of bytes.  If you don't need it, don't turn it on, because
            there will be at least a small performance degradation.  Default
            is OFF.

$ sudo modprobe 8021q

$ lsmod | grep 8021q
8021q                  18564  0 
garp                    6284  1 8021q

$ sudo vconfig add eth0 10
Added VLAN with VID == 10 to IF -:eth0:-

$ sudo ifconfig eth0.10 10.0.0.1 netmask 255.255.255.0

$ ifconfig
eth0.10   Link encap:Ethernet  HWaddr 00:e0:91:0b:75:8c  
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:91ff:fe0b:758c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:2110 (2.1 KB) 

[링크 : https://wiki.ubuntu.com/vlan]

'Linux > Ubuntu' 카테고리의 다른 글

vlan 1은 지원안함?  (0) 2011.11.06
ip alias on ubuntu  (0) 2011.11.05
netbeans package - ubuntu  (0) 2011.10.22
sudo timeout 늘리기  (0) 2011.10.05
리눅스에서 하드 I/O 사용량 측정하는 방법  (0) 2011.09.27
Posted by 구차니