15-Discovering Your Network
- When troubleshooting a network…
- 1. ifconfig
- basic network setup
- make sure you even have a connection
- routed traffic vs LAN traffic
- 2. Make sure you have a clean connection to your router
- does your mac know which machine the router is?
- netstat
- extremely powerful
- netstat -rn
- -r outputs routing tables
- Normally netstat does DNS lookups to change the IP addresses
into URLs
- we dont want that, because all the IP addresses we are
looking at are LAN IP addresses
- -n leaves them as IP addresses
- Output:
- Routing Tables
- Internet (refers to IPv4)
- columns:
- destination
- gateway
- Flags
- Refs
- Use
- Netif
- Expire
- Internet6 (refers to IPv6)
- Columns
- Destination
- gateway
- Flags
- Netif
- Expire
- Just ignore this part
- Look at the Internet: Default and Gateway Columns
- under Destination, look for Row that starts with default
- note the IP address for that row under gateway
- that is the IP address of your router's default gateway
- If you have more than one Network interface at a time
(ethernet, wifi, etc)
- look under the Netif column to see which one
- Now we know the IP address of what your mac thinks is the default
gateway
- ping
- sends out an ICMP packet to a specified target, and requests a
reply
- ping some IP address
- or a URL
- rows of data should start flowing down the screen
- will ping infinitely until told to stop
- they are listed as they are received
- not when they are sent
- to kill: CTRL+C
- Shows two summary lines
- # packets transmitted, # packets received, % Packet loss
- on your local network, you should NEVER have packet loss
- if you do, you have hardware problems, like weak wifi
signal, or a frayed Ethernet cable
- round-trip min/avg/max/stddev = #/#/#/# ms
- If the Ping works, then the problem exists between the Router and
the Internet
-
- Bart Busschots
- bartb.ie
- impodcast.tv
- podfeet.com