Switching

44
Network Types

Transcript of Switching

Page 1: Switching

Network Types

Page 2: Switching

LAN, MAN and WAN Networks are often classed according to how large they

are. The classes are called LAN, MAN and WAN. A LAN (Local Area

Network) connects hosts in a single building or across a single campus.

A MAN (Metropolitan Area Network) connects hosts across a town or a city.

A WAN (Wide Area Network) connects hosts across a country or the world.

LAN

MAN

0.1m 1m 10m 100m 1Km 10Km 100Km

1Kb/s

10Kb/s

100Kb/s

1Mb/s

10Mb/s

100Mb/s

1Gb/s

WAN

1000Km

Distances Spanned by NetworksDistances Spanned by Networks

Speed

of

Networks

Page 3: Switching

Uses of LANs, MANs and WANs LANs tend to be used for small networks (up to 100

computers). Their small size allows them to be fast because signals are less distorted over small distances.

MANs are often used to connect LANs in offices across a town or a city. They are also often used to connect LANs to Public Switched Data Networks (i.e. national networks provided by telephone companies for computer data).

WANs are used to connect computers across a country or the world. The Internet is the most obvious example of a WAN.

Networks can also be classed according to how they work..

Page 4: Switching

Broadcast Networks v.s. Switched Networks A broadcast network transmits messages to all the hosts

connected to it. That is to say that all the hosts could potentially read all the

messages. Usually hosts ignore any messages not destined for them.

Bus topologies and ring topologies are examples of broadcast networks.

A switched network routes messages through the network until it is received by the destination host. That is to say that only the destination host (and possibly

hosts en-route) can read the message. Mesh topologies and tree topologies are examples of

switched networks.

Page 5: Switching

Broadcast Networks v.s. Switched Networks Broadcast networks are more suited to LANs.

If there were a very large number of hosts attempting to transmit data (as there may well be in a MAN or a WAN) then the network would quickly be overwhelmed.

Broadcast networks are physically simpler than switched networks. No switching devices are needed because every host is sent every message regardless. A broadcast network must, however, deal with the problem of

contention. This is where more than one host wants to transmit a message at the same time.

Switched networks are more secure than broadcast networks because fewer messages are sent along any one route. No network is completely secure. Encrypting data can help

make both switched and broadcast networks more secure.

Page 6: Switching

Deterministic v.s. Non-Deterministic Contention is a problem that occurs when several hosts

share a common link. If two hosts want to transmit a message at exactly the same time, how do we decide which host transmits? You may think that the chance of two hosts transmitting at the

same time is very small but remember that signals do not propagate instantly and that even modern electronics can only react at a finite speed.

The deterministic approach is to ensure that only one host can transmit at a time, hence avoiding contention. This is usually done by passing a token from host to host.

Only the host with the token is allowed to transmit. The non-deterministic approach is to allow the possibility

of hosts transmitting at the same time. If a collision occurs then the hosts try again later.

Page 7: Switching

Types of Switched Networks Messages in a switched network are routed through the

network rather than being sent to all hosts on the network.

There are a number of different ways in which a switched network can be implemented: circuit switching message switching packet switching virtual circuit switching

messages

Page 8: Switching

Circuit Switching With circuit switching a physical connection (sometimes

called a copper path) is first established and data can be exchanged between the hosts.

The connection remains in effect until it is terminated (usually when the hosts have finished communicating). The links in the connection are then released and can then be used by other connections.

Whilst the connection is in effect, the hosts have exclusive use of its full bandwidth.

Page 9: Switching

Circuit Switching The advantages of circuit switching are:

Full uninterrupted use of the connection’s available bandwidth (therefore high throughput of data).

Connection-oriented data link (frames arrive in the order they were sent).

Fixed transit delays and throughput. The disadvantages of circuit switching are:

Long connection establishment delay. Hosts must agree on speed of communication. Network does not provide flow control nor error control. Connection under utilised because constant data

transmission between hosts is not typical. Because connections are not shared, more links must be

available to ensure new connections are not blocked.

Page 10: Switching

Message Switching In message switching the circuits are set up

