Aptitude Prep: Computer Networks

All those who are appearing for any Company’s Aptitude Exam (or exams like QUEST, AMDOCS, E-LITMUS, AMCAT etc.) here is a quick go through of all very important points which you must be knowing under the Computer Networks section. Most of the time the questions come based on the following points only:

1) Network: Connection of two or more devices/nodes (which are capable of sending & receiving data from/to other nodes) by a media link(communication channel).

2) Types of Networks:

  • Peer-to-Peer: Where each computer act as either a client or a server. Each user establishes security on their own computers & determines which of resources to shared.
  • Server/Client: Where 1/more dedicated computers are configured as Servers. Server runs N/w Operating System, which manages security & admin access to resources.

3) Transmission Technologies:

  • Point-to-point
  • Broadcast

4) Possible ways of Data Exchange:

  • Simplex
  • Full Duplex
  • Half Duplex

5) Standards corresponding to OSI model layers:

  • Application Layer- Telnet/Termination Emulation, FTP, HTTP, browsers
  • Presentation Layer- ASCII, BCD, Binary, JPEG, MIDI, MPEG
  • Session Layer- SQL, NFS, RPC
  • Presentation Layer- TCP, UDP
  • Data Link Layer- Ethernet, Wifi, Frame Relay, ATM, PPP

6) Which device operates at which layer of OSI model?

  • Data Link Layer: Switch, Bridges
  • Physical Layer: Hub, VLAN’s, Repeaters, Concentrators
  • Network Layer: Router

7) Key points about UDP:

  • Offers Connectionless Datagram Services
  • Neither guarantees delivery nor correct sequencing of delivered packets
  • DNS name serves use UDP
  • Port No-137

8 ) Key points about Router:

  • Connects two different networks & routes packets of data b/w them.
  • Increased Overhead & Latency
  • Connects different VLAN’s
  • N/w address translation
  • Packet Filtering
  • Don’t Broadcast
  • Build tables & makes routing decisions based on those tables.

9) Key points about VLAN’s:

  • Control Broadcasts
  • Provide increased n/w security
  • Admin assigns VLAN by port

10) Classes of Internet Addresses:

  • Class A: 0.0.0.0 -127.255.255.255
  • Class B: 128.0.0.0-191.255.255.255
  • Class C: 192.0.0.0-223.255.255.255
  • Class D: 224.0.0.0-239.255.255.255
  • Class E: 240.0.0.0-247.255.255.255

11) Reasons for LAN congestion:

  • Multicasting
  • Low bandwidth
  • Large amount of ARP traffic.

12) Define processes(PDU) at each layer of OSI model?

  • Transport: Segments
  • Network: Packets/Datagrams
  • Data Link: Frames
  • Physical: Bits

13) Topologies:

  • BUS topology: In this each computer is directly connected to primary network cable in a single line.

Advantages: Inexpensive, easy to install, simple to understand, easy to extend.

  • STAR topology: In this all computers are connected using a central hub.

Advantages: Can be inexpensive, easy to install and reconfigure and easy to trouble shoot physical problems.

  • RING topology: In this all computers are connected in loop.

Advantages: All computers have equal access to network media, installation can be simple, and signal does not degrade as much as in other topologies because each computer regenerates it.

14) Other Imp Points:

  • Max. length of header in TCP/IP: 20bytes
  • Min. length of header in TCP/IP: 60bytes
  • 802.3- Ethernet LAN
  • 802.4- Token Ring
  • 802.5- Token Bus
  • 10Base5: Max Transfer rate is 10Megabits/sec
  • Sub Layers of Data Link layer- Logical Link Control(LLC) & Media Access Control(MAC)

