Interview Preparation Review

Networking :

1, Subnet Range and Class :

Class     Leading bits     Start          End                          Default Sub net
A            0                     0.0.0.0         127.255.255.255      255.0.0.0    
B            10                   128.0.0.0     191.255.255.255      255.255.0.0    
C            110                 192.0.0.0     223.255.255.255      255.255.255.0    
D           1110                224.0.0.0     239.255.255.255      not defined    
E            1111               240.0.0.0     255.255.255.255      not defined



The private address space specified in RFC 1918 is defined by the following three reserved address blocks:
  • 10.0.0.0/8
    The 10.0.0.0/8 private network is a class A network ID that allows the following range of valid IP addresses: 10.0.0.1 to 10.255.255.254. The 10.0.0.0/8 private network has 24 host bits that can be used for any subnetting scheme within the private organization.

  • 172.16.0.0/12
    The 172.16.0.0/12 private network can be interpreted either as a block of 16 class B network IDs or as a 20-bit assignable address space (20 host bits) that can be used for any subnetting scheme within the private organization. The 172.16.0.0/12 private network allows the following range of valid IP addresses: 172.16.0.1 to 172.31.255.254.

  • 192.168.0.0/16
    The 192.168.0.0/16 private network can be interpreted either as a block of 256 class C network IDs or as a 16-bit assignable address space (16 host bits) that can be used for any sub netting scheme within the private organization. The 192.168.0.0/16 private network allows the following range of valid IP addresses: 192.168.0.1 to 192.168.255.254.

 Linux :

1. Inode :
Inode is a data structure that stores the following information about a file and the Inode number points to an Inode. 
  • Size of file
  • Device ID
  • User ID of the file
  • Group ID of the file
  • The file mode information and access privileges for owner, group and others
  • File protection flags
  • The time stamps for file creation, modification etc
  • link counter to determine the number of hard links
  • Pointers to the blocks storing file’s contents
a) Command to display inode :
     i. #ls -i
     ii. #df -i
example :

Some files with special characters are not possible to delete using rm with file name , Which can be removed by inode number 


2.Hard link and Soft link :

Hardlink is the pointer to the inode of the file ,It is actually the same file with different name,Thats the reason inode number does not have file name associated

e.g : echo 'This is a test' > foo
ln foo bar
ls -li bar foo


Softlink or symbolic link is just pointer to the path of the file like shortcut

e.g : ln -s /webroot/apache/index.php /home/user/index.php
ls -l


3. Routing in Linux :

route command displays kernel routing tables

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0

command to add a static route

$ route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.3.10

Ethernet configuration 

[root@tecmint ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Simple output:
DEVICE="eth0"
BOOTPROTO=static
ONBOOT=yes
TYPE="Ethernet"
IPADDR=192.168.50.2
NAME="System eth0"
HWADDR=00:0C:29:28:FD:4C
GATEWAY=192.168.50.1

3. Cron-tab Syntax :

<Minute 0-59> <Hour 0-23> <Day_of_the_Month 1- 31> <Month_of_the_Year 1-12> <Day_of_the_Week 1-7 (1-mon)><year 1900- 3000>

4.Shell script basics :

a. To hide the o/p of command execution
"> /dev/null"

e.g : #echo test /dev/null

5.  Command to pull a website information

#curl -ls http://www.ItWebAdminSolutions.com

6. To kill a process using port 

#fuser -ik 80/tcp

7. Script to copy 5th to 10 line from file1 to a new file file2 

Script copy.sh with

#!/bin/sh
sed -n  '5,10p' file1 file2


8. How to remove unwanted spaces from a file copied from windows to linux

Windows :

1. Equivalent for grep command in Unix :
C:\Users\root>dir | find "Links"
also findstr


SCM :

1. Devops : It is a new term emerging from two trends

a. Continuous Integration,Agile approach to operations work
b. Understanding of the value of collaboration between development and operations staff throughout all stages of the development life-cycle

DevOps is the practice of operations and development engineers participating together in the entire service life-cycle, from design through the development process to production support.

2. Sample ANT Script to build a file (wrt: 1.9.5) and java 1.7.0

build.xml

<xml version="1,0"?>

<project name = "base build" default="main" basedir=".">

<target name = "test">
<echo message = "from test"/> 
</target>

<target name = "main" depends = "test">
<echo message ="from main"/>
</target>

</project>

ANT basics :

1. Requires Java and build .xml as shown above decides the ant execution from the corresponding directory
2. each build.xml has one project , multiple targets but 1st execution will be the default target and then refers to depending target which is executed first as shown in above it first displays from test and the from main
3. one project and multiple targets for all build.xml




3. Comparison between ANT and Maven


Maven


Jenkins

4. XML vs HTML

The most salient difference between HTML and XML is that HTML describes presentation and XML describes content. An HTML document rendered in a web browser is human readable. XML is aimed toward being both human and machine readable.

syntax  difference from HTML and XML
  • New tags may be defined at will
  • Tags may be nested to arbitrary depth
  • May contain an optional description of its grammar
Apache Vs Tomcat


Web-sphere 


Default Config Spec in CC:


element * CHECKEDOUT
For any element, select the checked out version, if any)
element * /main/LATEST
Otherwise, select most recent version on the main branch

Clear Case   vs                                              SVN  vs                               Git


Types of Testing (Basics)

Black box(Bb) testing – Internal system design is not considered. Tests are based on requirements and functionality

White box(Wb) testing – This testing is based on knowledge of the internal logic of an application’s code. Also known as Glass box Testing. Internal software and code working should be known for this type of testing. Tests are based on coverage of code statements, branches, paths, conditions.

Unit testing – Testing of individual software components or modules. Typically done by the programmer and not by testers, as it requires detailed knowledge of the internal program design and code. 


Sanity/ Smoke/ Confidence Testing - 
Testing to determine if a new software version is performing well enough to accept it for a major testing effort. If application is crashing for initial use then system is not stable enough for further testing and build or application is assigned to fix.


Functional testing(Bb type) – This type of testing ignores the internal parts and focus on the output is as per requirement or not. 

System testing(Bb type) – Entire system is tested as per the requirements. Black-box type testing that is based on overall requirements specifications, covers all combined parts of a system.

Regression testing – Testing the application as a whole for the modification in any module or functionality. Difficult to cover all the system in regression testing so typically automation tools are used for these testing types.

Integration testing – Testing of integrated modules to verify combined functionality after integration

Acceptance Testing - Normally this type of testing is done to verify if system meets the customer specified requirements. User or customer do this testing to determine whether to accept application.





No comments:

Post a Comment