Deck rails can be added after the initial construction or they can be part of the plan from the very beginning. One way to secure deck rails from below is to mount them on posts that are also part of the deck's structural frame. When planning the vertical posts that will support the deck on the ground, extend some of them by several feet to serve as rail posts. Do this with posts at corners of the deck and every few feet along straight edges. The posts will appear to be outside the deck's perimeter, giving you more deck space and making your rails appear integrated into the design.
Top rails on a deck are the horizontal rails that are attached near the top of the vertical posts. Top rails serve as a place to set objects and a structural mounting point for pickets, which are vertical elements that hang down but don't provide any structure for the railing. To secure top rails from below, drill into the outside face of each post to produce a channel with an upward angle that will allow you to attach the top rail without adding nails or screws to its facing.
A deck's bottom rail is the horizontal rail that is attached to the posts a few inches above the deck's floor level. You can attach a bottom rail by drilling and screwing it from below at an angle, just as with a top rail. Bottom rails can also rest along the base of the deck, connecting posts and pickets to brace them against wind. A bottom rail that lays along the deck's floor can be made from a 4-by-4 with notches cut out to accommodate each post. Screwing or nailing upward through the deck's floorboards is the simplest way to secure a bottom rail that adds strength and conceals the hardware used to secure it.
Securing deck rails from below is slightly more complicated than attaching them from above or by simply nailing them into the sides of posts and the deck's frame. To account for the extra precision you'll need, take special care in measuring. Check each post plumb, of vertical degree of level, to ensure that your rails are straight. When nailing or screwing upward through a rafter or the deck flooring to secure a rail, measure the thickness of the material to determine the proper length for your fasteners.