New design points a path to the ‘ultimate’ battery

ultimate-battery-lithium-oxygen
Many of the technologies we use every day have been getting smaller, faster and cheaper each year — with the notable exception of batteries. Apart from the possibility of a smartphone which lasts for days without needing to be charged, the challenges associated with making a better battery are holding back the widespread adoption of two major clean technologies: electric cars and grid-scale storage for solar power. Credit: © Eyematrix / Fotolia

Scientists have developed a working laboratory demonstrator of a lithium-oxygen battery which has very high energy density, is more than 90% efficient, and, to date, can be recharged more than 2000 times, showing how several of the problems holding back the development of these devices could be solved.

Lithium-oxygen, or lithium-air, batteries have been touted as the ‘ultimate’ battery due to their theoretical energy density, which is ten times that of a lithium-ion battery. Such a high energy density would be comparable to that of gasoline — and would enable an electric car with a battery that is a fifth the cost and a fifth the weight of those currently on the market to drive from London to Edinburgh on a single charge.

However, as is the case with other next-generation batteries, there are several practical challenges that need to be addressed before lithium-air batteries become a viable alternative to gasoline.

Now, researchers from the University of Cambridge have demonstrated how some of these obstacles may be overcome, and developed a lab-based demonstrator of a lithium-oxygen battery which has higher capacity, increased energy efficiency and improved stability over previous attempts.

Their demonstrator relies on a highly porous, ‘fluffy’ carbon electrode made from graphene (comprising one-atom-thick sheets of carbon atoms), and additives that alter the chemical reactions at work in the battery, making it more stable and more efficient. While the results, reported in the journal Science, are promising, the researchers caution that a practical lithium-air battery still remains at least a decade away.

“What we’ve achieved is a significant advance for this technology and suggests whole new areas for research — we haven’t solved all the problems inherent to this chemistry, but our results do show routes forward towards a practical device,” said Professor Clare Grey of Cambridge’s Department of Chemistry, the paper’s senior author.

Many of the technologies we use every day have been getting smaller, faster and cheaper each year — with the notable exception of batteries. Apart from the possibility of a smartphone which lasts for days without needing to be charged, the challenges associated with making a better battery are holding back the widespread adoption of two major clean technologies: electric cars and grid-scale storage for solar power.

“In their simplest form, batteries are made of three components: a positive electrode, a negative electrode and an electrolyte,” said Dr Tao Liu, also from the Department of Chemistry, and the paper’s first author.

In the lithium-ion (Li-ion) batteries we use in our laptops and smartphones, the negative electrode is made of graphite (a form of carbon), the positive electrode is made of a metal oxide, such as lithium cobalt oxide, and the electrolyte is a lithium salt dissolved in an organic solvent. The action of the battery depends on the movement of lithium ions between the electrodes. Li-ion batteries are light, but their capacity deteriorates with age, and their relatively low energy densities mean that they need to be recharged frequently.

Over the past decade, researchers have been developing various alternatives to Li-ion batteries, and lithium-air batteries are considered the ultimate in next-generation energy storage, because of their extremely high energy density. However, previous attempts at working demonstrators have had low efficiency, poor rate performance, unwanted chemical reactions, and can only be cycled in pure oxygen.

What Liu, Grey and their colleagues have developed uses a very different chemistry than earlier attempts at a non-aqueous lithium-air battery, relying on lithium hydroxide (LiOH) instead of lithium peroxide (Li2O2). With the addition of water and the use of lithium iodide as a ‘mediator’, their battery showed far less of the chemical reactions which can cause cells to die, making it far more stable after multiple charge and discharge cycles.

By precisely engineering the structure of the electrode, changing it to a highly porous form of graphene, adding lithium iodide, and changing the chemical makeup of the electrolyte, the researchers were able to reduce the ‘voltage gap’ between charge and discharge to 0.2 volts. A small voltage gap equals a more efficient battery — previous versions of a lithium-air battery have only managed to get the gap down to 0.5 — 1.0 volts, whereas 0.2 volts is closer to that of a Li-ion battery, and equates to an energy efficiency of 93%.

