Вы находитесь на странице: 1из 31

Embedded Internet

The internet is not a network at all, but a vast collection of different networks
that use certain common protocols and provide certain common services
Collection of networks is an Internet
Ethernet standard enable the computers in a local network to exchange
messages with each other.
Most Ethernet networks also use Internet protocols such as TCP or UDP
and IP.
They provide defined and well-supported methods for accomplishing flow
control and flexible addressing and routing of messages
TCP/IP reference model holds the Internet together
TCP/IP makes universal services possible to all machines on the Internet
Actual meaning a machine is on the Internet if it runs the TCP/IP protocol
stack, has an IP address, and can send IP packets to all the other machines
on the Internet
Internet has 4 main applications:
E-mail
News
Remote login
File transfer
To communicate over the Internet, a computer must have three things:
An IP address to identify the computer on the Internet Internet
Service Provider (ISP) can provide IP addresses
Ability to send and receive IP data grams
A connection to the router that can access the Internet

How network differ?


When a packet sent by a source on one network must
transit one or more network, before reaching the
destination, many problems can occur at the
interfaces between networks
From a connection oriented network must transit a
connection less one, they may be reordered the sender
does not expect, and the receiver is not prepared to deal
with.
Protocol conversion is often needed
Address conversion will also be needed
Support for multicasting
Differing packet sizes
Different quality of service
Error flow and congestion control are different

Network interface cards


A NIC is a piece of computer hardware designed to allow computers
to physically access a networking medium.
Repeaters and hubs
A repeater is an electronic device that receives a signal, removes the
unnecessary noise, regenerates it, and retransmits it at a higher
power level, so that the signal can cover longer distances without
degradation.
Bridges
A network bridge connects multiple network segments at the data
link layer of the OSI model. Bridges broadcast to all ports.
Switches
A network switch is a device that forwards and filters OSI layer
datagram (chunks of data communication) between ports (connected
cables) based on the MAC addresses in the packets.
Routers
A router is an internet working device that forwards packets between
networks by processing information found in the datagram or packet.

How different networks are connected?


In the physical layer- networks can be connected by
repeaters or hubs which move the bits from one network
to an identical network
In the data link layer bridges and switches are there
they can accept frames, examine MAC addresses, and
forward the frames to a different network
In the network layer we have routers that can connect
two networks. if two networks have dissimilar network
layers, the router may be able to translate between the
packet formats
In the transport layer transport gateways which can
interface between two transport connections.
In the application layer application gateways translate
message semantics

Technologies for connection


Dial-up connections on phone lines home users
DSL Digital Subscriber Line for high speed
ISDN Integrated Services Digital Network can use
phone lines
Cable modem
Satellite connections - wireless

Connectionless internetworking
Datagram model
In this model the only service the network layer offers to
the transport layer is the ability to inject datagram into
the subnet (A sub network is a logically visible subdivision of
an IP network. The practice of dividing a network into sub networks
is called subnetting) and hope for the best.

There is no notion of virtual circuit in the network layer


Does not require all packets belonging to one connection
to traverse the same sequence of gateways
A routing decision is made separately for each packetdepending on the traffic at the moment the packet is sent
Can use multiple routers and thus achieve a higher
bandwidth than the virtual circuit model
There is no guarantee that the packets arrive at the
destination in order

The network layer in the Internet


The glue that holds the whole Internet together is the
network layer protocol Internet Protocol (IP)
Its job is to provide a best effort way to transport
datagram from source to destination
Communication in the Internet is as follows:
The transport layer takes data streams and breaks them up to
datagrams
Each datagram is transmitted through the Internet
When all the pieces finally get to the destination machine, they
are re-assembled by the network layer into the original datagram
This datagram is then handed to the transport layer, which
inserts it into the receiving processes input stream

The Internet Protocol (IP)


Messages travel on the Internet must use IP.
IP helps data to find its way to the destination even if the data must
travel through other networks
It enables a datagram to pass through networks of varying
capabilities by defining a protocol that allows a router to fragment a
datagram into multiple smaller datagrams and enables the
destination to reassemble the original messages from the fragments.
The IP does not provide flow control and error checking of the data
payload
An IP datagram consists of a header part and a text part
The header has 20-byte fixed part and a variable length optional part
IPv4 and IPv6 are the popular versions
Header format

