| 174 | |
| 175 | ---- |
| 176 | === 9/30/2010 === |
| 177 | |
| 178 | Making the node behave as an access point from the ssugrim-node-1-7-2010-09-22-20-04-54.ndz image. |
| 179 | |
| 180 | Edit ''/etc/default/hostapd'', enable debugging, and dameon mode, and the conf file: |
| 181 | |
| 182 | {{{ |
| 183 | RUN_DAEMON="yes" |
| 184 | DAEMON_CONF="/etc/hostapd/hostapd.conf" |
| 185 | DAEMON_OPTS="-dd" |
| 186 | }}} |
| 187 | |
| 188 | Edit ''/etc/hostpad/hostapd.conf'', add or enable the following lines: |
| 189 | |
| 190 | {{{ |
| 191 | interface=wlan0 |
| 192 | bridge=br0 |
| 193 | driver=nl80211 |
| 194 | ssid=ANSSID |
| 195 | hw_mode=b (to start with) |
| 196 | channel=1 |
| 197 | }}} |
| 198 | |
| 199 | Make a ''/var/run/hostapd'' directory. |
| 200 | |
| 201 | Insert the kernel module, from the ''/opt/openvswitch-1.1.0pre2'' directory run: |
| 202 | {{{ |
| 203 | insmod datapath/linux-2.6/openvswitch_mod.ko |
| 204 | }}} |
| 205 | |
| 206 | should see: |
| 207 | |
| 208 | {{{ |
| 209 | lsmod |
| 210 | Module Size Used by |
| 211 | openvswitch_mod 61272 0 |
| 212 | }}} |
| 213 | |
| 214 | Initialize the database: |
| 215 | {{{ |
| 216 | ovsdb-tool create /usr/local/etc/ovs-vswitchd.conf.db vswitchd/vswitch.ovsschema |
| 217 | }}} |
| 218 | |
| 219 | Start the switch database server: |
| 220 | {{{ |
| 221 | ovsdb-server /usr/local/etc/ovs-vswitchd.conf.db --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,managers --private-key=db:SSL,private_key --certificate=db:SSL,certificate --bootstrap-ca-cert=db:SSL,ca_cert --detach |
| 222 | }}} |
| 223 | |
| 224 | initialize the database using ovs-vsctl (only needs to be done once, ever): |
| 225 | {{{ |
| 226 | ovs-vsctl --no-wait init |
| 227 | }}} |
| 228 | |
| 229 | start the switch server: |
| 230 | {{{ |
| 231 | ovs-vswitchd unix:/usr/local/var/run/openvswitch/db.sock --detach |
| 232 | }}} |
| 233 | |
| 234 | You should be able to see the running process's |
| 235 | {{{ |
| 236 | ps -ef | grep ovs |
| 237 | root 865 1 0 20:30 ? 00:00:00 ovsdb-server /usr/local/etc/ovs-vswitchd.conf.db --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,managers --private-key=db:SSL,private_key --certificate=db:SSL,certificate --bootstrap-ca-cert=db:SSL,ca_cert --detach |
| 238 | root 870 1 0 20:32 ? 00:00:00 ovs-vswitchd unix:/usr/local/var/run/openvswitch/db.sock --detach |
| 239 | }}} |
| 240 | |
| 241 | Make a bridge with ovs-vsctl: |
| 242 | {{{ |
| 243 | ovs-vsctl add-br br0 |
| 244 | ovs-vsctl add-port br0 wlan0 |
| 245 | ovs-vsctl add-port br0 eth0 |
| 246 | }}} |
| 247 | |
| 248 | You should be able to check it's ports: |
| 249 | {{{ |
| 250 | ovs-vsctl list-ports br0 |
| 251 | eth0 |
| 252 | wlan0 |
| 253 | }}} |
| 254 | |
| 255 | Finally start the hostapd serivce. |
| 256 | {{{ |
| 257 | serivce hostapd start |
| 258 | }}} |
| 259 | |