The highly porous graphene electrode also greatly increases the capacity of the demonstrator, although only at certain rates of charge and discharge. Other issues that still have to be addressed include finding a way to protect the metal electrode so that it doesn’t form spindly lithium metal fibres known as dendrites, which can cause batteries to explode if they grow too much and short-circuit the battery.

Additionally, the demonstrator can only be cycled in pure oxygen, while the air around us also contains carbon dioxide, nitrogen and moisture, all of which are generally harmful to the metal electrode.

“There’s still a lot of work to do,” said Liu. “But what we’ve seen here suggests that there are ways to solve these problems — maybe we’ve just got to look at things a little differently.”

“While there are still plenty of fundamental studies that remain to be done, to iron out some of the mechanistic details, the current results are extremely exciting — we are still very much at the development stage, but we’ve shown that there are solutions to some of the tough problems associated with this technology,” said Grey.


Story Source:

The above post is reprinted from materials provided by University of Cambridge. Note: Materials may be edited for content and length.


Journal Reference:

  1. T. Liu, M. Leskes, W. Yu, A. J. Moore, L. Zhou, P. M. Bayley, G. Kim, C. P. Grey. Cycling Li-O2 batteries via LiOH formation and decomposition. Science, 2015; 350 (6260): 530 DOI: 10.1126/science.aac7730

What is Pointer?

What is Pointer?

In computer science, a pointer is a programming language object, whose value refers to (or “points to”) another value stored elsewhere in the computer memory using its address. A pointer references a location in memory, and obtaining the value stored at that location is known as dereferencing the pointer.

As an analogy, a page number in a book’s index could be considered a pointer to the corresponding page; dereferencing such a pointer would be done by flipping to the page with the given page number.

The term “Pointer” can also be defined as

  1. A variable does not store a value but store the address of the memory space which contains the value.
  2. A variable that contains the address of a location in memory. The location is the starting point of an allocated object, such as an object or value type, or the element of an array.
  3. A value that designates the address (i.e., the location in memory), of some value.
  4. Variables that hold a memory location.
  5. A memory address.

In general, Pointer is a long thin piece of metal on a scale or dial that moves to indicate a figure or position.

What is Logical Block Addressing (LBA)?

Logical Block Address (LBA)

Logical block addressing is a technique that allows a computer to address a hard disk larger than 528 megabytes. A Logical Block Address (LBA) is a 28-bit value that maps to a specific cylinder-head-sector address on the disk. 28 bits allows sufficient variation to specify addresses on a hard disk up to 8.4 gigabytes in data storage capacity.

The term “Logical block addressing” can also be defined as

  1. An address that defines where data is stored on the hard drive.
  2. A common scheme used for specifying the location of blocks of data stored on computer storage devices.
  3. A run-time function of the system BIOS. The BIOS uses LBA for the following commands: read (with and without retries), read verify, read long, write (with and without retries), write verify, write long, read multiple, write multiple, read DMA, write DMA, seek, and format track.

Machines have nothing on mom when it comes to listening

Credit: University of Montreal
Credit: University of Montreal

More than 99% of the time, two words are enough for people with normal hearing to distinguish the voice of a close friend or relative amongst other voices, says the University of Montreal’s Julien Plante-Hébert. His study, presented at the 18th International Congress of Phonetic Sciences, involved playing recordings to Canadian French speakers, who were asked to recognize on multiple trials which of the ten male voices they heard was familiar to them. “Merci beaucoup” turned out to be all they needed to hear.

Plante-Hébert is a voice recognition doctoral student at the university’s Department of Linguistics and Translation. “The auditory capacities of humans are exceptional in terms of identifying familiar voices. At birth, babies can already recognize the voice of their mothers and distinguish the sounds of foreign languages,” Plante-Hébert said. To evaluate these auditory capacities, he created a series of voice “lineups,” a technique inspired by the well-known visual identification procedure used by police, in which a group of individuals sharing similar physical traits are placed before a witness. “A voice lineup is an analogous procedure in which several voices with similar acoustic aspects are presented. In my study, each voice lineup contained different lengths of utterances varying from one to eighteen syllables. Familiarity between the target voice and the identifier was defined by the degree of contact between the interlocutors.” Forty-four people aged 18-65 participated.

