Notes for Computer Information Technology 160
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

oct15-networking-commands.md 1.3KB

October 15 - Networking Commands

Overview

ifconfig - configure a network interface

ip - show / manipulate routing, network devices, interfaces and tunnels

netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships

ping - send ICMP ECHO_REQUEST to network hosts

traceroute, tracepath, tracepath6 - traces path to a network host discovering MTU along this path

host - DNS lookup utility

nslookup - query Internet name servers interactively

dig - DNS lookup utility

Range in Bash

if (( $variable < 0 ))
  then
    echo "too low"
elif (( $variable <= 10 ))
  then
    echo "variable is in range 0-10"
elif (( $variable <= 20 ))
  then
    echo "variable is in range 11-20"
else
    echo "variable is larger than 20"

Ping and Traceroute

Ping sends an echo request to a server, if the server responds then you and the server are online.

Traceroute shows the route taken to the server.

IP Addresses

Class B

000.000.0.0/24

Class D is rarely used

A Class A private address is 10.0.0.0/8 and cannot be accessed from the internet

B is /16

C is /8

127.0.0.1 is the loopback address, it sends packets to localhost, the computer that send it