The invention discloses an Ethernet gateway capable of configuring a port mode, and a vehicle. The Ethernet gateway comprises a main control unit, an Ethernet switch circuit, an external memory and apower supply circuit, the main control unit is provided with an Ethernet MII interface, an SMI interface and a GPIO interface; the Ethernet switch circuit comprises an internal CPU, an internal register, an Ethernet port SGMII, a plurality of Ethernet PHYs, an Ethernet port MII electrically connected with the internal register, and a power supply module for supplying power to the Ethernet switch circuit, wherein the internal register, the Ethernet port SGMII and the Ethernet PHYs are electrically connected with the internal CPU. The main control unit is electrically connected with the power supply circuit through the GPIO interface; the power supply circuit is electrically connected with a power supply module of the Ethernet switch circuit; the main control unit is electrically connected with the Ethernet port MII of the Ethernet switch circuit through an Ethernet MII interface; and the main control unit is also electrically connected with an internal register of the Ethernet switch circuit through an SMI interface. According to the Ethernet gateway, the problem that the existing Ethernet gateway cannot be compatible with various electronic and electrical architectures is solved.