Plante-Hébert found that the participants were unable to identify short utterances regardless of their familiarity with the person speaking. However, with utterances of four or more syllables, such as “merci beaucoup,” the success rate was nearly total for very familiar voices. “Identification rates exceed those currently obtained with automatic systems,” he said. Indeed, in his opinion, the best speech recognition systems are much less efficient than auditory system at best, there is a 92% success rate compared to over 99.9% for humans.

Moreover, in a noisy environment, humans can exceed machine-based recognition because of our brain’s ability to filter out ambient noise. “Automatic speaker recognition is in fact the least accurate biometric factor compared to fingerprints or face or iris recognition,” Plante-Hébert said. “While advanced technologies are able to capture a large amount of speech information, only humans so far are able to recognize familiar voices with almost total accuracy,” he concluded.


Story Source:

The above post is reprinted from materials provided by University of Montreal. Note: Materials may be edited for content and length.

What is Storage?

storage-device-computer

 

In a computer, storage is the place where data is held in an electromagnetic or optical form for access by a computer processor. There are two general usages.

  1. Storage is frequently used to mean the devices and data connected to the computer through input/output operations – that is, hard disk and tape systems and other forms of storage that don’t include computer memory and other in-computer storage. For the enterprise, the options for this kind of storage are of much greater variety and expense than that related to memory. This meaning is probably more common in the IT industry than meaning 2 (the following).
  2. In a more formal usage, storage has been divided into:
    1. Primary storage, which holds data in memory (sometimes called random access memory or RAM) and other “built-in” devices such as the processor’s L1 cache, and
    2. Ssecondary storage, which holds data on hard disks, tapes, and other devices requiring input/output operations.

Primary storage is much faster to access than secondary storage because of the proximity of the storage to the processor or because of the nature of the storage devices. On the other hand, secondary storage can hold much more data than primary storage.

In addition to RAM, primary storage includes read-only memory (ROM) and L1 and L2 cache memory. In addition to hard disks, secondary storage includes a range of device types and technologies, including diskettes, Zip drives, redundant array of independent disks (RAID) systems, and holographic storage. Devices that hold storage are collectively known as storage media.

A somewhat antiquated term for primary storage is main storage and a somewhat antiquated term for secondary storage is auxiliary storage. Note that, to add to the confusion, there is an additional meaning for primary storage that distinguishes actively used storage from backup storage.

Interview Question : What is Hard Disk?

what-is-hard-disk-drive-hdd

A hard disk is part of a unit, often called a “disk drive,” “hard drive,” or “hard disk drive (HDD),” that stores and provides relatively quick access to large amounts of data on an electromagnetically charged surface or set of surfaces. Today’s computers typically come with a hard disk that contains several billion bytes (gigabytes) of storage.

A Hard disk can also be defined as:

  1. a rigid (“hard”) non-removable magnetic disk with a large data storage capacity.
  2. a data storage device used for storing and retrieving digital information using one or more rigid (“hard”) rapidly rotating disks (platters) coated with magnetic material.
  3. A magnetic disk on which you can store computer data. The term hard is used to distinguish it from a soft, or floppy disk. Hard disks hold more data and are faster than floppy disks.

Extra Information

A hard disk is really a set of stacked “disks,” each of which, like phonograph records, has data recorded electromagnetically in concentric circles or “tracks” on the disk. A “head” (something like a phonograph arm but in a relatively fixed position) records (writes) or reads the information on the tracks. Two heads, one on each side of a disk, read or write the data as the disk spins. Each read or write operation requires that data be located, which is an operation called a “seek.” (Data already in a disk cache, however, will be located more quickly.)

A hard disk/drive unit comes with a set rotation speed varying from 4500 to 7200 rpm. Disk access time is measured in milliseconds. Although the physical location can be identified with cylinder, track, and sector locations, these are actually mapped to a logical block address (LBA) that works with the larger address range on today’s hard disks.

To know more regarding the terms follow the post about Difference between Disc and Disk click here.

 

Virtual reality for mice teaches scientists about navigation

