<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE zprava SYSTEM "techrep.dtd">
<zprava cislo="30/2003" jazyk="en">
	<nazev>IOSConvert: IOS to XML router configuration file converter - command reference</nazev>
	<autor>Miroslav Matuska</autor>
	<datum>10.12.2003</datum>
	<h1>Introduction</h1>
	<p>This document describes the IOSConvert program. It is one of the front-ends of the 
	   Netopeer router configuration system. Netopeer is a part of
	   Liberouter project <cite href="Lib"/>. Purpose of the Netopeer system
	   is to create a software system for platform-independent configuration of routers and entire networks.
	   Therefore, for backward compatibility with currently used routers, conversion tool from platform dependent to platform independent configuration is needed.</p>
	<p>The Cisco IOS frontend is 
	   designed to perform batch conversion from the IOS configuration 
	   format into platform independent XML format, according to  
	   Netopeer DTD (see <cite href="Lho03"/>, samples in CVS). It parses IOS file (Cisco router 
	   configuration) and creates XML DOM tree containing same configuration 
	   information. The DOM tree is then written into file. All supported Cisco commands are converted into XML 
           elements or attributes</p>
	<p>The main task of this converter is to transform existing Cisco configuration files into Netopeer compatible configurations in order to use them on other platform or to process them in other front-end. The program runs in batch mode, eg. input IOS file is converted into output XML file, no command line interface is provided. The resulting XML file can be put into repository, loaded into other application (XML parser) an so on.</p>
	<p>IOSConvert program is written in C/C++ language under common Liberouter license.</p>
	<h1>Installation requirements</h1>
	<p>Packages: <soubor>Universal XML parser library (other part of Netopeer system)</soubor> or <soubor>libxml2</soubor>, <soubor>libxml2-devel</soubor>
	</p>
	<p>Compiler: GNU C (gcc/g++)</p>
	<h1>Installation</h1>
	<p>
		<ol>
			<li>Download the source tarball (or checkout the CVS).</li>
			<li>Unzip and untar if needed, chdir into sources directory.</li>
			<li>Run <prikaz>./configure --with-extra-includes=/usr/include/libxml2 [--with-extra-libs=/usr/lib]</prikaz> where you 
specify the path of header (include) and library files of libxml2</li>
			<li>Run <prikaz>make</prikaz>. This compiles the program.</li>
			<li>Now you can run the <prikaz>iosconvert</prikaz> program in the <soubor>iosconvert</soubor> directory.	</li>
		</ol>
	</p>
	<h1>Usage</h1>
	<p>
		<prikaz>iosconvert</prikaz>
		<soubor>infile outfile</soubor>
		<prikaz> [-ndD]</prikaz>
	</p>
	<p>The <soubor>infile</soubor> file is the source IOS configuration file and must exist.<br/>
	   The <soubor>outfile</soubor> file is the resulting XML file. If this file does not exist,
