Networks Notes: RFC 1149 – IP over Avian Carriers

This is a series containing notes I made while reading RFCs.

Link to this RFC.

postduif

Avian carrier

A Standard for the Transmission of IP Datagrams on Avian Carriers.

Note: this was the April Fool’s RFC for the year 1990.:-)

  • Describes an experimental method for sending IP datagrams over “avian carriers” (pigeons!)
  • Primarily useful in Metropolitan Area Networks
  • Experimental, not recommended standard.

Overview and Rational

  • Avian carriers provide:
    • high delay
    • low throughput
    • low altitude service
  • Connection path limited to a single point-to-point path for each carrier.
  • Many carriers can be used without significant interference with each other, outside of early spring.

Frame Format

  • Scroll of paper wrapped around avian carrier’s leg.
  • Bandwidth depends on leg length.
  • MTU typically 256 mg. Paradoxically, generally increases as carrier ages.

Discussion

  • Prioritized pecking order can be used for multiple types of service.
  • Built-in worm detection and eradication
  • Storms can cause dataloss.
  • Persistent delivery retry, until the carrrier drops.

Security Considerations

  • Not generally a problem in normal operation
  • Data encryption needed in tactical environments.

Networks Notes: RFC 792 – Internet Control Message Protocol

This is a series containing notes I made while reading RFCs.

Link to this RFC.

Internet Control Message Protocol (ICMP)

  • Used by a gateway or destination to communicate with a source host. To report an error, for example.
  • Uses the basic support of IP as if it was a higher-level protocol. Actually a part of IP, is implemented in every IP module.
  • Control messages provide feedback about problems in the communication environment.
  • Not designed to make IP reliable, IP is not designed to be completely reliable. For main purpose, see previous point.
  • No guarantees that a control message will be returned. Datagrams can still be undelivered without being reported by a control message.
  • Reliability is implemented in higher-level protocols that use IP (e.g TCP).
  • ICMP messages typically report errors in the processing of datagrams.
  • No ICMP messages are sent about ICMP messages (to avoid infinite loop).
  • ICMP messages only sent about errors in handing fragment zero of fragmented datagrams (the fragment with the fragment offset equal to zero).

Message Formats

  • Sent using the basic IP header.
  • First octet of the data portion of the datagram is a ICMP type field. Its value determines format of remaining data.
  • Protocol number of ICMP is 1.

For values of an ICMP message’s IP header, see the “Message Formats” section of the linked RFC.

ICMP Fields

  • Type
  • Code
  • Checksum

For details on ICMP message types see pages 4 to 19 of the linked RFC.

 

Networks Notes: RFC791 -Internet Protocol

This is a series containing notes I made while reading RFCs.

Link to this RFC.

Internet Protocol

  • Implements two basic functions:
    • Addressing
    • Fragmentation
  • Addresses carried in the internet header are used to transmit internet datagrams to their destinations.
  • The selection of a path for transmission is called routing.
  • Internet modules use fields in the internet header to fragment and reassemble internet datagrams when necessary in “small packet” networks.
  • An internet module resides in:
    • each host engaged in communication
    • each gateway interconnecting networks
  • Modules share common rules for interpreting the address fields and for fragmenting and assembling internet datagrams.
  • Modules have procedures for making routing decisions and other functions.
  • The protocol treats each internet datagram as an independent entity unrelated to any other internet datagram (i.e no connections or logical circuits).
  • The protocol uses four key mechanisms to provide service:
    • Type of Service
    • Time to Live
    • Options
    • Header Checksum

Mechanisms

  • Type of Service
    • Indicates the quality of the service desired.
    • Used by gateways for:
      • selecting tranmission parameters for a particular network
      • selecting the network to be used for the next hop
      • selecting the next gateway when routing the internet datagram.
  • Time to Live
    • Indication of an upper bound on the lifetime of an internet datagram.
    • Set by sender of the datagram.
    • Decremented at points in the route where it is processed.
    • The internet datagram is destroyed if this  reaches zero before reaching the destination.
    • A “self-destruct” time limit.
  • Options
    • provide for control functions needed or sometimes useful.
    • unnecessary in most common communications.
    • can include provisions for timestamps, security, routing etc.
  • Header Checksum
    • provides a verification that the internet datagram has been transmitted correctly.
    • the internet datagram is discarded if the header checksum fails.
  • The internet protocol does not provide a reliable communication facility. There are no:
    • acknowledgements
    • error control for data, aside from the header checksum
    • retranmissions
    • flow control
  • Errors detected can be reported using the Internet Control Message Protocol (ICMP), implemented in the IP module.

