Home | Reports | Technical Documents | Tech-Blog | One-Shot Gallery | Korea ICT News | Korea Communication Market Data | List of Contributors | Become a Contributor |    
 
 
Section 5G 4G LTE C-RAN/Fronthaul Gigabit Internet IPTV/Video Streaming IoT SDN/NFV Wi-Fi KT SK Telecom LG U+ Network Protocol Samsung   Korean Vendors
 
Real World Private 5G Cases   4 Deployment Models On-Premise Cases 5G Core Control Plane Sharing Cases

5G Core Sharing Cases

   
 
Private 5G Deployment   • Private 5G Frequency Allocation Status in Korea  South Korean government's regulations on private 5G and KT's strategy for entering the market
Cases in Korea   Private 5G Operators |   SK Networks Service (SI) Sejong Telecom (Wire-line Carrier) KT MOS (Affiliate of KT) • Newgens (SI) • NAVER Cloud more >>  
    Enterprise DIY |   Korea Hydro & Nuclear Power (Power Plant) Korea Electric Power Corporation (Energy) • Republic of Korea Navy more >>
 
CHANNELS     HFR Private 5G Solution (my5G)       my5G Solution Components       my5G Key Features        my5G Resources        my5G News          
 
banner
banner
Switching and Routing for Dummies - IP Routing
May 08, 2014 | By Chris Yoo (tech@netmanias.com)
Online viewer:
Comments (3)
12
 

 

In the previous post, we learned about L2 (Ethernet) switching. This post is about L3 (IP) routing. This time, we will look into IP routing illustrated in the right figure below.

 

 

Again, please take a close look at the network configuration above. In the figure, MAC/IP address values are as follows:

 

   Server/Router  Port  MAC Address  IP Address
   SVR1  lan1  m1

 1.1.1.10

   SVR3  lan2  m3  2.1.1.30
 

 R1

 

 ge1/1

 ge2/1

 a1

 a2

 1.1.1.1

 2.1.1.1

 

 

IP Routing
 

 

1. SVR1 sends ARP Request

  • SVR1 with IP address of 1.1.1.10 is trying to send a packet to the destination, SVR3 with IP address of 2.1.1.30.
  • Through routing table lookup, SVR1 finds out the destination address 2.1.1.30 is mapped to a default route (0.0.0.0/0), and thus "in order for the packet to reach the destination, it has to go to the gateway 1.1.1.1 via Outgoing Interface (OIF) lan1". In case of regular PCs, IP addresses are assigned (leased) through DHCP and gateway addresses are assigned through DHCP option 3. In case of servers, IP and gateway addresses are configured by server administrators. Then, the assigned (or configured) addresses are installed in the routing table.
  • A gateway (also known as default gateway) refers to the first router (no matter how many L2 switches there are in between) connected to a server, e.g. SVR1 here. This gateway is located in the same network that the server (SVR1) belongs to (In the figure, 1.1.1.1, the interface address of the first router (R1) connected to SVR1 (at 1.1.1.10) is the gateway of the server).
  • As the ARP table does not have a MAC address entry for the gateway whose IP address is 1.1.1.1 (i.e. ARP miss event), SVR1 sends an ARP request packet with the following fields to lan1 port:
   Header  Fields
 

 Ethernet Header

 

 

 * Destination MAC = FF:FF:FF:FF:FF:FF (broadcasting, so sending to all nods in the same LAN)
 * Source MAC = m1, the MAC address of the sender (SVR1)

 

 ARP Header

 

 

 

 * Sender MAC = m1, the MAC address of the sender (SVR1)
 * Sender IP = 1.1.1.10, the IP address of the sender (SVR1)
 * Target MAC = 00:00:00:00:00:00 (the value that SVR1 wants to find out)
 * Target IP = 1.1.1.1, the IP address of the intended receiver (R1)

  • Upon receiving the packet, S1 (Switch 1) performs source MAC learning and records the following in the MAC table: {MAC address m1 is connected to fe1 port}.
  • By referring the destination MAC address in the received packet, S1 determines an output port, e.g. a broadcast address (FF:FF:FF:FF:FF:FF) in this case. Accordingly, S1 performs flooding to all ports except for the receiving port. As a result, the packet is received by SVR2 and R1 (Router 1).
  • From the target IP address of the received ARP request packet, SRV2 learns that the address does not match its own. So, it discards it.