A mouse is ready to enter a virtual-reality system where its brain can be imaged while it thinks it’s running through a maze.
A mouse is ready to enter a virtual-reality system where its brain can be imaged while it thinks it’s running through a maze.

 

Scientists can now observe the brains of lab animals in microscopic detail as the animals go about some action. A technique called two-photon imaging, in particular, allows neuroscientists to watch thousands of neurons working in concert to encode information.

The trouble is, two-photon imaging requires the animal’s head to stay fixed in place. That would seem to preclude watching the brain as the animal does anything of much interest.

One creative solution is virtual reality—a computer-generated environment experienced through a headset. A few years ago neuroscientists started designing tiny virtual-reality systems to fool mice into thinking they were navigating a maze when they were really running on the top of a large ball, their heads fixed in position.

Until now, however, mice didn’t run on the ball until they’d had weeks of training. Jeremy Freeman, working with colleague Nicholas Sofroniew and others at the HHMI Janelia Research Campus in Virginia, created a virtual maze the mice seem to understand right away: they navigate through virtual corridors without training. It’s designed to exploit the way mice navigate in nature, Freeman says. Instead of relying primarily on their eyes, mice rely heavily on their whiskers to feel their way through the world.

In the whisker-oriented virtual reality, the walls move to give the mouse the illusion that it is running down winding corridors, he says. But the whole time, the rodent’s head is stationary.

This approach doesn’t translate neatly to the human world. Mice rely heavily on their whiskers to get around, and the neural imaging requires genetically altering mice to produce fluorescent proteins. However, this mouse-sized VR could still shed plenty of light on autism and other conditions that affect decisions, learning and the senses.


Story Source:

The above post is reprinted from materials provided by MIT Technology Review. Note: Materials may be edited for content and length.

Making batteries with portabella mushrooms

Diagram showing how mushrooms are turned into a material for battery anodes. Credit: Image courtesy of University of California - Riverside
Diagram showing how mushrooms are turned into a material for battery anodes.
Credit: Image courtesy of University of California – Riverside

Can portabella stop cell phone batteries from degrading over time?

Researchers at the University of California, Riverside Bourns College of Engineering think so.

They have created a new type of lithium-ion battery anode using portabella mushrooms, which are inexpensive, environmentally friendly and easy to produce. The current industry standard for rechargeable lithium-ion battery anodes is synthetic graphite, which comes with a high cost of manufacturing because it requires tedious purification and preparation processes that are also harmful to the environment.

With the anticipated increase in batteries needed for electric vehicles and electronics, a cheaper and sustainable source to replace graphite is needed. Using biomass, a biological material from living or recently living organisms, as a replacement for graphite, has drawn recent attention because of its high carbon content, low cost and environmental friendliness.

UC Riverside engineers were drawn to using mushrooms as a form of biomass because past research has established they are highly porous, meaning they have a lot of small spaces for liquid or air to pass through. That porosity is important for batteries because it creates more space for the storage and transfer of energy, a critical component to improving battery performance.

In addition, the high potassium salt concentration in mushrooms allows for increased electrolyte-active material over time by activating more pores, gradually increasing its capacity.

A conventional anode allows lithium to fully access most of the material during the first few cycles and capacity fades from electrode damage occurs from that point on. The mushroom carbon anode technology could, with optimization, replace graphite anodes. It also provides a binderless and current-collector free approach to anode fabrication.

“With battery materials like this, future cell phones may see an increase in run time after many uses, rather than a decrease, due to apparent activation of blind pores within the carbon architectures as the cell charges and discharges over time,” said Brennan Campbell, a graduate student in the Materials Science and Engineering program at UC Riverside.

The research findings were outlined in a paper, “Bio-Derived, Binderless, Hierarchically Porous Carbon Anodes for Li-ion Batteries,” published in the journal Scientific Reports. It was authored by Cengiz Ozkan and Mihri Ozkan, both professors in the Bourns College of Engineering, and three of their current or former graduate students: Campbell, Robert Ionescu and Zachary Favors.

Nanocarbon architectures derived from biological materials such as mushrooms can be considered a green and sustainable alternative to graphite-based anodes, said Cengiz Ozkan, a professor of mechanical engineering and materials science and engineering.

