How Network layer routing actually works in the physical world

I guess this question will require several iterations, so here is iteration 1

Basically, Internet consists of individual networks. Each network belongs to some organization/enterprise/other kind of (business) entity. Each network consists of physical hardware (including routers) as well as whatever is needed for this hardware to work. An autonomous system is a name for such network belonging to a single business entity[*].

The basic idea for this separation, is that each autonomous system can choose how to arrange routing within itself, however routing between autonomous systems is done using BGP, a single protocol for the whole Internet.

An ISP is an individual network belonging to a special type of organization that provides network services, so it is one type of network. ISPs are autonomous systems and get their own ISP numbers.

There are other types of organizations. Large content providers (facebook, google) or CDNs (cloudflare) have their own networks have their own ASNs. Internet exchange points interconnect ASNs. Any organization, i.e., a university may decide to manage its own network and thus be an ASN.

Side note: the part about LANs is usually internal detail of each organization. From routing perspective LAN is one specific type of layer 2 segment, and routing protocol routes between layer 2 segments.

Now to the questions:

What happens after the packet leaves my router & default gateway ? Is that part of the autonomous system ?

default gateway is part of the ISP, so yes

Does each ISP have its own physical routers ?

yes, also physical links between them. also it can have all kind of other networking hardware. this hardware belongs to the ISP.

Where do they install these routers, when it is not in someones home ? Under the street ? Underground ? Once the package leaves my default gateway, the next router would be in another building ? Or on the street ? I assume the BGP protocol will be used as its going to the other end of England and I guess it will be a different AS?

kinda whenever they see fit. I don’t think there is a general answer to this question.

If the person receiving my email is in Newcastle for example, and they are using the same ISP, would that be a different AS? or is it the same AS?

same

Is an autonomous system bound by physical boudaries or does each ISP only have 1 autonomous system and it can cover the whole country ?

no, AS is not bound by physical boundary. Each ISP would probably be a different autonomous system and it can cover whole country. Several different ISPs (each different AS) can cover the same country. ASs can cover continents or intercontinental paths.

Is my home LAN part of the ISP’s AS ?

ok, this one I don’t know.

[*] due to business stuff like merges it might not be exactly the case, but I would suggest to think like this at the beginning

Addendum: A Very Simplistic View of the Internet.

Side note: main function of router is to find paths to specific IP addresses. Routing protocols compute forwarding tables in a form IP-prefix->routers outgoing interface/next hop. Prefix is first N bits of IP address, N can vary. If you have a large range of IP addresses reachable through single interface, they are aggregated to prefixes.

Networks connect end-systems. End-systems are either users’ PCs/devices or servers (email server, web servers, etc). Users’ end-systems are typically attached to Ethernet-based LANs (in offices) or home (W)LANs.

Internet Edge

Home (W)LANs usually have home routers which connect to their providers’s access networks through cable/DSL/… . These access networks have access technology-specific equipment which connects to the provider’s core network with routers. Now, home router is a router because it does IP forwarding, but its main function as a router is to decide whether the packet should go on the Internet or not (e.g., to another device in the LAN) and then to just forward latter packets to its single outgoing interface. It does not usually run any routing protocols. I don’t know exactly, what each type of access network does, so it might contain routers, but for simplicity, we can assume that, from core router’s point of view it is a layer 2 domain with a certain range of IP addresses reachable through its corresponding interface to this access network.

Side note: this is why OSI Model is not that realistic, DSL can have devices, that are layer 3 from DSL’s perspective and layer 2 from router’s perspective.

Providers should also have connectivity with other providers. This is done by having BGP routers which are connected to BGP routers of other providers. This is called peering. How and with whom to peer is actually each provider’s choice/business decision. So, core networks would also include BGP routers that interconnect with other networks.

Organizations will typically have end-systems organized in Ethernet-based LANs which may or may not be interconnected by routers (depending on e.g., organization size). An organization would typically buy Internet connectivity from an ISP, so it will have at least one physical link to this ISP.

Now, whether an organization is an autonomous system (AS) or not. Actually it depends. If an organization has only one provider, it doesn’t really need to choose to which provider its internet traffic goes, and thus it does not really need to use BGP and thus an AS number (see Ron’s answer here). If an organization decides to have several providers (e.g., a backup connectivity) it might want to choose where its internet traffic goes and choose to participate in BGP. In this case it needs BGP routers, an AS number, and it needs to have peering relationships with its providers.

Now, servers usually reside in data centers. How routing done inside a data center network is another long story. It can be either layer 2 (usually modified e.g., SPB or Trill which actually uses a routing protocol :)) or layer 3 (any routing protocol). What is relevant, is that a data center would have a couple of core routers which interconnect it with the rest of Internet. For simplicity you can assume that there is one router between internal data center network and the rest of Internet. This router can be connected directly to its ISP (see above) or to an internal inter-datacenter network (see below). Again if it is a BGP router, it depends, can be both, depending on what the owner of the data center needs.

Finally, big organizations like Facebook and Google have their own network that spans multiple continents, and interconnect their data centers. These networks will peer with several providers (to reach user’s devices) and participate in BGP. They also have their own AS numbers.

Internet Core

Not all providers have customer’s end-systems. A large number of providers provide connectivity to other providers/between other providers. In the “simplistic view” you might have Internet backbones that have intercontinental lines. They offer their services to “smaller” providers, that span each continent, which in turn offer their services to customer ISPs. This is referred to as Tier One Providers, Tier Two Providers, etc. You can check the picture in Wikipedia. Here each provider also decides with which other provider to peer.

One notable type of an organization here is an Internet exchange point (IXPs). (I don’t know how exactly they work, so I won’t write anything wrong.)

Intra/Inter-Domain Routing

The basic idea is that each organization and provider decides how to organize routing within its own network (which has its own hardware). In simple version, each provider chooses an intra-domain routing protocol to do this. To talk to other providers everyone has to use BGP, that is everyone has to have BGP routers (physical hardware) that connect to BGP routers of the peer over physical links. A provider might have more physical links between itself and other providers (backups, business relationships that change, etc). In this case the provider can use BGP policies to decide how exactly to route inter-domain traffic. Policies are also internal business decisions.