Permalink
Browse files

cleanup compile/install

  • Loading branch information...
1 parent a48fab5 commit 8b585028ec922d85230cb2f9e5e8b221095ac413 upa committed Apr 27, 2012
Showing with 165 additions and 17 deletions.
  1. +62 −0 Makefile
  2. +99 −1 README.md
  3. +0 −2 net.c
  4. +4 −14 vxlan.conf
View
@@ -0,0 +1,62 @@
+# Makefile
+# LOGGING_FDB_CAHNGE is work on wide camp 1203 only
+
+CC = gcc -Wall -g
+
+MODULES = error.o fdb.o hash.o iftap.o net.o vxlan.o control.o
+PROGNAME = vxland vxlanctl
+INITSCRIPT = vxlan
+
+INSTALLDST = /usr/local/sbin/
+CONFIGDST = /usr/local/etc/
+CONFIGFILE = vxlan.conf
+
+RCDST = /etc/init.d/
+UPDATERCD = /usr/sbin/update-rc.d
+
+
+.PHONY : all
+all : vxland vxlanctl
+
+.c.o:
+ $(CC) -c $< -o $@
+
+modules : $(MODULES)
+
+vxland : main.c common.h $(MODULES)
+ $(CC) -pthread main.c $(MODULES) -o vxland
+
+vxlanctl : vxlanctl.c common.h
+ $(CC) vxlanctl.c -o vxlanctl
+
+clean :
+ rm $(MODULES) $(PROGNAME)
+
+install : $(PROGNAME)
+ install vxland $(INSTALLDST)
+ install vxlanctl $(INSTALLDST)
+ if [ ! -f $(CONFIGDST)/$(CONFIGFILE) ]; then \
+ install $(CONFIGFILE) $(CONFIGDST); \
+ fi
+ install $(INITSCRIPT) $(RCDST)
+ $(UPDATERCD) $(INITSCRIPT) defaults
+
+
+uninstall : $(PROGNAME)
+ rm $(INSTALLDST)/vxland
+ rm $(INSTALLDST)/vxlanctl
+ $(UPDATERCD) -f $(INITSCRIPT) remove
+ rm $(RCDST)/$(INITSCRIPT)
+
+
+control.c : control.h
+error.c : error.h
+fdb.h : hash.h
+fdb.c : fdb.h
+hash.c : hash.h
+iftap.c : iftap.h
+net.h : common.h
+net.c : net.h fdb.h error.h sockaddrmacro.h
+vxlan.h : common.h
+vxlan.c : net.h fdb.h error.h vxlan.h iftap.h sockaddrmacro.h
+
View
100 README.md
@@ -5,4 +5,102 @@ hogelan is simple vxlan implementation using Linux tap interface.
ID : https://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-00
-update readme soon.
+hogelan includes "vxland" and "vxlanctl" commands.
+vxland, is vxlan daemon, forwards packet to VXLAN
+Overlay Network. vxlanctl is command for controlling vxlan.
+You can create/destroy vxlan tunnel interface using
+vxlanctl. And configure access list about ARP/ND/MAC.
+
+INSTALL
+-------
+
+ % git clone git://github.com/upa/hogelan.git
+ % cd hogelan
+ % make
+ % make install
+
+
+How to Use
+----------
+
+### vxlan.conf ###
+
+Multicast Address and Interface are configured in
+/usr/local/etc/vxlan.conf . vxland can work IPv4 and
+IPv6.
+
+ # vxlan.conf
+ multicast_address 239.0.0.1
+ multicast_interface eth0
+
++ start : _/etc/init.d/vxlan start_
++ stop : _/etc/init.d/vxlan stop_
+
+Other configurations is installed by vxlanctl.
+
+
+### vxlanctl ###
+
+vxlanctl is command tool for configuring vxlan. you can
+create/destroy vxlan tunnel interface, and install Access list. All Access
+List affect as Out Bound Filter per VNI. if you prefer using
+vlan, create vlan interface using vconfig.
+
+
+ % vxlanctl --help
+ Usage :
+ vxlanctl [commands]
+
+ commands: (VNI is hex)
+
+ create <VNI> add vxlan interface
+ destroy <VNI> delete vxlan interface
+ acl <VNI> mac [deny|permit] <Mac Addr> Source Mac Address Filter
+ acl <VNI> arp [deny|permit] <v4Addr> ARP Target Address Filter
+ acl <VNI> ns [deny|permit] <v6Addr> NS Target Address Filter
+ acl <VNI> ra [deny|permit] RA Filter
+ acl <VNI> rs [deny|permit] RS FIlter
+
+ % vxlanctl create 0
+ created
+ % vxlanctl create A
+ created
+ % ifconfig vxlan0
+ vxlan0 Link encap:Ethernet HWaddr 06:b3:1a:45:86:9a
+ inet6 addr: fe80::4b3:1aff:fe45:869a/64 Scope:Link
+ UP BROADCAST RUNNING MTU:1500 Metric:1
+ RX packets:0 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:500
+ RX bytes:0 (0.0 B) TX bytes:328 (328.0 B)
+ %
+ % vconfig add vxlan0 100 // using vlan tag
+ Added VLAN with VID == 100 to IF -:vxlan0:-
+ % ifconfig vxlan0.100 up
+ % ifconfig vxlan0.100
+ vxlan0 Link encap:Ethernet HWaddr 06:b3:1a:45:86:9a
+ inet6 addr: fe80::4b3:1aff:fe45:869a/64 Scope:Link
+ UP BROADCAST RUNNING 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:500
+ RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)
+
+
+ToDO
+----
++ Per VLAN Access List
++ Per VLAN Forwarding Database (it is Per VNI FDB now)
++ Support *BSD
+
+
+Lisence
+-------
+Under BSD Lisence.
+
+
+Contact
+-------
+_upa@haeena.net_
+
+
View
2 net.c
@@ -220,11 +220,9 @@ send_etherflame_from_local_to_vxlan (struct vxlan_instance * vins,
strerror (errno));
} else {
EXTRACT_PORT (entry->vtep_addr) = htons (VXLAN_PORT_BASE);
- PRINT_ADDR("vtep_addr", entry->vtep_addr);
mhdr.msg_name = &entry->vtep_addr;
// mhdr.msg_namelen = EXTRACT_SALEN (entry->vtep_addr);
mhdr.msg_namelen = sizeof (entry->vtep_addr);
- printf ("send unicast!!\n");
if (sendmsg (vxlan.udp_sock, &mhdr, 0) < 0)
error_warn ("sendmsg to unicast failed : %s",
strerror (errno));
View
@@ -1,18 +1,8 @@
-# vxlan MAC/ARP/ND access list configuration
#
-# Syntax
-# TYPE VNI [MA:CA:DD:RE:SS:HEX|block]
-#
-#
-# Type
-# mac : Source Mac Address Filter
-# arp : ARP Target Address Filter
-# ns : ND Neighbor Solicit Target Address FIleter
-# ra : Outbound ND Router Advertise Filter
-# ns : Outbound ND Router Solicit Filter
+# vxlan.conf
#
+multicast_address 239.0.0.1
+multicast_interface eth0
+
-ns 0 2001:200:0:88bb::1
-ra 0 block
-rs 0 block

0 comments on commit 8b58502

Please sign in to comment.