Sie sind auf Seite 1von 25

2.

Ethernet Basics

TCP/IP (Transmission Control Protocol/Internet Protocol) is a set of protocols


independent of the physical medium used to transmit data, but most data transmission
for Internet communication begins and ends with Ethernet frames.

The Ethernet can use either a bus or star topology. A bus topology attaches all devices
in sequence on a single cable. In a star topology all devices are wired directly to a
central hub. 10Base-T uses a combination called a star-shaped bus topology because
while the attached devices can share all data coming in on the cable, the actual wiring
is in a star shape.

The access method used by the Ethernet is called Carrier Sense Multiple Access with
Collision Detect (CSMA/CD). This is a contention protocol, meaning it is a set of
rules to follow when there is competition for shared resources.

2.1 Ethernet Address

All Ethernet interfaces have a unique 48-bit address that is supplied by the
manufacturer. It is called the Ethernet address (also known as the MAC address, for
Media Access Control). Ethernet-enabled Rabbit boards store this value in Flash
Memory (EEPROM) that is programmed at the factory. If you need unique Ethernet
addresses for some product you are making, you can obtain them from the IEEE
Registration Authority.

Run the utility program Samples/tcpip/display_MAC.c to read the MAC


address of a Rabbit-based board. The utility is included with Dynamic C starting with
version 7.04.

2.2 Physical Connections

A Realtek RTL8019 10Base-T interface chip provides a 10 Mbps Ethernet


connection. This chip is used on many Ethernet-enabled Rabbit boards. The
corresponding port can be connected directly to an Ethernet network.

By using hubs and routers, a network can include a large number of computers. A
network might include all the computers in a particular building. A local network can
be connected to the Internet by means of a gateway. The gateway is a computer that is
connected both to the local network and to the Internet. Data that must be sent out
over the Internet are sent to the local network interface of the gateway, and then the
gateway sends them on to the Internet for routing to some other computer in the
world. Data coming in from the Internet are directed to the gateway, which then sends
them to the correct recipient on the local network.

2.2.1 Cables

Ethernet cables are similar to U.S. telephone plug cables, except they have eight
connectors. For our purposes, there are two types of cables--crossover and straight-
through. In most instances, the straight-through cables are used. It is necessary to use
a crossover cable when two computers are connected directly without a hub (for
example, if you want to connect your PC's Ethernet directly to the Rabbit
Semiconductor TCP/IP Development Board.) Some hubs have one input that can
accept either a straight-through or crossover cable depending on the position of a
switch. In this case make sure that the switch position and cable type agree.

Figure 2.1 Ethernet Network

2.3 Frames

Bits flowing across the Ethernet are grouped into structures called frames. A frame
must be between 46 and 1500 bytes in size. An Ethernet frame has four parts:

1. A Preamble of 8 bytes that helps synchronize the circuitry, thus allowing


small bit rate differences between sender and receiver.

2. A Header of 14 bytes that contains a 6 byte destination address, 6 byte source


address and a 2 byte type field.

3. A Data area of variable length that, along with the header, is passed to the IP
layer (aka. the Network layer).

4. A Trailer of 4 bytes that contains a CRC to guard against corrupted frames.

If the destination address is all 1 bits, it defines a broadcast frame and all systems on
the local network process the frame. There are also multicast frames. A subset of
systems can form a "multicast" group that has an address that does not match any
other system on the network. All systems in a particular subset process a packet with a
destination address that matches their subset. A system can belong to any number of
subsets.

A system may put its interface(s) into promiscuous mode and process all frames sent
across its Ethernet. This is known as "sniffing the ether." It is used for network
debugging and spying.

2.3.1 Collisions
In a star-shaped bus topology, all systems have access to the network at any time.
Before sending data, a system must determine if the network is free or if it is already
sending a frame. If a frame is already being sent, a system will wait. Two systems can
"listen" on the network and "hear" silence and then proceed to send data at the same
time. This is called a collision. Ethernet hardware has collision detection sensors to
take care of this problem. This is the Collision Detect (CD) part of CSMA/CD. The
colliding data is ignored, and the systems involved will wait a random amount of time
before resending their data.

3. Networks

A network is a system of hardware and software, put together for the purpose of
communication and resource sharing. A network includes transmission hardware,
devices to interconnect transmission media and to control transmissions, and software
to decode and format data, as well as to detect and correct problems.

There are several types of networks in use today. This chapter will focus on three of
them:

• LAN - Local Area Network


• WAN - Wide Area Network
• VPN - Virtual Private Network

3.1 LAN

The most widely deployed type of network, LANs were designed as an alternative to
the more expensive point-to-point connection. A LAN has high throughput for
relatively low cost. LANs often rely on shared media, usually a cable, for connecting
many computers. This reduces cost. The computers take turns using the cable to send
data.

