metis.cfg 5 metis.cfg metis.cfg is an example of a configuation file usable with metis_daemon1, though there is nothing special about the actual filename. Each line of the configuration file is also usable with metis_control1. This document specifies all available command lines used to configure and query Metis. All commands have a 'help', so typing 'help command' will display on-line help. In a configuration file, lines beginning with '#' are comments. ADD COMMANDS add connection ether symbolic dmac interface Adds an Ethernet connection on interface to the given destination MAC address. The symbolic name is a symbolic name for the connection, which may be used in later commands, such as add route. There must be an Ethernet Listener on the specified interface (see add listener), and the connection will use the same EtherType as the Listener. The dmac destination MAC address is in hexidecimal with optional "-" or ":" separators. A connection is a target for a later route assignment or for use as an ingress identifier in the PIT. When using a broadcast or group address for a connection, an Interest routed over that connection will be broadcast. Many receivers may respond. When Metis receives a broadcast Interest it uses the unicast source MAC for the reverse route -- it will automatically create a new connection for the source node and put that in the PIT entry, so a Content Object answering the broadcast Interest will only be unicast to the previous hop. add connection ether conn7 e8-06-88-cd-28-de em3 add connection ether bcast0 FFFFFFFFFFFF eth0 add connection (tcp|udp) symbolic remote_ip remote_port local_ip local_port Opens a connection to the specific remote_ip (which may be a hostname, though you do not have control over IPv4 or IPv6 in this case) on remote_port. The local endpoint is given by local_ip local_port. While the local_ip local_port are technically optional parameters, the system's choice of local address may not be what one expects or may be a different protocols (4 or 6). The default port is 9695. A TCP connection will go through a TCP connection establishment and will not register as UP until the remote side accepts. If one side goes down, the TCP connection will not auto-restart if it becomes availble again. A UDP connection will start in the UP state and will not go DOWN unless there is a serious network error. Opens a connection to 1.1.1.1 on port 1200 from the local address 2.2.2.2 port 1300 add connection tcp conn0 1.1.1.1 1200 2.2.2.2 1300 opens connection to IPv6 address on port 1300 add connection udp barney2 fe80::aa20:66ff:fe00:314a 1300 add listener (tcp|udp) symbolic ip_address port add listener ether symbolic interfaceName ethertype add listener local symbolic path Adds a protocol listener to accept packets of a given protocol (TCP or UDP or Ethernet). The symbolic name represents the listener and will be used in future commands such as access list restrictions. If using a configuration file on metis_daemon, you must include a listener on localhost for local applications to use. The ip_address is the IPv4 or IPv6 local address to bind to. The port is the TCP or UDP port to bind to. The interfaceName is the interface to open a raw socket on (e.g. "eth0"). The ethertype is the EtherType to use, represented as a 0x hex number (e.g. 0x0801) or an integer (e.g. 2049). The path parameter specifies the file path to a unix domain socket. Metis will create this file and remove it when it exits. Listens to 192.168.1.7 on tcp port 9695 with a symbolic name 'homenet' add listener tcp homenet 192.168.1.7 9695 Listens to IPv6 localhost on udp port 9695 add listener udp localhost6 ::1 9695 Listens to interface 'en0' on ethertype 0x0801 add listener ether nic0 en0 0x0801 add route symbolic prefix prefix Adds a static route to a given prefix to the FIB for longest match. Currently, the symbolic and cost are not used. LIST COMMANDS list connections Enumerates the current connections to Metis. These include all TCP, UDP, Unix Domain, and Ethernet peers. Each connection has an connection ID (connid) and a state (UP or DOWN) followed by the local (to metis) and remote addresses. list interfaces Enumerates the system interfaces available to Metis. Each interface has an Interface ID, a 'name' (e.g. 'eth0'), an MTU as reported by the system, and one or more addresses. list routes Enumerates the routes installed in the FIB. The iface is the out-bound connection. The protocol is the the routing protocol that injected the route. 'STATIC' means it was manually entered via metis_control. route is the route type. 'LONGEST' means longest matching prefix and 'EXACT' means exact match. Only 'LONGEST' is supported. cost is the cost of the route. It is not used. next is the nexthop on a multiple access interface. it is not used because the current implementation uses one connection (iface) per neighbor. prefix is the CCNx name prefix for the route. Examples > list connections 23 UP inet4://127.0.0.1:9695 inet4://127.0.0.1:64260 TCP > list interfaces int name lm MTU 24 lo0 lm 16384 inet6://[::1%0]:0 inet4://127.0.0.1:0 inet6://[fe80::1%1]:0 25 en0 m 1500 link://3c-15-c2-e7-c5-ca inet6://[fe80::3e15:c2ff:fee7:c5ca%4]:0 inet4://13.1.110.60:0 inet6://[2620::2e80:a015:3e15:c2ff:fee7:c5ca%0]:0 inet6://[2620::2e80:a015:a4b2:7e10:61d1:8d97%0]:0 26 en1 m 1500 link://72-00-04-43-4e-50 inet4://192.168.1.1:0 27 en2 m 1500 link://72-00-04-43-4e-51 28 bridge0 m 1500 link://3e-15-c2-7e-96-00 29 p2p0 m 2304 link://0e-15-c2-e7-c5-ca > list routes iface protocol route cost next prefix 23 STATIC LONGEST 1 ---.---.---.---/.... lci:/foo/bar Done REMOVE COMMANDS remove connection Not implemented. remove route Not implemented. MISC COMMANDS quit In interactive mode of metis_control, it cause the program to exit. set debug Turns on the debugging flag in metis_control to display information about its connection to Metis. unset debug Turns off the debugging flag in metis_control to display information about its connection to Metis. USAGE Example Linux metis.cfg configuration file #local listeners for applications add listener tcp local0 127.0.0.1 9695 add listener udp local1 127.0.0.1 9695 add listener local unix0 /tmp/metis.sock # add ethernet listener and connection add listener ether nic0 eth0 0x0801 add connection ether conn0 ff:ff:ff:ff:ff:ff eth0 add route conn0 lci:/ 1 # add UDP tunnel to remote system add connection udp conn1 ccnx.example.com 9695 add route conn1 lci:/example.com 1 Example one-shot metis_control commands metis_control list routes metis_control add listener local unix0 /tmp/metis.sock SEE ALSO metis_control1 metis_daemon1 CAVEATS BUGS The output of 'list interfaces' is difficult to read because multiple addresses do not align. AUTHOR Marc Mosko Palo Alto Research Center