The energy system is expected to face considerable changes in the futurein order to provide sustainable energy to society.Natural gas and its infrastructure are expected to play an importantrole in the energy transition because of the robust and reliablegas infrastructure, the relatively low emissions of natural gas---compared to oil and coal---, the ability to backup intermittent renewablegeneration by gas-fired power plants and the opportunity of injectinggreen gas which can contribute to the defossilisation of the gas network. However, it is important to timely assess the impact of possible futurechanges on the gas network, in order to safeguard the reliability ofthe energy system, to inform consumers and as a quantitative support for policy makers and regulators.One of the particularly interesting possible future changes that has beenstudied in this work is small-scale cogeneration, which is considered to havean interesting potential in the future energy system. The impact of cogeneration on the gas distribution network has been studied,indicating that most networks can indeed cope with a massive share of cogeneration,but this should be assessed carefully for each network as the impact of cogenerationis relatively larger for networks with higher reference load levels.Another interesting linkage between the electricity and the gas networksis the ``power to gas'' process which provides a way of indirectly storingsurplus renewable energy in the gas network. However, the results indicatea partial transfer of capacity and flexibility related issues from theelectricity to the gas sector which are related to the high penetration gradesof intermittent renewable electricity.Next to challenges, the energy transition can provide interesting opportunitiesfor the gas network as well. A particularly interesting opportunity has beenfound in the provision of gas flexibility by combining thermal storage forsolar thermal collectors and active gas demand response.This research, providing both methodological as qualitative insights,indicates that the gas system can indeed act as avaluable backbone of the general energy system, and as suchit can facilitate the energy transition.