IP Addressing Tutorial – How Internet Forwards Packets? (Interactive Animation 2)

Q1. What’s the relationship between Internet and routers?

Answer: First, let’s learn what is Internet? Computers are able to exchange messages by connecting to Internet. When receiving a message transmitted from one computer to another computer, Internet needs to figure out how to deliver the messages.

Next, how does Internet deliver messages? Internet is of routers and protocols. Routers are hardware communication equipment with one mission: Forwarding packets. Protocols are rules that decide packet forwarding paths. With routers and protocols, Internet is able to transfer messages between computers.

Q2. What is router?

Answer: Router is a network equipment that forwards packets toward their destinations hop-by-hop. It’s similar to how postal offices handling mails.

– A mail has sender and receiver’s addresses. A postal office uses receiver’s address to deliver mails to next postal office that is closer to the receiver. After several stops, the mail is delivered to the receiver.

– Computer messages are transported in smaller pieces called packet. Each packet contains sender’s IP address and receiver’s IP address. Routers use packet’s receiver address to forward it to a next hop router that is closer to the destination. After several stops, the packet is delivered to the receiver.

Q3. How to connect hosts and routers?

Answer: Hosts in a local network are connected to Internet by a gateway router. Gateway routers are connected to core routers. Internet is made of many gateway routers on the edge and core routers in the center. Gateway routers often use many different types of interface technologies and security features. Core routers focus on forwarding packets at high speed. Routers use routing table to make packet forwarding decisions. The topology connectivity is more clear in the companion aniation.

Q4. What is routing table?

Answer: Routing table is the core data structure in a router. It contains (destination address, next hop interface). When a router receives a packet, it uses packet’s receiver address to compare routing table’s destination addresses. If a match is found, router forward the packet to “next hop interface” associated with the destination. If no match is found, router drops the packet.

For example, R1’s routing table contains 3 entries:

– (, Port1). It means forward packets with destination to interface Port1.

– (, Port2). It means forward packets with destination to to interface Port2.

– (, Port2). It means forward packets with destination to to interface Port2.

Q5. How to build routing tables?

Answer: There are two ways to build routing tables:

A) Static routing table. Network admin manually configure routing tables on each router. It was common 20 years ago when the number of routers is small.

B) Dynamic routing table. Routers are running routing protocols to discover network topology, calculate routing paths, and filling their routing paths. Two popular routing protocols are OSPF and RIP. See simulations in OSPF and RIP.

Q6. How big is routing table?

Answer: There are approximately 4.2 billion IP addresses (IP address has 32 bits. 2^32 is about 4.2 billion.) It’s a large number. No routing table can fit so many routes.

In this animation, we want readers to get the basic ideas of routers and use individual IP addresses in routing tables. In reality, routing tables use network address, not individual IP address. See next tutorial for details.

Q7. What is network address?

Answer: Network address is similar to postal zip code. Thousands of street addresses are in the same zip code. Postal offices sort mails by their zip code and deliver mails to next hops according to zip code. At the last post office, mails are delivered to street addresses.

Routers forward packets by their destination IP address. But the actual lookup is done by using the network address portion of IP address. There could be hundreds or thousands of hosts using the same network address. See next tutorial in IP address series: Network address.

This article is the FAQ of an interactive animation. You can play this animation listed under External links.

Source link