Sunteți pe pagina 1din 12

Interview preparation

BGP- BGP is an exterior gateway routing protocol which is used to share routes between two or
more AS systems. AS system are collection of networks under a single network administrator
whereas IGP operates within the same AS same organization

Uses TCP port 179

4 types of BGP message Open- start of BGP peer connection, update - Exchange of routing
information, notification- Error handling Keepalive- periodic message exchange

BGP route attributes:

Well known mandatory - all BGP implementation and must be attached to all routers

e.g.= ORIGIN, AS_PATH, NEXT_HOP

Well known discretionary - Atomic aggregate

Optional transitive- Not recognized but travels with routes e.g. AGGREGATOR

Optional Non-transitive MED

Two types of BGP peers -External in different Ases

Internal - Same Ases

What is DHCP?

DHCP is a networking protocol that allows a particular server to assign TCP/IP configurations
automatically to client computers on the same network. In the Windows world, you need to install
the DHCP server role on a Windows Server in order to have this functionality on your network.
Administrators may specify the range or scope of IP address that are to be supplied by DHCP as well
as ex cluding or prohibiting certain IP address from being assigned to clients. You may also set
reservation for specific computers.

D- Discovery, O- Offer the IP address R- Request A- Acknowledge

IP helper - Router's main job in the network is to stop the braodcast traffic on the LAN and since it is
expensive to have dhcp server for every LAN we can configure IP helper on router such that once
DHCP broadcasts are recived on the router it will forward it to DHCP server

Difference between Layer 2, Layer 3 switch and router?

Layer 2 switch works on Layer 2, while Layer 3 and router works on Layer 3 of OSI. Layer 2 switches
are used in access layer while layer 3 are used in distribution. Layer 3 switches are in built switches
but with routing capabilities although it supports limited routing functionalities

Layer 3 switches also helps in inter vlan routing


L3 switch and router

L3 switch forwarding based on hardware while router are based on router, No NAT, no WAN on L3
switch while router - has all those features

Layer 2: 2960, 2950

Router - 1800,2800, 3800

Layer 3- 3550, 3560, 3750, 4500

Hot Standby routing protcol?

Other protocols such as GLBP- Gateway load balancer protocol and CARP - Common address
resolution protocol

HSRP is basically fault tolerance method for default GW. In this we use an additional router active
router and standby router

VLANS?

VLANs are basically used to logically separate large networks. The benefit of doing this we get is
additional security and minimizing the broadcasts as well as providing flexibility.

However, we need router to route traffic between different VLANs router on a stick

There are 4096 VLANS where first 1024 VLANS are used by system. By default, all the ports in a
switch are in VLAN1. There are two protocols Cisco ISL and IEEE 801.q - additional header

Spanning tree protocol?

Ehternet has no inherent mechanism to detect loops so there occurs a problem of broadcast storm
also if we only have one path there are pretty good problems associated with link failure So STP
helps us in such a scenario it helps in detecting loops and breaking them, SO STP works by selecting a
root bridge and selecting only one path from a switch to RB

BPDU

Hot Standby Routing Protocol:

The entire network is impacted when a single default gateway fails. So redundancy protocols such as
HSRP work by having two routers to share same fictitious MAC address and unique IP address. There
are two routers active and standby and this active router is elected by highest HSRP priority or IP
address. Standby routers monitors the hello messages

standby 39 ip 10.0.0.1

stand 2 authentication md5 key-string cisco


standby 39 preempt delay minimum 90

IPSLA- It is used in moniring active network traffic as well as network performance

IP SLA basically rely on ICMP messages to get network statistics

EIGRP - It is Cisco proprietary advanced distance vector routing protocol. It is based on BW and delay
Features: fast convergence , supports VLSM, use of multicasts 224.0.0.10, supports un equal cost
load sharing, authentication

EIGRP function Neighbour discovery - Hello messages RTP - reliable message delivery, DUAL -
determines best loop free network path

PDM - Plugins for Apple talk, IP IPX

Five different packet types:Hello Update, Query reply

EIGRP terminology - Successor is neighbour with shortest path

FS_ Neighbours that follows feasibility condition FC- Advertised cost of neighbour to that router is
smaller than FD for that destination

FD- Minimum cost for a route

Configurations:

router eigrp AS number

network IP SM

show ip eigrp neighbours

show ip eigrp interfaces

show ip eigrp topology

show ip eigrp traffic

OSPF - Open Shortest Path First

Link state -all neighbours advertised link state, and this is stored in LSDB and then in case of update
only updates are sent

Classless, Metric: arbitrary BW

Equal cost load sharing

Multicasts, authentication and route tags

Neighbourship is formed by sending hello packets and if both of these routers are in same subnet
and share common characteristics
After neighbpurship comes adjacencies where if one of them is Dr or BDR or if they are connected in
point to point terminologies

Areas - Each router is identified in an area with the help of its routing number .All areas should be
connected to Area 0 and all the traffic must flow from area 0.The concept of areas came in order to
reduce the number of LSA flooding

Types - Transit area and stub area

Router types - Internal router - Inside one area

Backbone router - One interface in area 0