permanently. It is whole messages of any length that are switched around the network.

Each message incorporates header information containing source and destination addresses.

A message is passed from switch to switch towards the destination host.

Successive message may not follow the same route. Each switch stores the message, checks it for errors and

forwards it to the next switch.

Page 11: Switching

Message Switching The advantages of message switching are:

Links within the network are shared. There is no waiting for a connection to be established. Network provides flow control and error control. Two hosts do not have to communicate at same speed. A message can be sent even if receiving host is not ready

(the switch hangs on to the message until it is ready). The disadvantages of message switching are:

Long messages can block links for a long time while they are being forwarded.

Switches must have large storage capacities in order to store very long messages.

Transit delays and throughput are variable. Message switching provides a connectionless service.

Page 12: Switching

Packet Switching With packet switching, messages are broken into small

pieces called packets. The packets are routed individually through the network. Successive packets may not follow the same route.

Each packet has a header containing source and destination addresses and well as ordering information.

When the packets arrive at the destination host, they must be reassembled to form the original message.

Page 13: Switching

Packet Switching The advantages of packet switching are:

Links within the network are shared. No waiting for a connection to be established. Reliable since packets can be routed around failures or

congestion in the network.Packet switched networks were originally developed to keep working even in the event of a nuclear strike.

Short packet sizes means that they can be stored-and-forwarded faster than messages and do not block links.

Packets from one message can travel along parallel routes through parts of the network. Thus packets can be faster.

Each packet contains only part of any message, so packet switching is more secure against line taps.

Page 14: Switching

Packet Switching The disadvantages of packet switching are:

Packets may not arrive in the order they were sent (packet switching provides a connectionless data link service).

This is not a problem if you are transferring a file but it can be a real headache if you are transmitting real time speech.

If packets go missing, they may either be a bit late or they may have been lost in transit. There is no way of telling.

Asking for packets to be retransmitted when they are just slow due to congestion will actually make things worse.

Packets have variable transit delays, which makes them unsuitable for real time communication systems.

Throughput is also variable.

Page 15: Switching

Virtual Circuit Switching Like packet switching, virtual circuit switching breaks

messages into small packets.

The difference between virtual circuit switching and packet switching is that the packets follow a single route through the network. Packets in a virtual circuit cannot overtake each other. Packets from other virtual circuits can share some of the

same links.

Page 16: Switching

Virtual Circuit Switching The advantages of virtual circuit switching are:

Links within network are shared. Packet header only needs to contain a virtual circuit ID

code thus the overhead is kept small. Packets arrive in the order they were sent (virtual circuit

switching provides a connection-oriented data link service).

The disadvantages of virtual circuit switching are: There is a short delay while the route of the virtual circuit is

established. Transit delay and throughput may be variable.

This is not true of all virtual circuit switching systems. The ATM system can guarantee a minimum throughput and a low transit delay.

Page 17: Switching

Permanent Circuits Both circuit switching and virtual circuit switching suffer

from the problem of connection establishment delay. In both cases the problem can be solved by setting up a

permanent circuit. In the case of a circuit switched network, a permanent circuit

is more widely known as a leased line. In the case of a virtual circuit network, a permanent circuit is

called a PVC (Permanent Virtual Circuit) as opposed to SVC (Switched Virtual Circuit).

Essentially a permanent circuit is established once and is never released. It is then constantly available to the communicating hosts. Permanent circuits should be reserved only for frequently

used connections since they can impede the establishment of other connections (and they’re usually expensive).

Page 18: Switching

Switching Mechanisms

Page 19: Switching

Switching Techniques

Two different switching techniques are used inside the telephone system: packet switching and circuit switching.

In circuit switching, a single path is established through the network.

Page 20: Switching

Circuit Switching

Once established, the path of the circuit remains the same for the duration of the call.

Originally the circuits were set up manually by operators (using jumper cables).

The automatic circuit switch was invented by an undertaker named Almon B. Strowger.

Page 21: Switching

Invention of Automatic Circuit Switching Equipment

Almon B Strowger was one of two undertakers in a town. The wife of the other undertaker was a telephone operator.

