In the past, network protocols in layered architectures have been obtained on an ad hoc basis, and many of the recent crosslayer designs are also conducted through piecemeal approaches. It is only recently that network protocol stacks have instead been analyzed and designed as distributed solutions to some global optimization problems in the form of generalized network utility maximization (NUM), providing insight on what they optimize and on the structures of the network protocol stacks. This chapter will present material required for understanding of layering as optimization decomposition where each layer corresponds to a decomposed subproblem, and the interfaces among layers are quantified as functions of the optimization variables coordinating the subproblems.Decomposition theory provides the analytical tool for the design of modularized and distributed control of networks. This chapter will present results of horizontal decomposition into distributed computation and vertical decomposition into functional modules such as congestion control, routing, scheduling, random access, power control and channel coding. Key results from many recent works are summarized and open issues discussed. Through case studies, it is illustrated how layering as optimization decomposition provides a common framework for modularization, a way to deal with complex, networked interactions. The material presents a top-down approach to design protocol stacks and a mathematical theory of network architectures.Convex optimization has become a computational tool of central importance in engineering, thanks to its ability to solve very large, practical engineering problems reliably and efficiently. Many communication problems can either be cast as or be converted into convex optimization problems, which greatly facilitate their analytic and numerical solutions. Furthermore, powerful numerical algorithms exist to solve the optimal solution of convex problems efficiently.For the basics in the area of convex optimization, the basics of convexity, Lagrange duality, distributed subgradient methods and other solution methods for convex optimization, the reader is referred to References [1] to [8].Advanced Wireless Networks: Cognitive, Cooperative and Opportunistic 4G Technology Second Edition Savo Glisic and Beatriz Lorenzo