IP addresses
A computer that uses the Internet Protocol must have an
IP address
A network administrator may manually assign an IP
address to each computer
Every host and router on the Internet have an IP
address, which encodes its network number and host
number
It is unique no two machines on the Internet have the
same IP address
All IP addresses are 32bits long and are used in the
source address and destination address fields of IP
packets.

IP addresses
The computer that uses IP must have an IP address.
The conventional way to express an IP address is in dotted-quad
format eg. 192.168.111.1

Assigning address
Each IP datagram includes the IP addresses of the datagrams
source and destination
A computers IP address must be unique within the network or
networks that the computer can communicate with
For communicating over internet, the address must be different from
the address of every other computer on the internet
Internet Corporation for Assigned Names and Numbers (ICANN) is
at the top which manages, assigning and allocation of IP addresses

Network and Host address


Each IP has two parts:
A network address, which is same for all of the
interfaces in the network
A host address, which is unique to the interface within
the network
The left most bits of the IP addresses are the network
address and the rightmost bits are the host address
Routers use network address to help in determining where
to forward received data grams
The number of bits allocated to the network address and
host address depends on the networks size
A network with a 24-bit network address and 8-bits host
address can have up to 254 hosts
A network with a 8-bit network address and 24-bits host
address can have up to 2 million hosts

There are two protocols for assigning network addresses


on the internet
The original protocol-classful addressing
Classless addressing
Classful addressing
The most significant bits of an IP address indicates the class of the
network the host belongs to and how many bytes make up the
network address
We can identify the class from the decimal value of the first byte or
from the binary value of the few MSB
In class A network, the first byte is between 1 and 126 and MSB is 0
The network address is 1 byte, leaving 3bytes for the host address.
There can be up to 126 class A networks
In class B network, the first byte is between 128 and 191,and the
two MSB bits are 10. The network address is 2bytes, leaving 2 bytes
for the host address

IP addresses are classified into five categories


This allocation is called classful addressing no longer
used

Class A 0
Class B 10
Class C 110
Class D 1110
Class E 1111

Network
Network
Network

Host
Host
Host
Multicast address
Reserved fro future use

Class A 1.0.0.0 to 127.255.255.255.255


Class B - 128.0.0.0. to 191.255.255.255
Class C 192.0.0.0 to 223.255.255.255
Class D 224.0.0.0 to 239.255.255.255
Class E 240.0.0.0 to 255.255.255.255
Class A, B, C and D formats allow up to
128 networks with 16 million hosts each
16,384 networks with 64K hosts
2 million networks with up to 256 hosts each

Network address 32 bit number written in dotted


decimal notation
Eg. 32-bit hexadecimal address C0290614 is written as:
192.41.6.20
The lowest IP address is 0.0.0.0 and the highest is
255.255.255.255
The value o and -1 (all 1s) have special meanings
0 means this network or this host
-1 is used as a broad cast address to mean all hosts on the
indicated network
00000000000000000000000 this host
000000000
host
- a host on this network
11111111111111111111111 broadcast on the local network
Network
111111111111 broadcast on a distant network
127
Anything
- loopback

Classless addressing
With classless addressing the network address and IP
prefix are often expressed in the form:
xxx.xxx.xxx.xxx/n
Where, xxx.xxx.xxx.xxx is the lowest IP address in the
network and n is the no. of bits in the network address
portion of the IP address.
Eg. With a network address and IP prefix of
192.0.2.0/24,
The network address is 192.0.2
The final 8-bits in the IP address are 0 host address

SUBNETS
The part of the network (Ethernets) are called subnets.
Subnetting is the process of dividing a network into groups called
sub networks or subnets
The hosts within a subnet are typically physically near to each
other
Routers use network address to decide where to route traffic on
the Internet
Routers can use subnet IDs to decide where to route traffic within
a network
Subnetting helps to solve the shortage of available network
addresses.
In a subnet, the host address portion of an IP address has two
parts: a subnet ID and a host ID
Subnet ID same for all hosts in the subnet
Host ID unique in the subnet
The network address portion of the IP address is the same for all
of the hosts in all of the subnets in the network.