2. R1 responds with ARP Reply

  • R1 (Router 1) also checks the target IP address of the received ARP request packet, and notices that its MAC is requested. So, it enters the MAC address corresponding to 1.1.1.1 in the Sender MAC field of an ARP reply packet, and sends the packet to ge1/1 port. At this time, the packet includes the following fields:
   Header  Fields
 

 Ethernet Header

 

 

 * Destination MAC = m1, the MAC address of SVR1 to which ARP reply is to be delivered
 * Source MAC = a1, the MAC address of the sender (R1)

 

 ARP Header

 

 

 

 * Sender MAC = a1, the MAC address of the sender (R1)
 * Sender IP = 1.1.1.1, the IP address of the sender (R1)
 * Target MAC = m1, the MAC address of the intended receiver (SVR1)
 * Target IP = 1.1.1.10, the IP address of the intended receiver (SVR1)

  • S1, upon receiving the packet, learns the source MAC and records the following in the MAC table: {MAC address a1 is connected to fe3 port}.
  • Then, it sends (unicasts) the packet to fe1 port by referring to the MAC table where m1, the destination MAC address of the received packet, is mapped to fe1.
  • Next, SVR1 records the received value (a1, the MAC address assigned for 1.1.1.1) in its ARP table.


3. SVR1 sends IP Packet to R1

  • SVR1, now ready to send an IP packet to SVR3, sends one with the following fields to lan1 port:
   Header  Fields
 

 Ethernet Header

 

 * Destination MAC = a1, the MAC address of the receiver (R1)
 * Source MAC = m1, the MAC address of the sender (SVR1)

 

 IP Header

 

 * Destination IP = 2.1.1.30, the IP address of the receiver (SVR3)
 * Source IP = 1.1.1.10, the IP address of the sender (SVR1)

  • S1, having already learned the source MAC address, skips the source MAC learning and sends the packet to fe3 port, as mapped for the destination MAC address a1 in the MAC table.

 


 


 

4. R1 sends ARP Request

  • Upon receiving the received packet, R1 (router 1) knows that "the destination address 2.1.1.30 is the network immediately connected to itself (because there is no next hop), and the outgoing interface is ge2/1" by referring to its FIB (routing table).
  • Now, R1 checks the ARP table for the MAC address corresponding to 2.1.1.30, and finds no entry there (ARP miss). So, it sends an ARP request packet with the following fields to ge2/1 port.
   Header  Fields
 

 Ethernet Header

 

 

 * Destination MAC = FF:FF:FF:FF:FF:FF (broadcasting: reaching all nodes in the same LAN)
 * Source MAC = a2, the MAC address of the sender (R1)

 

 ARP Header

 

 

 

 * Sender MAC = a2, the MAC address of the sender (R1)
 * Sender IP = 2.1.1.1, the IP address of the sender (R1)
 * Target MAC = 00:00:00:00:00:00 (the value that R1 wants to find out)
 * Target IP = 2.1.1.30, the IP address of the intended receiver (SVR3)

  • Now, this packet is received by S2 (Switch 2), and the source MAC address of the received packet is learned. Then, the following is recorded in the MAC table at S2: {MAC address a2 is connected to fe3 port}.
  • By referring to the destination MAC address of the received packet, S2 determines which output port to send to. In this case, as it is a broadcast-type address (FF:FF:FF:FF:FF:FF), it performs flooding to all the ports except for the receiving port. As a result, the ARP request packet is received by SVR3 and SVR4.
  • From the target IP address of the received ARP request packet, SVR4 notices that the address does not match its own, and hence discards it.

 

5. SVR3 responds with ARP Reply

  • SVR3 also checks the target IP address of the received ARP request packet, and finds out the address matches its own address. So, it enters the MAC address corresponding to 2.1.1.30 in the Sender MAC field of an ARP reply packet, and sends the packet to lan1 port. At this time, the packet includes the following fields:
   Header  Fields
 

 Ethernet Header

 

 * Destination MAC = a2, the MAC address of R1 to which ARP reply is to be delivered
 * Source MAC = m3, the MAC address of the sender (SVR3)

 

 ARP Header

 

 

 

 * Sender MAC = m3, the MAC address of the sender (SVR3)
 * Sender IP = 2.1.1.30, the IP address of the sender (SVR3)
 * Target MAC = a2, the MAC address of the intended receiver (R1)
 * Target IP = 2.1.1.1, the IP address of the intended receiver (R1)

  • S2, upon receiving the packet, learns the source MAC and records the following in the MAC table: {MAC address m3 is connected to fe3 port}.
  • Then, it sends (unicasts) the packet to fe1 port by referring to the MAC table where a2, the destination MAC address of the received packet, is mapped to fe3.
  • Next, R1 records the received value (m3, the MAC address assigned for 2.1.1.30) in its ARP table.

 

6. R1 sends IP Packet to SVR3

  • Now, as SVR3 has learned the MAC address, R1 (Router 1) is ready to forward IP packets from SVR1 to SVR2. So, it begins to forward the IP packet sent by SVR1 to SVR3, with the following fields:
   Header  Fields
 

 Ethernet Header

 

 * Destination MAC = m3, the MAC address of receiver (SVR3)
 * Source MAC = a2, the MAC address of the sender (R1)

 

 IP Header

 

 * Destination IP = 2.1.1.30, the IP address of the receiver (SVR3)
 * Source IP = 1.1.1.10, the IP address of the sender (SVR1)

  • S2, having already learned the source MAC address, skips the source MAC learning and sends the packet to fe1 port, as mapped for the destination MAC address m3 in the MAC table, so that it can be delivered on to SVR3.


