Relation between Router/switch/bridge/gateway/hub (1 Viewer)

Makro

Porcupine
Joined
May 16, 2006
Messages
415
Location
In between.
Gender
Male
HSC
2009
I need some clarification. I've got these definitions in my glossary.

[FONT=&quot]Router: [/FONT][FONT=&quot]Device that determines where to send a data packet between at least two networks.[/FONT]

[FONT=&quot]Switch:[/FONT][FONT=&quot] a device that directs data packets along a path. May include the function of a router.[/FONT]

[FONT=&quot]Bridge:[/FONT][FONT=&quot] combination of hardware and software to link two similar networks.[/FONT]

[FONT=&quot]Gateway:[/FONT][FONT=&quot] combination of hardware/software to link two different types of networks.[/FONT]

[FONT=&quot]Hub:[/FONT][FONT=&quot] a central connecting device in a network.[/FONT]
I understand the difference between gateway/bridge is that bridge connects similar networks, and gateway links different ones.

1. Difference between Router/switch?
2. How do they relate to bridges/gateways?
3. Are hubs even relevant in distinguishing between them all?
 

ondroo

*Sigh*
Joined
Oct 30, 2007
Messages
53
Gender
Male
HSC
2008
Difference between a router and a switch is that a router inspects data packets and forwards them to the next device that is on the shortest path to the destination. It maintains complex a routing table with addresses of devices to calculate the path/route. A router can be sometimes configured to act as a gateway or a switch.

A switch on the other hand creates a direct path from one device to another as required (it 'switches' between as necessary). Wikipedia has a good example; "This basically says that if you have 4 computers A/B/C/D on 4 switch ports, then A and B can transfer data between them as well as C and D at the same time, and they will never interfere with each others' conversations". A switch is a form of bridge.

A hub is a 'dumb' device. When it receives a data packet it forwards it devices, which is why they arn't very popular these days as it is slooow.

A bridge connects networks of the same protocol. But it only transfer data from one network to another where it is actually required rather than just sending all data between networks clogging up communications. e.g if u have a file sharing network in building A and another in building B, you could use a bridge between them. If a computer in building A transmits to another in A, it is not transmitted to network in building B. However if data is from a computer to A then the bridge routes it to building B as required.

A gateway basically converts one protocol to another. It can be hardware (ie a router) or software. Using example above, A could be use one type of protocol (e.g. ethernet) and B could another (e.g. token ring), so a gateway could connect them instead of a bridge

Sorry for the long winded reply. Hopefully it makes sense now.
 

crammy90

Member
Joined
Mar 26, 2006
Messages
264
Gender
Male
HSC
2008
ondroo said:
A bridge connects networks of the same protocol. But it only transfer data from one network to another where it is actually required rather than just sending all data between networks clogging up communications. e.g if u have a file sharing network in building A and another in building B, you could use a bridge between them. If a computer in building A transmits to another in A, it is not transmitted to network in building B. However if data is from a computer to A then the bridge routes it to building B as required.

A gateway basically converts one protocol to another. It can be hardware (ie a router) or software. Using example above, A could be use one type of protocol (e.g. ethernet) and B could another (e.g. token ring), so a gateway could connect them instead of a bridge

Sorry for the long winded reply. Hopefully it makes sense now.
So if a hub was used on building A's network, and message was desired to be send between two PC's in building A, would the bridge just not forward it to those in Building B as it would clog up the network? so can the the bridge inspect the header address and if the designated computer isnt in that other network it just drops it yeh? so basically a bridge doesnt route or direct traffic like a "traffic officer," but its more like a "traffic light" in that it will turn "green" and let it through if it is appropriate but doesnt offer directions?
and a gateway does the same stuff but just with the ability to convert protocols (which would be on the same layer in OSI yeh?)

it says in my text book for switch "each switch-node is on its own segment". What are the actual advantages of soemthing being on its own segment with just it and the switch? is it just less chance of collisions?
thanks heaps
 

SamD

Member
Joined
Jul 21, 2002
Messages
256
Gender
Male
HSC
N/A
Yes, a switch creates a segment for each connected node (and the switch). As you say this prevents collisions, however it also means each node has dedicated access to its own communication channel. So on a full duplex 100Mbps switched network all nodes can transmit and recieve at 100Mbps all the time. If a hub was used then all nodes share the 100Mbps.