15) Key Definitions:

  • Attenuation: Weaking/loss of signal energy caused by distance.
  • Beaconing: Process that allows a n/w to self-repair n/w problems.
  • Multicast: Single sender, multiple receivers.
  • ARP(Address Resolution Protocol): Used to associate 32bit IP Address to 48bit MAC Address
  • RARP: Reverse of ARP
  • FTP: TCP/IP protocol, used to transmitting files between n/w nodes.
  • Bit Rate: No. of bits transmitted during 1sec
  • Baud Rate: Bit Rate/N(no-of-bits represented by each signal shift)
  • ICMP (Internet Control Message Protocol): A N/w layer protocol, which can report errors & status information(using PING).
  • PING (Package Internet Gopher): Used for diagnosing IP.
  • KERBEROS: Authentication mechanism used to verify user/ server identity.
  • IPX: For transferring information from servers to workstations.

VMWare Virtualization

Virtualization is defined as an environment in which multiple Operating Systems (OS) run on a single physical machine. Each OS runs in its own partition, or Virtual Machine (VM). This is implemented by inserting an additional software layer between the hardware and the OS, called the Virtual Machine Monitor (VMM). The VMM schedules the guest OS’s and manages the hardware resources in much the same way that an OS manages the execution of applications.

Thus we can say that VMware Virtualization is basically an alternative to the dual boot or Live USB technique. And with the help of this we can create an virtual image of any O.S(called as Guest) onto the top of another O.S(called as Host). The main advantage of this sort of virtualization can be understood through the following example:-

Suppose you owe a firm, where approx 500+servers are running a variety of workloads and a large no. of cables, racks in order to support all your servers. Now an implementation of VMware Virtualization will impact in a drastic fall in the no. of resources required, like(as per as the studies):

  • 3000 cables/ports down to 300
  • 200 racks down to 10
  • 1000 servers down to 80 (as now we can run any no. of O.S on a single server, therefore 80 servers could easily manage the work of 1000 servers )

Installing a Guest O.S on VMware Workstation

Step1: To begin with, let’s start the VMware Workstation:

Step2: Click on “New Virtual Machine” (Through this option, we will be selecting out the Guest O.S which we will be running on our current Host O.S)

Step3: Now select “Typical” (to move ahead with the recommended settings) or choose “Custom” (if we want to configure the Guest O.S as per our need)
Step4: Now the next window will provide us options of selecting b/w whether we want to install our Guest O.S through a Disc or .ISO file? In case we don’t have the source file of the Guest O.S in hand at the moment, then we can move ahead with the third option of blank Disk.
Step5: As shown in this window, we are selecting out “Ubuntu 10.04(x86)” as our Guest O.S.


Step6: Now we will enter the details of the Guest O.S, to personalize it for our use.
Step7: Here we will select the path where we want the Guest O.S to get installed.
Step8: Now the configuration part for the Guest O.S begins. First of all we will choose the maximum hard Drive size for our Guest O.S (Ubuntu).
Step9: Next window will give us the preview of the details which we selected for our Ubuntu.
Step10: Now if we want to change in any of the Hardware configuration, we can click on “Customize Hardware” as shown in the previous window.It will show us the various available Hardware devices which we can configure according to our needs.

Step11: Suppose we want to increase up the performance of our Guest O.S (as we intend to use graphics software like MAYA/3DMax). Then we can increase the no. of processors or even the no. of cores per processor.
Step12 (Optional): We can even add in any other Hardware type.
Step13: Under the NAT (Hardware settings), as we can see that whenever we configure a virtual machine from the wizard, it is automatically configured with one virtual network adapter.
• Also we have the option to choose that when this network which we configured should get connected (at power on)?
NOTE: In VMware Workstation, you can have up to three virtual network adapters in each virtual machine.

Other than NAT, we have:
Bridge: In VMware Workstation, the bridge allows you to connect your virtual machine to the host PC and to the local area network (LAN) that your host computer is configured to use. Or we can say that when we use bridged networking, our virtual machine is connected to the LAN as if it were a physical PC connected to your network.

Host only: When you use a host-only network, your virtual machines can communicate with the host PC only. You cannot communicate with any other physical PC on the network.

Custom: A custom network allows you to customize your virtual network to suit your individual needs.