3.1.1 Repeaters and Bridges

LANs typically connect computers located in close physical proximity, i.e., all the
computers in a building. Repeaters are used to join network segments when the
distance spanned causes electrical signals to weaken. Repeaters are basically
amplifiers that work at the bit level; they do not actively modify data that is amplified
and sent to the next segment.

Like repeaters, bridges are used to connect two LANs together. Unlike repeaters,
bridges work at the frame level. This is useful, allowing bridges to detect and discard
corrupted frames. They can also perform frame filtering, only forwarding a frame
when necessary. Both of these capabilities decrease network congestion.

Bridged LANs can span arbitrary distances when using a satellite channel for the
bridge. The resulting network is still considered a LAN and not a WAN.

3.2 WAN
To be considered a WAN, a network must be able to connect an arbitrary number of
sites across an arbitrary distance, with an arbitrary number of computers at each site.
In addition, it must have reasonable performance (no long delays) and allow all of the
computers connected to it to communicate simultaneously. This is accomplished
with packet switches.

Figure 3.1 WAN with 4 Switches

3.2.1 Packet Switches

Packet switches are small computers with CPUs, memory and I/O devices. They
move complete packets, using a technique called Store and Forward. An incoming
packet is stored in a memory buffer and the CPU is interrupted. The processor
examines the packet and forwards it to the appropriate place. This strategy allows the
switch to accept multiple packets simultaneously.

As the figure above illustrates, WANs currently do not need to be symmetric.

3.2.2 Forwarding a Packet

A data structure contains the information that tells the switch where to send the packet
next. This is called a routing table. The destination address in the packet header
determines the routing table entry that is used to forward the packet. It could be
forwarded to a computer attached to the switch that is examining the packet or it
could be to another switch in the WAN.

3.3 VPN

VPNs are built on top of a publicly-accessible infrastructure, such as the Internet or


the public telephone network. They use some form of encryption and have strong user
authentication. Essentially a VPN is a form of WAN; the difference is their ability to
use public networks rather than private leased lines. A VPN supports the same
intranet services as a traditional WAN, but also supports remote access service. This
is good for telecommuting, as leased lines don't usually extend to private homes and
travel destinations.

A remote VPN user can connect via an Internet Service Provider (ISP) in the usual
way. This eliminates long-distance charges. The user can then initiate a tunnel request
to the destination server. The server authenticates the user and creates the other end of
the tunnel. VPN software encrypts the data, packages it in an IP packet (for
compatibility with the Internet) and sends it through the tunnel, where it is decrypted
at the other end.

There are several tunneling protocols available: IP security (IPsec), Point-to-Point


Tunneling Protocol (PPTP) and Layer 2 Tunneling Protocol (L2TP).

3.4 Network Devices

Some network devices (repeaters, bridges and switches) were discussed in the
previous sections. These are all dedicated hardware devices. Network devices can also
be non-dedicated systems running network software.

3.4.1 Routers

A router is a hardware device that connects two or more networks. Routers are the
primary backbone device of the Internet, connecting different network technologies
into a seamless whole. Each router is assigned two or more IP addresses because each
IP address contains a prefix that specifies a physical network.

Before a packet is passed to the routing software, it is examined. If it is corrupted, it is


discarded. If it is not corrupted, a routing table is consulted to determine where to
send it next. By default, routers do not propagate broadcast packets (see Directed
Broadcast Address). A router can be configured to pass certain types of broadcasts.

3.4.2 Firewalls

A firewall is a computer, router, or some other communications device that controls


data flow between networks. Generally, a firewall is a first-line defense against
attacks from the outside world. A firewall can be hardware-based or software-based.
A hardware-based firewall is a special router with additional filter and management
capabilities. A software-based firewall runs on top of the operating system and turns a
PC into a firewall.

Conceptually, firewalls can be categorized as Network layer (aka Data Link layer)
or Application layer. Network layer firewalls tend to be very fast. They control traffic
based on the source and destination addresses and port numbers, using this
information to decide whether to pass the data on or discard it.

Application layer firewalls do not allow traffic to flow directly between networks.
They are typically hosts running proxy servers. Proxy servers can implement protocol
specific security because they understand the application protocol being used. For
instance, an application layer firewall can be configured to allow only e-mail into and
out of the local network it protects.

3.4.3 Gateways

A gateway performs routing functions. The term default gateway is used to identify
the router that connects a LAN to an internet. A gateway can do more than a router; it
also performs protocol conversions from one network to another.

3.5 Network Architecture

There are two network architectures widely used today: peer-to-peer and client/server.
In peer-to-peer networks each workstation has the same capabilities and
responsibilities. These networks are usually less expensive and simpler to design than
client/server networks, but they do not offer the same performance with heavy traffic.

