📄 node161.html
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by: Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by: Nikos Drakos, CBLU, University of Leeds* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>14.10 Commands at a glance</TITLE><META NAME="description" CONTENT="14.10 Commands at a glance"><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="previous" HREF="node160.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node160.html"><LINK REL="up" HREF="node142.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node142.html"><LINK REL="next" HREF="node162.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node162.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html3744" HREF="node162.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node162.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3738" HREF="node142.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node142.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3734" HREF="node160.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node160.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3740" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html3742" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html3745" HREF="node162.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node162.html">15. The (Revised) Addressing</A><B> Up:</B> <A NAME="tex2html3739" HREF="node142.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node142.html">14. Local Area Networks</A><B> Previous:</B> <A NAME="tex2html3735" HREF="node160.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node160.html">14.9 LANs and routing</A>   <B> <A NAME="tex2html3741" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html3743" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H1><A NAME="SECTION0311100000000000000000"></A><A NAME="sec:lancommand"></A><BR>14.10 Commands at a glance</H1><P>The following is a list of lan related commands commonly used insimulation scripts:<DIV ALIGN="LEFT"><TT>$ns_ make-lan nodelist bw delay LL ifq MAC channel phy</TT><BR>Creates a lan from a set of nodes given by <nodelist>. Bandwidth, delay characteristicsalong with the link-layer, Interface queue, Mac layer and channel type for thelan also needs to be defined. Default values used are as follows:<BR><LL> .. LL<BR><ifq>.. Queue/DropTail<BR><MAC>.. Mac<BR><channel>.. Channel and <BR><phy>.. Phy/WiredPhy</DIV><P><DIV ALIGN="LEFT"><TT>$ns_ newLan nodelist BW delay args</TT><BR>This command creates a lan similar to make-lan described above. But thiscommand can be used for finer control whereas make-lan is a more convinient andeasier command. For example newLan maybe used to create a lan with hierarchicaladdresses. See /tcl/ex/vlantest-hier.tcl, vlantest-mcst.tcl, lantest.tcl,mac-test.tcl for usage of newLan. The possible argument types that can bepassed are LL, ifq, MAC, channel, phy and address.</DIV><P><DIV ALIGN="LEFT"><TT>$lannode cost c</TT><BR>This assigns a cost of c/2 to each of the (uni-directional) links in the lan.</DIV><P><DIV ALIGN="LEFT"><TT>$lannode cost?</TT><BR>Returns the cost of (bi-directional) links in the lan, i.e c.</DIV><P><DIV ALIGN="LEFT">Internal procedures :</DIV><P><DIV ALIGN="LEFT"><TT>$lannode addNode nodes bw delay LL ifq MAC phy</TT><BR>Lan is implemented as a virtual node. The LanNode mimics a real node and usesan address (id) from node's address space.This command adds a list of <nodes> to the lan represented by lannode.The bandwidth, delay and network characteristics of nodes are given bythe above arguments. This is an internal command used by make-lan and newLan.</DIV><P><DIV ALIGN="LEFT"><TT>$lannode id</TT><BR>Returns the virtual node's id.</DIV><P><DIV ALIGN="LEFT"><TT>$lannode node-addr</TT><BR>Returns virtual nodes's address.</DIV><P><DIV ALIGN="LEFT"><TT>$lannode dump-namconfig</TT><BR>This command creates a given lan layout in nam. This function may be changedto redefine the lan layout in a different way.</DIV><P><DIV ALIGN="LEFT"><TT>$lannode is-lan?</TT><BR>This command always returns 1, since the node here is a virtual noderepresenting a lan. The corresponding command for base class Node <TT>$node is-lan?</TT> always returns a 0.</DIV><P><DIV ALIGN="LEFT"></DIV><HR><!--Navigation Panel--><A NAME="tex2html3744" HREF="node162.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node162.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3738" HREF="node142.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node142.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3734" HREF="node160.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node160.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3740" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html3742" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html3745" HREF="node162.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node162.html">15. The (Revised) Addressing</A><B> Up:</B> <A NAME="tex2html3739" HREF="node142.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node142.html">14. Local Area Networks</A><B> Previous:</B> <A NAME="tex2html3735" HREF="node160.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node160.html">14.9 LANs and routing</A>   <B> <A NAME="tex2html3741" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html3743" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -