How do Internet (ISP/AS) routers send IP packets to each other

3

2

I know how computers in a LAN communicate with each other (all the Ethernet/MAC address/NAT etc stuff), but I wonder, how do Internet routers communicate? Are they connected into some kind of giant LAN? What protocol is used to deliver packets (e.g. IP and BGP packets)?

Roman Bodnarchuk

Posted 2012-11-10T12:49:40.797

Reputation: 83

Answers

5

The routers form a mesh, of sorts. Each one is connected to several others (conceivably on a LAN, but typically just a direct connection, maybe over a long distance like an undersea cable or a T-carrier or fibre link), and each one knows which it is connected to. Each router typically has many IP addresses, one per link to another router it has.

The routers usually run routing protocols which allow them to discover what their neighbours (the routers to which they are directly connected) are connected to. These are IS-IS, BGP, EIGRP, RIP, OSPF, etc. They can also keep track of this statically; routing protocols are a labour-saving device that lets network administrators automate routing table maintenance in case of changes (either intentional or due to a failure). So, each router is connected to several others, and knows what is where more or less. This information can be allowed to filter through the Internet; routers will inform each other of their neighbours' neighbours also, so it is possible to build a view of everything reachable in every direction (approximately). Routers also keep track of how far away things are (how many routers are between, and potentially how fast the path is), to facilitate getting packets to their destination efficiently.

Some routers (eg. your LAN gateway, or some of your ISP's routers) have only a couple routes: the LAN they are the gateway for, and usually one default route for the rest of the internet (in IPv4 networking, this is 0.0.0.0/0, or the "default" route). They therefore know that packets going to their LAN go in one direction (out the LAN interface), and packets going elsewhere go in another direction (out the WAN interface).

Other routers with more links and more networks on either side extend this concept somewhat. They will know what prefixes (the network number part of an IP address, formally) are in each of several directions, and send packets along that route (thus their name). They relay the packet to each other this way until it reaches its destination; if this is impossible, there are several mechanisms to drop it and show that it has been dropped.

So, your packet gets to your ISP, possibly from your LAN router which knows what interface the Internet is on and sends it that way. Each successive router looks at the destination address and determines which network it is part of and so which direction it goes according to its routing table; it will know that addresses beginning with a certain number are in the "direction" of one particular other ISP, and send it that way (changing the layer 2 information at each hop in order to do this, so the MAC address for instance will change at each hop). Eventually, it reaches a router on the same network as the host you're trying to reach, and it gets to that destination.

Each of these relay steps is called a hop. You can see this work using the traceroute utility (tracert on windows), though you may not see all the hops due to ICMP filtering being very widespread.

Falcon Momot

Posted 2012-11-10T12:49:40.797

Reputation: 491

1Thanks! The info I was looking for is in the first paragraph, but the for the full story too :) – Roman Bodnarchuk – 2012-11-13T16:20:13.430

Haha, this is "Network and Communications" class from school summarized in 6 paragraphs. Nicely done :) – Ярослав Рахматуллин – 2012-11-14T23:21:32.457

0

You are looking for IP Forwarding.
See if you want to try this short Cisco Routing presentation on YouTube.

nik

Posted 2012-11-10T12:49:40.797

Reputation: 50 788

I do know what IP routing is. I am interested - which data link protocols are used for communication between routers? – Roman Bodnarchuk – 2012-11-10T20:06:03.120

0

Yes, BGP is used to exchange routing informations between ASes. Thus enabling successful routing on the internet. This happens using TCP (and obviously IP) Then you have IGRP and OSPF in use within ASes.

JustStoppingBy

Posted 2012-11-10T12:49:40.797

Reputation: 46

So how IGRP and OSPF packets are sent between routers? – Roman Bodnarchuk – 2012-11-13T12:56:11.940

They are routing protocols, thats the ruleset the router uses to figure out which path to send the packets. Still IP packets. – JustStoppingBy – 2012-11-13T13:00:22.817

Well, sure IP, but what protocols below? Are these routers connected into some kind of LAN? – Roman Bodnarchuk – 2012-11-13T13:05:38.080

0

The protocol is TCP/IP, they are connected through WAN connections not LAN. The routing protocol is only the "language" that your router speaks. In a basic network you configure the same routing protocol so that your routers can understand each other, and these routing protocols are known as Interior Gateway Protocols. The "language" used in the Internet is called BGP this is called Exterior gateway Protocol.

Ernesto

Posted 2012-11-10T12:49:40.797

Reputation: 9

I believe the question was about lower-level protocols below IP. The accepted answer seems to cover BGP etc. – RedGrittyBrick – 2012-12-13T23:31:07.847