How Does TCP/IP Send Data?

navybeansvietnameseΔίκτυα και Επικοινωνίες

24 Οκτ 2013 (πριν από 3 χρόνια και 9 μήνες)

86 εμφανίσεις

BTEC National Comp
uting


Network & Communications 6


1

Ethernet Networks

Ethernet is a network standard for communication using either coaxial or
twisted pair cable. The standard known as Carrier Sense Multiple Access
with Collision Detection (CSMA/CD) uses a standard called 802.3

Ethernet Frame




Ethernet Frame Format


When communicating between computers on a network an Ethernet frame is
created. The header contains 5 fields


the most important of which are the
Desti
nation Address and the Source Address. This is the network interface card
number


a 6
-
byte number that is unique to each network interface card. The
Information field is the data. This is between 46 and 1500 bytes. There is a
minimum length of 46 so i
f any information is less than 46 is padded with space. The
trailer section is for error checking. It does not use parity but checksum.

How Does TCP/IP Send Data?

TCP/IP uses a User Datagram Protocol to send its data but the Ethernet is
still used


the
data receives a header as part of the Transport Control
Protocol then another header as part of the Internet Protocol. The IP address
is part of these headers. This in turn is treated as the Ethernet Data


UDP Frame Encapsulation

BTEC National Comp
uting


Network & Communications 6


2

If you use TCP/IP on a network it does create further problems. How does
one host tell another host that it wishes to speak to it. Ethernet uses the
Computer Name and MAC address, which eac
h computer knows since the
computer broadcasts it name to everyone when it first boots up. TCP/IP
only knows that the computer is on the same network by looking at the IP
address and its own sub
-
net mask.

Address Resolution Protocol

The Ethernet use 48 b
its or 6 bytes for the Ethernet address


the MAC
address. Unfortunately, there is no connection or relationship between
Ethernet addresses and Internet addresses. How does a host or router obtain
the correct Ethernet address when it needs to send a packe
t across the
physical network to a host with a known Internet address? The answer is to
use a separate protocol, ARP, for this function.

Operation


ARP


The ARP Diagr
am illustrates the basic setup for two hosts communicating.
Host A desires to communicate with Host B, but does not know Host B's
Ethernet address.

ARP Request

Host A broadcasts an ARP request packet that contains the destination
Internet address. Host
A is asking that the host with the enclosed Internet
address respond with its Ethernet address. All hosts on the network will
receive the request, but only Host B will respond, as illustrated on the ARP
Request Diagram.


ARP Request


BTEC National Comp
uting


Network & Communications 6


3

ARP Response

Host B recognizes its Internet address and responds to Host A's request by
sending an ARP reply that contains its Ethernet address. This is illustrated
on the ARP Response D
iagram. Host A now has the Ethernet address it
needs to send packets to Host B over the local physical network.


ARP Response


To keep the number of ARP broadcasts
to a minimum, hosts that use ARP maintain
a cache of discovered Internet
-
to
-
Ethernet mappings so that they do not have to use
ARP every time they want to transmit a packet. To keep the cache from growing too
large, an entry is removed if it is not used wit
hin a certain period of time. Before
transmitting a packet, the host always looks in its cache for a mapping before
sending an ARP request.


Additional network traffic is avoided by having the initiator of an ARP request include
its Internet
-
to
-
Ethernet ma
pping in the packet so that the recipient can add this
mapping to its cache.

Because the initial ARP request is broadcast, all computers on the local network
receive it and are able to learn the sender's Internet
-
to
-
Ethernet mapping and store it
in their c
ache.

Practical

Use a DOS window and type ARP

a
ipaddress

where ipaddress is the default
gateway, you neighbour etc. It will report the MAC address of that IP
address.


Token Ring Frame

Another way in which networks can be set up is to use a Token Ring.




When nodes on a Token Ring segment have no data to send, a free token
circulates around the ring. When a node has data to send, it first receives
and repeats the starting delimiter. The node then checks the token priority
in the access control field t
o make sure a higher priority task on the ring is
not waiting for the token. If the priority is okay, the node appends the
remaining header information, frame data, and trailer.


BTEC National Comp
uting


Network & Communications 6


4

The top portion of the diagram shows the format when data from an upper
laye
r is being encapsulated by the Token Ring media access control (MAC)
header and trailer. The bottom portion of the diagram shows the format of a
free token.



Toke
n Ring Token and Frame Format



The free token has 3 bytes. A start byte an end byte and an access control
byte in the middle.


The middle byte indicates whether it is free and whether anyone has
reserved the token by placing a priority number on it.


Whe
n the token is in use the start byte and access control byte are at the
front on the package within the header. The Destination and Source address
are included in the header. The information comes next then the trailer,
that perform the error checking.


The Internet


How does the computer locate the server ?

Domain Name System

On the internet, a

user sees a domain name as a group of labels separated
by dots (.).


For example: host1.lec.ac.uk


The first label is the name, and the labels following the f
irst dot constitute
the domain. For example, the domain name for host1 is lec.ac.uk

Hierarchial Structure

DNS is a mechanism for naming network resources. It grew from a need to
expand the Internet name database, which was centrally managed and
maintaine
d. A central database was efficient when there was a small group
of users, and database entries seldom changed. However, as TCP/IP became
more widely adopted, it became increasingly difficult to keep the central
database current. It was necessary to find a

naming system that would allow
local administration and maintenance of names, while at the same time
provide a single, consistent naming scheme.


BTEC National Comp
uting


Network & Communications 6


5

The DNS protocol extended the Internet name database by devising a system
whereby names could be placed in c
ategories that could later be further
partitioned.


Categories were defined according to domains of authority. This meant that
in partitioning the central name database, a scope of authority that included
authority for registering, maintaining, and admini
stering names was also
defined.


These top
-
level domains reflected current users as well as new groups
adopting TCP/IP: gov (government), edu (education), com (commercial), mil
(military), org (organization), and a two
-
letter code for individual countries
.


Each domain has an administrator who can authorise formation of a new
sub
-
domain. A new sub
-
domain has a specific scope of authority, called zone
of authority, usually over the named nodes within a given network system or
group of systems.


The DNS Hi
erarchical Structure Diagram shows a partial diagram of the top
level of DNS, and examples of domains partitioned from a top
-
level domain.



Domain Name System


A
s the diagram illustrates, DNS has a hierarchical structure, in which top
-
level domains are defined. These top
-
level domains are centrally
administered by InterNIC, which registers all names and maintains the DNS
database. Although the final authority and
responsibility for DNS names
rests with InterNIC, each domain has responsibility and authority for names
within its jurisdiction, or zone of authority, and can delegate similar
authority to sub
-
domains partitioned from it.


Domain name information is main
tained in databases, managed by
programs called name servers, and used for the following purposes:



Mapping domain names to IP addresses


Mapping mailboxes to domain names


Keeping up
-
to
-
date information


Communicating across networks that run differe
nt protocols

BTEC National Comp
uting


Network & Communications 6


6

Domain Names

The DNS can find Web pages and it can find Email locations. With Email the only
difference is that you use the @ symbol to separate the host and the network name.



DNS Hierarchical Tree Structure


www.register.co.uk

is a web site that allows you to register your own Web
address (at a cost) but you can also find out whether the address is already
in use and who owns it.