This tutorial explains internetworking in computer network with examples including networking devices and basic networking concepts such as CSMA/CD, collision domain and broad cast domain.
Computer networks are basically built from three components; End Devices, Networking Devices and Media.
End Devices: - End devices are used to access or transmit the data. Computer, laptop, data server and tablet are the example of end devices.
Networking Devices: - Networking devices are used to control the data flow. Switches, Routers, HUB, Bridges, firewalls and modems are the example of networking devices.
Media: - Media is used to transmit the data. Copper cables, fiber cable and wireless signals are the example of media.
Following figure illustrate a simple computer network
Let’s start exploring above network, assume that you are working on PC1 and want to send a file to PC3. What will you do?
Probably you will access PC3 from any network application such as Network [Available in left pane of windows explorer on any Windows OS] and drop the file in shared folder from PC3. That’s all, your job is done.
But wait…. it’s your job that is done not computer’s. Actually computer’s job is just started. Computer will start with name resolution process. In Name resolution process hostname is translated with IP address and vice versa. Its same mechanisms that mobile phone uses. When you dial someone’s number from contact what happen? Your mobile phone displays his name on screen. This feature allows us to know who is calling us or to whom we are calling.
For example in following figure SAM whose mobile number is 098765432112 calling to BOB whose mobile number is 123456789012.
Neither Bob nor SAM has to remember the each other’s mobile number. Because mobile numbers and contact names are stored in phonebook application. Phonebook is the smallest part of DNS service. DNS service is the database of contact numbers and names. Names are used for human reference while numbers are used for mobile network. Both are converted with each others in name resolution process. Same thing happens in computer network. You can replace name and number of mobile network with hostname and IP address in computer network.
In computer network:-
- Destination hostname must be converted with IP address before source can access it.
- Source PC uses DNS or ARP broadcast to resolve the hostname with IP address.
In our example we are sending a file from PC1 to PC3. Hostname of our destination address is PC3. It must be converted in IP address before PC1 can access it. PC1 uses DNS service to resolve the hostname with IP address.
Okay our source computer knows the IP address of destination computer. Will it send the file now? Not yet, it needs to know one more address; MAC address. MAC address is a hardware address and burned with Ethernet card from manufacturer.
How computer will know the MAC address of destination computer? Again it will use the ARP broadcast to find out the MAC address.
A sample broadcast from PC1 to find out the MAC address of PC3
Time Source Destination Protocol Info 8.123 192.168.1.1 Broadcast ARP Who has 192.168.1.3? Tell 192.168.1.1
A sample response from PC3 to PC1
Time Source Destination Protocol Info 8.124 192.168.1.3 192.168.1.1 ARP 192.168.1.3 is at 00:0b:db:99:d3:5e
Every computer in network has a unique network address. This address represents its location in network. Computer address is built from two addresses IP address and MAC address.
IP Address: - IP address is a software address. We need to configure it on each PC.
MAC Address: - MAC address is a hardware address. It is assigned with Ethernet card from its manufacture company.
Computers know their own address but they don't know others. To know others address they use two types of broadcast ARP and RARP.
Network applications rely on broadcast messages to get the necessary information. Beside ARP and RARP there are lots of broadcast in the network that create serious performance issue. To deal with broadcast issue, a large network is divided in many small networks. Each small network has its own broadcast boundaries and known as broadcast domain.
Broadcast is a destination less message. It never carries user data. It is used by computer for network functionality. Domain is the group of computers sharing same characteristics.
So broadcast domain is the group of computers those share same broadcast. Multilayer switches and routers can control the broadcast.
Collision is another bigger network issue that every network has to face. Collision occurs when two sender devices sense media at a time. Let’s understand it with a simple example.
Assume that PC-1 is sending a file to PC-3. What if at the same time PC-2 also sends data to PC-4. A collision will occur in media.
Okay collision has occurred in network, what will happen now? Before I answer this question, let me know what happens when an accident occurs in single lane road in real life?
Well traffic police will block the road from both sides and clean up the mess. Once site is cleared, barricades will removed and road will be reopen for traffic.
Exactly same thing happen in computer network. When collision occurs in network, a jam single is sent to all devices. Jam single has a time duration in which collision from media will be removed. Devices must have to wait till this time limit. Once this time period is over, devices can send the data again. This process is called CSMA/CD.
Carrier Sense Multiple Access/ Collision Detection (CSMA/CD) is a process that is used to send the data in shared environment.
- This mechanism is only used in HUB or shared environment.
- All devices have equal priority.
- In this process only one device can send data at a time.
- Before a device send data, it will first sense the wire to ensure that no other device is currently sending data. If other device is currently using the media, it will have to wait till that transmission is over. If no device is currently using wire it can send the data.
- If two or more devices simultaneously sense wire and see no data in it, they could place their data on the wire at same time.
- In this situation collision will occur.
- When a collision is occurred, a special jam signal is created in the wire.
- Jam signal has a waiting time period.
- All devices have to wait till jam signal time period is over.
- Once this time period is over, devices can sense the wire again.
- Devices those data lost in collision have to resend the same piece of data again.
Collision domain is a group of computers those share same collision. More computers you put in network, more collision you will experience. Collision seriously effect network performance. Collision should be less than one percent of total traffic. If it increases, we will have to implement collision removal devices. Bridges, switches, routers, multilayer switches can control the collision.
In this section we will take five key networking devices those are used to connect multiple computers in single network and explain how they affect broadcast and collision.
If you have two devices, you can connect them directly with a cable. But if you have more than two devices, you need a center device that can connect them. HUB solves this issue. It has single purpose, connect multiple devices in single network.
Hub is a multi-port repeater. It cannot control collision and broadcast. HUB is the earliest device in computer network. Usually you will not see it in current network.
Bridge connects devices more intelligently. It can remove collision from network.
It keeps record of connected device and create separate route for each devices. Bridge have following limitations.
- They cannot control broadcast.
- Bridges manage collision by software that slows down overall network performance.
- Bridges have port limitation.
- Bridges are outdated now. They are hard to find in current time computer network. They are replaced by switches.
Switches have all goodies of bridges. They can control collision at hardware level that improves overall network performance.
Switches create separate route for each connected device that eliminates CSMA/CD process completely.
Switch keeps route information in memory. We will explain this process in detail with example in our next article. For this article just make sure that you know switch maintain a table which is used to keep track of connected devices. It is known as CAM table and also used to remove the collision.
Switches can control the collision but they cannot control the broadcast.
Router can control both collision and broadcast. Beside this router do a lot more that we will explain in next article.
Routers have following drawback: -
- They are very expensive
- They have limited ports
Multilayer switches are the most expensive device among these. They can control both collision and broadcast.
Multilayer switches are usually deployed in enterprise size company environment.
|HUB||Single collision domain||Single broadcast domain|
|Bridge||Per port collision domain||Single Broadcast domain|
|Switch||Per port collision domain||Single Broadcast domain|
|Router||Per port collision domain||Per port broadcast domain|
|Multilayer switch||Per port collision domain||Per port broadcast domain|