Every time someone died, their relatives would phone the operator and ask to be put through to the undertaker.

Strowger decided that either he had to invent automatic switching equipment or go out of business.

Page 22: Switching

Setting up a Path

Before any data can be sent, the path between the caller and callee must be established.

It can easily take 10 seconds to set up the path (more if its an international call).

During this time interval, the switching equipment is searching for a ‘copper’ path through the network.

Page 23: Switching

Advantages of Circuit Switching The advantages are:

For the duration of the call, the communicating computers have exclusive use of a connection.

The full bandwidth of the connection can be used.

Data can be sent at a constant rate (there are not unexpected delays and data arrives in the order it was sent).

Circuit switching is also easier to administer, charge for and maintain.

Page 24: Switching

Disadvantages of Circuit Switching

The disadvantages are: There is along delay while the circuit is set up and

acknowledgement sent. The connection can be tapped (thus a potential

security problem). No error checking or flow control is done by

network, the computers must to it themselves. Traffic often consists of short bursts of data

followed by long periods of inactivity (thus line utilization is low).

Page 25: Switching

Message Switching

An alternative to circuit switching is message switching.

In message switching, all the connections are permanently set up.

Rather than having exclusive use of a connection, all the communicating computers share the connections.

It is the data (or messages) that are switched around the network.

Page 26: Switching

Operation of Message Switching Each message incorporates a header containing

the address of the source and destination computer. It may also contain routing information.

Each message is sent to the local switching office that stores the message (checking it for errors) and then forwards it on to the next appropriate switching office (this technique is called store-and-forward).

Page 27: Switching

Advantages of Message Switching The advantages are:

Because the connections are permanent, there is no waiting for connections be to set up.

Flow control and error checking can be handled by the network.

Messages can be sent even when the receiving computer is not ready (they can be stored until it is ready).

Security is better because successive messages may not be sent along the same path.

Page 28: Switching

Disadvantages of Message Switching

The disadvantages are:

There is no limit to the length of a message so a single message may block a link for a long time.

If messages are too long, intermediate switching offices may not have sufficient memory to store them (in which case they cannot be passed on).

Page 29: Switching

Packet Switching Packet switching, like message switching, uses

permanent connections.

In packet switching, the messages are broken up into smaller messages called packets (typically 512 bytes long).

Each packet has a header containing address and routing information as well as its position in the original message.

Page 30: Switching

Packet Switching

Packets are reassembled by the receiving computer to form the original message.

Packet switching has become widespread in many computer networks and the internet.

Page 31: Switching

Advantages of Packet Switching The advantages are:

Because packets are smaller than messages, they take less time to transmit across links.

They also take less memory to store and forward. Packets from the same message may be

transmitted along parallel routes (and may actually take less time to reach the destination than a single message would).

More secure because line taps will reveal only fragments of messages.

Page 32: Switching

Disadvantages of Packet Switching The disadvantages are:

Packets may arrive at their destination out-of-order and there may be a long delay while a small number of slow packets find their way through the network.

It is not certain how long it will take a packet to pass through the network or how long to wait before deciding to request its retransmission).

Packet switching is not ideal for supplying streams of data (as required for radio or T.V).

Page 33: Switching

Virtual Circuits Virtual Circuits attempt to combine the advantages of an

exclusive connection with the advantages of packet switching.

Essentially, a virtual circuit is a fixed path through a network that is establish when a call starts.

Data is transmitted as packets.

The packets follow the fixed path through the network.

Page 34: Switching

Virtual Circuits The difference between a virtual circuit and an ordinary

switched circuit is that packets from other sources can share common links.

The packets are guaranteed to arrive in the correct order.

It is usually left to the receiving computer to ask for damaged or missing packets to be retransmitted (this reduces the workload of the network and allows higher transfer rates in general).

Page 35: Switching

Virtual Circuits

Virtual circuits cope well with transmitting video and speech data (occasional missing or damaged packets are ignored).

It also handles other types of data (such as file transfers).

When a packet is lost, it’s absence is detected immediately (because of the guaranteed order of packets).

Page 36: Switching