it will be created, otherwise it will be overwritten.
	</p>
	<p>Switches:<br/>
		<prikaz>-d</prikaz> prints small debugging info (unknown commands)<br/>
		<prikaz>-D</prikaz> prints large debugging info (all parsed commands)<br/>
		<prikaz>-n</prikaz> does not print any line number info<br/>
	no switch prints only line number info<br/>
	</p>
	<h1>Command reference</h1>
	<p>This section describes each supported IOS command and their Netopeer XML equivalents. It provides the reference for the "status-quo" of the IOS supported commands. Unlisted commands found in IOS configuration file are put into &lt;platform-special&gt; element (see below).</p>
	<h2>
		<br/>
		<prikaz>!</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Comment, everything on the line is ignored. It can be also finishing character for previous section, if it is only character on the line.</p>
	<h3>Example</h3>
	<p>
		<pre>! This is just a comment for following section</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>None</p>
	<h2>
		<br/>
		<prikaz>access-list</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Unnamed access list, both standard and extended are supported. See the ACL section below.</p>
	<h3>Example</h3>
	<p>
		<pre>
	access-list 100 permit tcp host 120.25.35.1 any eq telnet
	access-list 11 deny ip host 120.25.35.1 any 
	</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>See below in ACL section</p>
	<h2>
		<br/>
		<prikaz>banner motd, banner login</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Login banner text (like /etc/issue). First two characters are taken as terminating and the text is processed until the second occurrence of terminating characters. Banner motd and login are taken as equal.</p>
	<h3>Example</h3>
	<p>
		<pre>banner login ^CWelcome to burcak!^C</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;banner&gt;Welcome to burcak!&lt;/banner&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>end</prikaz>
	</h2>
	<h3>Description</h3>
	<p>End of whole configuration, data after this command are not processed</p>
	<h2>
		<br/>
		<prikaz>hostname</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Name of the router</p>
	<h3>Example</h3>
	<p>
		<pre>hostname router-prg-c7200</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;system hostname="router-prg-c7200"&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>interface</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Start of a interface subsection  -  commands related to one interface only. Valid for usual L2 interfaces, Tunnels and VLANs</p>
	<h3>Example</h3>
	<p>
	<pre>interface FastEthernet10/0/1</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
	<pre>&lt;device id="cd1" name="FastEthernet10/0/1"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
	<pre>interface FastEthernet10/0/1.1</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
	<pre>&lt;vlan-interface device="cd1" id="cd1.1" name="FastEthernet 10/0/1.1"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
	<pre>interface Tunnel1</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
	<pre>&lt;tunnel id="ct1" name="Tunnel1"&gt;</pre>
	</p>
	<h3>Subcommands</h3>
	<h2>
		<br/>
		<prikaz>(interface) arp</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the type of ARP protocol. Valid type are: arpa, frame-relay, snap, probe. DTD equivalent is to enable ARP only.</p>
	<h3>Example</h3>
	<p>
		<pre>arp arpa</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device arp="on"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>arp frame-relay</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device arp="on"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>arp snap</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device arp="on"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>arp probe</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device arp="on"&gt;</pre>
	</p>		
	<h2>
		<br/>
		<prikaz>(interface) description</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies text info (description) for the current interface</p>
	<h3>Example</h3>
	<p>
		<pre>description Link to server segment</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;description&gt;Link to server segment&lt;/description&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) duplex</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set duplex operation mode on Ethernet devices.</p>
	<h3>Example</h3>
	<p>
		<pre>duplex full</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device duplex="full"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>duplex half</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device duplex="half"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>duplex auto</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device duplex="auto"&gt;</pre>
	</p>

	<h2>
		<br/>
		<prikaz>(interface)	encapsulation (1.form)</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the type of VLAN. Valid types are: dot1q (IEEE 802.1q), isl (Cisco Inter Switch Link)</p>
	<h3>Example</h3>
	<p>
		<pre>encapsulation dot1q</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;vlan-interface encapsulation="802.1q"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>encapsulation isl</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;vlan-interface encapsulation="isl"&gt;</pre>
	</p>	
	
	<h2>
		<br/>
		<prikaz>(interface) 	encapsulation (2.form)</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the type of layer-2 protocol. Valid types are: ppp (Point-to-Point Protocol), x25, smds (switched multimegabit data service), atm-dxi</p>
	<h3>Example</h3>
	<p>
		<pre>encapsulation ppp</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device encapsulation="ppp"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>encapsulation frame-relay</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device encapsulation="frame-relay"&gt;</pre>
	</p>	
	<h3>Example</h3>
	<p>
		<pre>encapsulation x25</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device encapsulation="x25"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>encapsulation smds</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device encapsulation="smds"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>encapsulation atm-dxi</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device encapsulation="atm-dxi"&gt;</pre>
	</p>
	
	<h2>
		<br/>
		<prikaz>(interface) ip address</prikaz>
	</h2>
	<h3>Description:</h3>
	<p>Set the IPv4 address and network mask of this interface. Address family is ipv4</p>
	<p>
		<b>Example:</b>
		<pre>ip address 192.168.1.2 255.255.255.0</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;ipv4-address address="192.168.1.2" device="cdX" masklen="24" af="ipv4"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) ip address XXX secondary</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the secondary IPv4 address and network mask of this interface.</p>
	<h3>Example</h3>
	<p>
		<pre>ip address 192.168.1.3 255.255.255.0 secondary</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;ipv4-address address="192.168.1.2" device="cdX" masklen="24"
                role="secondary"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) ip dvmrp, ip pim</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Enables multicast routing.</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device multicast="on"&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) ip rip send version</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Sets the version of sent RIP information on this interface</p>
	<h3>Example</h3>
	<p>
		<pre>ip rip send version 2</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip-interface send=yes out-version="2"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) ip rip receive version</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Sets the version of received RIP information on this interface, both versions are received by default</p>
	<h3>Example</h3>
	<p>
		<pre>ip rip receive version 2</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip-interface receive=yes in-version="2"&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>ip rip receive version 1 2</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip-interface receive=yes in-version="both"&gt;</pre>
	</p>
	
	<h2>
		<br/>
		<prikaz>(interface) ip rip authentication mode</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Sets the RIP authentication type on this interface. Valid types are: text (plaintext), md5 (hashed text)</p>
	<h3>Example</h3>
	<p>
		<pre>ip rip authentication mode text</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip-interface&gt;
  &lt;rip-authentication mode="simple"&gt;
&lt;/rip-interface&gt;
</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>ip rip authentication mode md5</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip-interface&gt;
  &lt;rip-authentication mode="md5"&gt;
&lt;/rip-interface&gt;
</pre>
	</p>
	
	
	<h2>
		<br/>
		<prikaz>(interface) ip rip authentication key-chain</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Sets the RIP authentication key-chain on this interface. It should be defined before in the "key" section.</p>
	<h3>Example</h3>
	<p>
		<pre>ip rip authentication key-chain mychain</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip-interface&gt;
  &lt;rip-authentication password="SeCrEt"&gt;