Step14: Next we begin with the installation of Ubuntu as our Guest O.S.
Step15: While installation if we are connected with the internet, it will automatically grab up the necessary updates.
Step16: Next, once installed we will get to see the Ubuntu Login screen.
Step17: Before login, it will ask for the admin password.

NOTE: Here usually a small problem arises, that your keyboard doesn’t seem to work
So in such case, we have to right click on the taskbar > Click on “Universal Access Preferences”
Next select “Use on-screen keyboard” option.
Next Restart the Virtual Machine>
Step18: Now an On-screen keyboard will pop up on the Login screen, using which you can easily enter your admin password.
Step19: Your virtual machine desktop would be what you get to see on the next window.

Now before i wrap up with this post it’s time to reveal the most fantastic feature of this virtualization technique, which is that you can even share up this current virtual image of your guest O.S with anyone else. All you have do is, simply transfer up the folder (which you selected in step 7) onto any other system and run the VMware virtual machine configuration file.

That’s it, now you don’t need to once again install & configure out your guest O.S on any other system (all you will require is VMware).

File Sharing- Using a torrent

A torrent is the perfect option in case you are planning to share anything with any remote user.

So here i bring a small & simple quide to build a .torrent file:-
Step1- Click on File
Step2- Click on Create new torrent
Step3- In the select source field, browse the files which you want to share with others. Yes you can skip few, by mentioning them in the next field.
Step4- Now you can use any of the trackers like-

“http://tracker.openbittorrent.com/announce

udp://tracker.openbittorrent.com:80/announce

udp://tracker.istole.it:80/announce

http://tracker.istole.it/announce

udp://tracker.publicbt.com:80/announce

http://tracker.publicbt.com/announce

http://tracker.prq.to./announce

http://tracker.torrentparty.com:6969/announce

http://photodiode.mine.nu:6969/announce

http://11.rarbg.com/announce

http://10.rarbg.com/announce

http://photodiode.mine.nu/announce

http://tracker.torrentparty.com/announce

http://tracker.ilibr.org/announce

http://pow7.com/announce

http://tracker.ilibr.org:6969/announce

http://www.h33t.com:3310/announce

http://genesis.1337x.org:1337/announce

http://tracker.publicbt.com:80/announce

http://tracker.openbittorrent.com:80/announce”

Step5- Check the “start seeding” checkbox
Step6- Finally click the “Create and save as button”
Step7- Now you can finally share it with your friends

Note- This method is only tested using utorrent via the author.

File Sharing: Using LAN

Step 1: Download IPmsg on both the machines (it’s compatible with both Windows 7 & Windows Xp).
Step 2:

For Windows 7 users

  • Go to the “Network & Sharing Center”.
  • Under view your active connections, Click on the “Local Area Connection”.
  • Click on the “Properties” Tab.
  • Select the “Internet Protocol Version 4(TCP/IPv4)” and then click on the “properties” tab.
  • As the new window appears, select the “use the following IP address:” and fill the following fields-
    IP Address- 192:168:1:2, Subnet Mask-255:255:255:0(this value normally present by default)
  • Finally click the Ok.

Repeat the same steps on the 2nd machine.

For Windows XP Users

  • Go to “Network Connections”
  • Right Click on “Local Area Network”
  • Double-click on the “Internet Protocol TCP/IP” and set the following details:
    IP address: 192.168.0.1, subnet mask: 255.255.255.0.
  • Then click OK

Repeat the same steps on the 2nd machine.

 

STEP 3: Now coming to the IPMsg part. Run it, on the both machines.

  • As you run it, you will see the names of both the systems under the “Users panel” in the IPMsg Window.
  • Now all what you have to do is, simply “Drag and Drop” all the files(which you want to transfer) into the second panel of the IPMsg.
  • Select the reciever system name.
  • Click on “send”

STEP 4: The moment you click on the “send”, IPMsg window will pop-up on the receiver’s system.

  • Double-Click on the file(s), which you want to recieve.
  • Now select the path, where you want to store them. (You can also select the “Lump”, to transfer multiple files together)