The nano-ribbon-like architectures transform upon heat treatment into an interconnected porous network architecture which is important for battery electrodes because such architectures possess a very large surface area for the storage of energy, a critical component to improving battery performance.

One of the problems with conventional carbons, such as graphite, is that they are typically prepared with chemicals such as acids and activated by bases that are not environmentally friendly, said Mihri Ozkan, a professor of electrical and computer engineering. Therefore, the UC Riverside team is focused on naturally-derived carbons, such as the skin of the caps of portabella mushrooms, for making batteries.

It is expected that nearly 900,000 tons of natural raw graphite would be needed for anode fabrication for nearly six million electric vehicle forecast to be built by 2020. This requires that the graphite be treated with harsh chemicals, including hydrofluoric and sulfuric acids, a process that creates large quantities of hazardous waste. The European Union projects this process will be unsustainable in the future.

The Ozkan’s research is supported by the University of California, Riverside.

This paper involving mushrooms is published just over a year after the Ozkan’s labs developed a lithium-ion battery anode based on nanosilicon via beach sand as the natural raw material. Ozkan’s team is currently working on the development of pouch prototype batteries based on nanosilicon anodes.

The UCR Office of Technology Commercialization has filed patents for the inventions above.


Story Source:

The above post is reprinted from materials provided by University of California – Riverside. The original item was written by Sean Nealon. Note: Materials may be edited for content and length.


Journal Reference:

  1. Brennan Campbell, Robert Ionescu, Zachary Favors, Cengiz S. Ozkan, Mihrimah Ozkan. Bio-Derived, Binderless, Hierarchically Porous Carbon Anodes for Li-ion Batteries. Scientific Reports, 2015; 5: 14575 DOI: 10.1038/srep14575

Porsche’s New Electric Concept Car Could Give Tesla Trouble

 

[dropcap]Porsche[/dropcap] might not be saying it directly, but anyone taking even a quick glance can see the Germans are taking aim at Tesla with the freshly unveiled Mission E concept at the Frankfurt Motor Show. With over 590 horsepower, this electric sedan doesn’t have quite as much electric grunt as a Model S, but the claimed 310.7 miles of range would outdo even the latest take on Elon Musk’s four-door with a 90 kWh battery. For those keeping track, a Ludicrous Speed-equipped Tesla might still be the ultimate victor in a drag race because the E’s sprint to 62 takes “under 3.5 seconds.”

To power the Mission E, Porsche’s engineers use two permanent magnet synchronous motors, and they are similar to what’s found on the company’s 919 Hybrid LMP1 racecar. In a single unit, the devices can both accelerate and recover braking energy. All-wheel drive with torque vectoring and four-wheel steering help the electric sedan lap the Nordschleife in less than eight minutes, the company claims.

[tie_slideshow]

[tie_slide]

Porsche-Missiohn-E-front-view

Drive System:

The drive system of the Mission E is entirely new, yet it is typical Porsche, i.e. proven in motor racing. Two permanent magnet synchronous motors (PMSM) – similar to those used in this year’s Le Mans victor, the 919 hybrid – accelerate the sports car and recover braking energy.

[/tie_slide]

[tie_slide]

Porsche-Missiohn-E-rear

Driving Range:

It is not just passionate sportiness that makes up a Porsche but also a high level of everyday practicality. Accordingly, the Mission E can travel over 500 km on one battery charge, and it can be charged with enough energy for around 400 km more driving range in about fifteen minutes.

[/tie_slide]

[tie_slide]

Porsche-Missiohn-E-at-frankfurt-2015

A moveable body segment on the front left wing in front of the driver’s door gives access to the charging port for the innovative “Porsche Turbo Charging” system. Via the 800-volt port, the battery can be charged to approximately 80 per cent of its capacity in around 15 minutes – a record time for electric vehicles

[/tie_slide]

[tie_slide]

Porsche-Missiohn-E-concept-frankfurt-1

Design:

A new type of matrix LED headlights in the brand’s typical four-point light design captures the viewer’s gaze. Integrated as an element hovering in the airflow of the air inlet, they lend a futuristic character to the front end.
[/tie_slide]

