Wednesday, August 16, 2017

configure Router-on-a-stick using vde and virtualbox

1- install vde
$ sudo apt-get install vde2

2- create switch
$ vde_switch -s /tmp/sw4

***info
vbox1: set network configuration on Adaptor 4
- attached to: generic driver
- Name: VDE
- Generic property: network=/tmp/sw4
 or network=/tmp/sw4[5]  to connect to port 5, above automatically assigned


vbox2: set network configuration on Adaptor 4
- attached to: generic driver
- Name: VDE
- Generic property: network=/tmp/sw4[6]

vbox3: set network configuration on Adaptor 4
- attached to: generic driver
- Name: VDE
- Generic property: network=/tmp/sw4[10]


vbox1 vlan: 5
vbox2 vlan: 6
vbox3 trunk



1- back to vde console
- create vlan
vde$ vlan/create 5
vde$ vlan/create 6

- set port with vlan
vde$ port/setvlan 5 5
vde$ port/setvlan 6 6

- set port 10
vde$ vlan/addvlan 5 10
vde$ vlan/addvlan 6 10


2- on vbox3
$ echo 1 > /proc/sys/net/ipv4/ip_forward
$ sudo modprobe 8021q
$ vconfig add eth0 5
$ vconfig add eth0 6


- then add ip on both eth0.5 and eth0.6

or we can also connect to tap with
$ tunctrl -u user1 
then run vde as below
$ vde_switch -s /tmp/sw5 --tap tap0

1 comment:


  1. Thanks for sharing such a good opinion, post is good, thats why i have read it fully all of craigslist

    ReplyDelete