90 likes | 247 Views
Testbed Software. Presented by William List August 12, 2003. TUN/TAP. TUN virtual P2P device Handles passing packets between kernel space and user space TUN device read and writes to applications rather than physical media TUN device handles IP packets TAP device handles Ethernet frames
E N D
Testbed Software Presented by William List August 12, 2003
TUN/TAP • TUN virtual P2P device • Handles passing packets between kernel space and user space • TUN device read and writes to applications rather than physical media • TUN device handles IP packets • TAP device handles Ethernet frames • Not used
Ad-Hoc Support Library (ASL) • Captures packets in the kernel that do not have a valid destination • Packets are sent to /dev/tun0, and then forwarded to attached applications • Support re-insertion of packets into the kernel for forwarding • Uses a raw socket to avoid packet reprocessing by the kernel
ASL – Continued • Commands • open_route_request() • Sets up tun device, raw socket, and insert the route_check module into the kernel • route_add() and route_del() • Add or delete a route handled by tun0 • read_route_request() • Returns routing information in route_info • Select() used to identify events
ASL – Continued • More commands • route_discovery_done() • Tells ASL to release the waiting packets if route discovery was successful • query_route_idle_time() • Reads /proc/asl/route_check for last use of given destination • close_route_request() • Shutdown ASL
Wireless Tools • iwconfig • Provides configuration information for the wireless interface • iwconfig eth0 essid khop • iwconfig eth0 key none • iwconfig eth0 mode ad-hoc • iwconfig eth0 channel 3 • iwconfig eth0 rate 2M auto
Cardctl • Use to control the status of the wireless interface • cardctl scheme khop • “khop” must be an entry in /etc/wireless.opts • cardctl reset • Sometimes needed for changes to take effect • cardctl eject followed by re-insertion • An alternative for committing changes
Ip • Allows manipulation of the kernel routing table (alternative to route) • Show current routing entries • ip route show or route –n (easier to read) • Delete an entry • ip route del 192.168.0.1 • Add an entry • ip route add 192.168.0.1 dev eth0 • ip route add default via 192.168.0.1