Adressing

  • Name – what we seek
  • Address – where it is
  • Route – how to get there

On addresses…

  • Addresses have a fixed length of four octets (32 bits).
  • An address:
    • begins with a network number
    • followed by the local address (“rest” field)
  • Addresses have three formats or classes.
    • Class A: high order bit is zero. Next 7 bits are the network. Last 24 bits are the local address.
    • Class B: high order two bits are one-zero. Next 14 bits are the network. Last 16 bits are the local address.
    • Class C: high order three bits are one-one-zero. Next 21 bits are the network. Last 8 bits are the local address.

Fragmentation

  • Necessary when large packets have to pass through a local network that limits packets to a smaller size.
  • An internet datagram can be marked “don’t fragment”.
    • It will not be fragmented under any circumstances.
    • If it cannot be delivered without fragmentation, it will be discarded.
  • Needs to be able to break a datagram into an almost arbitrary number of pieces that can later be reassembled.
  • Receiver uses identification field to ensure fragments of different datagrams are not mixed.
  • Fragment offset field tells receiver the position of a fragment in the original datagram.
  • Fragment offset and length determine portion of the original datagram covered by the fragment.
  • More-fragments flag indicates (by being reset) the last fragment
  • Fields that provide sufficient information to reassemble datagrams:
    • identification field
    • fragment offset field
    • length
    • more-fragments flag
  • See RFC page 8-9 for a very well-written description of how fragmentation works.

Gateways

  • Forward datagrams between networks
  • Also implement the Gateway to Gateway Protocol (GGP) to coordinate routing and other internet control information.
  • Higher level protocols need not be implemented in a gateway. GGP functions are added to the IP module.

The details on specification are very well written and I don’t think notes for them are needed. To read up the specification, refer to section 3 of the above linked RFC.

Networks Notes: RFC 768 – User Datagram Protocol

This is a series containing notes I made while reading RFCs.

Link to this RFC.

User Datagram Protocol

Characteristics:

  • Uses IP as its underlying protool.
  • Does not guarantee reliable delivery of data streams
  • Protocol mechanism is minimal

Header contains:

  • Source port. (optional)
    • Contains the port of the sending process.
    • Any replies will be possibly addressed to this port.
    • Contains a zero value if unused.
  • Destination port.
    • Contains the port of the destination address.
  • Length.
    • Contains the length (in octets i.e bytes) of the datagram being sent including the header and the data.
    • Minimum value is eight because the header is eight bytes.
  • Checksum.
    • 16-bit one’s complement of the one’s complement sum of the information being sent.
    • Sums up the information in the IP header*, the UDP header and the data.
    • Pads data with zero octets to make a multiple of 2 octets (16-bits remember?)
    • Has a value of all zeroes if not generated (e.g for debugging purposes)
    • Same checksum procedure is also used in TCP.

* or, to be more precise, the pseudoheader which is assumed will be prefixed to the datagram.

A user-interface designed for this protocol should allow:

  • The creation of new receive ports
  • Functionality on the receive ports that does operations like returning the data octets and indicating the source port and address.
  • An operation allowing a datagram to be sent, specifying the data and destination ports and addresses to be sent.

IP Interface guidelines:

  • UDP module should get the source and destination addresses and the protocol field from the IP header.
  • One possible UDP/IP interface can:
    • return whole internet datagram (including internet header) on a receive operation.
    • pass whole internet datagram (again, including header) to the IP on a send operation.
    • Let the IP verify certain fields for consistency and compute the internet header checksum.

Possible applications of this protocol include:

  • Internet Name Server
  • Trivial File Transfer

When used in the Internet Protocol, the protocol number of UDP is 17 (21 in octal).

 

Project Twain

To hype-up my vocabulary for the GRE and gain lots of information on the way, I am going to read articles regularly and list them here with my comments.

#1 “Waiting for Godel” by Siobhan Roberts in The New Yorker. June 29, 2016. ( link )

My comments: A very informative article about Godel’s Theorem and Mathematics in general. Centered around the experience of Siobhan Roberts while attending a crash-course on Godel’s Incompleteness Theorem at the Brooklyn Institute for Social Research where he encountered people as diverse as “a computer scientist obsessed with recursion…, a public-health nutritionist with a fondness for her “Philoslothical” T-shirt; a philosopher in the tradition of American pragmatism; an ad man versed in the classics; and a private-school teacher who’d spent a lonely, life-changing winter reading Douglas Hofstadter’s “Gödel, Escher, Bach,”” A very pleasant read.

#2 “Killing the Computer to Save It” by John Markoff in The New York Times. October 29, 2012. ( link )

