Sunday, January 5, 2014

I'm preparing for an interview so I will post frequently as a recap of the things I revised.
A revisit of the Active Directory configurations and DNS and networking technologies.
Active Directory site topology and replication -
Replication usually from single master server to subordinate servers
Active directory offers multimaster replication; avoids single point of failure
KCC tool sets up and manages the replication connections.
KCC uses two modes - intrasite and intersite.
intrasite is designed to create a minimum latency ring topology between DCs
the intersite uses a spanning tree algorithm with site link metrics.
Replications flows are setup between sites and DFS shares.
By default there's one site created automatically.
Multiple sites can be defined for a single location to segregate resources.
AD sites are defined in terms of a collection of well-connected AD subnets.
Site links connect and DC uses them to cover additional ones including the current site for user logons.
If not all site links are available, bridges are used instead.
Naming contexts are replicated by a domain controller by maintaining a high watermark table
- one each for schema, configuration and domain NCs.
This is based on the highest USNs of the updates.
Conditional Forwarding, delegation options and Dynamic DNS.
CF is the feature that lets name resolution for an ip address to be passed other than the local dns
DNS servers can be primary or secondary
primary stores all the records
secondary gets the contents from primary
The contents of a zone file are stored hierarchically
This structure can be replicated among all the DCs.
It is updated via LDAP operations or DDNS (must have AD integration)
A common misconfiguration issues is the island issue when ip address for a DNS changes
and it is updated only locally. To do a global update instead, they must point to a root server other than themselves.
Delegation options are granted to DNS servers or DCs.
Simple is when DNS namespaces are delegated to DCs and DC hosts a DNS zone.
The records in a DNS server as opposed to DC are autonomously managed.
DNS servers need to allow DDNS by DC
DC does DDNS to prevent updates to the DNS records in the server.
Support and maintenance is minimal with DDNS.
Standalone AD is used to create test or lab networks.
A forest is created, a DC is assigned, DNS Service is installed.
DNS zone is added, unresolved requests are forwarded to an existing corporate server
The primary DNS for all clients point to the DC.
Background loading of DNS Zones makes it even easier to load DNS zones while keeping the zone available for dns updates / queries.

Algorithms and data structures:
1) Quicksort  - defined as
Partition
 Quicksort one side
 Quicksort other side

Partition works something like this
x is the value of the partition candidate A[r] in A[p,r]
i,j indexes are maintained
j iterates from first to the last but one
i lags behind j
i and j bound the values higher than the partition candidate x

Radix sort - based on significant digits starting from right to left.

Insertion sort - think sorted list or arranging a deck of cards.
Merge sort - -
Mergesort A,p,q,r
Mergesort A,q +1, r
Merge A,p,q,r
bottom up merge and at each step sort the contents on merge
for k from p to r
if L[i] < R[j]
A[k] = L[i] i = i + 1
else
A[k] = R[j] j = j + 1

HeapSort O(nlogn)
uses a heap
Parent(i) = i/2
Left(i) = 2i
Right(i) = 2i + 1
for i from length(a)/2 downto 1
do Max-Heapify(A,i)
Max-Heapify is recursive

Tree-Successor : return minimum on the right sub tree  or keep climbing the parents until the given node is descended from the left

Tree - predecessor : return maximum on left subtree or keep climbing until the given node is descended from the right.

Tree-delete uses tree-successor.
Tree-Insert walk down the tree to find the value less than the key, then insert there
 Tree - Delete depends on how many children the target z has. if z has no children, we just remove it. If z has only one child, we splice out z  If z has two children, we splice out its successor y which has at most one child.
 Red-black tree insert and delete is even more interesting.

No comments:

Post a Comment