Title: Transmission Control Protocol / Internet Protocol and Network Utilities
1Transmission Control Protocol / Internet Protocol
and Network Utilities
- Colin Jamison
- University of Ulster
2Network Protocols
- Protocol - used by computers to exchange
information over a network - The most common is TCP/IP originated by the U.S
department of Defence - If IP is the native language of the Internet
- then
- TCP represents one of many specialised dialects
3Sockets
- De facto portable standard for portable
applications on TCP/IP - Sockets available on most PC OSs and Mainframes
- Internet Address(IP) and Port Address
- netid . hostid . portid
4Allocation of IP addresses
- Network Information Centre (NIC)
- NIC handles the administration of IP address
allocation to an organisation - 5-types of IPv4 IP addresses can be allocated
- Class A, Class B, Class C, Class D, Class E
- These allow the internet address to be broken
into blocks of small, medium and large networks
5IP Address Format
Represented by a string of 4-bytes separated by
full-stops
Each byte contains 8 bits - so each byte ranges
from 0 to 255 decimal
or 0000 0000 to 1111 1111 binary
From 000.000.000.000
6Breakdown of the IP Address
- The IP address consists of 2 parts which are, a
netid and a hostid
1 7 24
32
2 14 16
32
3 21 8
32
7IP Address Classes
- Class A for extremely large networks (up 16
million hosts) - no longer issued - Class B for medium sized networks (65534 hosts)
- Class C for small networks (254 hosts)
- Class D reserved for multicast
- Class E reserved
8Breakdown of IP Address Classes
- Class A 1.0.0.0 - 126.0.0.0
- Class B 129.0.0.0 - 191.255.0.0
- Class C 192.0.0.0 - 223.255.255.0
- Class D 224.0.0.0 - 239.255.255.0
- Class E 240.0.0.0 - 255.255.255.0
9Host Addresses (1)
- Each computer network interface is identified by
a unique IP address - If a computer has more than one interface then it
uses multiple IP addresses - one for each
interface
10Host Addresses (2)
- Each packet has a destination address
- All hosts on the network examine each broadcast
packet - If addressed to them then the host processes it -
otherwise it is ignored
11Limit to the Number of Hosts
- 2 IP addresses are reserved in each type of
class,and these are 0 - e.g. 194.23.12.0 which is the address of the
network itself - and
- 255 which is the broadcast address
- e.g. 194.23.12.255
12Subnets
- Each host must determine if a broadcast packet is
for it - For a large number of hosts each host must
process many packets - To maintain efficiency in a network the network
is split into sub-networks (subnets) - The network is divided by sub-netting to create
self-contained broadcast domains
13Subnet Masks
- A subnet mask is a bit mask that allows you to
determine which parts of an IP address correspond
to the - - 1) network address, and
- 2) subnet
- When you AND an IP address and a subnet mask the
result is an address that contains everything but
the hostid
14Resolving IP Addresses
Binary Class B
Class B netid hostid 1000
1100 . 1100 1100 . 0001 1011 . 0001 1011
Decimal
Class B Class B netid hostid IP Address
131 .204 .27 .27
Subnet Mask 255 .255 .255 .0
1111 1111 . 1111 1111 . 1111 1111 . 0000 0000
1000 1100 . 1100 1100 . 0001 1011 . 0000 0000
Subnet Number 131 .204
.27 .0
15Network Utilities
- netstat
- route
- arp
- ifconfig
- ping
- traceroute
16netstat
- Netstat prints information about the Linux
networking subsystem - The type of information printed is controlled by
the option given - -a displays both listening and non-listening
sockets - -r displays the routing table
- /bin/netstat
17route
- Used to add or delete to the kernels IP routing
table. - Its primary use is to setup static routes to
specific hosts or networks - Without options it displays the current contents
of the routing table - /sbin/route
18arp
- Manipulates the kernels address resolution
protocol (ARP) cache in various ways - The main use is to setup and clear an address
mapping entry - /sbin/arp -a
19ifconfig
- ifconfig is used to configure the kernels
resident network interfaces - it is used at boot time to set up the computers
interfaces - If no arguments are specified it displays the
status of the given interface only - If -a is specified it displays the status of all
interfaces - /sbin/ifconfig
20ping
- Used to send packets to a destination hostname or
IP address and display the response from the
destination - Useful to detect intermittent or non-existent
network connectivity - ping destination
21traceroute
- Traces the path of packets through the local
network or Internet to the specified destination - The destination can either be a hostname or IP
address - Useful as a network debugging aid
- /usr/sbin/traceroute destination
22