IntroNetworks

From UoWiki

Jump to: navigation, search

[edit] Networks introduction

Commands used today

  1. ifconfig - This will tell you what interfaces you have configured on your machine, and what they're doing. Useful for finding out your IP address and setting it (either at boot time - permanently in rc.conf, or whenever you feel like it
  2. netstat -rn - This shows you the routing table of your local machine. Also good for finding out your default gateway
  3. traceroute - shows you the machines that route your query across the Internet.
  4. w - shows you all the users who are logged in, and info about them
  5. who - does the same but in a different format
  6. who am I - shows you the output of who but only for you
  7. whoami - tells you who you are at that particular moment
  8. nslookup - hereby undeprecated / - passed by majority vote 2003-02-03
  9. mtr - mother's traceroute - makes pretty patterns across the screen. (generated using traceroute) - good for spotting problems with links, but it is a bit Mickey Mouse. But good fun.
  10. netcat - network swiss army knife (meeow). Too simple to explain but it kind of does what cat does (ie shows you the contents of a file) but over a network. Also can read and write. Very useful. Check the man page. You can open raw connections with in. So netcat is as useful as any network protocol. Good for diagnosing stuff too.
  11. netstat -rn - useful for showing your your default gateway and routing table.
  12. systat - shows you systems information in realtime - everything frim IOs to pigs.
  13. sockstat - shows you the status of your socks. (sockets). ha.
  14. nmap - naughty - network port scanner. Do not use in the world, but you can use it locally. If you use this on the Internet you will get arrested. It will take longer than 1 week, but probably less than 2.


Files we looked at

rc.conf - your general setup (hostname, etc)

hosts - static routes to machines, named and IP addressed - kind of (but not really) a local DNS thing.

resolv.conf - tells you what DNS servers to use.

Personal tools