Subnet mask
Determining which bits in the host address are the subnet ID
requires using a 32-bit value is called the subnet mask
In the subnet mask, the bits that correspond to the bits in the
network address and the subnet ID are ones and the bits that
correspond to the bits in the host ID are zeros
Example- in class B network, 2 bytes-network address and two
bytes-host address.
The subnet mask for class B network with 8-bits of subnet ID is:
255.255.255.0 (255.255 network address, 255 subnet ID, 0
host address)
Program code can use subnet mask to determine if a source
address and destination address are in the same subnet.
To do this - perform (logical AND of the source address with
subnet mask) and compare the result with the (logical AND of
the destination address with subnet mask). If the result matches,
the destination is in the same subnet and the source can use
direct routing.

Ethernet networks are subnets in a Class B network


A hub in each subnet connects to a router that enables the
computers in the subnets to communicate with computers in
other subnets and on the Internet
In each of the IP address:
First two bytes (172.16) are the network address
Third byte is the subnet ID (1,2,3)
Fourth byte is the hoist ID

IP Header
Field

no.of bits

Version

IP version being used

Internet header length

Total length of the header in 32-bit word

Type of service

Way for sending process to advise routers how to handle the


segment: max. throughput, reliability, min. delay etc.

Total length

16

total length of datagram in bytes

Identification

16

Identifier for use in reassembling fragments

Flags

Information used in fragmenting

Fragment offset

13

the location of the fragment in a fragmented data

Time to live

max. time or no. of router hops a data may live

Protocol

identifier for the data portion of the datagram

Header checksum
Source addr.

16
32

error checking value for the header


IP address of the source

Destination addr.

32

IP address of destination

Options

varies

additional information for security, routing etc.

Assigning an IP address to a Host

A network may use any variety of ways of assigning IP address to its hosts.
One way network administrator configure the address to each host.
But, it makes more sense to have a single-location in charge of assigning IP
addresses.
The Dynamic Host Configuration Protocol (DHCP- RFC2131) defines three
ways of doing this
They are: manual, automatic and dynamic.
Method of assigning
IP addr.

Stores addr. In a
single server?

Method of adding a
Host

Method of removing
a host

Requires the host to


renew its lease
periodically?

DHCP Manual

Yes

Manual

Manual

No

DHCP Automatic

Yes

Automatic

Manual

No

DHCP Dynamic

Yes

Automatic

Automatic

Yes

All three DHCP methods require a computer that


function as a DHCP server. The other computers in the
network are DHCP clients, which request IP address
from the server. The server uses one of the three
methods in responding to the requests.
On connecting to the network, a DHCP client uses UDP
to broadcast a DHCPDISCOVER message to request an
assigned IP address. Because the host doesnt have an
IP yet, it uses a source IP address of 0.0.0.0 in the
request.
The DHCP server respond to the DHCPDISCOVER
message by returning an IP address to the requesting
host, which uses the new address in future
communications.

Virtual circuit subnet


If connectionless service is offered, packets are injected into the subnet
individually and routed independently of each other. No advance setup is
needed. Packets are called datagram and the subnet is called datagram
subnet
If connection-oriented service is used, a path from the source router to the
destination router must be established before any data packets can be sent.
This connection is called Virtual circuit and the subnet is called virtual
circuit subnet

Congestion

When too many packets are present in the subnet, performance degrades.
This situation is called congestion.
At very high traffic, performance collapses completely and almost no
packets are delivered.
Causes:
If streams of packets begin arriving on different lines and all need the
same output line
In sufficient memory to hold all the packets
Slow processors
Low bandwidth

Congestion control and Flow control