&lt;/rip-interface&gt;
</pre>(where "mychain" is the name for key chain that includes the string "SeCrEt" as the password, see key section)</p>
	<h2>
		<br/>
		<prikaz>(interface) ip access-group XXX in</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Apllies acces control list (packet filter chain) on the input traffic on this interface.</p>
	<h3>Example</h3>
	<p>
		<pre>ip access-group 101 in</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device filter-in="101"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) ip access-group XXX out</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Apllies acces control list (packet filter chain) on the output traffic on this interface.</p>
	<h3>Example</h3>
	<p>
		<pre>ip access-group 101 out</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device filter-out="101"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) ipv6 address</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the IPv6 address and network mask of this interface. Address family (af attribute) is ipv6. Attribute "link" specifies forced link-local address on this interface</p>
	<h3>Example</h3>
	<p>
		<pre>ip address 2001:718:1f02::1/64</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;ipv6-address address="2001:718:1f02::1" device="cd1"
                masklen="64" af="ipv6"/&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>ip address FFFE:718:1f02::1/64 link-local</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;ipv6-address address="FFFE:718:1f02::1" device="cd1"
                masklen="64" af="ipv6" scope="link"/&gt;</pre>
	</p>	
	
	<h2>
		<br/>
		<prikaz>(interface) ipv6 rip ripng enable</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Enabling the RIPng protocol distribution on this interface</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;ripng&gt;
  &lt;ripng-interface device="cd1"/&gt;
&lt;/ripng&gt;
</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) 	mac-address</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the MAC address of NIC on this device.</p>
	<h3>Example</h3>
	<p>
		<pre>mac-address 00:00:a0:3f:19:0d</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device macaddr="00:00:a0:3f:19:0d"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) mtu</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the Maximum Trasmit Unit parameter of the link.</p>
	<h3>Example</h3>
	<p>
		<pre>mtu 512</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device mtu="512"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) no</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Negativize the command on the rest of line.</p>
	<h3>Example</h3>
	<p>
		<pre>no ip address</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>None</p>
	<h2>
		<br/>
		<prikaz>(interface) shutdown</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Administratively disable the interface.</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device disable="yes"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) speed</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the speed in Mbit/s on Ethernet devices.</p>
	<h3>Example</h3>
	<p>
		<pre>speed auto</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device speed="auto"/&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>speed 100</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device speed="100"/&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>speed 10</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device speed="10"/&gt;</pre>
	</p>
	
	<h2>
		<br/>
		<prikaz>(interface) tunnel checksum</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Enables the checking of checksum in tunnel. Default is: off</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;tunnel checksum="on"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) tunnel key</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Tunnel selector or security key</p>
	<h3>Example</h3>
	<p>
		<pre>tunnel key mykey</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;tunnel key="mykey"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) tunnel mode</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the tunnel encapsulation type. Valid types are: gre</p>
	<h3>Example</h3>
	<p>
		<pre>tunnel mode gre</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;tunnel mode="gre"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) tunnel path-mtu-discovery</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Enables the path MTU discovery in tunnel. Default is: off</p>
	<h3>Example</h3>
	<p>
		<pre>tunnel path-mtu-discovery</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;tunnel pmtudisc="on"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) tunnel sequence-datagrams</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Enables the checking of the correct sequnce of datagrams in tunnel. Default is: off</p>
	<h3>Example</h3>
	<p>
		<pre>tunnel sequence-datagrams</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;tunnel sequence="on"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) tunnel source tunnel-source-interface</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the source point of the tunnel - interface.</p>
	<h3>Example</h3>
	<p>
		<pre>tunnel source Serial0/1</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;tunnel&gt;
  &lt;tunnel-source-interface device="cd4"/&gt;
&lt;/tunnel&gt;
</pre>Where "cd4" is device "Serial0/1".
	</p>
	<h2>
		<br/>
		<prikaz>(interface) tunnel source tunnel-source-address</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the source point of the tunnel - address.</p>
	<h3>Example</h3>
	<p>
		<pre>tunnel source 132.177.5.10</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;tunnel&gt;
  &lt;tunnel-source-address address="132.177.5.10"/&gt;
&lt;/tunnel&gt;
</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) 	tunnel destination tunnel-destination-address</prikaz>
	</h2>
	<h3>Description</h3>
	<p>tunnel destination 222.22.2.3</p>
	<h3>Example</h3>
	<p>
		<pre>! This is just a comment for following section</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;tunnel&gt;
  &lt;tunnel-destination-address address="222.22.2.3"/&gt;
&lt;/tunnel&gt;
</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) tunnel ttl</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the TTL parameter of the tunnel.</p>
	<h3>Example</h3>
	<p>
		<pre>tunnel ttl 64</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;tunnel ttl="64"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(interface) tx-ring-limit</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Set the length of transmitting (output) data queue on interface.</p>
	<h3>Example</h3>
	<p>
		<pre>tx-ring-limit 100</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;device txqlen="100"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>ip access-list</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies the section the named packet filter chain (access control list). Both standard and extended ACLs are supported. See the section of ACLs below.</p>
	<h3>Example</h3>
	<p>
		<pre>ip access-list standard mylist-stand
  deny 10.1.0.0 0.0.255.255
  permit any any