My comments: This article discusses the attempt of a famour Computer Scientist and Network Security specialist, Peter G. Neumann to redesign computer systems in an attempt to prevent the security flaws the modern-day internet is plagued with. With nostalgic descriptions of SRI, the early days of Computers and the Internet, and a meeting between Dr. Neumann and Albert Einstein which was to influence Dr. Neumann’s life and work greatly, the article is very vivid and engaging.

#3 “Soviet Computer Push” in The New York Times. January 5, 1988. ( link )

My comments: Not a particularly good article. Monotonously reports a 1985 Soviet attempt to accelerate the development of its computer industry in order to compete with the West.

#4 “Ada Lovelace, The First Tech Visionary” by Betsy Morais in The New Yorker. October 15, 2013. ( link )

My comments: This article provides a glimpse into the life of Ada Lovelace using various sources. It discusses her contributions to the “Analytical Engine” introduced to her by its inventor, Charles Babbage, which was later to be recognized as the world’s first designed computer. It describes how Ada was the first person to recognize the true potential of the Analytical Engine and write the world’s first computer program which weaved a sequence of Bernoulli numbers. Moreover it also informs us that Ada was the first person to predict the rise of a new science emergent from mathematics based on this design, which she called the “science of operations” and is now called computer science. In parallel with all this, the article also discusses the discrimination faced by women in mathematics and computing and even the attempts at discrediting Ada in the twentieth century in order to establish male domination in the field. ““As people realized how important computer programming was, there was a greater backlash and an attempt to reclaim it as a male activity,” Aurora told me. “In order to keep that wealth and power in a man’s hands, there’s a backlash to try to redefine it as something a woman didn’t do, and shouldn’t do, and couldn’t do.”” The author concludes with a mention of the Ada programming language, named after the Countess of Lovelace which “brought together a number of different programming languages. It’s fitting for Lovelace—a woman who rode horses and played the harp and studied poetry—to tie seemingly disparate elements together.”

#5 “Beautiful Code” by Zeke Turner in The New Yorker. March 30, 2015. ( link )

My comments: Some people might find this article beautiful. I see it as a narration of how three people tried to sell other people’s code and algorithms as art on fancy sandstone tablets. Wasn’t particularly informative or inspiring.

#6 “Tesla Slept Here” by Mark Singer in The New Yorker. January 14, 2008. ( link )

My comments: This article uses the setting of the hotel Nikola Tesla lived in for the last decade of his life as a starting point to discuss his life. It is unique because, unlike most Tesla articles, it has almost no details about his scientific contributions. Instead it focuses more on Tesla the person, and Tesla the occupant of rooms 3327 and 3328.

#7 “Slavoj Žižek on Brexit, the crisis of the Left, and the future of Europe” by Slavoj Zizek and Benjamin Ramm in Open Democracy. July 1, 2016.  ( link )  [ entry by Ali Mehdi Zaidi ]

Mehdi’s comments: This article has an interesting discussion on the feasibility of popular democracy and the various forms of governance which can be instituted to bring about radical change.

My comments: Very illuminating. Zizek is not afraid to make assertions he can back up with solid reasoning, even if it is criticism of the Left and democracy. ““Direct democracy is the last Leftist myth”, Žižek tells me. “When there is a genuine democratic moment – when you really have to decide – it’s because there is a crisis”.” I am not sure what his exact opinion on the EU is, but seems somewhat supportive with a bit of suggested changes in policy. Analyzes the Brexit fuck-up really well.

#8 “Claude Shannon, the Father of the Information Age, Turns 1100100” by Siobhan Roberts in The New Yorker. April 30, 2016. ( link )

My comments: This article gives a heartening account of the mathematician Claude Shannon who is aptly called the father of the Information Age. It discusses some of Shannon’s greatest contributions, laying the foundation of Information Theory and establishing the connection between Boolean Algebra and Circuit Design in his Master’s thesis which completely changed the field of Circuit Design. As the article quotes, there will probably be an entry Shannon in the 166th edition of Encyclopedia Galactica, something like “Claude Shannon: Born on the planet Earth (Sol III) in the year 1916 A.D. Generally regarded as the father of the information age, he formulated the notion of channel capacity in 1948 A.D. Within several decades, mathematicians and engineers had devised practical ways to communicate reliably at data rates within one per cent of the Shannon limit.”

#9 “The Saint and the Skyscraper” by Mohammed Hanif in The New York Times. June 15, 2016. ( link )