3.5.1 Client/Server Networks

The client/server paradigm requires some computers to be dedicated to serving other


computers. A server application waits for a client application to initiate contact.

Table 3-1. Summary of Differences between Client and Server Software

Client Software Server Software

An arbitrary application program that A special-purpose, privileged program


becomes a client when a remote service is dedicated to providing one service. It can
desired. It also performs other local handle multiple remote clients at the same
computations. time.

Actively initiates contact. Passively waits for contact.

Invoked by a user and executes for one Invoked when the system boots and
session. executes through many sessions.

Capable of accessing multiple services as Accepts contact from an arbitrary number


needed, but actively contacts only one of clients, but offers a single service or a
remote server at a time. fixed set of services.

Can require powerful hardware and a


Does not require special hardware or a
sophisticated operating system, depending
sophisticated operating system.
on how many clients are being served.

3.5.1.1 Port Numbers

Port numbers are the mechanism for identifying particular client and server
applications. Servers select a port to wait for a connection. Most services have well-
known port numbers. For example, HTTP uses port 80. When a web browser (the
client) requests a web page it specifies port 80 when contacting the server. Clients
usually have ephemeral port numbers since they exist only as long as the session lasts.

Some of the common well-known TCP port numbers are listed in the table below.

Port Number Listening Application

7 Echo request

20/21 File Transfer Protocol (FTP)

23 Telnet

25 Simple Mail Transfer Protocol (SMTP)

53 Domain Name Server

80 HTTP Server

4. Network Protocol Layers


Computers on a network communicate in agreed upon ways called
protocols. The complexity of networking protocol software calls for the
problem to be divided into smaller pieces. A layering model aids this
division and provides the conceptual basis for understanding how software
protocols together with hardware devices provide a powerful
communication system.

4.1 Layering Models

In the early days of networking, before the rise of the ubiquitous Internet,
the International Organization for Standardization (ISO) developed a
layering model whose terminology persists today.

Table 4-1. ISO 7-Layer Reference Model

Name of
Purpose of Layer
Layer

Layer 7 Application Specifies how a particular application uses a network.


Layer 6 Presentation Specifies how to represent data.

Layer 5 Session Specifies how to establish communication with a remote system.

Layer 4 Transport Specifies how to reliably handle data transfer.

Layer 3 Network Specifies addressing assignments and how packets are forwarded.

Specifies the organization of data into frames and how to send frames over a
Layer 2 Data Link
network.

Layer 1 Physical Specifies the basic network hardware.

The 7-layer model has been revised to the 5-layer TCP/IP reference model
to meet the current needs of protocol designers.

Table 4-2. TCP/IP 5-Layer Reference Model

Name of Layer Purpose of Layer

Layer 5 Application Specifies how a particular application uses a network.

Layer 4 Transport Specifies how to ensure reliable transport of data.

Layer 3 Internet Specifies packet format and routing.

Layer 2 Network Specifies frame organization and transmittal.

Layer 1 Physical Specifies the basic network hardware.

4.2 TCP/IP Protocol Stack

TCP/IP is the protocol suite upon which all Internet communication is


based. Different vendors have developed other networking protocols, but
even most network operating systems with their own protocols, such as
Netware, support TCP/IP. It has become the de facto standard.

Protocols are sometimes referred to as protocol stacks or protocol suites. A


protocol stack is an appropriate term because it indicates the layered
approach used to design the networking software
Figure 4.1 Flow of Data Between Two Computers Using TCP/IP

Stacks

Each host or router in the internet must run a protocol stack. The details of
the underlying physical connections are hidden by the software. The sending
software at each layer communicates with the corresponding layer at the
receiving side through information stored in headers. Each layer adds its
header to the front of the message from the next higher layer. The header is
removed by the corresponding layer on the receiving side.

5. TCP/IP Protocols
This chapter discusses the protocols available in the TCP/IP protocol suite.
The following figure shows how they correspond to the 5-layer TCP/IP
Reference Model. This is not a perfect one-to-one correspondence; for
instance, Internet Protocol (IP) uses the Address Resolution Protocol (ARP),
but is shown here at the same layer in the stack.
Figure 5.1 TCP/IP Protocol Flow

5.1 IP

IP provides communication between hosts on different kinds of networks


(i.e., different data-link implementations such as Ethenet and Token Ring).
It is a connectionless, unreliable packet delivery service. Connectionless
means that there is no handshaking, each packet is independent of any other
packet. It is unreliable because there is no guarantee that a packet gets
delivered; higher-level protocols must deal with that.

5.1.1 IP Address

IP defines an addressing scheme that is independent of the underlying


