Title: Computer Networks
1Computer Networks
2IP Addresses
- Before we communicate with a computer on the
network we have to be able to identify it. - Every computer on a network must have a unique
address. - The system used on the Internet is called
Internet Protocol (IP). Every machine on the
Internet has a unique IP address.
3Internet Protocol (IP)
- Internet protocol has been revised
- IP version 4 (IPv4) is the most widely used.
- IP version 6 (IPv6) will eventually replace it.
- IPv4 uses 32-bit host addresses
- IPv6 uses 128-bit host addresses
4Internet Protocol (IPv4)
- 32-bit IP addresses
- Store internally as a single word
- Usually expressed to users using dotted decimal
notation (e.g., 161.115.147.1) where each of
the four numbers range from 0 to 255. - Usually aliased to host domain name of the
system (e.g. hobb-0113-Instrl.lynchburg.edu,
www.google.com, www.amazon.com )
5Domain Name System (DNS)
- How can we map host names to IP addresses?
- Domain Name Servers provide names in response to
client requests. - A hierarchical representation provides name
management at each level of domain name.
6Domain Name Management
- Each level is responsible for assigning its own
names - .edu is the top-level domain for educational
institutions in the US. We need to get
permission from the managers of the .edu domain
before we can use lynchburg.edu - lynchburg.edu is the Lynchburg College domain
name. We can name our computers anything we
want, (e.g., altair.lynchburg.edu). - If we wanted to we could create a
cs.lynchburg.edu subdomain
7Client/Server Models
- Network interaction is based on an asymmetrical
relationship - Server
- provides services to authorized clients
- typically handles many clients simultaneously
- works passively, driven by client requests
- Client
- requests services
- typically initiates
8Port Numbers
- IP addresses identify host machines only.
- Port numbers identify services on machines.
- 16-bit port numbers provide values (0-65535)
- Well-known ports (0-1023)
- Registered ports (1024-49151) (49152 is 75 of
available port numbers) - Dynamic or private ports
- Internet Assigned Number Authority (IANA)
- Determines (0-1023)
- Registers (1024-49151)
- Does not control (49151-65535)
9Some Well Known Port Numbers
- 23 (telnet)
- 21 (ftp)
- 13 (daytime)
- 25 (smtp (mail))
- 43 (whois)
- 144 (news)
- 80 (http web server)
10Telnet Client
- telnet lthostnamegt ltport numbergt
- provides a general interface to request a service
and return a text response.
11Trace Route
- traceroute lthostnamegt (unix)
- tracert lthostnamegt (dos/windows)
12Ping
- See if there is a connection between two machines
- See if a particular host is running
- ping lthostnamegt
13Special Ip Addresses
14Subnets
- Problem
- We are rapidly running out of IP addresses
- Many networks do not have the maximum number of
hosts that can be supported - Temporary Solution
- Create subnet. Subnet works with smaller numbers
of hosts. - Changes the distribution of network and host
addresses - Uses some of the bits originally allocated for
the host address for the network address
15Sample subnet for class B network
16Types of Routing
- Direct Routing
- Both machines are on the same network
- Machines communicate directly, e.g., on the same
Ethernet - Indirect Routing
- Machines are on different physical networks
- There is no direct connection
- Datagrams travel from source to destination via
one or more gateways or routers. - Hosts can determine which method to use by
comparing their network address with the network
address of the datagram.
17Gateways and Routers
- A gateway is a host that belongs to more than one
network - A gateway has more than one IP address, one for
each network that includes it. - Gateways can also work as hosts, but more
frequently gateways provide routing as their
principal function. - The terms router and gateway are often used
interchangeably, but the term router is more
often used to describe custom hardware dedicated
to routing.
18Network Routing
150.123.23.1
128.100.230.156
acavax.lynchburg.edu 161.115.147.1
128.173.133.102
161.115.100.22
128.100.200.165
128.100.201.155
161.115.144.2
161.115 lynchburg.edu
128.100 cns.vt.edu
208.22.66.1
128.173 cs.vt.edu
161.115.100.27
lasi-main
128.100.200.123
208.22.66.145
128.173.133.44
128.100.200.145
161.115.100.29
128.173.133.155
208.22.66 networkvirginia.net
GATEWAYS
208.22.66.100
208.22.66.102
208.22.66.101
19Routing on a LAN
- Datagrams can be routed directly to a destination
host that is connected to the same LAN - Ethernet cards all have a unique 6-byte address
(e.g., 08-f3-32-a3-b5-23) - The hosts maintain a table of IP to Ethernet
address translations - This table is maintained automatically using ARP
20Address Resolution Protocol (ARP)
- The source broadcasts the destination address to
the local network (along with the local sources
address) requesting the Ethernet address of the
corresponding host - The destination host responds by sending its
Ethernet address to the source host - The destination host sends the data to the
destination and records the IP/Ethernet address
pair in a cache for future use. - Cache entries time-out and must be reacquired
21Basics of Internet Routing
- Look at the destination IP address
- Extract the network address
- If network is directly connected, send the
datagram directly. Use ARP to resolve the
physical address if necessary. - If network is indirectly connected, lookup the
address of the network in a routing table.
22Network Routing
150.123.23.1
128.100.230.156
acavax.lynchburg.edu 161.115.147.1
128.173.133.102
161.115.100.22
128.100.200.165
128.100.201.155
161.115.144.2
161.115 lynchburg.edu
128.100 cns.vt.edu
208.22.66.1
128.173 cs.vt.edu
161.115.100.27
lasi-main
128.100.200.123
208.22.66.145
128.173.133.44
128.100.200.145
161.115.100.29
128.173.133.155
208.22.66 networkvirginia.net
Routing Table for lasi-main 161.115 direct
delivery 208.22.66 direct delivery default
208.22.66.145
Routing Table for acavax 161.115 direct
delivery default 161.115.144.2
Routing Table for 208.22.66.145 208.22.66 direct
delivery 128.100 direct delivery 161.115
208.22.66.1 128.173 128.100.200.123 default
128.100.230.156
208.22.66.100
208.22.66.102
208.22.66.101