TCP/IP configuration
# Commands
some are modules in - !Boot.Resources.!Internet.bin. these are for Iyonix and A9 except where noted. ARP ekinfo exinfo A9 GetHost IfConfig (If is unix/riscos IPConfig is Windows IfRConfig InetSta IPVars Map-MBone MRInfo MTrace Ping Pong Route ShowStat SysCtl TraceRoute * replaced by Darren Salt version# ARP
Tip: ping router before using *arp - it wakes up old entries Usage: arp -a [kernel] [kernel_memory] arp -d <hostname > arp -s <hostname > <ether_addr > [temp] [pub] arp -f <filename > displays and modifies the address resolution protocol tables Options: -a displays all of the current table entries -d deletes the given hostname -s create an entry for the host with given ethernet address -f read and add multiple entries from the given filename eg ARP -a displays entries in table of current communicants eg ARP -s 62.185.32.4 0:40:8c:5d:64:0b supposed to set ip address of the AXIS print server but did not work# *dhcpinfo
DHCP 0.21 (05 Aug 2004) Interface : ek0 State : BOUND IP address : 192.168.1.8 DHCP server : 192.168.1.1 Renew lease @ Sun Apr 20 08:52:55 2008 Rebind lease @ Mon Apr 21 11:52:55 2008 Lease expires @ Mon Apr 21 20:52:55 2008# *ekinfo (exinfo for A9)
EtherK device driver for Intel PRO/1000 network controllers, ver 0.18 DCI Version 4.05 Supported network cards detected: 1 Unit 0 (location: Motherboard) Ethernet address 00:09:95:00:15:C8 Link is up; 100 Mbps Full Duplex Controller mode: Multicast, reject frames with errors Frame types claimed: IEEE 802.3 (multicast) handler=(FC3297E8,FB407504) Ethernet 0800 (multicast) handler=(FC2E627C,FB407414) Ethernet 0806 (normal) handler=(FC2E627C,FB407414) Ethernet 8035 (normal) handler=(FC2E627C,FB407414) Hardware statistics summary: TX frames 2,710 : RX frames 2,944 TX bytes 236,449 : RX bytes 3,782,790 TX errors 0 : RX errors 0 Driver statistics (only non-zero statistics are reported): Frames received: 2,944 *# *FwShow displays all currently known Freeway objects
Syntax: *FWShow *fwshow No remote nets Type 2: (Printers) Type 5: (Hosts) *Name=panther Holder=192.168.1.22 Name=riscpc Holder=192.168.1.21 Type 1: (Discs) Name=HardDisc4 Holder=192.168.1.21 Name=_S1501a8c0 Holder=192.168.1.21#gethost
*gethost lappcjr Hostname: guest Alias: lappcjr Alias: no10 Address: 192.168.1.10 type: 2 length: 4 - hosts file 26.01.05 127.0.0.1 loopback localhost loghost 62.185.32.1 riscpc 62.185.32.2 panther 62.185.32.3 JULIEXP 62.185.32.199 LAPPCJR - hosts file 04.11.05 127.0.0.1 loopback localhost loghost 192.168.1.1 vigor 192.168.1.10 guest 192.168.1.11 riscpc julie pc700 192.168.1.12 panther john 192.168.1.13 jam mac 192.168.1.21 maryland 192.168.1.199 lappcjr laptop# *host (see prm 4)
Host looks for information about Internet hosts without using the Resolver module. It gets this information from a set of interconnected servers that are spread across the world. By default, it simply converts between host names and Internet addresses. However with the -t or -a options, it can be used to find all of the information about this host that is maintained by the domain server.# IfConfig
Usage: ifconfig [-ea] <interface > [address [dest_addr]] [parameters] configures network interface parameters Options: -e write any errors to Inet$Error -a list all present interfaces. Parameters: up Mark an interface up down Mark an interface down arp Enable the use of ARP -arp Disable the use of ARP metric <n > Set the routing metric to n (default 0) netmask <mask > Set the interface netmask to mask broadcast <addr > Set the network broadcast to addr alias <addr > Set an additional interface address delete <addr > Remove an interface address mtu <n > Set the interface maximum transmission unit to n * eg *ifconfig -a lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST > mtu 16384 inet 127.0.0.1 netmask 0xff000000 ek0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST > mtu 1500 inet 192.168.1.22 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:09:95:00:15:c8# inetstat -?
inetstat: illegal option -- ? Usage: inetstat [-Aan] [-f <address_family >] [-M <core >] [-N <system >] inetstat [-bdghimnrs] [-f <address_family >] [-M <core >] [-N <system >] inetstat [-bdn] [-I <interface >] [-M <core >] [-N <system >] [-w <wait >] inetstat [-M <core >] [-N <system >] [-p <protocol >] shows network status Options: -A show addresses of protocol control blocks associated with sockets -a show the state of all sockets -b show the number of bytes in and out -d show the number of dropped packets -g show information relating to group address (multicast) -h show the state of the IMP host table -i show the state of interfaces which have been autoconfigured -m show statistics recorded by the memory management routines -n do not attempt to lookup names using DNS -r show routing tables -f limit statistics to the given address family -M extract values associated with name list from given core -N extract the namelist from the given system -I show information about the specified interface only -w show statistics at intervals of wait seconds -p show only statistics for the named protocol -s show per protocol statistics eg *inetstat -r *** use -nr if you want to see ip addresses Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.1.1 UGSc 0 0 ek0 1.255.255.255 link#2 UHLW 1 9 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.1 link#2 UC 0 0 192.168.1.1 0.50.7f.24.8e.0 UHLW 1 0 ek0 1197 192.168.1.5 0.11.ac.0.5.75 UHLW 0 0 ek0 570 192.168.1.255 link#2 UHLW 2 59 *# Ipconfig
Windows Only!! but very useful eg ipconfig /all on LAPPCJR shows mac address shows :- Windows IP Configuration Host Name . . . . . . . . . . . . : lappcjr Primary Dns Suffix . . . . . . . : ASTRAC.local Node Type . . . . . . . . . . . . : Broadcast IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : ASTRAC.local Ethernet adapter Wireless Network Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : D-Link AirPlus DWL-650+ Wireless Cardbus Adapter Physical Address. . . . . . . . . : 00-80-C8-18-A4-CF Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.1.15 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DNS Servers . . . . . . . . . . . : 192.168.1.1 Lease Obtained. . . . . . . . . . : 27 December 2005 16:56:32 Lease Expires . . . . . . . . . . : 30 December 2005 16:56:32 Ethernet adapter Local Area Connection: Media State . . . . . . . . . . . : Media disconnected Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC Physical Address. . . . . . . . . : 00-40-D0-20-AA-E0# Ping
(look into PingMod on A9) Usage: ping [-Rdfnqrv] [-c count] [-i wait] [-l preload] [-p pattern] [-s packetsize] <host > sends an echo request to a host or gateway Options: -R record the route taken -d set the debug option on the socket used -f flood ping at least 100 per second -n do not attempt to lookup names using DNS -q be quiet, show only summary lines on exit -r bypass the routing tables and send direct -v be verbose -c stop after sending and receiving count packets -i wait the given number of seconds between pings -l send preload packets as fast as possible first -p specify up to 16 pad bytes to pad the packet -s set the packet size (default 56) try ping to the broadcast address - this will identify most addresses on the network (XP does not respond) eg *ping -c 2 192.168.1.255 PING 192.168.1.255 (192.168.1.255): 56 data bytes 64 bytes from 192.168.1.12: icmp_seq=0 ttl=255 time=0.349 ms 64 bytes from 192.168.1.10: icmp_seq=0 ttl=64 time=1.128 ms (DUP!) 64 bytes from 192.168.1.255: icmp_seq=0 ttl=255 time=1.542 ms (DUP!) 64 bytes from 192.168.1.12: icmp_seq=1 ttl=255 time=0.302 ms# *pong -?
Unknown argument `?' Usage: pong [-t|-u] [-bslrd <arguments >] <dest > send responses to echo request packets Options: -u use UDP as transport (the default) -t use TCP as transport -b broadcast packet (udp only) -s use next arg as service required -l use next arg as length of output packet -r use next arg as repeat count (0 = forever) -d use next arg as repeat delay in u-secs -S lists available services *# *showstat
DCI4 Statistics Display 0.02 (17-Jan-03) Copyright (C) Element 14 Ltd. 1999. All rights reserved. Interface name : ek Unit number : 0 Hardware address : 00:09:95:00:15:c8 Location : Motherboard Driver module : EtherK Supported features : Multicast reception is supported : Promiscuous reception is supported : Interface has a hardware address : Driver can alter interface's hardware address : Driver supplies standard statistics MTU : 1500 Interface type : 100baseTX Link status : Interface OK Active status : Interface is active Receive mode : Direct, broadcast and multicast Interface mode : Full duplex Polarity : Correct TX frames : 2700 TX bytes : 235767 RX frames : 2931 RX bytes : 3781916 Module MbufManager is an mbuf manager Mbuf Manager : System wide memory buffer (mbuf) memory management Active sessions : 3 Sessions opened : 4 Sessions closed : 1 Memory pool size : 262144 Small block size : 128 Large block size : 1536 Mbuf exhaustions : 0 Small mbufs in use : 1 Small mbufs free : 511 Large mbufs in use : 0 Large mbufs free : 128 *# SysCtl
Usage: sysctl [-bden] <variable > ... sysctl [-bne] -w <variable >=<value > ... sysctl [-bden] -a sysctl [-bden] -A sysctl [-bden] -X Options: -b output the variables in raw binary mode -d display the description rather than its value -n suppress the printing of the field name -w set the MIB to the given value -a list all the current string and integer variables -A list all the known MIB names including opaques -X same as -A except opaque values are hex dumped -e write any error to Inet$Error eg *sysctl -a net.inet.ip.forwarding: 0 net.inet.ip.redirect: 1 net.inet.ip.ttl: 64 net.inet.ip.rtexpire: 3600 net.inet.ip.rtminexpire: 10 net.inet.ip.rtmaxcache: 128 net.inet.ip.sourceroute: 0 net.inet.ip.intr_queue_maxlen: 100 net.inet.ip.intr_queue_drops: 0 net.inet.ip.fragttl: 60 net.inet.ip.accept_sourceroute: 0 net.inet.ip.subnets_are_local: 0 .........# traceroute
the version of traceroute supplied with the Iyonix uses UDP which doesnt work with the draytek router so I use Darren Salt's traceroute from nettools which uses ICMP *traceroute Darren Salt ICMP *traceroute Version 1.4a12 Usage: traceroute [-dFIlnrvx] [-g gateway] [-i iface] [-f first_ttl] [-m max_ttl] [ -p port] [-q nqueries] [-s src_addr] [-t tos] [-w waittime] [-z pausemsecs] host [packetlen] *traceroute -I www.astrac.com traceroute to www.astrac.com (137.134.240.96), 30 hops max, 40 byte p... 1 n1 (192.168.1.1) 30 ms 10 ms 0 ms 2 213.130.145.49 (213.130.145.49) 30 ms 20 ms 10 ms 3 g2-74.cr2-u8-sal-uk.as15444.net (213.130.145.126) 30 ms 20 ms 10 ms 4 g3-0-41.cr1-u1-sal-uk.as15444.net (82.163.3.161) 30 ms 20 ms 10 ms 5 g2.cr1-telc-man-uk.as15444.net (213.130.130.45) 30 ms 20 ms 20 ms 6 194.168.63.123 (194.168.63.123) 20 ms 20 ms 10 ms 7 so-2-0-0-bcr1.lnd.cw.net (166.63.163.225) 30 ms 20 ms 30 ms 8 ge-5-0-0-dcr2.lnd.cw.net (195.2.9.90) 20 ms 20 ms 30 ms 9 ge-5-0-0-dcr2.lnd.cw.net (195.2.10.113) 90 ms 100 ms 100 ms 10 ge-5-0-0-dcr2.lnd.cw.net (195.2.3.14) 90 ms 100 ms 90 ms 11 paix.nyw.ny.rcn.net (198.32.118.23) 100 ms 100 ms 90 ms 12 ge2-0.core2.nyw.ny.rcn.net (207.172.15.66) 100 ms 90 ms 100 ms 13 pos6-0.core2.sbo.ma.rcn.net (207.172.19.36) 100 ms 100 ms 100 ms 14 ge6-1.aggr1.sbo.ma.rcn.net (207.172.15.151) 110 ms 100 ms 90 ms 15 ge-5-0-0-dcr2.lnd.cw.net (208.58.17.62) 120 ms 200 ms 200 ms 16 www.astrac.com (137.134.240.96) 210 ms 100 ms 100 ms * *traceroute original UDP - does not work with vigor routers Usage: traceroute [-dnrv] [-m max_ttl] [-p port#] [-q nqueries] [-s src_addr] [-t tos] [-w wait] <host > [data size] prints the route packets take to a host Options: -d turn debugging on -n do not attempt to lookup names using DNS -r bypass the normal routing tables and send direct -v be verbose -m sets the maximum time-to-live of the trace packet -p set the base port number to probe (default 33434) -q set the number of queries per ttl (default 3) -s mark outgoing packets as coming from the given address -t set the type-of-service in probe packets -w wait the given time for a response to a probe *traceroute www.google.com traceroute to www.l.google.com (216.239.59.103), 30 hops max, 40 b... 1 vigor (192.168.1.1) 18.763 ms 5.886 ms 5.929 ms 2 * * *traceroute vpn traceroute to astracvpn (212.135.39.2), 30 hops max, 40 byte packets 1 n1 (192.168.1.1) 18.629 ms 6.323 ms 6.648 ms 2 *# Utilities live in the Resource filer
Resources:$.Resources.Internet.bin.SysCtl Resources:$.Resources.Internet.bin.Pong Resources:$.Resources.Internet.bin.Ping Resources:$.Resources.Internet.bin.IfConfig Resources:$.Resources.Internet.bin.ARP# whoami
ifconfig -a shows ip address and mac address inetstat -nr show other ip addr and mac adresses ping 192.168.1.255 shows all ip addresses arp -a maps ip to mac address ekinfo IYO network card info inc mac addr exinfo (A9) network card info inc mac addr fwshow - or log on to Draytek and > >system management > diagnostic tools > ethernet ARP Cache table shows connected ip addresses and MAC addresses linux > >Network >firelog >q----ifconfig
© JR 2013