physical address (e.g, 48-bit MAC address). IP specifies a unique 32-bit
number for each host on a network. This number is known as the Internet
Protocol Address, the IP Address or the Internet Address. These terms are
interchangeable. Each packet sent across the internet contains the IP address
of the source of the packet and the IP address of its destination.
For routing efficiency, the IP address is considered in two parts: the prefix
which identifies the physical network, and the suffix which identifies a
computer on the network. A unique prefix is needed for each network in an
internet. For the global Internet, network numbers are obtained from Internet
Service Providers (ISPs). ISPs coordinate with a central organization called
the Internet Assigned Number Authority (IANA).

5.1.2 IP Address Classes

The first four bits of an IP address determine the class of the network. The
class specifies how many of the remaining bits belong to the prefix (aka
Network ID) and to the suffix (aka Host ID). The first three classes, A, B
and C, are the primary network classes.

First 4 Number Of Max # Of Number Of Max # Of Hosts Per


Class
Bits Prefix Bits Networks Suffix Bits Network

A 0xxx 7 128 24 16,777,216

B 10xx 14 16,384 16 65,536

C 110x 21 2,097,152 8 256

D 1110 Multicast

E 1111 Reserved for future use.

When interacting with mere humans, software uses dotted decimal notation;
each 8 bits is treated as an unsigned binary integer separated by periods. IP
reserves host address 0 to denote a network. 140.211.0.0 denotes the
network that was assigned the class B prefix 140.211.

5.1.3 Netmasks

Netmasks are used to identify which part of the address is the Network ID
and which part is the Host ID. This is done by a logical bitwise-AND of the
IP address and the netmask. For class A networks the netmask is always
255.0.0.0; for class B networks it is 255.255.0.0 and for class C networks
the netmask is 255.255.255.0.

5.1.4 Subnet Address

All hosts are required to support subnet addressing. While the IP address
classes are the convention, IP addresses are typically subnetted to smaller
address sets that do not match the class system. The suffix bits are divided
into a subnet ID and a host ID. This makes sense for class A and B
networks, since no one attaches as many hosts to these networks as is
allowed. Whether to subnet and how many bits to use for the subnet ID is
determined by the local network administrator of each network.

If subnetting is used, then the netmask will have to reflect this fact. On a
class B network with subnetting, the netmask would not be 255.255.0.0. The
bits of the Host ID that were used for the subnet would need to be set in the
netmask.

5.1.5 Directed Broadcast Address

IP defines a directed broadcast address for each physical network as all ones
in the host ID part of the address. The network ID and the subnet ID must be
valid network and subnet values. When a packet is sent to a network's
broadcast address, a single copy travels to the network, and then the packet
is sent to every host on that network or subnetwork.

5.1.6 Limited Broadcast Address

If the IP address is all ones (255.255.255.255), this is a limited broadcast


address; the packet is addressed to all hosts on the current (sub)network. A
router will not forward this type of broadcast to other (sub)networks.

5.2 IP Routing

Each IP datagram travels from its source to its destination by means of


routers. All hosts and routers on an internet contain IP protocol software and
use a routing table to determine where to send a packet next. The destination
IP address in the IP header contains the ultimate destination of the IP
datagram, but it might go through several other IP addresses (routers) before
reaching that destination.

Routing table entries are created when TCP/IP initializes. The entries can be
updated manually by a network administrator or automatically by employing
a routing protocol such as Routing Information Protocol (RIP). Routing
table entries provide needed information to each local host regarding how to
communicate with remote networks and hosts.

When IP receives a packet from a higher-level protocol, like TCP or UDP,


the routing table is searched for the route that is the closest match to the
destination IP address. The most specific to the least specific route is in the
following order:
• A route that matches the destination IP address (host route).
• A route that matches the network ID of the destination IP address
(network route).
• The default route.

If a matching route is not found, IP discards the datagram.

IP provides several other services:

• Fragmentation: IP packets may be divided into smaller packets. This


permits a large packet to travel across a network which only accepts
smaller packets. IP fragments and reassembles packets transparent to
the higher layers.
• Timeouts: Each IP packet has a Time To Live (TTL) field, that is
decremented every time a packet moves through a router. If TTL
reaches zero, the packet is discarded.
• Options: IP allows a packet's sender to set requirements on the path
the packet takes through the network (source route); the route taken
by a packet may be traced (record route) and packets may be labeled
with security features.

5.3 ARP

The Address Resolution Protocol is used to translate virtual addresses to


physical ones. The network hardware does not understand the software-
maintained IP addresses. IP uses ARP to translate the 32-bit IP address to a
physical address that matches the addressing scheme of the underlying
hardware (for Ethernet, the 48-bit MAC address).

There are three general addressing strategies:

1. Table lookup
1. Translation performed by a mathematical function
1. Message exchange