[tie_slide]

Porsche-Missiohn-E-dashboard

Display and Control Concept:

A new world based on an innovative display and control concept opens up before the driver. It is intuitive, fast and free of distractions – created for the sports car of tomorrow. The filigree driver’s display is curved, low-profile and free-standing. The instrument cluster shows five round instruments – they can be recognized as Porsche, but they are displayed virtually in OLED technology

[/tie_slide]

[tie_slide]

Porsche-Missiohn-E-foot-rest

[/tie_slide]

[tie_slide]

Porsche-Missiohn-E-interior

Holographic display:

The entire dashboard is chock full of new ideas. Its division into two three-dimensionally structuring layers reinforces the impression of lightness and clarity. The upper layer integrates the driver’s display, and between the levels there is a holographic display that extends far into the passenger’s side. It shows individually selectable apps, which are stacked in virtual space and arranged by priority with a three-dimensional effect.

[/tie_slide]

[tie_slide]

Porsche-Missiohn-E-interior-1

The driver – or passenger – can use these apps to touch-free control primary functions such as media, navigation, climate control, contacts and vehicle. The desired symbol is activated by gestures that are detected by sensors. A grasping gesture means select, while pulling means control. Moreover, driver or passenger can use a touch display on the centre console to control secondary functions such as detailed information menus.

[/tie_slide]

[tie_slide]

Porsche-Missiohn-E-side

Driving dynamics:

The battery mounted in the car’s underbody, which is based on the latest lithium-ion technology, runs the whole length between the front and rear axles. This distributes its weight to the two drive axles uniformly, resulting in exceptionally good balance. 

[/tie_slide]

[tie_slide]

Porsche-Missiohn-E-tail-light

The body as a whole is made up of a functional mix of aluminium, steel and carbon fibre reinforced polymer. The wheels are made of carbon: the Mission E has wide tyres mounted on 21-inch wheels in front and 22-inch wheels at the rear.

[/tie_slide]

[/tie_slideshow]

Capable of hitting 124 mph in less than 12 seconds, the Mission E is undoubtedly quick, but its speed in charging is especially impressive too. The concept utilizes an 800-volt system that Porsche claims can charge the sedan to 80 percent in just 15 minutes, assuming you can find a source for that much energy. That would be enough to offer about 249 miles of range in less time than getting a cup of coffee at a busy Starbucks. The E could also use a traditional 400-volt charger or power up inductively.

The Mission E’s design looks like a futuristic Panamera as filtered through the style of the 918 and a next-gen Star Wars Stormtrooper helmet. In an especially cool touch, the charging port is hidden in a movable panel ahead of the driver’s door on the front fender. Also, like like lots of four-door concepts in recent memory, the design sports suicide doors with no B-pillars. To keep weight to a minimum, the body mixes aluminum, steel, and carbon-fiber reinforced polymer. Also present are carbon-fiber wheels. Inside, drivers get instruments that track their eyes so that the gauges always remain visible. There’s a video below, but stay tuned for a closer look at the Mission E from the show floor in Frankfurt.

Easy Lesson On : Active FTP vs Passive FTP

Contents:

 

Introduction

One of the most commonly seen questions when dealing with firewalls and other Internet connectivity issues is the difference between active and passive FTP and how best to support either or both of them. Hopefully the following text will help to clear up some of the confusion over how to support FTP in a firewalled environment.

 

The Basics

FTP is a TCP based service exclusively. There is no UDP component to FTP. FTP is an unusual service in that it utilizes two ports, a ‘data’ port and a ‘command’ port (also known as the control port). Traditionally these are port 21 for the command port and port 20 for the data port. The confusion begins however, when we find that depending on the mode, the data port is not always on port 20.

 

Active FTP

In active mode FTP the client connects from a random unprivileged port (N > 1023) to the FTP server’s command port, port 21. Then, the client starts listening to port N+1 and sends the FTP command PORT N+1 to the FTP server. The server will then connect back to the client’s specified data port from its local data port, which is port 20.