So isn’t file sharing too simple via a LAN connection?

You love him, The way i loved you

Everybody has something to say, And so do i..
Baby i love you… It’s all about you…
Everybody has something to dream about, And so do i..
Baby i want you… Only you…
When everybody fall in love, So why can’t it be with you?
Why can’t i love you?…

I can’t see you with anyone else, I can’t let you walk away from me.
Baby as you live in my heart, And your thoughts flows inside me.

You are the only crush i had, You are the only one for whom i ever lived.
And now if you rush away from my life, Then how will i exist?

Everybody has something to say, And so do i..
Everybody has something to dream about, And so do i..
When everybody fall in love, So why can’t it be with you?
Why can’t i love you?…

I don’t know how can you say? That dare you said that again.
Is it all as you never fallen in love? or Is it that you never seen me that way?

I don’t know how can you love him? As i thought you will be only mine.
I don’t know how can do this with me? As i never expected this any time…

Everybody has something to say, And so do i..
Baby i love you… It’s all about you…
Everybody has something to dream about, And so do i..
Baby i want you… Only you…
When everybody fall in love, So why can’t it be with you?
Why can’t i love you?…

It’s seems i’m back to the same place, Where it all began-ed.
The moment when i thought you are in my arms,
I forget that you too can love someone else, The same way i thought you will be mine…

Now i got to know, It doesn’t matter anymore..
Even how much i try… I really won’t be able to make you mine…
Because you have already given your heart, The heart which i thought will be only mine..

Today I came to know…
You love him, The way i loved you.
You love him, Even more than i thought i would loved you.
.

Composed By- Prabhjot

Procedural Vs Object Oriented Languages

Procedural Language Object Oriented Language
Emphasis over here is on how to do things? Emphasis is on the algorithm, i.e it’s on the procedures. Emphasis is on all the objects which are involved in any particular thing, i.e emphasis is on the data and not on the procedures.
In any procedural language program, a no. of functions do exists. Now suppose a data type got changed by any particular function, then all the other functions which are working on the similar data type must have to reflect the similar change. And this usually takes a quite amount of time. An object oriented language program includes classes & objects. So whenver any change has to be made for any object, simply it’s corresonding class gets modified. And by this all the functions that are processing this data will get to see the change immediately, without any wastage of time.

It doesn’t model the real world. For e.g-

  • If you are in a resturant, then procedural language will only get concern about eating, drinking like activities.
  • If you consider a vehicle, then it will concern about it’s acceleration, halting etc.

It models the real world. For e.g-

  • While it will concern about the starters, main course, deserts, price, quantity which are available in the resturant.
  • It will concern about the colour, price, mileage, model like data of the vehicle.

 

Languages which come under this includes:- Cobol, C, MATLAB, Perl, VBScript, JScript, JavaScript, Forton etc. Languages which come under this includes:- C#, Php, Python, C++ etc.

First PHP Script

So if you have downloaded the WAMP server and get it installed on your machine then now you are ready to make your debut in PHP scripts.

COMMON ONE’S

  • Syntax: Every php statement will follow a common pattern like this:-

<? php

—————

—————

?>

As Php interpreter will only read those instructions which are inside the “<——–?>” php tags.

  • Semicolon: Every of the php statement inside the php tags will end via a semicolon “;”.

{Exceptional case}: Whether to mark the end of a php statement with or without semicolon, is the common area of error. It’s not every time that you have to put a semicolon over there, exception do exists.

Example1:

<?php echo “case 1″ ?>

Example2:

<?php echo “case2″;  echo “semicolon present” ?>

So as you see in the above examples in case1 where a single statement exists you can omit putting semicolon, as this”?>” closing of php will automatically includes a semicolon. But while there are multiple statements as in case2, you can’t omit the semicolon.

  • Comment: As simple as in javascipt.

<? php

//for a single line statement

?>

 

<? php

/* for

multiple line

statements */

?>

 

Let’s Start:

So after having an idea about the Php scripts structure now you can easily write one for yourself.