TCP/IP can use any of the three. ARP employs the third strategy, message
exchange. ARP defines a request and a response. A request message is
placed in a hardware frame (e.g., an Ethernet frame), and broadcast to all
computers on the network. Only the computer whose IP address matches the
request sends a response.

5.4 The Transport Layer


There are two primary transport layer protocols: Transmission Control
Protocol (TCP) and User Datagram Protocol (UDP). They provide end-to-
end communication services for applications.

5.4.1 UDP

This is a minimal service over IP, adding only optional checksumming of


data and multiplexing by port number. UDP is often used by applications
that need multicast or broadcast delivery, services not offered by TCP. Like
IP, UDP is connectionless and works with datagrams.

5.4.2 TCP

TCP is a connection-oriented transport service; it provides end-to-end


reliability, resequencing, and flow control. TCP enables two hosts to
establish a connection and exchange streams of data, which are treated in
bytes. The delivery of data in the proper order is guaranteed.

TCP can detect errors or lost data and can trigger retransmission until the
data is received, complete and without errors.

5.4.2.1 TCP Connection/Socket

A TCP connection is done with a 3-way handshake between a client and a


server. The following is a simplified explanation of this process.

• The client asks for a connection by sending a TCP segment with the
SYN control bit set.
• The server responds with its own SYN segment that includes
identifying information that was sent by the client in the initial SYN
segment.
• The client acknowledges the server's SYN segment.

The connection is then established and is uniquely identified by a 4-tuple


called a socket or socket pair:

(destination IP address, destination port number)


(source IP address, source port number)

During the connection setup phase, these values are entered in a table and
saved for the duration of the connection.

5.4.2.2 TCP Header


Every TCP segment has a header. The header comprises all necessary
information for reliable, complete delivery of data. Among other things,
such as IP addresses, the header contains the following fields:

Sequence Number - This 32-bit number contains either the sequence


number of the first byte of data in this particular segment or the Initial
Sequence Number (ISN) that identifies the first byte of data that will be sent
for this particular connection.

The ISN is sent during the connection setup phase by setting the SYN
control bit. An ISN is chosen by both client and server. The first byte of data
sent by either side will be identified by the sequence number ISN + 1
because the SYN control bit consumes a sequence
number. Figure 5.2 illustrates the three-way handshake.

Figure 5.2 Synchronizing Sequence Numbers for TCP

Connection

The sequence number is used to ensure the data is reassembled in the proper
order before being passed to an application protocol.

Acknowledgement Number - This 32-bit number is the other host's


sequence number + 1 of the last successfully received byte of data. It is the
sequence number of the next expected byte of data. This field is only valid
when the ACK control bit is set. Since sending an ACK costs nothing,
(because it and the Acknowledgement Number field are part of the header)
the ACK control bit is always set after a connection has been established.

The Acknowledgement Number ensures that the TCP segment arrived at its
destination.

Control Bits - This 6-bit field comprises the following 1-bit flags (left to
right):

• URG - Makes the Urgent Pointer field significant.


• ACK - Makes the Acknowledgement Number field significant.
• PSH - The Push Function causes TCP to promptly deliver data.
• RST - Reset the connection.
• SYN - Synchronize sequence numbers.
• FIN - No more data from sender, but can still receive data.

Window Size - This 16-bit number states how much data the receiving end
of the TCP connection will allow. The sending end of the TCP connection
must stop and wait for an acknowledgement after it has sent the amount of
data allowed.

Checksum - This 16-bit number is the one's complement of the one's


complement sum of all bytes in the TCP header, any data that is in the
segment and part of the IP packet. A checksum can only detect some errors,
not all, and cannot correct any.

5.4.3 ICMP

Internet Control Message Protocol is a set of messages that communicate


errors and other conditions that require attention. ICMP messages, delivered
in IP datagrams, are usually acted on by either IP, TCP or UDP. Some
ICMP messages are returned to application protocols.

A common use of ICMP is "pinging" a host. The Ping command (Packet


INternet Groper) is a utility that determines whether a specific IP address is
accessible. It sends an ICMP echo request and waits for a reply. Ping can be
used to transmit a series of packets to measure average round-trip times and
packet loss percentages.

5.5 The Application Layer


There are many applications available in the TCP/IP suite of protocols.
Some of the most useful ones are for sending mail (SMTP), transferring files
(FTP), and displaying web pages (HTTP). These applications are discussed
in detail in the TCP/IP User's Manual, vols. 1 and 2.

Another important application layer protocol is the Domain Name System


(DNS). Domain names are significant because they guide users to where
they want to go on the Internet.

5.5.1 DNS

The Domain Name System is a distributed database of domain name and IP