From the server-side firewall’s standpoint, to support active mode FTP the following communication channels need to be opened:

  • FTP server’s port 21 from anywhere (Client initiates connection)
  • FTP server’s port 21 to ports > 1023 (Server responds to client’s control port)
  • FTP server’s port 20 to ports > 1023 (Server initiates data connection to client’s data port)
  • FTP server’s port 20 from ports > 1023 (Client sends ACKs to server’s data port)

When drawn out, the connection appears as follows:active-ftp-winged-post

In step 1, the client’s command port contacts the server’s command port and sends the command PORT 1027. The server then sends an ACK back to the client’s command port in step 2. In step 3 the server initiates a connection on its local data port to the data port the client specified earlier. Finally, the client sends an ACK back as shown in step 4.

The main problem with active mode FTP actually falls on the client side. The FTP client doesn’t make the actual connection to the data port of the server–it simply tells the server what port it is listening on and the server connects back to the specified port on the client. From the client side firewall this appears to be an outside system initiating a connection to an internal client–something that is usually blocked.

 

Active FTP Example

Below is an actual example of an active FTP session. The only things that have been changed are the server names, IP addresses, and user names. In this example an FTP session is initiated from area1.wingedpost.com (192.168.150.80), a linux box running the standard FTP command line client, to area2.wingedpost.com (192.168.150.90), a linux box running ProFTPd 1.2.2RC2. The debugging (-d) flag is used with the FTP client to show what is going on behind the scenes. Everything in red is the debugging output which shows the actual FTP commands being sent to the server and the responses generated from those commands. Normal server output is shown in black, and user input is in bold.

There are a few interesting things to consider about this dialog. Notice that when the PORT command is issued, it specifies a port on the client (192.168.150.80) system, rather than the server. We will see the opposite behavior when we use passive FTP. While we are on the subject, a quick note about the format of the PORT command. As you can see in the example below it is formatted as a series of six numbers separated by commas. The first four octets are the IP address while the last two octets comprise the port that will be used for the data connection. To find the actual port multiply the fifth octet by 256 and then add the sixth octet to the total. Thus in the example below the port number is ( (14*256) + 178), or 3762. A quick check with netstat should confirm this information.

area1: {/home/p-t/wingedpost/public_html} % ftp -d area2
Connected to area2.wingedpost.com.
220 area2.wingedpost.com FTP server ready.
Name (area2:wingedpost): wingedpostuser
---> USER wingedpostuser
331 Password required for wingedpostuser.
Password: TmpPass
---> PASS XXXX
230 User wingedpostuser logged in.
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
ftp: setsockopt (ignored): Permission denied
---> PORT 192,168,150,80,14,178
200 PORT command successful.
---> LIST
150 Opening ASCII mode data connection for file list.
drwx------   3 wingedpostuser    users         104 Jul 27 01:45 public_html
226 Transfer complete.
ftp> quit
---> QUIT
221 Goodbye.

 

Passive FTP

In order to resolve the issue of the server initiating the connection to the client a different method for FTP connections was developed. This was known as passive mode, or PASV, after the command used by the client to tell the server it is in passive mode.

In passive mode FTP the client initiates both connections to the server, solving the problem of firewalls filtering the incoming data port connection to the client from the server. When opening an FTP connection, the client opens two random unprivileged ports locally (N > 1023 and N+1). The first port contacts the server on port 21, but instead of then issuing a PORT command and allowing the server to connect back to its data port, the client will issue the PASV command. The result of this is that the server then opens a random unprivileged port (P > 1023) and sends P back to the client in response to the PASV command. The client then initiates the connection from port N+1 to port P on the server to transfer data.

From the server-side firewall’s standpoint, to support passive mode FTP the following communication channels need to be opened:

  • FTP server’s port 21 from anywhere (Client initiates connection)
  • FTP server’s port 21 to ports > 1023 (Server responds to client’s control port)
  • FTP server’s ports > 1023 from anywhere (Client initiates data connection to random port specified by server)
  • FTP server’s ports > 1023 to remote ports > 1023 (Server sends ACKs (and data) to client’s data port)

When drawn, a passive mode FTP connection looks like this:passive-ftp-wingedpost

