Documente Academic
Documente Profesional
Documente Cultură
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
4 types of BGP message Open- start of BGP peer connection, update - Exchange of routing
information, notification- Error handling Keepalive- periodic message exchange
Well known mandatory - all BGP implementation and must be attached to all routers
Optional transitive- Not recognized but travels with routes e.g. AGGREGATOR
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.
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
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
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
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
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
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
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
FS_ Neighbours that follows feasibility condition FC- Advertised cost of neighbour to that router is
smaller than FD for that destination
Configurations:
network IP SM
Link state -all neighbours advertised link state, and this is stored in LSDB and then in case of update
only updates are sent
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 of LSA
type 7 NSSA
#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
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(++, --)
Arrays
Strings
OSI model
TCP/IP is built into OS and OS exports this functionalities through Socket API
types of sockets:
Strucutre sockaddr_in{
Byte ordering
Server - socket() -> bind() -> listen() -> accept() -> recv() -> send() -> closesocket()
UDP cleint-server
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
C# interview questions :
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
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
FCL- Framework class library- Collection of usable classes interfaces and value types
What is .NET?
Manged execution environment to build and run applications. It consists of CLR and FCL
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 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
PIIPL-CLPS-RU
PreInit
Init
InitComplete
PreLoad
Load
Load complete
prerender
prerender complete
savestatecomplete
Render
Unload
PSIL-VERU
Page request
Start
Initialization
Load
Validation
Error handling
Render
Unload
Model- Manages data; controller manages calls on the model and view display the content
Advantages of razor?
Database questions
Inner join- Inner join selects records that have matching values from two given tables
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
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
Does the team ever get together for extra curricular with?
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.
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.
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
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
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.
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
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
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
Both of them string is immutable, String buffer is threadsafe, but string builder is faster as it is not
synchronised
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:
Importing:
Import lib also we can import function by running from lib import function