In this paper, we explore the issue of static routing and spectrum/IT resource assignment (RSIA) of elastic all-optical switched intra-datacenter networks (intra-DCNs) by proposing anycast- and manycast-based integer linear programming (ILP) models. The objective is to jointly optimize the DCN resources, i.e., network transmission bandwidth and IT resources, under different situations. First, for given service-request matrices with unknown network transmission bandwidth and IT resources, we propose anycast and manycast ILP models to minimize the maximum numbers of required network and IT resources to accommodate all the service requests. For anycast RSIA issue, we proposed two different ILP models that are based on node-arc and link-path methods, respectively. Node-arc based manycast ILP model is also proposed for the first time to our knowledge. Second, for given network transmission bandwidth and IT resources and known service-request matrices, we propose node-arc based anycast ILP models to maximize the total number of successfully served service requests. To evaluate the efficiency of anycast and manycast models, all proposed ILP models are evaluated and compared with unicast ILP models. Simulation results show that anycast and manycast ILP models perform much better in efficiently using DCN resources and successfully accommodating more service requests when compared to unicast ILP models under the same network conditions.