ABR - Between one area and area 0

ASBR - router connecting two different Ases

Types of LSA

LSa type 1 - Describe one routers link

Type 2 - network LSA -DR produces this LSA

type 3 - Network Summary LSa ABR routers produce this

type 4 - ASBR Summary How to get to that particular ASBR

type 5 - External Lsa to describe outside world

type 7 NSSA

C programming and Sockets

C- It is low level small programming compiled language

#include <stdio.h>

int main ()

printf("Hello World");

return 0

pre-processor directives- To use the existing functions and prototypes that are already compiled. For
Eg: printf and scanf methods are defined in <stdio.h> header file so by including it we do nave to
define them again and we can directly invoke and use them

C program compiled into object code .obj

Linker- Linker combines compiled code with additonal code to produce executable
Operators - Arithmetic operators(, +, - Unary + - % / *), Relatinal operators(==,!=, >= <=) ,logical
operators(&&, ||, !), asignment operators(+=,-=*=,/= ) increment and decrement operators(++, --)

Formatting (m.pX) - %d, %f, %d %e and %g

Selection : if else break swtich continue goto for while do while

Arrays

Strings

Pointers and Arrays

Structures & Unions

OSI model

TCP/IP is built into OS and OS exports this functionalities through Socket API

Socket is an interface between network services and application interfaces

types of sockets:

Stream socket, Datagram socket, raw socket