ip access-list extended mylist-ext
  deny ip 10.1.0.0 0.0.255.255 10.2.6.0 0.0.0.255 eq telnet
  permit icmp any any 10 12
</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>See below (ACL section)</p>
	<h2>
		<br/>
		<prikaz>ip domain-list</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies a domain name for domain lookups. There can be more domain-list commands in one configuration. If both domain-name and domain-list commands are present, domain-list is used.</p>
	<h3>Example</h3>
	<p>
		<pre>ip domain-list cesnet.cz
ip domain-list muni.cz
</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;system&gt;
  &lt;dns&gt;
    &lt;search&gt;
      &lt;domain-suffix suffix="cesnet.cz"/&gt;
      &lt;domain-suffix suffix="muni.cz"/&gt;
    &lt;/search&gt;
  &lt;/dns&gt;
&lt;/system&gt;
</pre>
	</p>
	<h2>
		<br/>
		<prikaz>ip domain-name</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies a domain name for domain lookups. There can be only one domain-name command in one configuration. If both domain-name and domain-list commands are present, domain-list is used.</p>
	<h3>Example</h3>
	<p>
		<pre>ip domain-name muni.cz</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;system&gt;
  &lt;dns&gt;
    &lt;search&gt;
      &lt;domain-suffix suffix="muni.cz"/&gt;
    &lt;/search&gt;
  &lt;/dns&gt;
&lt;/system&gt;
</pre>
	</p>
	<h2>
		<br/>
		<prikaz>ip multicast-routing</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Enables multicast routing on given machine.</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;system multicast-routing="on"&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>ip name-server</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies a DNS server in numeric form for domain lookups.</p>
	<h3>Example</h3>
	<p>
		<pre>ip name-server 192.168.1.1</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;system&gt;
  &lt;dns&gt;
    &lt;dns-server address="192.168.1.1"/&gt;
  &lt;/dns&gt;
&lt;/system&gt;
</pre>
	</p>
	<h2>
		<br/>
		<prikaz>ip route</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies a static IPv4 route in form: target network+subnet mask+next hop. Next hop could be IP address or name of point-to-point interface. If the name of "next-hop" interface is "Null", then the packet will be discarded silently (route into blackhole). </p>

	<h3>Example</h3>
	<p>
		<pre>ip route 192.168.1.0 255.255.255.0 192.168.3.1 110</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;static-routes&gt;
  &lt;route af="ipv4" preference="110"&gt;
    &lt;destination address="192.168.1.0" length="24"/&gt;
    &lt;nexthop via="192.168.3.1"/&gt;
  &lt;/route&gt;
&lt;/static-routes&gt;
</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>ip route 192.168.1.0 255.255.255.0 Null</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>
		&lt;static-routes&gt;
  &lt;route af="ipv4" type="blackhole"&gt;
    &lt;destination address="192.168.1.0" length="24"/&gt;
  &lt;/route&gt;
&lt;/static-routes&gt;
</pre>
	</p>

	<h2>
		<br/>
		<prikaz>ipv6 route</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies a static IPv6 route in form: target network+subnet mask+next hop. Next hop could be IP address or name of point-to-point interface. If the name of "next-hop" interface is "Null", then the packet will be discarded silently (route into blackhole).</p>
	<h3>Example</h3>
	<p>
		<pre>ipv6 route 2001:718:0:4::/64 2001:718:1f00::1</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;static-routes&gt;
  &lt;route af="ipv6"&gt;
    &lt;destination address="2001:718:0:4::" length="64"/&gt;
    &lt;nexthop via="2001:718:1f00::1"/&gt;
  &lt;/route&gt;
&lt;/static-routes&gt;
</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>ipv6 route 2001:718:0:4::/64 Null</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;static-routes&gt;
  &lt;route af="ipv6" type="blackhole"&gt;
    &lt;destination address="2001:718:0:4::" length="64"/&gt;
  &lt;/route&gt;
&lt;/static-routes&gt;
</pre>
	</p>
		
	<h2>
		<br/>
		<prikaz>ipv6 router ripng</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Declares a section of global commands for IPv6 RIPng</p>
	<h3>Subcommands</h3>
	<h2>
		<br/>
		<prikaz>(ipv6 router ripng) redistribute [ static | connected | isis | ospf | bgp ]</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Includes IPv6 routes from other routing protocols in RIPng updates (via routing table, routes are exported from routing table)</p>
	<h3>Example</h3>
	<p>
		<pre>redistribute static</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;ripng&gt;
  &lt;route-export chain="ripng-export"/&gt;
&lt;/ripng&gt;

  &lt;routing&gt;
    &lt;route-filters&gt;
      &lt;route-filter-chain id="ripng-export"
          name="ripng-export-filter-chain"&gt;
        &lt;route-filter-rule&gt;
          &lt;route-match-list&gt;
            &lt;match-route-source source="static"/&gt;
          &lt;/route-match-list&gt;
          &lt;route-action-list&gt;
            &lt;accept-action/&gt;
          &lt;/route-action-list&gt;
        &lt;/route-filter-rule&gt;
      &lt;/route-filter-chain&gt;
    &lt;/route-filters&gt;
  &lt;routing&gt;
