Computer Fundamental CSE 111: Programming Languages
Computer Fundamental CSE 111: Programming Languages
CSE 111
Programming Languages
What is the difference between Ethernet hub,
switch and router?
All these three devices has the common goal for you, connecting your
computer with other computers, network devices, or even with other
networks.
Each of the devices has two or more connectors called ports into which
the cables can be plugged in to make connection.
Ethernet hub
• A Ethernet hub is least expensive among these three, also least
intelligent, least complicated. Its job is very simple-anything that
comes in one port is sent out to the others.
• For example, if a message comes in for computer “A”, that message is
sent out all the other ports.
Cont’d
• Similar, when computer “A” responds, its response also goes out to
every other port on the Ethernet hub.
Switches
• A switch does essentially what a hub does, but more efficiently. By
paying attention to the traffic that comes across it, it can “learn”
where particular addresses are.
• Initially a switch knows nothing and simply sends on incoming
message to all ports.
• However the switch has learned something-it knows on which
connecting the sender of the message is located. Thus when machine
“A” responds to the message, the switches only need to send that
message out to the once connection.
Cont’d
• In addition to sending the response through to the originator, the
switch has now learned something else-it now knows on which
connection machine “A” is located.
• That means the subsequent message destined for machine “A” need
only by sent to that one port.
• Switches learn the location of the devices that they are connected to
almost instantaneously. The net result is that most network traffic
only goes where it needs to rather than to every port, saves network
from data traffic jam.
Router
• Router is the smartest and most complicated of the bunch. A simple
way to think of a router is as a computer that can be handle. Many
routers today are, in fact, little computers dedicated to the task of
routing network traffic.
• As far as simple traffic routing is concerned, a router operates exactly
as switch, learning the location of the computers on its connections
and routing traffic only to those computers.
Cont’d
• Consumer grade routers perform at the minimum two additional and
important DHCP- Dynamic Host Configuration Protocol is the way
dynamic IP address are assigned. A device asks for an IP address to be
assigned to it from “upstream” and DHCP server responds with an IP
address assignment.
• A router connected to the ISP provided internet connection with
typically ask your ISP’s server for an IP address; this will be your IP
address on the internet.
• Local computers, on the other hand, will ask the router for an IP
address and there addresses are local to your network.
Cont’d
• NAT-network address translation is the way that the router translates
the IP address of packets that cross the internet/local network
boundary.
Programming Languages
• A programming language is a formal computer language designed to
communicate instructions to a machine, particularly a computer.
Programming languages can be used to create programs to control the
behavior of a machine or to express algorithms.
• Any great craftsman has a belt full of tools, each a perfect choice for certain
situations. Similarly, there will never be just a single programming language,
and each language will evolve and improve over time to keep pace with
innovation.