Thursday, July 10, 2008

ipconfig (Windows NT / Windows 98)

Use ipconfig /all to see the complete IP configuration and the MAC address for any device.


winipcfg (Windows 95)

Use winipcfg to see the complete IP configuration and the MAC address for any device.



ifconfig (UNIX)

Use ifconfig -au to see the complete IP configuration and the MAC address for all devices on the host.



netstat (UNIX and Windows)

Use netstat –rn to view the routing tables for the host.

route (Windows)

Use route print to view the routing tables for a Windows host.


route (Windows)

Use route add mask to add a new route to the routing table. You can also use default instead of

and .

Use route delete to delete a route from the routing table.

(You must be Administrator to do this)


route (Unix)

Use route add [-net | -host] destination gateway

Use route delete to delete a route from the routing table

(You must be root to do this)



ARP (UNIX and Windows)

Use arp –a to display all the MAC addresses a host has in its ARP tables.

Use arp –d [address] to delete a MAC address from the table.



ping (UNIX and Windows)

Use ping ping a host and see its IP address.



traceroute (UNIX)

Use traceroute to ‘trace’ the route a packet follows from the local host to a remote host.

Use traceroute –n to do a traceroute without doing a DNS lookup for every host in the path.



tracert (Windows)

Use tracert to ‘trace’ the route a packet follows from the local host to a remote host.

Use tracert –d to do a traceroute without doing a DNS lookup for every host in the path.



Tips and tricks

The default route is also referred to as 0.0.0.0/0 or 0.0.0.0:0.0.0.0.
Remember that routes are directional. This means that if you have routes from A to B, you still need routes from B to A to transfer data.
If you can ping from A to B then all the routes are correct (A to be and B to A).
Routing works on a next-hop basis. The next-hop must be in the same subnet as one of the router’s own devices.
You can use ipconfig / ifconfig / winipcfg to see what the IP address and mask is configured for each device on the host.
On Ethernet, a router will always have an entry for the next-hop in its ARP tables. If router B is not in the ARP tables of router A, then B cannot be a next-hop for A. The same goes for the default route, or default gateway on a router or on a host.
You can use traceroute (tracert) to monitor the path a packet follows to its destination. The address shown is always the address of the device nearest to the source.

0 comments:

Post a Comment

 

Subscribe in Bloglines Msn bot last visit powered by MyPagerank.Net Yahoo bot last visit powered by MyPagerank.Net
I heart FeedBurner downtime checker The Ubuntu Counter Project - user number # 31290

 
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Powered by TadPole
FOG FLAMES