In step 1, the client contacts the server on the command port and issues the PASV command. The server then replies in step 2 with PORT 2024, telling the client which port it is listening to for the data connection. In step 3 the client then initiates the data connection from its data port to the specified server data port. Finally, the server sends back an ACK in step 4 to the client’s data port.

While passive mode FTP solves many of the problems from the client side, it opens up a whole range of problems on the server side. The biggest issue is the need to allow any remote connection to high numbered ports on the server. Fortunately, many FTP daemons, including the popular WU-FTPD allow the administrator to specify a range of ports which the FTP server will use.

The second issue involves supporting and troubleshooting clients which do (or do not) support passive mode. As an example, the command line FTP utility provided with Solaris does not support passive mode, necessitating a third-party FTP client, such as ncftp. 
NOTE: This is no longer the case–use the -p option with the Solaris FTP client to enable passive mode!

With the massive popularity of the World Wide Web, many people prefer to use their web browser as an FTP client. Most browsers only support passive mode when accessing ftp:// URLs. This can either be good or bad depending on what the servers and firewalls are configured to support.

 

Passive FTP Example

Below is an actual example of a passive FTP session. The only things that have been changed are the server names, IP addresses, and user names. In this example an FTP session is initiated from area1.wingedpost.com (192.168.150.80), a linux box running the standard FTP command line client, to area2.wingedpost.com (192.168.150.90), a linux box running ProFTPd 1.2.2RC2. The debugging (-d)  flag is used with the FTP client to show what is going on behind the scenes. Everything in red is the debugging output which shows the actual FTP commands being sent to the server and the responses generated from those commands. Normal server output is shown in black, and user input is in bold.

Notice the difference in the PORT command in this example as opposed to the active FTP example. Here, we see a port being opened on the server (192.168.150.90) system, rather than the client.

area1: {/home/p-t/wingedpost/public_html} % ftp -d area2
Connected to area2.wingedpost.com.
220 area2.wingedpost.com FTP server ready.
Name (area2:wingedpost): wingedpostuser
---> USER wingedpostuser
331 Password required for wingedpostuser.
Password: TmpPass
---> PASS XXXX
230 User wingedpostuser logged in.
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> passive
Passive mode on.
ftp> ls
ftp: setsockopt (ignored): Permission denied
---> PASV
227 Entering Passive Mode (192,168,150,90,195,149).
---> LIST
150 Opening ASCII mode data connection for file list
drwx------   3 wingedpostuser    users         104 Jul 27 01:45 public_html
226 Transfer complete.
ftp> quit
---> QUIT
221 Goodbye.

 

Summary

The following chart should help admins remember how each FTP mode works:

 Active FTP :
     command : client >1023 -> server 21
     data    : client >1023 <- server 20

 Passive FTP :
     command : client >1023 -> server 21
     data    : client >1024 -> server >1023

A quick summary of the pros and cons of active vs. passive FTP is also in order:

Active FTP is beneficial to the FTP server admin, but detrimental to the client side admin. The FTP server attempts to make connections to random high ports on the client, which would almost certainly be blocked by a firewall on the client side. Passive FTP is beneficial to the client, but detrimental to the FTP server admin. The client will make both connections to the server, but one of them will be to a random high port, which would almost certainly be blocked by a firewall on the server side.

Luckily, there is somewhat of a compromise. Since admins running FTP servers will need to make their servers accessible to the greatest number of clients, they will almost certainly need to support passive FTP. The exposure of high level ports on the server can be minimized by specifying a limited port range for the FTP server to use. Thus, everything except for this range of ports can be firewalled on the server side. While this doesn’t eliminate all risk to the server, it decreases it tremendously.

References

An excellent reference on how various internet protocols work and the issues involved in firewalling them can be found in the O’Reilly and Associates book, Building Internet Firewalls, 2nd Ed, by Brent Chapman and Elizabeth Zwicky. 
Note : This book is VERY old and the information contained therein may be outdated!

Finally, the definitive reference on FTP would be RFC 959, which sets forth the official specifications of the FTP protocol. RFCs can be downloaded from numerous locations, including http://www.faqs.org/rfcs/rfc959.html.