{"id":793,"date":"2015-02-21T23:57:13","date_gmt":"2015-02-21T22:57:13","guid":{"rendered":"http:\/\/blog.techmedia.pl\/?p=793"},"modified":"2017-11-16T22:59:43","modified_gmt":"2017-11-16T21:59:43","slug":"ubuntu-14-04-instalacja-vlanow","status":"publish","type":"post","link":"https:\/\/www.techmedia.pl\/blog\/ubuntu-14-04-instalacja-vlanow\/","title":{"rendered":"Ubuntu 14.04 instalacja VLAN&#8217;\u00f3w"},"content":{"rendered":"<p>Instalacja i konfiguracja wirtualnych sieci LAN w Ubuntu.<\/p>\n<p>1) Instalujemy wymagane pakiety:<\/p>\n<pre>root@server:\/# <strong>apt-get install vlan<\/strong><\/pre>\n<p>2) \u0141adujemy modu\u0142 VLAN do kernela:<!--more--><\/p>\n<pre>root@server:\/# <strong>modprobe 8021q<\/strong><\/pre>\n<p>\u00a0Warto doda\u0107 modu\u0142 na sta\u0142e do kernela, \u017ceby by\u0142 \u0142adowany przy starcie systemu:<\/p>\n<pre>root@server:\/# <strong>echo \"8021q\" &gt;&gt; \/etc\/modules<\/strong><\/pre>\n<p>3) Edytujemy plik <span style=\"color: #ff0000;\">\/etc\/network\/interfaces<\/span> i dodajemy konfiguracj\u0119 dla VLAN&#8217;u (w przyk\u0142adzie tworzymy VLAN o id 20 na interfejsie eth0):<\/p>\n<pre>auto vlan20\r\niface vlan20 inet static\r\n\u00a0\u00a0\u00a0 address 192.168.1.1\r\n\u00a0\u00a0\u00a0 netmask 255.255.255.0\r\n\u00a0\u00a0\u00a0 network 192.168.1.0\r\n\u00a0\u00a0\u00a0 broadcast 192.168.1.255\r\n\u00a0\u00a0\u00a0 vlan_raw_device eth0<\/pre>\n<p>4) Podnosimy nowy interfejs VLAN:<\/p>\n<pre>root@server:\/# <strong>ifup vlan20<\/strong><\/pre>\n<p>Nale\u017cy pami\u0119ta\u0107, \u017ce wykorzysta\u0107 VLAN&#8217;y mo\u017cemy tylko w\u00f3wczas, gdy posiadamy zarz\u0105dzalne prze\u0142\u0105czniki obs\u0142uguj\u0105ce VLAN&#8217;y. Dzi\u0119ki temu na jednej fizycznej infrastrukturze mo\u017cemy stworzy\u0107 dwie lub wi\u0119cej logicznych, w pe\u0142ni odseparowanych od siebie sieci.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Instalacja i konfiguracja wirtualnych sieci LAN w Ubuntu. 1) Instalujemy wymagane pakiety: root@server:\/# apt-get install vlan 2) \u0141adujemy modu\u0142 VLAN do kernela:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[75,98,167],"yst_prominent_words":[],"_links":{"self":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/793"}],"collection":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/comments?post=793"}],"version-history":[{"count":5,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/793\/revisions"}],"predecessor-version":[{"id":2269,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/793\/revisions\/2269"}],"wp:attachment":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/media?parent=793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/categories?post=793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/tags?post=793"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}