Step1: Open any of the text editor(notepad or notepad++).

Step2: Write any simple script, how about displaying something on the webbrowser? :-

<?Php echo”welcome to php” ?>

Step3: Save this with a “.php” extension. And please remember if you are saving using notepad don’t forget to put double quotes while specifying the file name or otherwise you will land with a text file.

EXECUTE & VIEW

Step1: Install WAMP server:

As installation about to complete, it will ask you to specify your browser location.

So specify where your browser file is located:

Step2: Left click on the WAMP server icon on the taskbar. Remember it’s left click not the usual right one.

Step3: Click on “localhost”.

Something like this would appear on your browser.

Step4: Now you will have to create a folder at “c:\wamp\www\” or wherever you have installed wamp server (let the folder name ultimatechange).  Basically we create this folder for simple accessibilty, so that we can have a single location where all our projects can be stored and can be accesed as require.

And then simply drag and drop the PHP-file which you have created above at this location:- ”c:\wamp\www\ultimatechange”.

Step5: Now refresh your browser. And you will see the folder which you had created above.

So click over the new folder which you created and you will get:

Step6: Here you can see “script1.php” the file which you created is appeared, so click it to see the output of your first php script:

All About PHP

 

A B C Of PHP

  • PHP stands for Hypertext Preprocessor.
  • It’s a server side scripting language, like ASP.NET, JSP, Perl etc.
  • It is an interpretted language, means no need for compiling PHP programs before executing them.

Current Version

Current version while writing up this post is PHP 5.3.2.

Basic Funda Of PHP

Step1: Assume you open your web browser and type in any URL (let it be ultimatechange.co.cc). So now your web browser will send a request to the corresponding server (of this URL).

Step2: The web server on the other hand receive this request. It spots out that this URL ends with “.php” extension and so it send this request to the PHP interpreter which is present in the server only (consider the interpreter to be a part of server for now).

Step3: The PHP interpreter accepts the request send to it by the server. It then starts executing whatever PHP-tags are associated with that particular request (hope you have little idea about tags, if not then consider it to be as some code for now).

As execution is completed the response (result) is sent back to your browser. And finally what you get to see is ultimatechange.co.cc blog or whatever you have requested for.

What Makes It Special? 

Server Side Player: As discussed above PHP code is processed at the server side and not on client’s browser. Now this may sound you very normal thing, but even this little thing make a big difference. How?  Actually what happens is for all client side scripting languages(yes the one which are executed at your end) a complex logic is required for providing browser specifications. But with server side  scripting like PHP, anyone can easily write any program irrespective of client’s browser specifications.

Source Code Privacy: Yeah that’s another remarkable feature of PHP. And the credit for this again goes to server side scripting only. As all the PHP-tags are processed at the server side and only the result is send to the client, thus hardly you can see what’s the source code of the webpage is.

Requirements

Generally WAMP server is used when you want to try out your hands with PHP on windows. This WAMP server basically comprises of 4 components Windows, Apache, MySQL, PHP.

Now you might be amazed by reading out all these components, some of us will say when we can easily write out this PHP at notepad then why we will require all this things? So to answer your this query i want to drag your attention back to “Funda of PHP“, over their i told you that you client working on your system, request server which passes ahead the same to interpreter and so on.. So now considering you as a beginner to this language, i will recommend you to first practise out your PHP scripts on your system only. And once you have enough practice with it, then definately you can move on by simply writng PHP in notepad and then uploading files on FTP sever.

So for building and then testing all your PHP scripts locally on your machine, requires a specific environment comprises of:

  • An operating system where client work and a server environment(usually linux).
  • A webserver (usually apache on linux, while IIS on windows).
  • PHP interpreter to process all PHP codes.
  • Database (MySQL) to hold all data.

And that’s the reason why we choose WAMP server( for windows) or LAMP server (for linux).

"IPL3, Let's fight again"-News My Way

RWelcome sir over here on ultimatechange, a blog which really loves to interview newsmakers like you.