address bindings. A domain name is simply an alphanumeric character
string separated into segments by periods. It represents a specific and unique
place in the "domain name space." DNS makes it possible for us to use
identifiers such as rabbit.com to refer to an IP address on the Internet. Name
servers contain information on some segment of the DNS and make that
information available to clients who are called resolvers.

5.5.1.1 DCRTCP.LIB Implementation of DNS

The resolve() function in DCRTCP.LIB immediately converts a dotted


decimal IP address to its corresponding binary IP address and returns this
value.

If resolve() is passed a domain name, a series of queries take place between


the computer that called resolve() and computers running name server
software. For example, to resolve the domain name
www.rabbitsemiconductor.com, the following code (available
in SAMPLES\TCP\DNS.C) can be used.

#define MY_IP_ADDRESS "10.10.6.101"


#define MY_NETMASK "255.255.255.0"
#define MY_GATEWAY "10.10.6.19"
#define MY_NAMESERVER "10.10.6.19"

#memmap xmem
#use dcrtcp.lib

main() {
longword ip;
char buffer[20];

sock_init();

ip=resolve("www.rabbitsemiconductor.com");
if(ip==0)
printf("couldn't find www.rabbitsemiconductor.com\n");
else
printf("%s is www.rabbitsemiconductors address.\n",
inet_ntoa(buffer,ip));
}

Your local name server is specified by the configuration


macro MY_NAMESERVER. Chances are that your local name server does not
have the requested information, so it queries the root server. The root server
will not know the IP address either, but it will know where to find the name
server that contains authoritative information for the .com zone. This
information is returned to your local name server, which then sends a query
to the name server for the .com zone. Again, this name server does not know
the requested IP address, but does know the local name server that handles
rabbitsemiconductor.com. This information is sent back to your local name
server, who sends a final query to the local name server of
rabbitsemiconductor.com. This local name server returns the requested IP
address of www.rabbitsemiconductor.com to your local name server, who
then passes it to your computer.
thernet Tutorial Part I: Networking Basics

LANs (Local Area Networks)

A network is any collection of independent computers that communicate with


one another over a shared network medium. LANs are networks usually
confined to a geographic area, such as a single building or a college campus.
LANs can be small, linking as few as three computers, but often link hundreds
of computers used by thousands of people. The development of standard
networking protocols and media has resulted in worldwide proliferation of
LANs throughout business and educational organizations.

WANs (Wide Area Networks)

Often a network is located in multiple physical places. Wide area networking


combines multiple LANs that are geographically separate. This is
accomplished by connecting the different LANs using services such as
dedicated leased phone lines, dial-up phone lines (both synchronous and
asynchronous), satellite links, and data packet carrier services. Wide area
networking can be as simple as a modem and remote access server for
employees to dial into, or it can be as complex as hundreds of branch offices
globally linked using special routing protocols and filters to minimize the
expense of sending data sent over vast distances.

Internet

The Internet is a system of linked networks that are worldwide in scope and
facilitate data communication services such as remote login, file transfer,
electronic mail, the World Wide Web and newsgroups.

With the meteoric rise in demand for connectivity, the Internet has become a
communications highway for millions of users. The Internet was initially
restricted to military and academic institutions, but now it is a full-fledged
conduit for any and all forms of information and commerce. Internet websites
now provide personal, educational, political and economic resources to every
corner of the planet.

Intranet

With the advancements made in browser-based software for the Internet,


many private organizations are implementing intranets. An intranet is a private
network utilizing Internet-type tools, but available only within that organization.
For large organizations, an intranet provides an easy access mode to
corporate information for employees.

Ethernet

Ethernet is the most popular physical layer LAN technology in use today.
Other LAN types include Token Ring, Fast Ethernet, Fiber Distributed Data
Interface (FDDI), Asynchronous Transfer Mode (ATM) and LocalTalk.
Ethernet is popular because it strikes a good balance between speed, cost
and ease of installation. These benefits, combined with wide acceptance in
the computer marketplace and the ability to support virtually all popular
network protocols, make Ethernet an ideal networking technology for most
computer users today. The Institute for Electrical and Electronic Engineers
(IEEE) defines the Ethernet standard as IEEE Standard 802.3. This standard
defines rules for configuring an Ethernet network as well as specifying how
elements in an Ethernet network interact with one another. By adhering to the
IEEE standard, network equipment and network protocols can communicate
efficiently.

Fast Ethernet

