In bash, set +e is basically the default: If you get an error in a bash script, it normally barfs out an error to the system (this is called an exit code) but the script will continue running.

But if you want errors to cause the script immediately to exit then you can put set -e on a line to force your script to exit on errors from that point on.

*Using set -e should be carefully planned… you don’t want to stop on the first error and miss the second problem, which could something much worse:

set -e
dodge approaching car (*steering wheel error- abandon program, including the routine to slam on the breaks. You die.)

via quora:

deb stretch main contrib non-free
deb stretch-proposed-updates main contrib non-free
deb stretch-updates main contrib non-free

deb-src stretch main contrib non-free
deb-src stretch-proposed-updates main contrib non-free
deb-src stretch-updates main contrib non-free

deb stretch/updates main non-free contrib
deb-src stretch/updates main non-free contrib


1. data link layer design issues

  1. providing a well-defined service interface to the network layer.
  2. dealing with transmission errors.
  3. regulating the flow of data so that slow receivers are not swamped by fast senders.


  1. Framing
  2. Physical Addressing
  3. Flow Control
  4. Error Control
  5. Access Control

Measure of file size: KBps

File size i.e. how big the file or how much space a file occupies in the hard disk measured in terms of Kilo Bytes (KB upper case “K” and upper case “B”). In computing terms the upper case “K” stands for 1024. 1024 is computed from 210. (2 power 10). 2 denote the number of characters in the binary system which is used to store data in the disc (ones and zeroes).
Other abbreviations like mega, giga and terra also use the base as 1024,

1KB (Kilo Byte) = 1024 Bytes (approximately 1000 Bytes)
1MB (Mega Byte) = 1024 KB (approximately 1000 Kilo Bytes or 1 million Bytes)
1GB (Gigabyte) = 1024 MB (approximately 1000 Mega Bytes or 1 billion Bytes)
1TB (Terra Byte) = 1024 GB (approximately 1000 Gigabytes or 1 trillion Bytes)

Measure of data transfer speeds: kbps

Data transfer speed over the networks (including the internet) is calculated in terms of bits per second: kilobits (kb small case “k” and small case “b”). The higher the kbps i.e. more the bits transferred per second, more the speed, faster the network/connection. Here k stands for 1000 (103 )

1 kbps (kilo bits per second) = 1000 bits per second
1 Mbps (mega bits per second) = 1000 kilo bits per second.
1 Gbps (giga bits per second) = 1,000 mega bits per second.

ISP bandwidth and download speeds

The most common confusion caused by the similarity of KBps and kbps is when it comes to internet bandwidth and download speeds. People often complain that their ISP promised 512kbps connectivity but they are seldom able to download any file at 512 KBps. They fail to notice the difference in cases of the units and hence think their ISP is cheating them or offering them poor quality service. As mentioned earlier data transfer speeds are always calculated in terms of kilo bits per second (kbps) so an ISP connectivity of 512 kbps promises of transfer of at the max 512 kilo bits per second.

On the other hand, file size measure is always in Kilo Bytes and thus download speeds are always calculated based on how many Bytes per second are downloaded and hence Kilo Bytes per second (KBps). KBps and kbps are not interchangeable.

So an internet connectivity of say 512kbps can never achieve a download speed of 512 KBps. To calculate the maximum download speed of a “X kbps” connection, we need to use a simple formula as below.

Download KBPS speed = (Kbps value*1000) /8)) / 1024.

I.e. For a connectivity of 512 kbps

kbps value 1000 = 512 1000 = 512000

512000 / 8 = 64000

64000 / 1024 = 62.5 KBps

Therefore theoretically an internet connection of 512kbps bandwidth can download at a speed of 62.5 KBps.

If you don’t want to go through all the hassles of the above formula, just multiply the kbps value with 0.1220703125 to get the KBps value.

512 kbps * 0.1220703125 = 62.5 KBps. Simple!

Internet connectivity

Download speed (approx) ( Marked in Italics)

256 kbps

31.3 KBps

384 kbps

46.9 KBps

512 kbps

62.5 KBps

768 kbps

93.8 KBps

1 mbps ~ 1000kbps

122.1 KBps

I have mentioned download speed as approximate because they will vary (always reduce) by 15 – 20% due to network signal loss, computer hardware overheads etc. So for realistic, real world figures always reduce 15 – 20% from the computed KBPS download speeds
Now I guess the confusion of kbps and KBps has cleared away. Just remember when you talk in terms of network it’s always bites per second (bps) and when you talk in terms of storage and files its always Bytes per second (Bps). And next time you won’t complain when your 512 kbps connection does not give you download speeds of 512KBps because now you know why .


Q1: What's meaning of PAN, LAN, MAN, WAN and internet



  1. PANs(Personal Area Network) let devices communicate over the range of a person. A little example are wireless mouse, wireless keyboard that based on Bluetooth.
  2. LAN(Local Area Network) is a privately owned network that operates within and nearby a single building like a home, office or factory. When LANs are used by companies, the are called enterprise networks". AP, wireless router, base station are LAN devices.
  3. MAN(Metropolitan Area Network) covers a city.
  4. WAN(Wide Area Network) spans a large geographical area, often a country or continent.
  5. Internetwork(also called internet) is a collection of interconnected networks.

Q2: what's the difference of layer and interface.


a protocol is an agreement between the communicating parties on how communication is to proceed.

A list of the protocols used by a certain system, one protocol per layer, is called a protocol stack.

Between each pair of adjacent layers is an interface.The interface defines which primitive operations and services the lower layer makes available to the upper one.

Q3: what are design issues for the layers


  1. Reliability

    1. error detection
    2. finding a working path through a network
  2. the evolution of the network
  3. resource allocation
  4. security