</pre>
	</p>
	<h2>
		<br/>
		<prikaz>ipv6 unicast routing</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Enables IPv6 unicast routing on given machine.</p>
	<h3>XML Equivalent</h3>
	<p>None</p>
	<h2>
		<br/>
		<prikaz>key-chain</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Start of key chain section</p>
	<h3>Example</h3>
	<p>
		<pre>key chain mychain</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>None (converted into elements that use this key chain, please
                see RIP authentication section)</pre>
	</p>
	<h3>Subcommands</h3>
	<h2>
		<br/>
		<prikaz>(key-chain) key-string</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies the text string (password) for this key chain.</p>
	<h3>Example</h3>
	<p>
		<pre>key string SeCrEt</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>None (converted into elements that use this key chain, see RIP authentication section.)</p>
	<h2>
		<br/>
		<prikaz>no</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Negativize the command on the rest of line.</p>
	<h2>
		<br/>
		<prikaz>no ip split-horizon</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Turns off split horizon for RIP on all RIP enabled interfaces</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip&gt;
  &lt;rip-interface device="cd4" split-horizon="no"/&gt;
  &lt;rip-interface device="cd5" split-horizon="no"/&gt;
&lt;/rip&gt;
</pre>(Where cd4 and cd5 are interfaces, that run RIP)</p>
	<h2>
		<br/>
		<prikaz>router rip</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Declares a section of global commands for IPv4 RIP.</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip disable="no"&gt;</pre>
	</p>
	<h3>Subcommands</h3>
	<h2>
		<br/>
		<prikaz>(router rip) network</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Includes IPv4 network prefix in RIP updates</p>
	<h3>Example</h3>
	<p>
		<pre>network 146.1.0.0
network 146.2.0.0
</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip&gt;
  &lt;rip-interface device="cd4"/&gt;
  &lt;rip-interface device="cd5"/&gt;
&lt;/rip&gt;
</pre>(Where cd4 corresponds to the interface with 146.1.x.x/16 subnet and cd5 corresponds to the interface with 146.2.x.x/16 subnet)
</p>
	<h2>
		<br/>
		<prikaz>(router rip) distance</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies administrative distance of RIP routes (120 by default).</p>
	<h3>Example</h3>
	<p>
		<pre>distance 120</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip preference="120"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(router rip) default-metric</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies the default metric of RIP routes.</p>
	<h3>Example</h3>
	<p>
		<pre>default-metric 2</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip default-metric="2"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(router rip) neighbor</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies unicast RIP neighbor (mostly on NBMA networks) </p>
	<h3>Example</h3>
	<p>
		<pre>neighbor 192.168.1.16</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip&gt;
  &lt;rip-neighbor address="192.168.1.16"/&gt;
&lt;/rip&gt;
</pre>
	</p>
	<h2>
		<br/>
		<prikaz>(router rip) passive-interface</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Disables any RIP activity on specified interface</p>
	<h3>Example</h3>
	<p>
		<pre>passive-interface FastEthernet0/1</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip-interface device="cd4" send="no" receive="no"/&gt;</pre>
		Where "cd4" is the "FastEthernet0/1 interface."
	</p>
	<h2>
		<br/>
		<prikaz>(router rip) redistribute [ static | connected | isis | ospf | bgp ]</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Includes IPv4 routes from other routing protocols in RIP updates (via routing table)</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip&gt;
  &lt;route-export chain="rip-export"/&gt;
&lt;/rip&gt;
</pre>(see RIPng "redistribute" section to see "rip-export" static routes definition - same as "ripng-export")
</p>
	<h2>
		<br/>
		<prikaz>(router rip) version</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies version of RIP protocol (can be overwritten on interfaces). Default value is to accept version 1 and 2 and distribute only version 1 broadcasts.</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip version="12in1out"/&gt;</pre>(by default whe no other IOS command is present)
	</p>
	<h3>Example</h3>
	<p>
		<pre>version 1</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip version="1"/&gt;</pre>
	</p>
	<h3>Example</h3>
	<p>
		<pre>version 2</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;rip version="2"/&gt;</pre>
	</p>
	
	<h2>
		<br/>
		<prikaz>version</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Specifies the version of IOS system for which the configuration file was intended</p>
	<h3>Example</h3>
	<p>
		<pre>version 12.2</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;platform-special platform="ios" version="12.2"/&gt;</pre>
	</p>
	<h2>
		<br/>
		<prikaz>*Anything else that is not covered by DTD*</prikaz>
	</h2>
	<h3>Description</h3>
	<p>Unknown parts of IOS configuration (=those that are not currently supported by DTD) are placed into "platform-special" element. Netopeer Cisco backend may use these information to restore complete configuration (next to XML data) for Cisco router. The aim of this element is to allow working with whole Cisco IOS configuration on Cisco routers in Netopeer without losing information even if some IOS commands are not supported in DTD. Supported commands are moved into other XML elements and the rest is put here.
