Router VLAN pada debian

Hal ini sengaja saya tulis sebagai pengingat saja, sorry klo kurang jelas bagi anda 😀

Cara ini saya lakukan karena adanya kerusakan pada switch Gigabit di Lab saya, sedangkan konverter Fiber Optik yang ada hanya bisa ngomong (berkomunikasi) dengan GigabitEthernet, akhirnya saya mencari komputer korban (tentunya yang punya GigabitEthernet) untuk dijadikan router sementara.
Sebagai informasi, VLAN yang sudah ada pada cicso switch di Lab adalah bernama 67, 90, 91, 92, 93, 94.

  1. Install vlan pada debian
  2. root@constantine:~# apt-get install vlan

  3. Load kernel module agar ethernet interface pada debian support protokol VLAN
  4. root@constantine:~# modprobe 8021q

  5. Setting aliasing pada ethernet interface sesuai database VLAN yg ada
  6. root@constantine:~# mcedit /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # Gigabit Ethernet - nyambung nang Konverter FO
    auto eth0
    iface eth0 inet static
    address 10.122.254.2
    netmask 255.255.255.248
    gateway 10.122.254.1

    # Ethernet - nyambung nang switch cisco, ini yang mau aliaskan dg berbagai VLAN yg ada
    # auto eth1 !!! PERHATIKAN BAHWA BARIS INI JUGA DI COMMENT !!!

    # VLAN 67
    auto eth1.67
    iface eth1.67 inet static
    address 10.122.67.1
    netmask 255.255.255.0
    network 10.122.67.0
    broadcast 10.122.67.255
    mtu 1500
    vlan_raw_device eth1

    # VLAN 90
    auto eth1.90
    iface eth1.90 inet static
    address 10.122.90.1
    netmask 255.255.255.0
    network 10.122.90.0
    broadcast 10.122.90.255
    mtu 1500
    vlan_raw_device eth1

    # VLAN 91
    auto eth1.91
    iface eth1.91 inet static
    address 10.122.91.1
    netmask 255.255.255.0
    network 10.122.91.0
    broadcast 10.122.91.255
    mtu 1500
    vlan_raw_device eth1

    # VLAN 92
    auto eth1.92
    iface eth1.92 inet static
    address 10.122.92.1
    netmask 255.255.255.0
    network 10.122.92.0
    broadcast 10.122.92.255
    mtu 1500
    vlan_raw_device eth1

    # VLAN 93
    auto eth1.93
    iface eth1.93 inet static
    address 10.122.92.1
    netmask 255.255.255.0
    network 10.122.92.0
    broadcast 10.122.92.255
    mtu 1500
    vlan_raw_device eth1

    # VLAN 94
    auto eth1.94
    iface eth1.94 inet static
    address 10.122.92.1
    netmask 255.255.255.0
    network 10.122.92.0
    broadcast 10.122.92.255
    mtu 1500
    vlan_raw_device eth1

  7. Restart Networking anda
  8. root@constantine:~# /etc/init.d/networking restart

    Jika tidak ada pesan error, dan muncul pesan spt dibawah ini, brarti anda sudah berhasil.

    * Reconfiguring network interfaces...Removed VLAN -:eth1.67:-
    Removed VLAN -:eth1.90:-
    Removed VLAN -:eth1.91:-
    Removed VLAN -:eth1.92:-
    Removed VLAN -:eth1.93:-
    Removed VLAN -:eth1.94:-
    Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
    Added VLAN with VID == 67 to IF -:eth1:-
    Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
    Added VLAN with VID == 90 to IF -:eth1:-
    Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
    Added VLAN with VID == 91 to IF -:eth1:-
    Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
    Added VLAN with VID == 92 to IF -:eth1:-
    Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
    Added VLAN with VID == 93 to IF -:eth1:-
    Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
    Added VLAN with VID == 94 to IF -:eth1:-

  9. Restart linux anda
  10. root@constantine:~# reboot

  11. Cek konfigurasi network interface anda
  12. Perhatikan bahwa eth1 sdh tdk mempunyai IP Address lagi.

    root@constantine:~# ifconfig -a
    eth0 Link encap:Ethernet HWaddr 00:04:23:b9:0c:34
    inet addr:10.122.254.2 Bcast:10.122.254.7 Mask:255.255.255.248
    inet6 addr: fe80::204:23ff:feb9:c34/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:844344 errors:0 dropped:0 overruns:0 frame:0
    TX packets:483489 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1181024982 (1.0 GB) TX bytes:39028632 (37.2 MB)
    Base address:0xac00 Memory:fbfe0000-fc000000

    eth1 Link encap:Ethernet HWaddr 00:04:23:b9:0c:35
    inet6 addr: fe80::204:23ff:feb9:c35/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:484878 errors:0 dropped:0 overruns:0 frame:0
    TX packets:846101 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:39082386 (37.2 MB) TX bytes:1181310388 (1.1 GB)

    eth1.67 Link encap:Ethernet HWaddr 00:04:23:b9:0c:35
    inet addr:10.122.67.1 Bcast:10.122.67.255 Mask:255.255.255.0
    inet6 addr: fe80::204:23ff:feb9:c35/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:484262 errors:0 dropped:0 overruns:0 frame:0
    TX packets:845902 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:32255841 (30.7 MB) TX bytes:1181281683 (1.1 GB)

    eth1.90 Link encap:Ethernet HWaddr 00:04:23:b9:0c:35
    inet addr:10.122.90.1 Bcast:10.122.90.255 Mask:255.255.255.0
    inet6 addr: fe80::204:23ff:feb9:c35/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:360 errors:0 dropped:0 overruns:0 frame:0
    TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:19395 (18.9 KB) TX bytes:9555 (9.3 KB)

    eth1.91 Link encap:Ethernet HWaddr 00:04:23:b9:0c:35
    inet addr:10.122.91.1 Bcast:10.122.91.255 Mask:255.255.255.0
    inet6 addr: fe80::204:23ff:feb9:c35/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:8849 (8.6 KB)

    eth1.92 Link encap:Ethernet HWaddr 00:04:23:b9:0c:35
    inet addr:10.122.92.1 Bcast:10.122.92.255 Mask:255.255.255.0
    inet6 addr: fe80::204:23ff:feb9:c35/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:8849 (8.6 KB)

    eth1.93 Link encap:Ethernet HWaddr 00:04:23:b9:0c:35
    inet addr:10.122.92.1 Bcast:10.122.92.255 Mask:255.255.255.0
    inet6 addr: fe80::204:23ff:feb9:c35/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:256 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:18858 (18.4 KB) TX bytes:492 (492.0 B)

    eth1.94 Link encap:Ethernet HWaddr 00:04:23:b9:0c:35
    inet addr:10.122.92.1 Bcast:10.122.92.255 Mask:255.255.255.0
    inet6 addr: fe80::204:23ff:feb9:c35/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:492 (492.0 B)

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:868 errors:0 dropped:0 overruns:0 frame:0
    TX packets:868 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:74686 (72.9 KB) TX bytes:74686 (72.9 KB)

Referensi :
http://www.go2linux.org/vlan-with-debian
http://www.mysidenotes.com/?p=6
man vconfig

Advertisements
  1. 16 November 2009 at 2:46 pm

    hai.. Aku punya situs Tutorial Mikrotik. Isinya tentang Kuliah Mikrotik. Silahkan mampir ya kalo ada waktu.. 🙂

  2. 1 January 2010 at 7:38 am

    [..]berita santai lebih mudah untuk dipahami orang awam seperti saya[..]

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: