The bus from Dien Bien Phu to [wiki=39fe94b03fd66ff316c6cde3bc981e11]Muang Khua[/wiki] in Laos leaves daily at 05:30 and costs 115,000vnd (Dec 2014), or you can go directly to Udomxai for 235,000 dong (On December 28, 2013 it was possible to board a 7:00am bus to Mung Khua from DBP). Be sure to get there even earlier and claim a seat although you will likely be sharing your seat with a local, or sitting on a pile of goods piled in the aisle. As a rule, the "bus is never full." Bring water and snacks. It takes about 2 hours to reach the Tay Trang Vietnam exit customs, which is fairly straightforward. From the Vietnamese border station it is another 6km to the Laos border checkpoint.
Visa-on-arrival is available and costs $30-42 depending on nationality plus 10,000 kip visa fee, 10,000 kip extra on weekends. You can pay in Dong (poor conversion rate), Kip, or US Dollars. One passport photo is required, but if you don't have one they'll take a picture for you for $5. Everyone pays 10,000 kip for stamp, 10,000 kip extra on weekends, plus a 5,000 kip 'H1N1' test (they take your temperature). They've also started charging an extra $2 for the 'tourist fund' as of Dec 2014, though the H1N1 test seems only run on weekends. So in total: have your visa fee plus an extra $4 and 5,000 kip plus $5 for the photo if required. If you're travelling on a weekend, you'll need your visa fee plus $6. Probably prudent to carry a little extra with you as well just in case.
The road is now paved and good quality all the way to [wiki=39fe94b03fd66ff316c6cde3bc981e11]Muang Khua[/wiki] and should only take around 2 hours, arriving a little before 11:00. It arrives at the main junction in the centre of town (there are 2 ATMs) and there is no longer any need to get a ferry. You can take a tuk-tuk to the bus station (5,000kip) and then connect to Odoumxai for 35,000kip, 2.5 hours. You should consider taking the boat ride down the fairly narrow and very scenic Nam Ou River towards Nong Khiaw where road travel is possible - departures depend on whether there are enough people interested in going - ask ahead at the boat ramp.
There are a number of bus companies that run between DBP and Hanoi. There is little variation in price 360,000-375,000, but substantial differences in the bus layouts. Some have WIFI, others do not. Best to shop around if possible. Trip takes around 11-12 hours, and drops you at the Southern or Western Bus station in Hanoi. Local busses into town from the station cost 7,000, but you'll likely need to research which route you need beforehand (For example, using google maps).
From the bus station there is a 6:30 AM (sharp!) bus going to Lao Cai for 190,000 dong (Aug. 2015). There is a brief stop for lunch in Lai Chau. The route will pass through Sapa and you can ask the driver to drop you off there. From the drop off point near the lake, it is a short walk to the center and accommodation. If you are going to Sapa, paying the full Lai Cai fare may not be necessary, ask when purchasing (writer failed to do so). Time to Sapa took roughly 8 hours, much of the road is under construction and unpaved, but not terribly uncomfortable in the new-ish van.
[[WikiPedia:Dien Bien Phu]]
[wiki=3c037ce03acc19ce14d63ebfbd317766]fr:Dien Bien Phu[/wiki]