Garlic routing is a variant of onion routing that encrypts multiple messages together to make it more difficult for attackers to perform traffic analysis and to increase the speed of data transfer.
Michael Freedman defined "garlic routing" as an extension to onion routing, in which multiple messages are bundled together. He called each message a "bulb", whereas I2P calls them "garlic cloves". All the messages, each with its own delivery instructions, are exposed at the endpoint. This allows the efficient bundling of an onion routing "reply block" with the original message.
Garlic routing is one of the key factors that distinguishes I2P from Tor and other privacy or encryption networks. The name comes from actual garlic, whose structure this protocol resembles. "Garlic routing" was first coined by Michael J. Freedman in Roger Dingledine's Free Haven Master's thesis Section 8.1.1 (June 2000), as derived from Onion Routing. However garlic routing implementation in I2P isn't identical to the one proposed by Freedman and has unidirectional tunnels unlike bidirectional circuits of Tor and Mixmaster.