Afridi: {Smiling heavily} Allah! so finally i got to hear someone who really admires me.

R: {Pausing for a moment} Sir i’m sorry to say but you might seem to get into some kind of misunderstanding, i have not uttered a single word praising you out.

Afridi: Arrey, tagging out newsmaker with my name that’s enough for me. Anyway you carry on..

R: Okay as you like…

Sir, as we all recently witnessed in the IPL3 auction, not even a single Pakistan player got picked up.  Being as a senior pakistan player, does it really matters to you? or you just don’t mind this at all?

Afridi: Look, the moment opponent’s team player stares at me, i spontaneously burst out on him with my abusive dictionary. So how can people like you imagine that i don’t mind this at all?

Afridi: Moreover it is a million dollars deal. And it really matters to me, specially when it comes dealing in foreign currency.

R: Yeah sir everyone knows, how much pakistani people likes foreign currency. After all, every year you people get a huge sponsorships from U.S.

R: {Moving to next question} Sir, recently pakistan media broadcasted that this was the conspiracy build by Indian government to humilitate pakistan on a very big stage. Do you agree with them?

Afridi: Yeah absolutely.. But when for so many years our country had executed thousands of conspiracies against india, then in front of it we not all mind this one, after all finally India had stared to follow our footsteps.

R: But don’t you sir really feel humiliated by this kind of treatment, which you got from IPL teams, franchies, BCCI, Team managements?

Afridi: Hmm… a kind of, but to be very honest loosing out to Australia even  bowling them out for 127 in the recent test match at sydney was much more shameful.

R: But sir, you also recently got sacked by ICC for the bowl tempering issue. Wasn’t that the most humiliated moment for you?

Afridi: Oh no way, it just an another part of planning & plotting against me.

R: But sir, footages clearly shows that ball was in your mouth. You were trying out something with it….

Afridi: Er…er.   I…..I…. It’s just nonsense. I can prove myself being framed out.

R: But how sir?

Afridi: Did you remeber the IPL season1? Remember the case when Bhaji slapped Sreesanth badly?

R: Yeah sure sir, but what all this to do with the ball in your mouth?

Afridi: You fool… Wasn’t that a big crime, slapping out your team mate instead of oppostion player? And still no footage of this leaked out in media. So how can this of mine footage can be presented out?

Afridi: This purely reflects that this one is just a manipulated video, it would be some kind of situation where i would be eating out something like an apple and some fellow had just replaced it with the ball.

R: {Oh my god!! what a reasoning} Anyway sir, just a last question to you.

R: Every one is really anxious to know about the current status of PPL(Pakistan Premeire League)? Any comment regarding it?

Afridi: Right now we would prefer to focus on internationals tournements (after all setting up a premiere league requires lots of sponsorship & right now pakistan millionaires prefer to invest in terrorism then in cricket).

R: We really apprecitate that you joined with us.

Afridi: I too thanx you for tagging newsmaker word with me.

Tried Hard, But Nothing Changes

I cried all the night, Cried throughout the day,

Turning my life upside down, I spent last few days..

 

I stopped listening to others, Even fought with my friends,

Looking at your picture in my heart, I completely forget of myself..

 

I’m sorry for that call, The little conversation which we had on that day,

All the words which i spoke, Really sorry for repeating out those things over again & again..

 

But what can i do?

As you are my heart, so how can i let it go away?

But what can i do?

As i too, very badly got strucked in between this love game….

 

Believe me,

I was just trying to express myself, Just trying to tell whatever i feel,

Just trying to find out, What’s the reason bcoz of which you really don’t love me..

Believe me,

I just want to reach out for a conclusion,

Want to hear you speaking out, that you really don’t love me..

 

But what i inturn got back, is a little advice from you,

You said don’t ever think, the thing which is impossible to exists..

But can you please tell me, How can a person will survive,

If he starts taking every second thing as impossible for him….

 

I completely disagree with you on this,

As i tried very hard, but i can’t forget about you & all those things….

By- Prabhjot

Posted in Uncategorized | 1 Reply