Skip to content

Instantly share code, notes, and snippets.

View hwchiu's full-sized avatar
🏠
Working from home

HungWei Chiu hwchiu

🏠
Working from home
View GitHub Profile
@hwchiu
hwchiu / gist:ecb6c0bc7acfe6b0d41e
Last active August 29, 2015 14:02
畢業致詞
各位師長、家長以及在座所有的畢業生們大家好,
今天,是個特別的日子
為什麼特別?
是因為一群人穿者碩士袍聚在一起?
還是因為你父母從遠方而來參加這場畢業典禮?
亦或是你等等準備上台接受撥穗?
都不是
真正的特別的是,過了今天以後,你還是不能畢業

Create topology

sudo mn --topo single,3 --mac

Configuration

  • In the mininet prompt
    1. h3 ifconfig h3-eth0 30.0.0.3
    2. h1 route add default gw 10.0.0.254 h1-eth0
  1. h3 route add default gw 30.0.0.254 h3-eth0
@hwchiu
hwchiu / gist:8b7bab91b5ec56f43380
Created June 12, 2014 11:25
DeviceManagerImpl.java
protected Command processPacketInMessage(IOFSwitch sw, OFPacketIn pi,
FloodlightContext cntx) {
Ethernet eth =
IFloodlightProviderService.bcStore.
get(cntx,IFloodlightProviderService.CONTEXT_PI_PAYLOAD);
logger.error("ethernet:{}",eth.toString());
....
....
...

@左邊電腦

  1. root@controller:/ neturon-server @tty1
  2. root@controller:/home/amy/floodlight_ecmp/: floodlight ..... @tty2
  3. 等他跑一下,可以看floodlight console有沒有噴計算完畢相關的訊息

@右邊筆電

  1. root@controller:/ cd home/amy/code_test/$VAR1 screen-9
  2. sh simple_random_VM..sh Ubuntu-exp2 執行此指令去創造vm
@hwchiu
hwchiu / topo.py
Last active August 29, 2015 14:02
  1. mininet: mn --controller=remote,ip=127.0.0.1 --topo topo --custom topo.py
  2. h1 ping h4
  3. open other terminal
  4. type "ovs-ofctl dump-flows s2" to make sure the flow is pass through s2.
  5. type "ifocnfig s1-eth1" to shutdown the link between s1 and s2
  6. The result in the mininet promt:
64 bytes from 10.0.0.4: icmp_req=71 ttl=64 time=0.028 ms
64 bytes from 10.0.0.4: icmp_req=72 ttl=64 time=195 ms
64 bytes from 10.0.0.4: icmp_req=73 ttl=64 time=0.157 ms
@hwchiu
hwchiu / gist:b63e7588ff331a6d6c5ef38487718930
Created August 26, 2016 09:54
openvpn tag v2.2-beta1
tag v2.2-beta1
Tagger: David Sommerseth <dazo@users.sourceforge.net>
Date: Mon Aug 16 20:43:39 2010 +0200
2010.08.10 -- Version 2.2-beta1
* When aborting in a non-graceful way, try to execute do_close_tun in
init.c prior to daemon exit to ensure that the tun/tap interface is
closed and any added routes are deleted.
routemap.c:405:7: warning: Access to field 'instance' results in a dereference of a null pointer (loaded from variable 'zlog_default')
if (zlog_default->instance)
^~~~~~~~~~~~~~~~~~~~~~
routemap.c:1689:9: warning: Access to field 'nextrm' results in a dereference of a null pointer (loaded from variable 'index')
index->nextrm,
^~~~~~~~~~~~~
2 warnings generated.
ptm_lib.c:385:13: warning: Branch condition evaluates to a garbage value
if (!p_ctxt) {
^~~~~~~
@hwchiu
hwchiu / _readme.md
Created October 2, 2017 11:15 — forked from maxivak/_readme.md
Vagrant with Ubuntu 16.04 in VirtualBox

Setup Ubuntu 16.04 to be used with Vagrant and Virtualbox

Prepare Vagrant box with Ubuntu 16.04

We will use official box "ubuntu/xenial64" and modify it to work with Vagrant.

  • Vagrantfile
@hwchiu
hwchiu / _readme.md
Created October 2, 2017 11:15 — forked from maxivak/_readme.md
Vagrant with Ubuntu 16.04 in VirtualBox

Setup Ubuntu 16.04 to be used with Vagrant and Virtualbox

Prepare Vagrant box with Ubuntu 16.04

We will use official box "ubuntu/xenial64" and modify it to work with Vagrant.

  • Vagrantfile
@hwchiu
hwchiu / _readme.md
Created October 2, 2017 11:15 — forked from maxivak/_readme.md
Vagrant with Ubuntu 16.04 in VirtualBox

Setup Ubuntu 16.04 to be used with Vagrant and Virtualbox

Prepare Vagrant box with Ubuntu 16.04

We will use official box "ubuntu/xenial64" and modify it to work with Vagrant.

  • Vagrantfile