For Ethernet networks that need higher transmission speeds, the Fast
Ethernet standard (IEEE 802.3u) has been established. This standard raises
the Ethernet speed limit from 10 Megabits per second (Mbps) to 100 Mbps
with only minimal changes to the existing cable structure. There are three
types of Fast Ethernet: 100BASE-TX for use with level 5 UTP cable,
100BASE-FX for use with fiber-optic cable, and 100BASE-T4 which utilizes an
extra two wires for use with level 3 UTP cable. The 100BASE-TX standard
has become the most popular due to its close compatibility with the 10BASE-
T Ethernet standard. For the network manager, the incorporation of Fast
Ethernet into an existing configuration presents a host of decisions. Managers
must determine the number of users in each site on the network that need the
higher throughput, decide which segments of the backbone need to be
reconfigured specifically for 100BASE-T and then choose the necessary
hardware to connect the 100BASE-T segments with existing 10BASE-T
segments. Gigabit Ethernet is a future technology that promises a migration
path beyond Fast Ethernet so the next generation of networks will support
even higher data transfer speeds.

Token Ring

Token Ring is another form of network configuration which differs from


Ethernet in that all messages are transferred in a unidirectional manner along
the ring at all times. Data is transmitted in tokens, which are passed along the
ring and viewed by each device. When a device sees a message addressed
to it, that device copies the message and then marks that message as being
read. As the message makes its way along the ring, it eventually gets back to
the sender who now notes that the message was received by the intended
device. The sender can then remove the message and free that token for use
by others.

Various PC vendors have been proponents of Token Ring networks at


different times and thus these types of networks have been implemented in
many organizations.

Protocols

Network protocols are standards that allow computers to communicate. A


protocol defines how computers identify one another on a network, the form
that the data should take in transit, and how this information is processed
once it reaches its final destination. Protocols also define procedures for
handling lost or damaged transmissions or "packets." TCP/IP (for UNIX,
Windows NT, Windows 95 and other platforms), IPX (for Novell NetWare),
DECnet (for networking Digital Equipment Corp. computers), AppleTalk (for
Macintosh computers), and NetBIOS/NetBEUI (for LAN Manager and
Windows NT networks) are the main types of network protocols in use today.

Although each network protocol is different, they all share the same physical
cabling. This common method of accessing the physical network allows
multiple protocols to peacefully coexist over the network media, and allows
the builder of a network to use common hardware for a variety of protocols.
This concept is known as "protocol independence," which means that devices
that are compatible at the physical and data link layers allow the user to run
many different protocols over the same medium.

Media
An important part of designing and installing an Ethernet is selecting the
appropriate Ethernet medium. There are four major types of media in use
today: Thickwire for 10BASE5 networks, thin coax for 10BASE2 networks,
unshielded twisted pair (UTP) for 10BASE-T networks and fiber optic for
10BASE-FL or Fiber-Optic Inter-Repeater Link (FOIRL) networks. This wide
variety of media reflects the evolution of Ethernet and also points to the
technology's flexibility. Thickwire was one of the first cabling systems used in
Ethernet but was expensive and difficult to use. This evolved to thin coax,
which is easier to work with and less expensive.

The most popular wiring schemes are 10BASE-T and 100BASE-TX, which
use unshielded twisted pair (UTP) cable. This is similar to telephone cable
and comes in a variety of grades, with each higher grade offering better
performance. Level 5 cable is the highest, most expensive grade, offering
support for transmission rates of up to 100 Mbps. Level 4 and level 3 cable
are less expensive, but cannot support the same data throughput speeds;
level 4 cable can support speeds of up to 20 Mbps; level 3 up to 16 Mbps.
The 100BASE-T4 standard allows for support of 100 Mbps Ethernet over level
3 cable, but at the expense of adding another pair of wires (4 pair instead of
the 2 pair used for 10BASE-T); for most users, this is an awkward scheme
and therefore 100BASE-T4 has seen little popularity. Level 2 and level 1
cables are not used in the design of 10BASE-T networks.

For specialized applications, fiber-optic, or 10BASE-FL, Ethernet segments


are popular. Fiber-optic cable is more expensive, but it is invaluable for
situations where electronic emissions and environmental hazards are a
concern. Fiber-optic cable is often used in interbuilding applications to insulate
networking equipment from electrical damage caused by lightning. Because it
does not conduct electricity, fiber-optic cable can also be useful in areas
where large amounts of electromagnetic interference are present, such as on
a factory floor. The Ethernet standard allows for fiber-optic cable segments up
to 2 kilometers long, making fiber optic Ethernet perfect for connecting nodes
and buildings that are otherwise not reachable with copper media.

Topologies

A network topology is the geometric arrangement of nodes and cable links in


a LAN, and is used in two general configurations: bus and star. These two
topologies define how nodes are connected to one another. A node is an
active device connected to the network, such as a computer or a printer. A
node can also be a piece of networking equipment such as a hub, switch or a
router. A bus topology consists of nodes linked together in a series with each
node connected to a long cable or bus. Many nodes can tap into the bus and
begin communication with all other nodes on that cable segment. A break
anywhere in the cable will usually cause the entire segment to be inoperable
until the break is repaired. Examples of bus topology include 10BASE2 and
10BASE5.