If some commands of configuration sub-section (eg. interface or routing protocols subsection) are unsupported, then subsection is made in the "platform-special" element also (separated by the exclamation mark "!"; and only unsupported commands are put into it). 
Unsupported flags in ACLs rules are ignored now (these are not put into "platform-special" element now).
</p>
	<h3>Example</h3>
	<p>
		<pre>router bgp 100
  neighbor 152.13.12.11
!
</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;platform-special platform="ios"&gt;
router bgp 100
  neighbor 152.13.12.11
!
&lt;/platform-special&gt;
</pre>
	</p>
	<h1>Access Control Lists</h1>
	<p>Access Control List is group of lines (=criterias+actions) that are matched against data to accept or reject these data by given criteria.
Cisco IOS uses two types of IP access lists: simpler "standard" ACLs and complex ACLs called "extended". Standard ACLs:
<ul>
			<li>operate on Layer 3 (IP packets)</li>
			<li>uses source address to match accept/reject rule</li>
		</ul>
Extended ACLs:
<ul>
			<li>operate on higher layer</li>
			<li>can use source and destination address, number of port or type of service to match accept/reject rule</li>
		</ul>
	</p>
	<h3>Example of numbered ACL:</h3>
	<p>
		<pre>access-list 100 permit tcp any host 120.25.35.1 eq telnet
access-list 100 permit tcp any host 120.25.35.1 eq http
access-list 100 permit tcp any host 120.25.35.1 eq 443
access-list 100 deny ip any host 120.25.35.1</pre>
	</p>
	<h3>Example of two named ACLs:</h3>
	<p>
		<pre>ip access-list standard mylist-stand
deny 10.1.0.0 0.0.255.255
deny 10.2.0.0 0.0.255.255
deny 10.3.0.0 0.0.255.255
permit any any

ip access-list extended mylist-ext
permit tcp 10.1.0.0 0.0.255.255 host 10.2.6.1 eq telnet
deny tcp 10.1.0.0 0.0.255.255 10.2.6.0 0.0.0.255 eq telnet
permit icmp any any 10 12
</pre>
	</p>
	<p>As you can see, named ACL has a kind of  "header" with identification info. Header starts a section of lines that belong to same access list (specified in header). Numbered ACLs do not have the first "header" line, they include identification info on each line in the list.
Each line is one rule in the list. They are interpreted consecutive from the first one to the last one. If a match is found, appropriate action (specified on matched line) is taken and the processing of the ACL is finished. If no match is found, the implicit "reject" action is taken
</p>
	<p>General template for specifying standard numbered ACLs is:</p>
	<p>
		<pre>access-list number action source_address_with_mask log</pre>
	</p>
	<p>General template for specifying extended numbered ACLs is:</p>
	<p>
		<pre>access-list number action protocol source_address_with_mask
  [source_port] destination_address_with_mask
  [destination_port] [various_protocol_options] [log | log-input]</pre>
	</p>
	<p>Template for the named form of ACL is similar  -  remove initial "<prikaz>access-list number</prikaz>" string</p>
	<p>Legend:</p>
	<p>
		<prikaz>
			<b>number</b>
		</prikaz> is unique identifier of ACL, it shows which lines belong to same ACL (to the same packet filter chain)</p>
	<p>
		<prikaz>
			<b>action</b>
		</prikaz> can be either deny (means that matching packet will be rejected), permit (means that matching packet will be accepted) or remark. Remark means that this line is not rule, just remark for list maintainer (the line contains no more information than this remark)</p>
	<p>Following values are criteria:</p>
	<p>
		<prikaz>
			<b>protocol</b>
		</prikaz> (only in extended ACL)  -  specifies type of protocol that has to be in packet (IP, TCP, UDP, ICMP)</p>
	<p>
		<prikaz>
			<b>source_address_with_mask</b>
		</prikaz> and <prikaz>
			<b>destination address_with_mask</b>
		</prikaz> are ranges of IP addresses (eg. subnets if the masks are contignuous) that will be matched against source or destination address of the packet. Masks are IOS specific  -  wildcard masks, bitwise NOT of normal subnet mask. The address and mask is separated with a space. So if we want to match whole 168.12.0.0/16 subnet, we use notation <prikaz>168.12.0.0 0.0.255.255</prikaz>
		<br/>