My comments: Very well-written article informing us about the shrine of Abdullah Shah Ghazi in Karachi and what it means to the poor people there. While being threatened by religious extremists and having suffered a suicide blast in 2010, the shrine now has a new enemy: corporate real estate investors. Bahria Icon towers has completely surrounded the shrine with concrete walls and has made it impossible for its visitors, the poor, to visit Ghazi’s shrine. Shielding Ghazi’s shrine from the people who actually needed it. The article moves on to criticize the general trend in Karachi for development by the rich and exclusively for the rich and how it harms and sidelines the poor. “This is the development model Karachi has followed. There are signal-free corridors for car owners, but hardly any footpaths for the millions who walk to work. There are air-conditioned shopping malls for affluent consumers, but the police hound street vendors claiming they’re a threat to public order…But then who needs the sea, or a saint to protect us against it, when we can have infinity pools in the sky?”

#10 “I Worry About Muslims” by Mohammed Hanif in The New York Times. December 17, 2015. ( link )

My comments: This article discusses the death of Sabeen Mahmud. The writer, Mohammed Hanif, discusses the hypocrisy of both her Muslim killers and the moderates who take it upon themselves to defend the reputation of Islam. Very insightful read. It ends with: “The most poetic bit Muslim pundits tell the world is that Islam says if you murder one human being you murder the whole human race. So how come Sabeen Mahmud is gone and the whole bloody human race, including her killers, is still alive?”

#11 “Leopold Weiss, The Jew Who Helped Invent the Modern Islamic State” by Shalom Goldman in Tablet. July 1, 2016. ( link ) [entry by Ali Mehdi Zaidi]

Mehdi’s comments: his is about Muhammad Asad, father of famous Anthropologist Talal Asad and a renowned scholar of the Quran. Apparently, the man had a very interesting back story and had profound ideas on Islamic governance. Definitely worth reading.

My comments: Very interesting story, especially considering his diverse background and very globalized life.

#12 “How Nikola Tesla Predicted the Smartphone” by Celena Chong in TIME magazine. November 10, 2015. ( link )

My comments: This articles depicts the genius of the Serbian scientist and inventor Nikola Tesla using yet another example, his accurate almost prophetic prediction of the smartphone. Today, Tesla is widely regarded as the father of the electric age and a man far ahead of his time.

FlowBender: Flow-level Adaptive Routing for Improved Latency and Throughput in Datacenter Networks by Kabbani, Vamanan, Hasan et al.

Problem: Load-balancing schemes hash a flow to a random path.

  • Long flows collide on the same path. High congestion
  • Other paths underutilized.

Proposed Solution: Flowbender.

  • No excessive packet reordering.
  • End-host driven rehashing. Assigns flows to paths dynamically.
  • Recovers from link failures within Retransmit Timeout (RTO)
  • Readily deployable in data-centers. (< 50 lines of kernel code)
  • Robust. Easy to tune.

Selection_003

Top-Level Design Decisions of Flowbender:

  • Uses flow load-balancing instead of packet-level load-balancing. Shift flow to a different path only once it is congested or disconnected. This avoids:
    • Excessive out-of-order packet delivery
    • Hardware changes to existing datacenter infrastructure
  • Uses RTT-based load-balancing instead of Link-level load-balancing. This:
    • Avoids congestion spreading trees that link-level schemes can create.
    • ECN etc. already demonstrated to promptly propagate congestion information.
    • Using ECN => targeting long flows taking several roundtrips to finish but these flows carry most of the traffic anyway.
    • Transport-layer algorithms (like TCP) can quickly detect end-to-end link-failures. Flowbender can hence promptly avoid broken paths.

Gist of the Algorithm: Transmit a flow on a single path. Reroute that individual flow when it is congested.

  • How do we know a flow is congestion?
  • How is rerouting done?

Sensing Congestion: (uses the same technique as DCTCP)

  • Switch marks every packet exceeding queue size above a threshold.
  • Keep track of the fraction of ECN-marked acks in every RTT.

If congestion is larger than a threshold, we reroute the flow.

Rerouting Flows:

  • ECMP engines in switches compute a hash-function based on packet-header fields.
  • “Hacks” a packet-header field, TTL, based on congestion to change the hash generated. Maps hash to paths. (Why TTL? long story. Feel free to email me if you want to know)

Evaluation Details:

  • Evaluated against existing schemes: ECMP, RPS and DeTail.
  • Evaluation methods used:
    • Simulation (simulated in ns-3, not lame old ns-2 with a stupid Tcl binding and incredibly fucked up C++ API from the prehistoric period)
    • Test-bed implementation

 

George Carlin on Issues

o7V81aM