10BASE-T Ethernet and Fast Ethernet use a star topology, in which access is
controlled by a central computer. Generally a computer is located at one end
of the segment, and the other end is terminated in central location with a hub.
Because UTP is often run in conjunction with telephone cabling, this central
location can be a telephone closet or other area where it is convenient to
connect the UTP segment to a backbone. The primary advantage of this type
of network is reliability, for if one of these 'point-to-point' segments has a
break, it will only affect the two nodes on that link. Other computer users on
the network continue to operate as if that segment were nonexistent.

Collisions

Ethernet is a shared media, so there are rules for sending packets of data to
avoid conflicts and protect data integrity. Nodes determine when the network
is available for sending packets. It is possible that two nodes at different
locations attempt to send data at the same time. When both PCs are
transferring a packet to the network at the same time, a collision will result.

Minimizing collisions is a crucial element in the design and operation of


networks. Increased collisions are often the result of too many users on the
network, which results in a lot of contention for network bandwidth. This can
slow the performance of the network from the user's point of view.
Segmenting the network, where a network is divided into different pieces
joined together logically with a bridge or switch, is one way of reducing an
overcrowded network.

Ethernet Products

The standards and technology that have just been discussed help define the
specific products that network managers use to build Ethernet networks. The
following text discusses the key products needed to build an Ethernet LAN.

Transceivers
Transceivers are used to connect nodes to the various Ethernet media. Most
computers and network interface cards contain a built-in 10BASE-T or
10BASE2 transceiver, allowing them to be connected directly to Ethernet
without requiring an external transceiver. Many Ethernet devices provide an
AUI connector to allow the user to connect to any media type via an external
transceiver. The AUI connector consists of a 15-pin D-shell type connector,
female on the computer side, male on the transceiver side. Thickwire
(10BASE5) cables also use transceivers to allow connections.

For Fast Ethernet networks, a new interface called the MII (Media
Independent Interface) was developed to offer a flexible way to support 100
Mbps connections. The MII is a popular way to connect 100BASE-FX links to
copper-based Fast Ethernet devices.

Network Interface Cards

Network interface cards, commonly referred to as NICs, are used to connect a


PC to a network. The NIC provides a physical connection between the
networking cable and the computer's internal bus. Different computers have
different bus architectures; PCI bus master slots are most commonly found on
486/Pentium PCs and ISA expansion slots are commonly found on 386 and
older PCs. NICs come in three basic varieties: 8-bit, 16-bit, and 32-bit. The
larger the number of bits that can be transferred to the NIC, the faster the NIC
can transfer data to the network cable.

Many NIC adapters comply with Plug-n-Play specifications. On these


systems, NICs are automatically configured without user intervention, while on
non-Plug-n-Play systems, configuration is done manually through a setup
program and/or DIP switches.

Cards are available to support almost all networking standards, including the
latest Fast Ethernet environment. Fast Ethernet NICs are often 10/100
capable, and will automatically set to the appropriate speed. Full duplex
networking is another option, where a dedicated connection to a switch allows
a NIC to operate at twice the speed.

Hubs/Repeaters

advertisement

Hubs/repeaters are used to connect together two or more Ethernet segments


of any media type. In larger designs, signal quality begins to deteriorate as
segments exceed their maximum length. Hubs provide the signal amplification
required to allow a segment to be extended a greater distance. A hub takes
any incoming signal and repeats it out all ports.

Ethernet hubs are necessary in star topologies such as 10BASE-T. A multi-


port twisted pair hub allows several point-to-point segments to be joined into
one network. One end of the point-to-point link is attached to the hub and the
other is attached to the computer. If the hub is attached to a backbone, then
all computers at the end of the twisted pair segments can communicate with
all the hosts on the backbone. The number and type of hubs in any one-
collision domain is limited by the Ethernet rules. These repeater rules are
discussed in more detail later.

A very important fact to note about hubs is that they only allow users to share
Ethernet. A network of hubs/repeaters is termed a "shared Ethernet," meaning
that all members of the network are contending for transmission of data onto a
single network (collision domain). This means that individual members of a
shared network will only get a percentage of the available network bandwidth.
The number and type of hubs in any one collision domain for 10Mbps
Ethernet is limited by the following rules:
Max Nodes Per
Network Type Max Distance Per Segment
Segment
10BASE-T 2 100m
10BASE2 30 185m
10BASE5 100 500m

10BASE-FL 2 2000m

If you would like to be notified when NovaStars Information Services release


the next part of this tutorial click here to sign up to our newsletter!

Das könnte Ihnen auch gefallen