// // Copyright (C) 2000 Institut fuer Telematik, Universitaet Karlsruhe // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // // @page ipaddresses.html, Specifying IP (IPv6) addresses in module parameters // // In INET, TCP, UDP and all application layer modules work with // both IPv4 and IPv6. Internally they use the IPvXAddress C++ class, which // can represent both IPv4 and IPv6 addresses. // // Most modules use the IPAddressResolver C++ class to resolve addresses // specified in module parameters in omnetpp.ini. // IPAddressResolver accepts the following syntax: // // - literal IPv4 address: "186.54.66.2" // - literal IPv6 address: "3011:7cd6:750b:5fd6:aba3:c231:e9f9:6a43" // - module name: "server", "subnet.server[3]" // - interface of a host or router: "server/eth0", "subnet.server[3]/eth0" // - IPv4 or IPv6 address of a host or router: "server(ipv4)", // "subnet.server[3](ipv6)" // - IPv4 or IPv6 address of an interface of a host or router: // "server/eth0(ipv4)", "subnet.server[3]/eth0(ipv6)" // // @page irt.html, The IP routing files // // Routing files are files with <tt>.irt</tt> or <tt>.mrt</tt> extension, // and their names are passed in the routingFileName parameter // to RoutingTable modules. RoutingTables are present in all // \IP nodes (hosts and routers). // // Routing files may contain network interface configuration and static // routes. Both are optional. Network interface entries in the file // configure existing interfaces; static routes are added to the route table. // // Interfaces themselves are represented in the simulation by modules // (such as the PPP module). Modules automatically register themselves // with appropriate defaults in the RoutingTable, and entries in the // routing file refine (overwrite) these settings. // Interfaces are identified by names (e.g. ppp0, ppp1, eth0) which // are normally derived from the module's name: a module called // <tt>"ppp[2]"</tt> in the NED file registers itself as interface ppp2. // // An example routing file (copied here from one of the example simulations): // // <pre> // ifconfig: // // # ethernet card 0 to router // name: eth0 inet_addr: 172.0.0.3 MTU: 1500 Metric: 1 BROADCAST MULTICAST // Groups: 225.0.0.1:225.0.1.2:225.0.2.1 // // # Point to Point link 1 to Host 1 // name: ppp0 inet_addr: 172.0.0.4 MTU: 576 Metric: 1 // // ifconfigend. // // route: // 172.0.0.2 * 255.255.255.255 H 0 ppp0 // 172.0.0.4 * 255.255.255.255 H 0 ppp0 // default: 10.0.0.13 0.0.0.0 G 0 eth0 // // 225.0.0.1 * 255.255.255.255 H 0 ppp0 // 225.0.1.2 * 255.255.255.255 H 0 ppp0 // 225.0.2.1 * 255.255.255.255 H 0 ppp0 // // 225.0.0.0 10.0.0.13 255.0.0.0 G 0 eth0 // // routeend. // </pre> // // The <tt>ifconfig...ifconfigend.</tt> part configures interfaces, // and <tt>route..routeend.</tt> part contains static routes. // The format of these sections roughly corresponds to the output // of the <tt>ifconfig</tt> and <tt>netstat -rn</tt> Unix commands. // // An interface entry begins with a <tt>name:</tt> field, and lasts until // the next <tt>name:</tt> (or until <tt>ifconfigend.</tt>). It may // be broken into several lines. // // Accepted interface fields are: // - <tt>name:</tt> - arbitrary interface name (e.g. eth0, ppp0) // - <tt>inet_addr:</tt> - \IP address // - <tt>Mask:</tt> - netmask // - <tt>Groups:</tt> Multicast groups. 224.0.0.1 is added automatically, // and 224.0.0.2 also if the node is a router (IPForward==true). // - <tt>MTU:</tt> - MTU on the link (e.g. Ethernet: 1500) // - <tt>Metric:</tt> - integer route metric // - flags: <tt>BROADCAST</tt>, <tt>MULTICAST</tt>, <tt>POINTTOPOINT</tt> // // The following fields are parsed but ignored: <tt>Bcast</tt>,<tt>encap</tt>, // <tt>HWaddr</tt>. // // Interface modules set a good default for MTU, Metric (as 2e9/bitrate) and // flags, but leave inet_addr and Mask empty. inet_addr and mask should // be set either from the routing file or by a dynamic network configuration // module. // // The route fields are: // // <pre> // Destination Gateway Netmask Flags Metric Interface // </pre> // // <i>Destination, Gateway</i> and <i>Netmask</i> have the usual meaning. // The <i>Destination</i> field should either be an \IP address or "default:" // (to designate the default route). For <i>Gateway</i>, <tt>*</tt> is also // accepted with the meaning <tt>0.0.0.0</tt>. // // <i>Flags</i> denotes route type: // - <i>H</i> "host": direct route (directly attached to the router), and // - <i>G</i> "gateway": remote route (reached through another router) // // <i>Interface</i> is the interface name, e.g. <tt>eth0</tt>. // // // // @page ipv6overview.html, IPv6 model overview // // \IPv6 support is implemented by several cooperating modules. The IPv6 module // implements \IPv6 datagram handling (sending, forwarding etc). It relies on // RoutingTable6 to get access to the routes. RoutingTable6 also contains the // neighbour discovery data structures (destination cache, neighbour cache, // prefix list -- the latter effectively merged into the route table). Interface // configuration (address, state, timeouts etc) is held in the InterfaceTable, // in <tt>IPv6InterfaceData</tt> objects attached to <tt>InterfaceEntry</tt> // as its <tt>ipv6()</tt> member. // // The module IPv6NeighbourDiscovery implements all tasks associated with // neighbour discovery and stateless address autoconfiguration. The data // structures themselves (destination cache, neighbour cache, prefix list) // are kept in RoutingTable6, and are accessed via public C++ methods. // Neighbour discovery packets are only sent and processed by this module -- // when IPv6 receives one, it forwards the packet to IPv6NeighbourDiscovery. // // The rest of \ICMPv6 (\ICMP errors, echo request/reply etc) is implemented in // the module ICMPv6, just like with \IPv4. \ICMP errors are sent into // IPv6ErrorHandling, which the user can extend or replace to get errors // handled in any way they like. //