There are few abbreviations for this field: <prikaz>any</prikaz> means <prikaz>0.0.0.0 0.0.0.0</prikaz> (match is in every case), <prikaz>host</prikaz> means that the wildcard mask is <prikaz>0.0.0.0</prikaz> (match only on one specified host, not on subnet)
</p>
	<p>
		<prikaz>
			<b>source_port</b>
		</prikaz> and <prikaz>
			<b>destination_port</b>
		</prikaz> fields are used for TCP and UDP protocols (no use for IP or ICMP, of course). Match should be done on exact port numbers (keyword <prikaz>eq</prikaz>) or port range (keywords <prikaz>range,lt,gt,neq</prikaz>). These keywords are used like this:<br/>
		<prikaz>eq 22</prikaz> - match is made when the port equals to 22<br/>
		<prikaz>range 0 1024</prikaz>  - match is made when the port is between 0 and 1024<br/>
		<prikaz>lt 128</prikaz> - match is made when the port is lesser than 128<br/>
		<prikaz>gt 1024</prikaz> - match is made when the port is greater than 1024<br/>
		<prikaz>neq 80</prikaz> - match is made when the port not equals to 80<br/>
		<prikaz>neq http</prikaz>  - match is made when the port not equals to 80 (same as previous line but different notation)<br/>
The port number can be specified either as an decimal number or as text string (for well-known ports like 21=ftp, 23=telnet, 25=smtp, 80=http)
</p>
	<p>
		<prikaz>
			<b>various_protocol_options</b>
		</prikaz> are one or more of the following:</p>
	<p>
		<ul>
			<li>
				<prikaz>urg,rsh,pst,fin,ack,established,syn</prikaz> are state bits of TCP connection in TCP header. If a keyword is present, then desired bit in TCP header must be set (=1). Established means that syn bit must be 0 (allows only established connections)</li>
			<li>
				<prikaz>dscp</prikaz>,<prikaz>tos</prikaz> matches against certain value of TOS and DSCP fields in IP header</li>
			<li>
				<prikaz>fragments</prikaz> means that this rule is valid only for subsequent fragments of fragmented IP packet</li>
			<li>for ICMP protocol : <prikaz>type</prikaz> and <prikaz>code</prikaz> values could be specified as two consecutive numbers in this field (text representation of ICMP values is not supported in IOSConvert now).</li>
		</ul>
	</p>
	<p>
		<prikaz>
			<b>log</b>
		</prikaz> or <prikaz>
			<b>log-input</b>
		</prikaz> means that packet match here should be logged (without this field, only action is taken and no logging is provided)</p>
	<h3>XML representation</h3><p>
One line of access list means one <prikaz>&lt;packet-filter-rule&gt;</prikaz> element.
Actions and logging functions are specified in <prikaz>&lt;packet-action-list&gt;</prikaz> element (subelement of <prikaz>&lt;packet-filter-rule&gt;</prikaz>). <prikaz>&lt;accept-action&gt;</prikaz> is used for permit, <prikaz>&lt;drop-action&gt;</prikaz> is used for deny and <prikaz>&lt;log-action&gt;</prikaz> element is used for logging.
</p>

<h3>Example</h3>
	<p>
		<pre>access-list XXX permit XXX 
access-list XXX permit XXX log
access-list XXX deny XXX log-input
</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;packet-action-list&gt;
        &lt;accept-action count="no" /&gt; 
     &lt;/packet-action-list&gt;

&lt;packet-action-list&gt;
        &lt;accept-action count="no" /&gt; 
	   &lt;log-action count="no" /&gt;
&lt;/packet-action-list&gt;

&lt;packet-action-list&gt;
        &lt;drop-action count="no" /&gt; 
	   &lt;log-action count="no" level="notice"/&gt;
     &lt;/packet-action-list&gt;
</pre>
	</p>
	<p>Remarks are stored in <prikaz>&lt;description&gt;</prikaz> element (subelement of <prikaz>&lt;packet-filter-rule&gt;</prikaz>).</p>
	<h3>Example</h3>
	<p>
		<pre>access-list 100 remark This is remark to the next rule in chain...</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;packet-filters&gt;
  &lt;packet-filter-chain default-policy="drop-action" id="100"&gt;

    &lt;packet-filter-rule&gt;
      &lt;description&gt;
        This is remark to the next rule in chain...
  	    &lt;/description&gt;
    &lt;/packet-filter-rule&gt;

  &lt;/packet-filter-chain&gt;
&lt;/packet-filters&gt;

</pre>
	</p>
	<p>Source and destination addresses with their subnet masks are represented as <prikaz>&lt;prefix-list&gt;</prikaz> elements and referenced only in <prikaz>&lt;packet-match-list&gt;</prikaz> element.</p>
	<h3>Example</h3>
	<p>cp2 represents "<prikaz>any</prikaz>" keyword, cp3 represents "<prikaz>host 217.155.135.2</prikaz>"</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;prefix-lists&gt;

  &lt;prefix-list id="cp2" name="cp2"&gt;
    &lt;match-prefix address="0.0.0.0" length="32" af="ipv4" /&gt; 
  &lt;/prefix-list&gt;

  &lt;prefix-list id="cp3" name="cp3"&gt;
    &lt;match-prefix address="217.155.135.2" length="32" af="ipv4" /&gt; 
  &lt;/prefix-list&gt;

&lt;/prefix-lists>
</pre>
	</p>
	<p>Protocol criteria field is represented by following elements (all of the are subelements of <prikaz>&lt;packet-match-list&gt;</prikaz>)</p>
	<h3>Example for IP(v4) protocol</h3>
	<p>
		<pre>access-list NUMBER ACTION ip SRC_ADDRESS_MASK DST_ADDRESS_MASK
                fragments [dscp 12 | tos 3]</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;match-ipv4 fragments="subseq"&gt;
  &lt;match-source list="SRC_ADDRESS_MASK"/&gt;
  &lt;match-destination list="DST_ADDRESS_MASK"/&gt;
  [&lt;match-dsfield dscp="12"/&gt; | &lt;match-ecnfield ect="on" ce="on"/&gt;]
&lt;/match-ipv4&gt;
</pre>IPv6 element is similar to IPv4 element.</p>
	<h3>Example for ICMP protocol</h3>
	<p>
		<pre>access-list NUMBER ACTION icmp SRC_ADDRESS_MASK DST_ADDRESS_MASK 15 12</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;match-icmp type="15" code="12"/&gt;</pre>
	</p>
	<h3>Example for TCP protocol</h3>
	<p>
		<pre>access-list NUMBER ACTION tcp SRC_ADDRESS_MASK gt 1024
                DST_ADDRESS_MASK eq 22 ack syn</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;match-tcp&gt;
  &lt;match-source-port-range lo="1024" hi="65535" negate="no"/&gt;
  &lt;match-destination-port-range lo="22" hi="22" negate="no"/&gt;
  &lt;match-tcp-flags syn="on" ack="on" .../&gt;
&lt;/match-tcp&gt;
</pre>
	</p>
	<h3>Example for UDP protocol</h3>
	<p>
		<pre>access-list NUMBER ACTION udp SRC_ADDRESS_MASK lt 1024
                DST_ADDRESS_MASK neq 53</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;match-udp&gt;
  &lt;match-source-port-range lo="0" hi="1024" negate="no"/&gt;
  &lt;match-destination-port-range lo="53" hi="53" negate="yes"/&gt;
&lt;/match-udp&gt;
</pre>
	</p>
	<p>The criteria are specified in <prikaz>&lt;packet-match-list&gt;</prikaz> element (subelement of <prikaz>&lt;packet-filter-rule&gt;</prikaz>).</p>
	<h3>Example</h3>
	<p>
		<pre>access-list 1 permit host 217.155.135.2
access-list 1 deny any
</pre>
	</p>
	<h3>XML Equivalent</h3>
	<p>
		<pre>&lt;packet-filters&gt;
  &lt;packet-filter-chain default-policy="drop-action" id="1"&gt;

    &lt;packet-filter-rule&gt;
      &lt;packet-match-list&gt;
        &lt;match-ipv4 fragment="all"&gt;
          &lt;match-source list="cp3" negate="no" /&gt;
   &lt;/match-ipv4&gt;
      &lt;/packet-match-list&gt;
 &lt;packet-action-list&gt;
        &lt;accept-action count="no" /&gt; 
 &lt;/packet-action-list&gt;
    &lt;/packet-filter-rule&gt;

    &lt;packet-filter-rule&gt;
      &lt;packet-match-list&gt;
   &lt;match-ipv4 fragment="all"&gt;
  		&lt;match-source list="cp2" negate="no" /&gt; 
  	   &lt;/match-ipv4&gt;
  	 &lt;/packet-match-list&gt;
 &lt;packet-action-list&gt;
   &lt;drop-action count="no" /&gt; 
 &lt;/packet-action-list&gt;
    &lt;/packet-filter-rule&gt;

  &lt;/packet-filter-chain&gt;
&lt;/packet-filters&gt;
</pre>
	</p>
	<h1>Remarks</h1>
	<p>
		<ul>
			<li>ESP protocol is not supported now (no support in DTD).</li>
			<li>IPv6 addresses access-lists are on basic level of support due to developing syntax of IPv6 ACLs in Cisco IOS (see <cite href="Gro01"/>)</li>
			<li>MAC addresses access-lists are supported, but currently only on single host basis (no "net"-mask or groups of MAC addresses).</li>
		</ul>
	</p>
	<h1>References</h1>
	<seznamknih>
		<kniha id="Lho03">
Lhotka Ladislav,  <i>XML schema for router configuration data: An annotated DTD</i>
			<br/>CESNET Technical Report 2/2003
</kniha>
		<kniha id="Cis02">
Cisco Systems, Inc., <i>Cisco IOS Command References Master Index, Release
12.0</i><br/>
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/12cgcr/rbkixol.htm, 2002
</kniha>
		<kniha id="Gro01">
Grossetete Patrick, <i>Cisco IOS IPv6 Access Control Lists</i><br/>
http://www.cisco.com/warp/public/732/Tech/ipv6/docs/ipv6_acls0403.ppt, Cisco Systems, Inc., 2001
</kniha>
		<kniha id="Lib">
CESNET z.s.p.o., <i>Liberouter project, PC based IPv6 router</i>
			<br/>
http://www.liberouter.org 
</kniha>
	</seznamknih>
</zprava>

