You are on page 1of 4

AdCommLab 05

Mart 2012, v1.01


AdCommLa
b

05
Microcore Linux + Open vSwitch i Virtuelne računarske mreže (VLAN)

Cilj vežbe

Cilj vežbe je konfiguracija mreže sa dva Virtuelna LAN-a.

A virtual local area network, virtual LAN or VLAN, is a group of hosts with a common set of
requirements, which communicate as if they were attached to the same broadcast domain,
regardless of their physical location. A VLAN has the same attributes as a physical local area
network (LAN), but it allows for end stations to be grouped together even if not on the same
network switch. VLAN membership can be configured through software instead of physically
relocating devices or connections.

Open vSwitch is a production quality, multilayer virtual switch licensed under the open source
Apache 2.0 license. It is designed to enable massive network automation through programmatic
extension, while still supporting standard management interfaces and protocols (e.g. NetFlow,
sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to support distribution across
multiple physical servers similar to VMware's vNetwork distributed vswitch or Cisco's Nexus
1000V.

Kreiranje projekta i osnovna podešavanja

GNS3 – Graphical Network Simulator

Pokrenuti GNS3. U prozoru upisati naziv projekta AdCommLab05_VLAN_Basic i čekirati opciju


Save IOS startup configuration i Save nvrams and virtual hard drives (Napomena: čekiranje
opcija je veoma važno da bi se konfiguracija uređaja u scenariju mogla snimati u odgovarajuće
fajlove)

Kreiranje mreže

Kreiranje čvorova za scenario se vrši uz pomoć Qemu emulatora i imidža sa Microcore Linux-om
Quagga ruting i Open vSwitch svičing softverom.

Opcija menija Edit > Preferences i unos imidž fajla. Opcija Identifier name treba da se podesi na
Microtic, a Binary image na linux-microcore-4.0-openvswitch-1.2.2-quagga-
0.99.20.img, koji se nalazi na lokaciji C:\GNS3_Labs\IOSImages. Zatim kliknuti na opciju Save.

Tehnički fakultet “Mihajlo Pupin” – Zrenjanin


AdCommLab 05
Mart 2012, v1.01

Podešavanje scenarija

1) Openvswitch configuration
Login is tc without password set.

a) Let’s create bridge br0


sudo ovs-vsctl add-br br0

b) Add access port eth0 to the bridge br0 and assign it to VLAN 10
sudo ovs-vsctl add-port br0 br0 eth0 tag=10

c) Assign remaining ports to the br0

Tehnički fakultet “Mihajlo Pupin” – Zrenjanin


AdCommLab 05
Mart 2012, v1.01
sudo ovs-vsctl add-port br0 eth2 tag=10
sudo ovs-vsctl add-port br0 eth1 tag=20
sudo ovs-vsctl add-port br0 eth3 tag=20

d) Assign hostname to Microcore


sudo hostname openvswitch
echo "hostname openvswitch" >> /opt/bootlocal.sh

e) Save conf.db file to keep it persistent after the next reboot of Microcore Linux
/usr/bin/filetool.sh -b

2) PC1 configuration
Login is tc without password set.
Assign IP address 192.168.1.1/24 to eth0 and make it persistent after next reboot of Microcore
sudo hostname PC1
sudo ifconfig eth0 192.168.1.1 netmask 255.255.255.0
echo "hostname PC1" >> /opt/bootlocal.sh
echo "ifconfig eth0 192.168.1.1 netmask 255.255.255.0" >> /opt/bootlocal.sh

/usr/bin/filetool.sh -b

3) PC2 to PC4 configuration


Configure all remaining computers with correct IP paramters, similary as it was done in point 2)..

4) Access VLAN connectivity test


a) Connectivity test between PC which are residing in the same VLAN
Issue ping from PC1 (VLAN10) to PC2 (VLAN10).

tc@bPC1:~$ ping 192.168.1.2


PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=64 time=26.666 ms
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.000 ms
64 bytes from 192.168.1.2: seq=2 ttl=64 time=3.334 ms
64 bytes from 192.168.1.2: seq=3 ttl=64 time=0.000 ms
— 192.168.1.2 ping statistics —
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.000/6.000/26.666 ms
tc@PC1:~$

Issue ping from PC3 (VLAN20) to PC4 (VLAN20).

tc@PC3:~$ ping 192.168.1.4


PING 192.168.1.4 (192.168.1.4): 56 data bytes
64 bytes from 192.168.1.4: seq=0 ttl=64 time=3.334 ms
64 bytes from 192.168.1.4: seq=1 ttl=64 time=3.333 ms
64 bytes from 192.168.1.4: seq=2 ttl=64 time=3.333 ms
64 bytes from 192.168.1.4: seq=3 ttl=64 time=0.000 ms
— 192.168.1.4 ping statistics —
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.000/1.666/3.334 ms
tc@PC3:~$

As we have expected ping should have worked in both cases.

b) Test connectivity between computers placed to different VLANs


Issue ping from PC1 (VLAN10) to PC3 (VLAN20).

tc@PC1:~$ ping 192.168.1.4


PING 192.168.1.4 (192.168.1.4): 56 data bytes
— 192.168.1.4 ping statistics —

Tehnički fakultet “Mihajlo Pupin” – Zrenjanin


AdCommLab 05
Mart 2012, v1.01
11 packets transmitted, 0 packets received, 100% packet loss

We can see that ping is not working between PC1 and PC3. We confirm that there is not
connectivity between computers placed in to different VLANs and openvswitch is working
correctly.

Literatura

[1] http://brezular.wordpress.com/2011/06/25/part2-openvswich-vlans-trunks-l3-vlan-
interface-intervlan-routing-configuration-and-testing/

[2] http://brezular.wordpress.com/2011/11/23/part3-openvswich-campus-model-with-layer2-
access-built-with-open-source-applications/

[2] http://openvswitch.org/download/

Tehnički fakultet “Mihajlo Pupin” – Zrenjanin

You might also like