<p>Just a collection of semi-usefull commands.</p>{"id":1030,"date":"2009-06-18T13:57:57","date_gmt":"2009-06-18T17:57:57","guid":{"rendered":"http:\/\/patrickv.info\/wordpress\/?p=64"},"modified":"2009-06-18T13:57:57","modified_gmt":"2009-06-18T17:57:57","slug":"misc-network-commands","status":"publish","type":"post","link":"https:\/\/rootuser.ninja\/index.php\/2009\/06\/18\/misc-network-commands\/","title":{"rendered":"Misc. network commands"},"content":{"rendered":"<p>Just a collection of semi-usefull commands.<br \/>\n<!--more--><\/p>\n<p>lsdev -Cc if &#8211; Lists all available\/defined network interfaces<\/p>\n<p>chdev -l (device name) -a hostname=(hostname) &#8211; Changes hostname permanently<\/p>\n<p>ifconfig (device name) detach &#8211; Removes the network card from the network interface list<\/p>\n<p>ifconfig lo0 alias 195.60.60.1 &#8211; Create alias ip address for loopback<\/p>\n<p>route (add\/delete) (-net\/-host) (destination) (gateway) &#8211; Adds or deletes routes to other networks or hosts, does not update the ODM database and will be lost at reboot.<br \/>\n     route add -net 194.60.89.0 194.60.90.4<\/p>\n<p>chdev -l en0 -a &#8220;net,-hopcount,1,-netmask,netmask,destination,gateway&#8221; &#8211; Adds a route and adds entry into ODM, route survives a reboot.<br \/>\n     chdev -l en0 -a &#8220;net,-hopcount,1,-netmask,255.255.255.0,207.156.168.0,10.0.15.254&#8221;<\/p>\n<p>route -rn &#8211; Display route table.<\/p>\n<p>odmget -q &#8220;attribute=route&#8221; CuAt &#8211; Displays routes in the ODM.<\/p>\n<p>lsattr -EHl en0 &#8211; Displays routes set in ODM and hostname<\/p>\n<p>odmget -q &#8220;name=en0&#8221; CuAt &#8211; Displays routes set in ODM and hostname<\/p>\n<p>netstat -i &#8211; Displays interface statistics<\/p>\n<p>entstat -d (ethernet adapter eg en0) &#8211; Displays ethernet statistics<\/p>\n<p>arp -a &#8211; Displays ip to mac address table from arp cache<\/p>\n<p>stopsrc -g tcpip &#8211; Stops all running TCP\/IP daemons<\/p>\n<p>\/etc\/tcp.clean &#8211; Stops all running TCP\/IP daemons and removes all lock files<\/p>\n<p>\/etc\/rc.tcpip &#8211; Start all TCP\/IP daemons. Do not use startsrc -g tcpip as this will start all TCP\/IP daemons including routed &#038; gated<\/p>","protected":false},"excerpt":{"rendered":null,"protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,1],"tags":[],"class_list":["post-1030","post","type-post","status-publish","format-standard","hentry","category-aix-notes","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts\/1030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/comments?post=1030"}],"version-history":[{"count":0,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts\/1030\/revisions"}],"wp:attachment":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/media?parent=1030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/categories?post=1030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/tags?post=1030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}