Congestion control has to do with making sure the subnet is able to
carry the offered traffic.
It is a global issue, involving the behavior of all the hosts, routers
and store-and-forwarding processing within the routers
Flow control relates to the point-to-point traffic between a given
sender and a given receiver.
Its job is to make sure that a fast sender cannot continually transmit
data faster than the receiver is able to absorb it
Flow control frequently involves some direct feedback from the
receiver to the sender to tell how things are doing at the other end.

Congestion control in virtual circuit subnets


One technique admission control
Once congestion has been signaled, no more virtual circuits
are set up until the problem has gone away.
Then, attempts to set up new transport layer connection fails.
This approach is crude, but simple and easy to carry out.
An alternative approach allow new virtual circuits but
carefully route all new virtual circuits around the problem
areas.
Another strategy is to negotiate an agreement between the
host and subnet when a virtual circuit is set up.
This agreement normally specifies the volume and shape of
the traffic, QoS required and other parameters. To keep its
part of the agreement, the subnet will typically reserve
resources along the path when the circuit is set up.
In this way, congestion is unlikely to occur on the new virtual
circuits because all the necessary resources are guaranteed
to be available.

Congestion control in Datagram subnets


Each router can monitor the utilization of its output lines
and other resources.
To maintain a good estimate of utilization, u a sample of
the instantaneous line utilization, f can be made
periodically and U updated according to
Unew = a. u old + (1-a)f
Where the constant a determines how fast the router
forgets recent history
Whenever u moves from the threshold, the output line
enters a warning state.
Each newly arriving packets is checked to see if its
output line is in warning state. If so, some action is
taken.
The action taken can be one of several alternatives.

The warning bit


The old architecture signaled the warning state by setting a
special bit in the packets header.
When the packet arrived at its destination, the transport entity
copies the bit into the next acknowledgment sent back to the
source. The source then cut back on traffic.
As long as the router was in the warning state, it continued to
set the warning bit, and the source adjust its transmission rate
accordingly
Choke packet
The router sends a choke packet back to the source host,
giving it the destination found in the packet.
The original packet is tagged so that it will not generate any
more choke packets farther along the path and is then
forwarded in the usual way.
When the source gets the choke packet, it is required to
reduce the traffic sent to the specified destination by X%.

Hop-by-hop choke packets


A hop represents one portion of the path
between source and destination.
At high speeds or over long distance, sending a
choke packet to the source does not work well
because the reaction is so slow.
Eg..
An alternative approach is to have the choke
packet take effect at every hop it passes
through.
The net effect of this hop-by-hop scheme is to
provide quick relief at the point of congestion at
the price of using up more buffers upstream.
In this way congestion can be nipped in the bad
without losing any packets.

Store-and-forward packet switching


In most WANs, the network contains numerous
transmission lines, each one connecting a pair of
routers.
If two routers that do not share a transmission line wish
to communicate, they must do this indirectly, via other
routers.
A host with a packet to send, transmit a I to the nearest
router
The packet is store there until it has fully arrived, so that
the check sum can be verified and the required output
line is free. Then it is forwarded to the next router along
the path until it reaches the destination host, where it is
delivered.
This mechanism is store-and-forward packet switching.

Error detecting codes


Error detecting codes are widely used on wireless links, which are notoriously
noisy and error prone when compared to copper wire or optical fibers.
Without error correcting codes it would be hard to get anything through.
However, over copper wire or fiber, the error rate is much lower, so error
detection and retransmission is usually more efficient there.
Polynomial code or Cyclic Redundancy Check
Polynomial codes are based upon treating bit strings as representations of
polynomials with coefficients of 0 and 1 only.
Polynomial arithmetic is done modulo 2
There are no carries for addition or borrow for subtraction.
When the polynomial code method is employed, the sender and receiver must
agree upon a generator polynomial, G(x) in advance.
Both high and low order bits of the generator must be 1.
To compute check sum for some frame with m bits, corresponding to the
polynomial M(x), the frame must be longer than the generator polynomial
The idea is to append a check sum to the end of the frame in such a way that the
polynomial represented by the check summed frame is divisible by G(x).
When the receiver gets the check summed frame, it tries dividing it by G(x).
If there is a reminder, there has been a transmission error.

Вам также может понравиться