I may not completely agree with everything he says, but I love George Carlin. He’s hilarious and spot-on. He also has a knack of making excellent arguments brilliantly while being drop-dead hilarious at the same time, which is why he has had a lot of influence on my own opinions. For my own benefit as much as anyone else’s, here is a compilation of his comic take on various issues.

George Carlin on chickens (yay!):

George Carlin on what to do with the male chauvinists:

George Carlin on voting:

George Carlin on war:

George Carlin on questioning things:

George Carlin on abortion:

 

 

Evolution Notes – Variation under Domestication (1 of 3)

References used: The Origin of Species (first edition) by Charles Darwin. Chapter 1.

border_collie_sheepdog_trial

Cultivated plants and animals generally show more variety as compared to species bred naturally. This is probably because of the fact that domestic plants and animals are raised in conditions that are not as uniform as the natural habitat of their ancestors. Variation in domestic animals and plants is observed to be a continuous and unceasing process. For example, wheat, which is a very old cultivated plant, continues to produce new varieties.

Claim: Conditions of life are not the direct and only cause of this variation

Evidence: Seedlings of the same fruit and offspring from the same litter can show be considerably different from each other even if both the offspring and parents are raised under exactly the same conditions. If the conditions of life were the only cause of variation in organisms, there would have been no variation among the offspring or even if there was variation, all the offspring should have varied in the same manner. This can be used as evidence of the fact that the laws of reproduction, growth and inheritance have a greater impact on the characteristics of an organism than do the conditions of life directly.

Claim: Correlation of growth. If an organism is selectively bred for a certain characteristic, other parts of the structure of that organism are also modified.

Evidence: Cats with blue eyes are always observed to be deaf. Hairless dogs have imperfect teeth. Long limbs are always accompanied by an elongated head. White sheep and pigs are differently affected by vegetable poisons as compared to their domestic counterparts.

Claim: As a general rule, every characteristic in an organism inherited.

Evidence: When in individuals exposed to the same conditions of life as the rest of the population, a very rare deviation such as albinism, for example, appears which is only found in one of several millions of individuals in a population, the same deviation is often also found in that individual’s offspring. By the laws of probability, one is compelled to attribute its reappearance in the offspring to the laws of inheritance.

 

Spring Break Project: Biology

bengal-tiger-why-matter_7341043

Since I have this week off from university as spring break, I have been given an epic opportunity to learn something new. So I have decided to learn something about a field that has always interested me: Biology. Especially things like evolutionary biology, ecology and genetics. My own field of Computer Science has a lot of things that are based on ideas in Biology including genetic algorithms, neural networks and even the botany-like terminology used for trees, their sub- and super-structures. Not to mention the fact that the father of computer science, Alan Turing, was also a part-time Biologist.

So here is my plan. I plan to read Charles Darwin’s The Origin of Species, two chapters every day for seven days (since the edition I was able to find at my university’s library contains fourteen chapters and I have seven days off) starting today and post notes related to them here on my blog. Let’s hope I manage to complete this project.

The Legend of Bilal Ahmad

As the award ceremony begins, the crowd can be heard whispering: “Where is the champion? Where is Ryu?” Where is Ryu as his admirers chant his name? Already seeking the next challenge. Ceremony means nothing to him. The fight is everything. ~ Street Fighter 2.

Before the Midterm exam of the Digital Logic Circuits course I am taking, a teaching assistant emailed us telling us an unofficial review session had been arranged for us by some person called Bilal Ahmad who had been the head TA in the last offering of the course. I wanted a good grade in the course and a review session would help, I figured, so I attended it. I was expecting a typical last-minute tutorial where they basically summarise all the stuff we learnt in class and somewhat mentally prepare us for the final exam.

Things turned out to be a lot different from what I expected, however. This… this person (for lack of a better term)… managed to teach me the pre-mid course content better in that two-hour tutorial than whatever I had gained out of half a semester worth of classes, book-reading and assignments combined. Moreover he seemed to be passionate about what he was teaching. After the tutorial ended, he remained in the library teaching us more and helping us out with problems till well after midnight and then gave us his contact number just in case we needed more help before the midterm. He was not a TA for the current offering of the course. He was not required to do any of this, he was doing it completely for free. The best part about it all was that when he taught something, it seemed so simple and so exciting.

“Who was this brilliant genius?” I found myself asking. It was Bilal Ahmad, an Electrical Engineering graduate. A person who had been head TA in the last offering of Digital Logic Circuits and has refused to stop helping students out with the course. The only reason I am writing this post is to show my gratitude to this gem of a person both for finally making me understand how a binary adder-subtractor works and for restoring my faith in humanity. This is a reminder of how there are heroes in our midst. Heroes to whom the ceremony means nothing… and the fight is everything.