Posts

Showing posts from September, 2015

DNS Resource Records

Image
In this post I am laying some concepts on the DNS resource records. DNS Resource Record RR A name server contains one or more Resource Records (RR). When a DNS server is queried, it may answer with one or more resource records, depending on the type of the query. A resource record is in the following format: Name, TTL, Class, Type, rdata Name : the domain name TTL : Time to Live: the amount of time the RR can exist in a DNS server cache. This is similar to the concept of IP TTL field  but not to be confused with. Class : you will almost always find this field equal to “IN”, which means INternet Type : defines the type of the RR. The most common types are: A, NS, CNAME and MX. The Type field defines what “Name” and “rdata” will be. rdata : also known as Value in some other documentation. This is the record data. Some DNS Resource Record Types We said that resource records are in the format: Name, TTL, Class, Type, rdata. If Type = A, the...

A Domain Name System Tutorial

Image
Here is a collection of my study notes on the Domain Name System protocol. DNS Hierarchy and Database Remember the format of a URL: Figure: URL format – copyright www.examsmyantra.com The Domain Name System protocol is hierarchical. It’s not flat. If you’ve worked with UNIX and Linux file systems, you’ll notice there is a similarity. The next thing you’ll notice is you have a “dot” symbol at the top of the pyramid. This is the root domain, or root name server . Immediately below it, there are extensions that we all know such as “com” and “org”. These are the Top Level Domains TLD s: The DNS hierarchy © Stanford University Below the TLDs are the second-level domains , such as Cisco, Microsoft, etc. And every domain below them is simply called  sub-domain : Figure: DNS Structure – © usahitman.com The domain name is segmented into different domain levels. Each domain level contains many servers. For example, ...

Bittorrent Explained

In a previous post, I introduced the Bittorrent application when defining the TCP bidirectional bytestream The torrent file is a torrent descriptor file. The torrent file contains: “info” section: contains the hash codes, the lengths and the names of the pieces of the file and the Tracker URL “announce” section When a torrent client executes a torrent file, it reads its metadata to determine the Tracker. The Tracker maintains a list of peers that have pieces of the requested file (called the swarm). So the Bittorrent client joins the swarm. To download the file, the file is segmented into equal-sized pieces. the size of the pieces vary. A consequence of this feature is that a file download can be paused or halted without losing previous downloaded pieces. each file piece is associated with a SHA-1 hash. The hash code ensures that the piece is neither maliciously altered nor accidently modified. each SHA-1 hash identifies a one and only piece “Rarest first” policy: a torrent download po...

Understanding The DNS Lookup Process

Image
We will understand how DNS lookup works by looking at an example. In this example, all the interactions -except for the root name server- are assumed to be recursive, although some may argue that all queries should be iterative. Figure: how DNS works © Computer Networking: A Top Down Approach “Surf.eurocom.fr” needs to communicate with “gaia.cs.umass.edu”. We don’t know whether it is a HTTP communication, an FTP transfer or an email service. Either way, there must be a DNS name resolution. So “Surf.eurocom.fr” DNS client, the resolver, sends a DNS request to its local DNS name server, “dns.eurocom.fr”. The request litterally contains the name “gaia.cs.umass.edu”. “dns.eurocom.fr” looks up “gaia.cs.umass.edu” into its DNS database. It does not find any entry. So it requests it on behalf of “Surf.eurocom.fr” to the root name server. the root name server does not know how to resolve this domain name; it responds with the IP address of an intermediate name server that can help with the...

Understanding The Basics of HTTP Protocol

Image
Before starting to talk about HTTP, I begin with a definition of socket interfaces . A socket interface is the “door” between the application layer (here HTTP) and the transport layer (here TCP). So if we have two hosts communicating at the application layer (for instance HTTP), then both hosts will have socket interfaces. Figure: Socket interfaces in the interaction between the application layer and the transport layer – © homepage.smc.edu Sending requests The client process at the application layer sends HTTP requests down to the Transport layer through the socket interface. At the server side, the Transport layer receives the HTTP request and hands it to the server process through the socket interface. Receiving responses The server process at the application layer sends a HTTP rely down the Transport layer through the socket interface. When the client TCP connection receives the HTTP response, it forwards it to the client process through the socket interface. Note here that HT...

The Thing With CUCM Device Packs

Image
To add a new phone on CUCM, whether it is a Cisco phone or one of the free softphones on the Internet, you go to Device –> phone. Sometimes the phone you want to add does not exist in the drop box, because the device model is new or the CUCM version is a bit old. What you can do here is to download a Device Pack of the new phone and install it. A Device Pack is a set of firmwares contained in a single file. Generally, it has the extension “sgn”. A Device Pack for phone X not only contains a load for it, but also loads for many other phone models. This is important to know because, once you install a Device Pack in CUCM, your existing phones by default will install the new version of their respective loads. I encountered a case where, after installing a Device Pack, some phones no longer worked. So I had to note down the “Active Load” and put it in the Device Defaults page. CUCM Device Pack download To download a Device Pack, you need to have a valid Cis...