Summary

 

   

 

All clients/servers (to be referred to as servers below) are connected to other servers through switche(es) and router(s).


When a server sends a packet, the server first makes a decision on whether to send the packet by Ethernet switching or IP routing.

As discussed in the previous post, when a server sends a packet, it uses the MAC address of the destined server as the destination MAC address of the packet if the destination IP address (e.g. 1.1.1.20) is located within the same network (LAN) that the server belongs to (e.g. 1.1.1.10).

On the other hand, if the destination IP address (e.g. 2.1.1.30) is not located in the same network where the sender server (e.g. 1.1.1.10) is located as explained in this post, the sender server uses the MAC address of a gateway (e.g. 1.1.1.1), instead of the destined destination, as the destination MAC address of the packet. Here, the gateway refers to the first L3 hop that is connected to the server, i.e. router (R1). For that reason, the packet is destined to the MAC address of the router, and thus is sent to the router via Ethernet switching regardless of the switch(es) installed in between. Then, the router, after confirming the destination MAC address of the received packet matches its own, performs IP routing (also known as "forwarding") through FIB lookup.

So, again the point here is:
"The router performs IP routing if the destination MAC address of the received packet matches its own. If not, it simply discards it."
Exceptionally, if the destination MAC address is FF:FF:FF:FF:FF:FF, then the packet is received by the control plane of the router, as the ARP request packet is received and processed by R1 above.

 

 

 

 

Georgette 2015-01-02 18:16:17

netmanias! Such a pretty great source to learn about how computer network works. I'm doing bachelor and surprisingly this is the subject which I'm studying this semester. This will definitely help me out in final semester project.

gita 2018-06-07 18:00:45

Wow!!. Such a brilliant explanation.

merkaba 2019-02-22 12:20:53

can u pls explain why the Router R1 does not learn the mac of the server 1  and update in the ARP table  , but only learns the mac of server 2  in the ARP table ? I.e when S1 sends packet to R1 , the arp table is still empty ( compared to switches which learn both the mac of router and servers) 

Thank you for visiting Netmanias! Please leave your comment if you have a question or suggestion.
 
 
 
 

[HFR Private 5G: my5G]

 

Details >>

 

 

 

     
         
     

 

     
     

Subscribe FREE >>

Currently, 55,000+ subscribed to Netmanias.

  • You can get Netmanias Newsletter

  • You can view all netmanias' contents

  • You can download all netmanias'

    contents in pdf file

     
     

 

     
         
     

 

 

 

View All (854)
4.5G (1) 5G (101) AI (7) AR (1) ARP (3) AT&T (1) Akamai (1) Authentication (5) BSS (1) Big Data (2) Billing (1) Blockchain (3) C-RAN/Fronthaul (18) CDN (4) CPRI (4) Carrier Ethernet (3) Charging (1) China (1) China Mobile (2) Cisco (1) Cloud (5) CoMP (6) Connected Car (4) DHCP (5) EDGE (1) Edge Computing (1) Ericsson (2) FTTH (6) GSLB (1) GiGAtopia (2) Gigabit Internet (19) Google (7) Google Global Cache (3) HLS (5) HSDPA (2) HTTP Adaptive Streaming (5) Handover (1) Huawei (1) IEEE 802.1 (1) IP Routing (7) IPTV (21) IoST (3) IoT (56) KT (43) Korea (20) Korea ICT Market (1) Korea ICT Service (13) Korea ICT Vendor (1) LG U+ (18) LSC (1) LTE (78) LTE-A (16) LTE-B (1) LTE-H (2) LTE-M (3) LTE-U (4) LoRa (7) MEC (4) MPLS (2) MPTCP (3) MWC 2015 (8) NB-IoT (6) Netflix (2) Network Protocol (21) Network Slice (1) Network Slicing (4) New Radio (9) Nokia (1) OSPF (2) OTT (3) PCRF (1) Platform (2) Private 5G (10) QoS (3) RCS (4) Roaming (1) SD-WAN (17) SDN/NFV (71) SIM (1) SK Broadband (2) SK Telecom (35) Samsung (5) Security (16) Self-Driving (1) Small Cell (2) Spectrum Sharing (2) Switching (6) TAU (2) UHD (5) VR (2) Video Streaming (12) VoLTE (8) VoWiFi (2) Wi-Fi (31) YouTube (6) blockchain (1) eICIC (1) eMBMS (1) iBeacon (1) security (1) telecoin (1) uCPE (2)
Password confirmation
Please enter your registered comment password.
Password