HTH
Sam
 

crammy90

Member
Joined
Mar 26, 2006
Messages
264
Gender
Male
HSC
2008
SamD said:
Yes, a switch creates a segment for each connected node (and the switch). As you say this prevents collisions, however it also means each node has dedicated access to its own communication channel. So on a full duplex 100Mbps switched network all nodes can transmit and recieve at 100Mbps all the time. If a hub was used then all nodes share the 100Mbps.

HTH
Sam
alritey
just to clarify
a twisted pair cable usually contains the 4 pairs of twisted copper wires. This allows a TP cable to be used in full-duplex transmission as 2 pairs for recieveing data from the central node and the other 2 for sending data yeh?
so what i deduced here is that it is the medium of TP which facilitates this duplex transmission....ill try to explain a bit...
So using a switch on a physical and logical star using TP would mean all nodes are connected directly to the switch and are thus on there own communication channel (which is the same thing as a segment yeh? which is basically they dont share the medium with any other nodes?), and this in conjunction with the fact the TP has 2 parts to its medium (one reserved for recieving and sending) means that each node recieves and sends data at 100Mbps...
so if we used a hub in this case...this places every node in the same segment, and only half-duplex transmission can occur between nodes as all 4 pairs of the TP are used for recieveing and then succeeding transmission all 4 pairs are used to recieve data from other devices on the network..correct?
So if that is correct lol, how does coaxial do full duplex transmission with only one wire...
and lastly lol (Following on from above example)
- just say there was a physical bus (which has 5 nodes connected to its bus) connected to this switch (im guessing the bus connects to the switch?..) and there was a hub on this bus. If a node on this bus wished to send data to another node on that bus, does it send the data down the trunk to the hub, which amplifies it back up the bus to all connected nodes (one of which is the switch joining the overall network) and the intended node in the MAC address accepts it and the switch just drops it?...or would the switch then again (upon recieving the data) send it back up the bus to the node (which already recieved it from the hub's signal) once again to redundantly duplicate the signal

(thanks for the email it clarified heaps)
 

SamD

Member
Joined
Jul 21, 2002
Messages
256
Gender
Male
HSC
N/A
crammy90 said:
alritey
just to clarify
a twisted pair cable usually contains the 4 pairs of twisted copper wires. This allows a TP cable to be used in full-duplex transmission as 2 pairs for recieveing data from the central node and the other 2 for sending data yeh?
so what i deduced here is that it is the medium of TP which facilitates this duplex transmission....
For 10Mbps (10BaseT) and 100Mbps (100BaseT) full-duplex Ethernet running on Cat 5 (or better) just two of the four pairs are used. One pair for sending and the other for recieving. Two of the twisted pairs of wires are not used at all. I think there's another Ethernet standard that permits full duplex 10 and 100Mbps on Cat 3 cable and that uses all four pairs, but its seldom used. For Gigabit and faster Ethernet all four pairs are used.

crammy90 said:
ill try to explain a bit...
So using a switch on a physical and logical star using TP would mean all nodes are connected directly to the switch and are thus on there own communication channel (which is the same thing as a segment yeh? which is basically they dont share the medium with any other nodes?), and this in conjunction with the fact the TP has 2 parts to its medium (one reserved for recieving and sending) means that each node recieves and sends data at 100Mbps...
so if we used a hub in this case...this places every node in the same segment, and only half-duplex transmission can occur between nodes as all 4 pairs of the TP are used for recieveing and then succeeding transmission all 4 pairs are used to recieve data from other devices on the network..correct?
So if that is correct lol, how does coaxial do full duplex transmission with only one wire...
To my knowledge, only half-duplex was supported by the older coaxial Ethernet standards. The same communication channel is used for sending and recieving - so nodes must take turns (using CSMA/CD). Don't think of messages as travelling in one direction along a wire, rather as the message is placed on the wire it is immediately (well virtually) present at all points (including all nodes) along the wire. The waves travel at close to the speed of light.

Cable (and ADSL) internet connections are a different animal altogether. These technologies use different frequency ranges for different communication channels. For instance Cable internet splits the total bandwidth into 6MHz wide download channels (equal to the bandwidth of a Cable TV station). And smaller bandwidth channels for upload (depends on your cable provider and your plan).

crammy90 said:
and lastly lol (Following on from above example)
- just say there was a physical bus (which has 5 nodes connected to its bus) connected to this switch (im guessing the bus connects to the switch?..) and there was a hub on this bus. If a node on this bus wished to send data to another node on that bus, does it send the data down the trunk to the hub, which amplifies it back up the bus to all connected nodes (one of which is the switch joining the overall network) and the intended node in the MAC address accepts it and the switch just drops it?...or would the switch then again (upon recieving the data) send it back up the bus to the node (which already recieved it from the hub's signal) once again to redundantly duplicate the signal
The switch learns which MAC addresses are attached to each of its ports. In your example there are five MAC addresses associated with the port that connects the swtich to the hub. This means the switch ignores messages sent between the five hub connected nodes.

crammy90 said:
(thanks for the email it clarified heaps)
No worries!

Regards, Sam
 

crammy90

Member
Joined
Mar 26, 2006
Messages
264
Gender
Male
HSC
2008
SamD said:
For 10Mbps (10BaseT) and 100Mbps (100BaseT) full-duplex Ethernet running on Cat 5 (or better) just two of the four pairs are used.
so TP's still allow duplex communication as the pairs can recieve data via the uplink and the downlink at the same time because there are 2 different pairs used yeh?
and ive had written down
- TP = 60Kbps (is this a generalisaton or is this outdated info which doesnt consider Cat5+> Because when you said 10Mbps for TP im confused as to whether its the ethernet protocol and its ability to send larger 4000byte frames which gives it this extra speed, or whether its the physical quality of the medium which gives it this great speed - by this im refering to resistance in the copper wires or impurities for lower categories n stuff.) So yeh, basically do both the protocol and the medium affect speed, or do protocols not really affect it as packets are, like you said, moving at the speed of light (almost lol).
- Coax = 10Mbps
- Fibre = 400Mbps
- Microwaves = speed of light cause its EMR...right?
so if fibre optics uses light (EMR) how is it not the same speed as microwaves (or does weather n other stuff come into play :p)

To my knowledge, only half-duplex was supported by the older coaxial Ethernet standards. The same communication channel is used for sending and recieving - so nodes must take turns (using CSMA/CD). Don't think of messages as travelling in one direction along a wire, rather as the message is placed on the wire it is immediately (well virtually) present at all points (including all nodes) along the wire. The waves travel at close to the speed of light.
Is a communication channel a physical part in the medium? like in Tp there is 2 because there are 2 wires? and with Coax there is 1 as its uni-wired? But within each there are hundreds/thousands of bandwidth channels (i.e. different wave patterns and frequencies available)?

lastly
- a bus is generally a coaxial. So can nodes use TP as their connector to the bus, and the t-connector connects the 2 mediums...as im confused as to how this works if 1 uses 1 communication channel and another uses 1 (coax).
- in a star physical and logical, does it have to be a TP connecting them (or something capable of 2 channels) to allow for the 2 communication channels (1 pair up, other down?), because if coax is used to connect nodes to central switch then thats 1 channel and so couldnt provide the 2 different channels and so collisions could still occur..which i thought was the benefit of logical star in the no collisions occur

sorry for the trouble lol ill refrain this to being my last of my naggings lol
 

SamD

Member
Joined
Jul 21, 2002
Messages
256
Gender
Male
HSC
N/A
I think you are confusing LAN and long distance (Internet) connection speeds...

I suspect the 60kbps is talking about a dialup link using a dialup modem over long distances (typically between dialup modem and ISP). Typical phone lines use Cat 3 twisted pair (just one pair is used). This old type of internet connection modulates using only the lower frequencies (from about 200Hz to 3200Hz) that are used for voice calls. This is because devices used by the phone company would have filtered out higher frequencies. ADSL connections change this, they use higher frequencies and more significantly a much greater frequency range (bandwidth) as the phone company installs devices (DSLAM, routers, etc.) at the local telephone exchange to split voice and ADSL signals - voice goes to the phone network and ADSL to the Internet. Both dialup and ADSL require modems and are quite different to Ethernet standards used on a LAN.

Modulated systems, such as cable internet and ADSL, use a single physical medium but different frequencies are used to create different communication channels. On an Ethernet LAN each physical link is used for one communication channel.

Ethernet LAN standards in common use (10baseT, 100baseT) do not modulate/demodulate waves (although some of the faster emerging Ethernet standards do). Rather the voltage is altered to represent 0s and 1s. This is the main reason why Ethernet TP cables are limited to lengths up to 100m long - longer lengths would experience significant voltage drop and hence loss of signal. However these voltage signals are in a form that can be understood directly by integrated circuits without the need for demodulation.

Most backbones that connect LANs that are relatively close are optical fibre as it allows longer cable lengths (single mode fibre >2km) because the signal does not deteriorate so easily. In the past coaxial cable was used for similar reasons. And yes, these backbones are really a physical and logical bus topology. However this is not usually such an issue as they generally connect just a few switches together.

In a LAN each twisted pair supports a single communication channel. For long distance (usually internet connections) the signal is modulated to occupy a particualr range of frequencies, therefore many communication channels can travel along the same wire (or optical fibre or microwave link). Each communcation channel uses a different range of frequencies.

In all media (TP, fibre, coaxial, microwaves through air) the signal travels (propagates) at close to the speed of light. So when a particualr bit pattern is placed on the meduim (wire, fibre, air) by the sender it will propagate to all connected nodes at close to the speed of light. Now the sender places the next bit pattern on the meduium and it also propagates at the speed of light. The speed of the transmission is barely affected by the propogation speed, rather it is the speed at which the sender places bit patterns on the wire that determines the transmission speed. The speed of light only becomes significant over enromous distances, such as satellite links. The sender places each bit pattern on the line for a period of time and then places the next bit patrtern on the line for the same period of time. Optical fibre allows bit patterns to be shoved on the fibre more raidly than TP as the fibre introduces less noise so the reciever is able to detect different bit patterns with more accuracy.

Hope this doesn't confuse you further!

Sam
 

crammy90

Member
Joined
Mar 26, 2006
Messages
264
Gender
Male
HSC
2008
I think i understand everything now lol :)
Modulated systems, such as cable internet and ADSL,
so cable internet stil uses phone line but just its range of frequencies (above the lower voice) is higher than ADSL and hence faster speeds?
i.e. say the medium TP supports 1oo-300Hz (hypothetical ofcourse)
- voice = 100-120Hz and
  • ADSL: 120-200
  • Cable: 120 - 300 (i.e. its range of frequencies is higher than ADSL and so can transmit more data signals.)
- does a different communication channel mean it sorta (analogy here we come) splits a road into different lanes...and so data could travel up one lane (channel) and down another at the same time i.e. although its just the one cable, as there are 2 communication channels in can do full duplex? or does dividing a medium into 2 different channels just mean it "divides the road" into two lanes but data can still only be sent in the one direction, just two different "cars - i.e. signals) can travel at once.
- is a segment just a collection of nodes all sending data on the same communication channel?
- if a hub is used it sends data along the same communication channel to all nodes and so they are all sharing the same channel and thus on the same segment. Hubs can only understand data sent within that communication channel so all nodes must send data within this channel. This is why on a physical star only one node can send data at the same time as if 2 nodes were to send data at the same time down the same channel this would cause collisions and muddling of the 2 signals in the channel. Nodes connected to a switch on a physical/logical star send data on different channels to eachother, so a switch can recieve their different signals at once and direct them. As all connected nodes use different communication channels they are on different segments. Example: nodeA operating on channelA needs to send data to nodeB operating on its channelB. nodeA's data is sent to the switch on channelA, where the switch sends it to nodeB along the channelA. This allows data to be sent and collisions non-existent as each node is sending data on its own frequency so no 2 nodes are operating the same frequency. Every node, however, can accept data along any channel. The ability of these multiple channels means data can also be send and recieved at the same time (data travelling to node is one a different channel to data that node is sending)
- Communication channels: communication channels are just subsets of the range of frequencies supported for that medium. Each different signal is modulated into its own range so it can be distinguished form the other data send along the other communication channels...i think that right.
- Modems: they basically are only needed when we need to split a physical communication medium into different communication channels. This is needed to be done when we have more than one device sharing the one medium? or maybe when the same device needs to send two different signals and the same time?
- "bridges split the LAN into a number of segments"...so does this mean all nodes in the segment operate on the same one communication channel.
  • Hence why LANs dont need modems from node-node as they are only sending the one signal along the singlular communication channel.
Modems (or NIC? i thought NIC's controlled the sending of information :S) alter the voltage using Manchester encoding (synchronous transmission - preample to synchronise eachothers clocks so reciever checks voltage of signal at same time sender places signal on - the faster the sender places it on the faster the data speeds - the speed they place the signal on is dependant on the medium i.e. fibre optics allows for sender so place signal onto medium more often than TP as signals less affected by noise so less space needed between placings of bits)
so if thats right i shall be fine :)

i tried to keep this post short aha. I think i succeeded personally lol.

i just think i may as well ask because after 2 days i might regret not asking lol
 
Last edited:

Sanjeet

Member
Joined
Apr 20, 2011
Messages
239
Gender
Male
HSC
2012
I think you are confusing LAN and long distance (Internet) connection speeds...

I suspect the 60kbps is talking about a dialup link using a dialup modem over long distances (typically between dialup modem and ISP). Typical phone lines use Cat 3 twisted pair (just one pair is used). This old type of internet connection modulates using only the lower frequencies (from about 200Hz to 3200Hz) that are used for voice calls. This is because devices used by the phone company would have filtered out higher frequencies. ADSL connections change this, they use higher frequencies and more significantly a much greater frequency range (bandwidth) as the phone company installs devices (DSLAM, routers, etc.) at the local telephone exchange to split voice and ADSL signals - voice goes to the phone network and ADSL to the Internet. Both dialup and ADSL require modems and are quite different to Ethernet standards used on a LAN.

Modulated systems, such as cable internet and ADSL, use a single physical medium but different frequencies are used to create different communication channels. On an Ethernet LAN each physical link is used for one communication channel.

Ethernet LAN standards in common use (10baseT, 100baseT) do not modulate/demodulate waves (although some of the faster emerging Ethernet standards do). Rather the voltage is altered to represent 0s and 1s. This is the main reason why Ethernet TP cables are limited to lengths up to 100m long - longer lengths would experience significant voltage drop and hence loss of signal. However these voltage signals are in a form that can be understood directly by integrated circuits without the need for demodulation.

Most backbones that connect LANs that are relatively close are optical fibre as it allows longer cable lengths (single mode fibre >2km) because the signal does not deteriorate so easily. In the past coaxial cable was used for similar reasons. And yes, these backbones are really a physical and logical bus topology. However this is not usually such an issue as they generally connect just a few switches together.

In a LAN each twisted pair supports a single communication channel. For long distance (usually internet connections) the signal is modulated to occupy a particualr range of frequencies, therefore many communication channels can travel along the same wire (or optical fibre or microwave link). Each communcation channel uses a different range of frequencies.

In all media (TP, fibre, coaxial, microwaves through air) the signal travels (propagates) at close to the speed of light. So when a particualr bit pattern is placed on the meduim (wire, fibre, air) by the sender it will propagate to all connected nodes at close to the speed of light. Now the sender places the next bit pattern on the meduium and it also propagates at the speed of light. The speed of the transmission is barely affected by the propogation speed, rather it is the speed at which the sender places bit patterns on the wire that determines the transmission speed. The speed of light only becomes significant over enromous distances, such as satellite links. The sender places each bit pattern on the line for a period of time and then places the next bit patrtern on the line for the same period of time. Optical fibre allows bit patterns to be shoved on the fibre more raidly than TP as the fibre introduces less noise so the reciever is able to detect different bit patterns with more accuracy.

Hope this doesn't confuse you further!

Sam
...Are you the one and only Sam Davis??
 

Lemonlime

Member
Joined
Sep 9, 2011
Messages
55
Gender
Female
HSC
2012
I just wanted to ask if you are the author Sam Davis, who has written a textbook for IPT? Thanks :D
I think you are confusing LAN and long distance (Internet) connection speeds...

I suspect the 60kbps is talking about a dialup link using a dialup modem over long distances (typically between dialup modem and ISP). Typical phone lines use Cat 3 twisted pair (just one pair is used). This old type of internet connection modulates using only the lower frequencies (from about 200Hz to 3200Hz) that are used for voice calls. This is because devices used by the phone company would have filtered out higher frequencies. ADSL connections change this, they use higher frequencies and more significantly a much greater frequency range (bandwidth) as the phone company installs devices (DSLAM, routers, etc.) at the local telephone exchange to split voice and ADSL signals - voice goes to the phone network and ADSL to the Internet. Both dialup and ADSL require modems and are quite different to Ethernet standards used on a LAN.

Modulated systems, such as cable internet and ADSL, use a single physical medium but different frequencies are used to create different communication channels. On an Ethernet LAN each physical link is used for one communication channel.

Ethernet LAN standards in common use (10baseT, 100baseT) do not modulate/demodulate waves (although some of the faster emerging Ethernet standards do). Rather the voltage is altered to represent 0s and 1s. This is the main reason why Ethernet TP cables are limited to lengths up to 100m long - longer lengths would experience significant voltage drop and hence loss of signal. However these voltage signals are in a form that can be understood directly by integrated circuits without the need for demodulation.

Most backbones that connect LANs that are relatively close are optical fibre as it allows longer cable lengths (single mode fibre >2km) because the signal does not deteriorate so easily. In the past coaxial cable was used for similar reasons. And yes, these backbones are really a physical and logical bus topology. However this is not usually such an issue as they generally connect just a few switches together.

In a LAN each twisted pair supports a single communication channel. For long distance (usually internet connections) the signal is modulated to occupy a particualr range of frequencies, therefore many communication channels can travel along the same wire (or optical fibre or microwave link). Each communcation channel uses a different range of frequencies.

In all media (TP, fibre, coaxial, microwaves through air) the signal travels (propagates) at close to the speed of light. So when a particualr bit pattern is placed on the meduim (wire, fibre, air) by the sender it will propagate to all connected nodes at close to the speed of light. Now the sender places the next bit pattern on the meduium and it also propagates at the speed of light. The speed of the transmission is barely affected by the propogation speed, rather it is the speed at which the sender places bit patterns on the wire that determines the transmission speed. The speed of light only becomes significant over enromous distances, such as satellite links. The sender places each bit pattern on the line for a period of time and then places the next bit patrtern on the line for the same period of time. Optical fibre allows bit patterns to be shoved on the fibre more raidly than TP as the fibre introduces less noise so the reciever is able to detect different bit patterns with more accuracy.

Hope this doesn't confuse you further!

Sam
 

maxon

New Member
Joined
Sep 1, 2012
Messages
1
Location
Australia
Gender
Male
HSC
N/A
Difference between a router and a switch is that a router inspects data packets and forwards them to the next device that is on the shortest path to the destination. It maintains complex a routing table with addresses of devices to calculate the path/route. A router can be sometimes configured to act as a gateway or a switch.

A switch on the other hand creates a direct path from one device to another as required (it 'switches' between as necessary). Wikipedia has a good example; "This basically says that if you have 4 computers A/B/C/D on 4 switch ports, then A and B can transfer data between them as well as C and D at the same time, and they will never interfere with each others' conversations". A switch is a form of bridge.

A hub is a 'dumb' device. When it receives a data packet it forwards it devices, which is why they arn't very popular these days as it is slooow.

A bridge connects networks of the same protocol. But it only transfer data from one network to another where it is actually required rather than just sending all data between networks clogging up communications. e.g if u have a file sharing network in building A and another in building B, you could use a bridge between them. If a computer in building A transmits to another in A, it is not transmitted to network in building B. However if data is from a computer to A then the bridge routes it to building B as required.

A gateway basically converts one protocol to another. It can be hardware (ie a router) or software. Using example above, A could be use one type of protocol (e.g. ethernet) and B could another (e.g. token ring), so a gateway could connect them instead of a bridge

Sorry for the long winded reply. Hopefully it makes sense now.
Great your information is really very effective.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top