ubuntu 802.1q Tagged VLan

http://ubuntuforums.org/showthread.php?t=703387

https://wiki.ubuntu.com/vlan

  • Virtual Local Area Network

Virtual Local Area Networks are used to devide a physical network into several broadcast domains.

Introduction

As you probably already understand, the reason to use vlan's is to divide a network and separate host's that shouldn't be able to access each other. This article will address the IEEE 802.1q standard way of doing this division.

There are two types of packets on a vlan, these are tagged and untagged packets. The untagged packet is a regular packet and looks just like a packet that exists on a regular network. Untagged packets is the most common type on a vlan. The decision of which vlan an untagged packet belongs to is made by the switch. A switch can be configured to assign specific ports to specific vlan's. The switch can also be configured to receive tagged packets.

If the switch receives a tagged packet and the port which it receives the packet with is configured to allow tagged packets, it knows which ports it can send the packet to.

A switch can also be configured to transmit tagged packets, this could be used to make a vlan span more than one switch or to make use of a vlan aware NIC (Network Interface Card) on a router, firewall, server or even a workstation.

A vlan is asigned a specific id this id can be anything between 1 and 4094. Vlan 1 is very often used for management so this should not be used.

Prerequisites

Variables needed to make use of vlan's. :)

Hardware

To be able to make use of vlan's you will need a switch (or several) that support the IEEE 802.1q standard. You will also need a NIC (Network Interface Card) that plays nice when used to transmit and receive tagged packets. Many NIC's do support 802.1q but some have trouble with the extra 4 bytes added to the packet when tagged packets are used.

Software

Ubuntu supports vlan's out of the box but a userspace tool needs to be installed to create the vlan aware interfaces.

Scenario

We have a router/firewall with two NIC's one used to connect to the Internet (WAN) and the other to connect to the local network (LAN). We would like to beef up the security aspect of our site and introduce a Demilitarized Zone (DMZ). If this should be implemented without the use of vlan's we would have to buy a new switch and a third NIC for our router/firewall.

Luckily the switch used supports 802.1q. The switch configuration is done by adding a new vlan. How this is done should be documented in the switch documentation.

Networks

  • WAN 172.16.0.0/24
  • LAN 192.168.0.0/24
  • DMZ 10.0.0.0/24

Installation

sudo apt-get install vlan

Configuration

Load the 8021q module into the kernel.

sudo modprobe 8021q

Create a new interface that is a member of a specific vlan, vlan id 10 is used.

sudo vconfig add eth1 10

Assigning an address to the new interface.

sudo ifconfig eth1.10 10.0.0.1 netmask 255.255.255.0

Making it permanent

To make this setup permanent, some lines has to be added to some configuration files.

Add the module to the kernel on boot.

sudo su -c 'echo "8021q" >> /etc/modules'

Create the interface and make it available during the boot. Add the following lines to /etc/network/interfaces

auto eth1.10
iface eth1.10 inet static
address 10.0.0.1
netmask 255.255.255.0
vlan-raw-device eth1


http://onvox.net/linux/how-to-enable-8021q-vlan-tagging-in-ubuntu

Posted by 눈빛마음

2010/04/05 09:25 2010/04/05 09:25
, , ,
Response
No Trackback , No Comment
RSS :
http://iz.apgu.co.kr/tc/rss/response/536

crontab 옵션 지정법

출처 : http://k.daum.net/qna/view.html?qid=3ysRA

2) crontab 파일 형식
----------    ----------  ---------------------------------------------------
  필  드                 의  미           범  위
----------    ----------  ---------------------------------------------------
첫 번째                      분              0-59
두 번째                      시              0-23
세 번째                      일              0-31
네 번째                      월              1-12
다섯 번째                  요일             0-7 (0 또는 7=일요일, 1=월, 2=화, ...)
여섯 번째                명령어             실행할 명령을 한줄로 쓴다.
----------    ----------  ---------------------------------------------------

Posted by 눈빛마음

2010/02/08 14:44 2010/02/08 14:44
, , ,
Response
No Trackback , No Comment
RSS :
http://iz.apgu.co.kr/tc/rss/response/525

disable arp

linux 에서 arp 응답안하게 하는 방법

http://www.nabble.com/Disable-ARP-td13222034.html

ifconfig lo -arp
ip link set lo:1 arp off

Agreed, if you configure the IP on the loopback interface then add the following sysctl options it'll probably work how you want it to:

net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2


preup() {
        /sbin/ifconfig dummy0 -arp;
        return 0
        }

config_dummy0=( "ipaddress" )

Posted by 눈빛마음

2008/01/28 21:45 2008/01/28 21:45
, ,
Response
No Trackback , a comment
RSS :
http://iz.apgu.co.kr/tc/rss/response/367

나중에 더 자세한 이야기를 하는 것으로 하고
screen 을 쓸때는 2가지를 기억하세요.

screen -S 세션명
screen -r 세션명



Ctrl-a, c : (create) 새로운 쉘이 생기면서 그 쉘로 이동
Ctrl-a, a : 바로 전 창으로 이동
Ctrl-a, n : (next) 다음 창으로 이동
Ctrl-a, p : (previous) 이전 창으로 이동
Ctrl-a, 숫자 : 숫자에 해당하는 창으로 이동
Ctrl-a, d : (detach) screen 세션에서 빠져나옴
Ctrl-a, x : lock screen

Ctrl-a, S : (split) 창을 나눔 (region)
Ctrl-a, Tab : 다른 region으로 이동
Ctrl-a, Q : 현재 region을 제외한 나머지 숨기기

Posted by 눈빛마음

2006/10/18 13:22 2006/10/18 13:22
,
Response
No Trackback , No Comment
RSS :
http://iz.apgu.co.kr/tc/rss/response/235

tmpfs 지정지 사이즈 지정

tmpfs 지정지 옵션을 주지 않으면 사이즈가 작게 잡힌다.
이때 도움이 될만한 옵션을 이야기 하면..

mount -o size=1024M 이렇게 옵션을 추가해주면 된다.


make oldconfig
이 설정 옵션은 새로운 2.6 커널들을 컴파일 하면서 굉장히 유용할 것입니다. 대강 훑어 보면 'make config' 와 동일하게 보이지만 'oldconfig' 는 현재 .config 설정을 읽어와 기존 설정을 바탕으로 자동으로 설정하고 새로운 설정 선택사항만 보여줍니다. 이 설정 옵션을 사용하기 위해 간단히 이전의 .config 파일을 복사하고 'make oldconfig' 명령을 입력합니다.

Posted by 눈빛마음

2006/09/26 10:31 2006/09/26 10:31
,
Response
No Trackback , No Comment
RSS :
http://iz.apgu.co.kr/tc/rss/response/230


블로그 이미지

눈빛마음의 사색공간

- 눈빛마음

Archives

Calendar

«   2010/08   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Site Stats

Total hits:
292910
Today:
41
Yesterday:
81