The Switch Hierarchy In the USA there are 10 regional switching

offices. They are fully connected to minimize the delay for inter-regional calls.

They are connected by high-bandwidth fiber optic trunks.

Below the regional offices are 67 sectional offices.

Below them are 1,300 toll offices. Below them are 19,0000 end offices.

Page 37: Switching

Circuit Switching We have already seen circuit switching in POTS

and it is the same in computer networks.

A connection from node A to node B is established and the full bandwidth of that connection is available for communication.

The connection remains in place for the duration of the computer conversation.

Page 38: Switching

Time Sequence Diagram for Circuit Switching We can use a time sequence diagram to see the

order of events in circuit switching.

Acknowledge

Connection

Acknowledge

Connection

t i m enode

Anode

Bswitch

1switch 2Establish

Connection Establish Connection Establish

Connection

Acknowledge

ConnectionSend Data

Relay DataRelay Data

Send DataRelay DataRelay Data

Close Connection Close

Connection Close Connection

Page 39: Switching

Message Switching

Message switching sends complete messages from node to node until they reach their destination.

Because messages are of variable length, they time delay for delivery is variable.

This makes message switching unsuitable for interactive traffic.

Large messages can also cause congestion and overflow switches with small memory.

Page 40: Switching

Time Sequence Diagram for Message Switching

The events in message switching occur as follows:

t i m e

node A node Bswitch 1 switch 2

Send MessageRelay Message

Relay Message

Send Message

Relay Message

Relay Message

Send small Message

Send large Message

Page 41: Switching

Packet Switching

Packet switching is similar to message switching except that the messages are broken up into small datagrams called packets (about 1Kbyte in length).

Because packets are smaller than messages, they do not suffer the same delays as messages do.

This makes packet switching better for interactive traffic.

Page 42: Switching

The time delay between sending first packet and its delivery is much less.

Time Sequence Diagram for Packet Switching

Packet 5

Packet 2

Packet 4

Packet 2

Packet 1

Packet 2

t i m e

node A

node B

switch 1

switch 2

Packet 3

Packet 2

Packet 3Packet 3

Packet 2

Transmit Packet 1

Packet 1Packet 1

Packet 2

Packet 3

Packet 2

Packet 3Packet 3

Packet 2

Transmit Packet 1

Packet 1Packet 1

Packet 2

Packet 6

Packet 5

Packet 6Packet 6

Packet 5

Packet 4Packet 4

Packet 4

Packet 5

Send Small

Message

Send Large Message

Host A Host B

Message broken into packets with distinct sequence

numbers Packet 3

Packet 1

Packet 3

Packets reassembled into message using

sequence numbers to order

Message broken into packets with distinct sequence

numbers

Packet 3

Packet 1

Packet 6

Packet 5

Packet 2

Packet 4

Packet 3

Packet 1

Packet 6

Packets reassembled into message using

sequence numbers to order

Received Small Message

Received Large

Message

Page 43: Switching

Virtual Circuit

A Virtual Circuit is similar to packet switching with the exception that all the packets follow the same route.

The route, or virtual circuit, is established in a similar way as a connection of a circuit switched network.

The difference is that connections are shared between many virtual circuits.

Page 44: Switching

Time Sequence Diagram for Virtual Circuit (LLC-2)

L_data_connect_req

tim eHost A Host B

AcknowledgeConnection

AcknowledgeConnection

node A

node B

switch 1

switch 2Establish

Connection Establish Connection Establish

Connection

AcknowledgeConnection

Send DataRelay Data

Relay Data

Confirm DataConfirm DataConfirm Data

Close Connection Close

Connection Close Connection

L_connect_req

L_connect_req

L_connect_confirm

L_connect_confirm

Indicate StatusIndicate Status

Indiate Status

L_connect_indication

L_connect_indication

L_data_connect_req

L_connect_data_confirm

L_connect_data_confirm

Indicate StatusIndicate Status

Indiate Status

L_connect_indicationL_connect_

indication

L_disconnect_req

L_disconnect_req

DisconnectDisconnectDisconnect

L_disconnect_confirm

L_disconnect_ confirm