Strucutre sockaddr_in{

IP address denotation AF_INET - TCP

Byte ordering

little endian- Least significant byte lower memory location

big endian - least significant higher memory

WINSOCK API - for windows implementation

TCP client -server

Client - socket()->connect() - > send() -> receive -> closesocket()

Server - socket() -> bind() -> listen() -> accept() -> recv() -> send() -> closesocket()

UDP cleint-server

Client - socket() -> sendto() -> recvfrom() -> closesocket()

Server - socket() -> bind() -> recvfrom() -> sendto() -> closesocket
Iterative server - Until first client is not serviced completely all other arer blocked

Processes - Processes are independently executign processes on the same host, but seperate
memory space used for heavy weight

fork() - New process , zombies

Threads- Lighweight taks

C# interview questions :

References- Store references to actual data like functions,class, string

Value- Struct, enums boolean

Interface- Are used to specify methods and properties that derived class has access to. Its like a
contract and it does not have code

Abstract classes- Like interfaces but it can contain code, they cannot be instantiated, and they are
partially implemented or not implemented at all. They can be only inherited from one abstract class

you can specify virtual to force derived class to create its own implementation

Static class- Class which contains static members. They cannot be instantiated, and they are
inherently sealed

Generics- Generics allow you to enforce type safety by tailoring a method or class to precise data
type

Polymorphism- When classes have different functionality while using same interface

Eg. Blu-ray disk player can play CD or DVD

Encapsulation and abstraction- Features

Encapsulation prevents access to implementation details

Abstraction -Makes only relevant information visible by implementing interfaces,abstract classes

Inheritances- Object or class is based on parent object or class taking its characteristics

Cannot do multiple inheritance in C# -No but you can implement multiple inheritances to do so
OOP pillars- Abstraction, Polymorphism, Inheritance and encapsulation

NET framework - CLR and FCL - Common language run time

Offers security memory management and exception handling

FCL- Framework class library- Collection of usable classes interfaces and value types

FCL sits on top of CLR

What is .NET?

Manged execution environment to build and run applications. It consists of CLR and FCL

Code applications in C+=,C#,Java

What is managed code vs unmanaged code?

Managed code is what C# compliers create, it runs on the CLR which among other things offer
GC,reference checking

Unmanged code- Compiles straight to machine code and this is not manged by CLR and since it is not
intermediate language it is not portable

Boxing and unboxing?

Boxing is the process of converting a value type to the type of an object and stores in under
managed heapIt consumes more memory and takes minimum of two lookups to access

Unboxing- Reverse i.e extracting the value type from the object it also takes lot of memory

ASP.net lifecycle events

PIIPL-CLPS-RU

PreInit

Init

InitComplete

PreLoad

Load

Control Post back events

Load complete
prerender

prerender complete

savestatecomplete

Render

Unload

Page lifecycle events?

PSIL-VERU

Page request

Start

Initialization

Load

Validation

Error handling

Render

Unload

ASP.net and MVC- They are completely design pattern

ASP.net is web framework

MVC -Design pattern

Model- Manages data; controller manages calls on the model and view display the content

Advantages of razor?

Razor is syntax in embedding server code in webpages

Database questions

Inner join- Inner join selects records that have matching values from two given tables

Joins- Left join, right join and Full join

Stored procedures- It is subroutine that has collection of SQL statements. Mostly needed to for
complex logic
Design patterns:

Dependency injection- It allows your class to no longer be responsible for instantiating their own
dependencies. In other words, dependency is another object that your class needs to function

Gang of Four- Authors of Elements of Reusable Object-oriented software

Design patterns: Creational, Structural and Behavioural patterns

Creational patterns- Create objects while hiding creation logic

Structural patterns Class and Object composition

Repository pattern: Allows application to perform with CRUD like operations by providing
abstraction of data

Unit of Work - It maintains in memory updates and sends in memory updates as one transaction to
the DB

Questions to ask in an interview?

What technical challanges does your team face?

If they could change anything in their job what would it be?

Does the team ever get together for extra curricular with?

Brown bag lunches ? if they provide internal training?

How to handle irrelevant questions?

Model-View-Presenter

In MVP, the Presenter contains the UI business logic for the View. All invocations from the View
delegate directly to Presenter. The Presenter is also decoupled directly from the View and talks to it
through an interface. This is to allow mocking of the View in a unit test. One common attribute of
MVP is that there has to be a lot of two-way dispatching. For example, when someone clicks the
"Save" button, the event handler delegates to the Presenter's "OnSave" method. Once the save is
completed, the Presenter will then call back the View through its interface so that the View can
display that the save has completed.
MVP tends to be a very natural pattern for achieving separated presentation in Web Forms. The
reason is that the View is always created first by the ASP.NET runtime. You can find out more about
both variants.

Two primary variations

Passive View: The View is as dumb as possible and contains almost zero logic. The Presenter is a
middle man that talks to the View and the Model. The View and Model are completely shielded from
one another. The Model may raise events, but the Presenter subscribes to them for updating the
View. In Passive View there is no direct data binding, instead the View exposes setter properties
which the Presenter uses to set the data. All state is managed in the Presenter and not the View.

Pro: maximum testability surface; clean separation of the View and Model

Con: more work (for example all the setter properties) as you are doing all the data binding yourself.

Supervising Controller: The Presenter handles user gestures. The View binds to the Model directly
through data binding. In this case it's the Presenter's job to pass off the Model to the View so that it
can bind to it. The Presenter will also contain logic for gestures like pressing a button, navigation,
etc.

Pro: by leveraging databinding the amount of code is reduced.

Con: there's less testable surface (because of data binding), and there's less encapsulation in the
View since it talks directly to the Model

Java interview questions

What is JDK, JRE, JVM?

JDK - Java development toolkit it consists of JRE + all other tools used to compile, document and
package Java programs

JRE - JRE is Java runtime environment it implements JVM + class library files for run time execution of
Java

JVM - It is an abstract machine which executed your Java bytecode and because of this Java is
platform independent

tasks

Java application execution steps:

Edit- Using any editor and you save the file with .java extension

Compile- Java complier compiles the .java file and converts it into Java bytecode
Load- The Java bytecode is then loaded into memory using class loader. The .class files can be loaded
from hard drive or network as well

Verify- The byte code verifier checks if the bytecode loaded are valid and do not breach security

Execute- JIT compiler compiles one bytecode at a time and runs the program

What is synchronisation?

It is the process to keep all the concurrent threads in execution to be in sync by placing lock on the
resource. It helps to avoid memory inconsistency errors.

What is the difference between thread and process?

An executing instance of a program is process and inside this process there are multiple threads
executing. They run in separated memory spaces and are controlled by operating systems. Processes
are independent. Threads run in shared memory, threads are controlled by programmer and they
are dependent

What are wrapper classes?

Wrapper classes are used to wrap the primitive datatypes into objects of that class. Process is called
as boxing and unboxing. Wrapper class can help in passing by references

the primitive data and truly following object-oriented programming

What is the purpose of keyword final, finally, and finalize?

final keyword can be used on classes, methods and variables. Final class cannot be inherited, final
method cannot be overridden, final value cannot be changed

Finally used to execute statements whether exception is handled or not

fianlize is used to perform clean up processing just before the GC is called

StringBuilder, StringBuffer differences?

Both of them string is immutable, String buffer is threadsafe, but string builder is faster as it is not
synchronised

Difference in stack and heap memory?

Stack - LIFO, Heap - Memory management based on Stack memory only consists of primitive
variables and reference variables to objects in heap space. Whenever an object is created in Java it is
always created in heap
What is the difference between ArrayList and Vector?

Array list is fast and not synchronised, vector otherwise, array list increases its size by 50% whereas
vector doubles its size and also defines increment size

Python

Python is strongly typed, dynamically, implicitly typed, case sensitive, and object-oriented language

Python has indentation, comments are # and ‘’’. Assignment = and equality testing == and + to
concatenate strings

Datatypes (Can mix integers,strings) – Lists(1D array, but can have lists inside of lists) Sets Tuples
Dictionary(key value pairs) Multi line Strings are represented by “””

Flow control = if elif else for while No switches and do while loops.To obtain a list of numbers we can
use range().pass-> do nothing

Functions: Declared with def keyword, function can return multiple values. Lambda functions are ad-
hoc functions consisting of single lines. Parameters are passed by reference but tuples string and ints
cannot be changed

Classes:

Ptyon supports limited form of multiple inheritance in classes. Private variables an methods can be
declared by adding __. Using classname.class variable we can change value but using object name
we can only change for that particular class. We can also add class instances directly in the code

Exceptions:

Try , except else and finally block

Importing:

Import lib also we can import function by running from lib import function

S-ar putea să vă placă și