CT320: Network and System Administration

Fall 2019

IP Addresses

Show Lecture.IPAddresses as a slide show.

CT320 IP Addresses

Port 49757
198.51.100.135
Port 22
203.0.113.42

Format

An IPv4 (as opposed to the newer IPv6) IP address is a 32-bit quantity which represents a host on the internet. It is usually represented as four numbers, each 0–255, separated by dots. For example:

    198.51.100.106

Grouping

Old-Fashioned Classful Addresses

How address ranges used to be allocated
ClassPatternNetworksHosts/networkAddresses
A0nnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh27224 (~16 million)0–127.whatever
B10nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh214216 (65536)128–191.whatever
C110nnnnn nnnnnnnn nnnnnnnn hhhhhhhh22128 (256)192–223.whatever

List of assigned class A networks

Classful no good

Masking

CIDR

CIDR example

Consider the CS network, 129.82.44/23

∴ 129.82.44/23 is the range of addresses 129.82.44.0 … 129.82.45.255.
It contains 129.82.44.whatever and 129.82.45.whatever, for 512 addresses total.

Special classes of addresses

$ host art
art.edu has address 3.233.19.193
art.edu mail is handled by 0 us-smtp-inbound-1.mimecast.com.
art.edu mail is handled by 0 us-smtp-inbound-2.mimecast.com.
$ host denver
$ host tuba
Host tuba not found: 3(NXDOMAIN)

I’m sorry that CSU addresses begin with 129, which is so similar to the 192 that begins one form of private networks.

/etc/hosts

/etc/hosts is the first stage of translating a name to an IP address:

$ grep "ub" /etc/hosts
10.1.44.62	tuba.cs.colostate.edu tuba
129.82.44.223	rubens.cs.colostate.edu rubens
129.82.45.169	rhubarb.cs.colostate.edu rhubarb
129.82.45.204	ruby.cs.colostate.edu ruby

$ grep -oP '^(\d+\.){3}' /etc/hosts | sort | uniq -c | pr -2t
      2 10.1.101.		    	 31 129.82.119.
      8 10.1.118.		    	 11 129.82.138.
    116 10.1.44.		    	246 129.82.208.
     10 10.1.45.		    	203 129.82.44.
      1 10.2.44.		    	171 129.82.45.
      1 104.154.34.		    	  5 192.168.100.
      1 127.0.0.		    	  1 255.255.255.
     74 129.82.118.

Stupid IP Address Tricks

These all work in my browser:

Avoid actual links, as the linkcheck program will complain.

    http://cs.colostate.edu

    http://%63%73%2e%63%6f%6c%6f%73%74%61%74%65%2e%65%64%75

    http://129.82.45.114

    http://0x81.0x52.0x2d.0x72

    http://0201.0122.055.0162

    http://2169646450

    http://0x81522d72

    http://020124426562