Sangoma
  • Email
  • Facebook
  • Linkedin
  • Twitter
  • Youtube
Menu 
  • Home
  • Solutions
    • Service ProvidersCARRIERS | TELCOS | LARGE ENTERPRISE
      • SIP Trunking – Carrier
      • SIP Dial Tone/Multi-Dwelling Units
      • SIP Network to SS7 Interconnection
      • Mobile Value Added Services (VAS)
      • Color Ring Back Tone (CRBT) Solution
      • High-Density Call Completion Platforms
      • Data Networking Solutions
    • Microsoft Lync Solutions
      Ms. Lync
      • Telephony Support for Office 365
      • IP PBX Replacement with Lync
      • Branch Office Support for Lync
      • Extending Lync to the PBX
    • Enterprise CommunicationsCALL CENTERS | CPE | SMB | SOHO
      • SIP Trunking – Enterprise
      • Branch Office Survivability
      • Connecting Legacy Equipment to an IP PBX
      • Legacy Connectivity for IP-PBXs
      • Call Recording Directly From T1/E1
      • Contact Centers
      • Interactive Voice Response (IVR)
      • IP-PBX
    • OEMManufacturers
      • White Label Software
      • White Label Telecom and Datacom Hardware
    • Developers and IntegratorsMVAS | SYSTEM INTEGRATORS
      • Open Source
      • API / SDK
  • Products
    • VoIP Gateways
      • Vega Appliance SeriesSIP to PSTN
      • NetBorder AppliancesVoIP | TRANSCODING | LYNC | SS7
      • NetBorder SoftwareSIP to PSTN | SS7
    • Session Border ControllersSIP to SIP | Transcoding | Security
      Lync Express
      • NetBorder Carrier SBC
      • Vega Enterprise SBC
      • Vega Enterprise SBC VM/Software
      • Vega Enterprise SBC VM/Hybrid
    • Telecom Interface Boards
      • Analog Voice Boards
      • Digital Voice Boards
      • Hybrid Voice Boards
      • ISDN BRI Voice Boards
      • Wireless GSM Board
    • Datacom Interface Boards
      • ADSL Board
      • A56: 56kbps DDS
      • T1 / E1 Data Boards
      • T3 / E3 Data Board
      • Serial Interface Boards
    • Media Processing
      • T116 – Tapping BoardCALL CONTROL | TELECOM INFORMATION
      • Voice Transcoding BoardsVOIP | PSTN | MOBILE
      • NetBorder Transcoding ApplianceVOIP | PSTN | MOBILE
    • Multiplexers
      • T3Mux M13 Multiplexer
      • STM1Mux Fiber Multiplexer
    • Contact Center Solutions
      • Lyra AMD
      • NetBorder Call Analyzer
      • NetBorder Agent Bridge
    • Accessories
      • Cables
      • Antennas
      • Line Tapping System
      • Specialty Tools
  • Purchase
      • Request a Quote
      • Where to Buy
      • Become a Partner
      • Lyra and CPA 30-day Subscription
    • Find a Local Distributor
      Empowered by Sangoma Look for the Empowered by Sangoma symbol when purchasing

      Save money on shipping and products
      Speak in your native language
      Get faster service in your own time zone
      Get Sangoma's lifetime warranty

      Find a Distributor

  • Support
      • Contact Support
      • Wiki & Forum
      • NetBorder Software Registration
      • Lyra Software Registration
      • Register Product
      • Warranty and Return Policy
      • Training
    • Get Premium Support

      PREMIUM SUPPORT

      Purchase 1-hour or 4-hour blocks of enhanced support.
      Response time within ½ day (9am–5pm EST) via ticketing system and telephone.

      STANDARD SUPPORT

      No-charge communication via “ticketing system” with a dedicated customer Engineer.
      Best effort response time, typically wihtin 3 business days.

  • Company
    • Company
      • About Sangoma
      • Awards
      • Press Releases
      • History
      • Management
      • Careers
      • Events
      • Speakers
    • Investor Relations
      • Annual Financial Reports
      • Quarterly Financial Reports
      • Stock Quote
      • Stock Charts
      • Historical Data
    • Contact Us
      • Request for Information
      • Contact Sangoma
      • Contact Support
      • Media Contacts
      • Ordering
    • Sangoma Newsletter

      Sangoma eNews

      Regsiter to our monthly newsletter.

  • Resources
      • Solution ProvidersOPEN SOURCE | IP-PBX | IVR | CONTACT CENTER | CARRIERS | DATA NETWORKING
      • Success StoriesSangoma partners deliver real solutions to Enterprises and Carriers
      • TrainingWebinars and onsite training calendar
      • TutorialsTutorials on various WAN and communications topics
    • Featured Whitepapers
      • Sangoma SS7 Gateway Advantage

      • 28 Ways Sangoma Makes Asterisk Better

      • Specialized Hardware Answers Booming VoIP Transcoding Demands

  • News & Blog
    • Sangoma Press Releases
    • Sangoma Blog
    • Newsletter
    • Industry News
  • Partner Portal
  • Request a Quote

Basic IP Routing

Home» Tutorials » TCP/IP and IPX Routing Tutorial » Basic IP Routing
  • TCP/IP and IPX Routing Tutorial
    • Basic IP Routing
      • Classed IP Addressing and the Use of ARP
      • Direct vs. Indirect Routing
      • Static vs. Dynamic Routing
      • WANPIPE Routing

Classed IP Addressing and the Use of ARP

Consider a small internal TCP/IP network consisting of one Ethernet segment and three nodes. The IP network number of this Ethernet segment is 200.1.2. The host numbers for A, B, and C are 1, 2, and 3 respectively. These are Class C addresses, and therefore allow for up to 254 nodes on this network segment.

Each of these nodes have corresponding Ethernet addresses, which are six bytes long. They are normally written in hexadecimal form separated by dashes (02-FE-87-4A-8C-A9 for example).

TCP/IP and IPX Routing

In the diagram above and subsequent diagrams, we have emphasized the network number portion of the IP address by showing it in red.

Suppose that A wanted to send a packet to C for the first time, and that it knows C’s IP address. To send this packet over Ethernet, A would need to know C’s Ethernet address. The Address Resolution Protocol (ARP) is used for the dynamic discovery of these addresses [1].

ARP keeps an internal table of IP address and corresponding Ethernet address. When A attempts to send the IP packet destined to C, the ARP module does a lookup in its table on C’s IP address and will discover no entry. ARP will then broadcast a special request packet over the Ethernet segment, which all nodes will receive. If the receiving node has the specified IP address, which in this case is C, it will return its Ethernet address in a reply packet back to A. Once A receives this reply packet, it updates its table and uses the Ethernet address to direct A’s packet to C. ARP table entries may be stored statically in some cases, or it keeps entries in its table until they are “stale” in which case they are flushed.

Consider now two separate Ethernet networks that are joined by a PC, C, acting as an IP router (for instance, if you have two Ethernet segments on your server).

TCP/IP and IPX Routing

Device C is acting as a router between these two networks. A router is a device that chooses different paths for the network packets, based on the addressing of the IP frame it is handling. Different routes connect to different networks. The router will have more than one address as each route is part of a different network.

Since there are two separate Ethernet segments, each network has its own Class C network number. This is necessary because the router must know which network interface to use to reach a specific node, and each interface is assigned a network number. If A wants to send a packet to E, it must first send it to C who can then forward the packet to E. This is accomplished by having A use C’s Ethernet address, but E’s IP address. C will receive a packet destined to E and will then forward it using E’s Ethernet address. These Ethernet addresses are obtained using ARP as described earlier.

If E was assigned the same network number as A, 200.1.2, A would then try to reach E in the same way it reached C in the previous example – by sending an ARP request and hoping for a reply. However, because E is on a different physical wire, it will never see the ARP request and so the packet cannot be delivered. By specifying that E is on a different network, the IP module in A will know that E cannot be reached without having it forwarded by some node on the same network as A.

Direct vs. Indirect Routing

Direct routing was observed in the first example when A communicated with C. It is also used in the last example for A to communicate with B. If the packet does not need to be forwarded, i.e. both the source and destination addresses have the same network number, direct routing is used.

Indirect routing is used when the network numbers of the source and destination do not match. This is the case where the packet must be forwarded by a node that knows how to reach the destination (a router).

In the last example, A wanted to send a packet to E. For A to know how to reach E, it must be given routing information that tells it who to send the packet to in order to reach E. This special node is the “gateway” or router between the two networks. A Unix-style method for adding a routing entry to A is:

route add [destination_ip] [gateway] [metric]

Where the metric value is the number of hops to the destination. In this case,

route add 200.1.3.3 200.1.2.3 1

will tell A to use C as the gateway to reach E. Similarly, for E to reach A,

route add 200.1.2.1 200.1.3.10 1

will be used to tell E to use C as the gateway to reach A. It is necessary that C have two IP addresses – one for each network interface. This way, A knows from C’s IP address that it is on its own network, and similarly for E. Within C, the routing module will know from the network number of each interface which one to use for forwarding IP packets.

In most cases it will not be necessary to manually add this routing entry. It would normally be sufficient to set up C as the default gateway for all other nodes on both networks. The default gateway is the IP address of the machine to send all packets to that are not destined to a node on the directly-connected network. The routing table in the default gateway will be set up to forward the packets properly, which will be discussed in detail later.

Static vs. Dynamic Routing

Static routing is performed using a preconfigured routing table which remains in effect indefinitely, unless it is changed manually by the user. This is the most basic form of routing, and it usually requires that all machines have statically configured addresses, and definitely requires that all machines remain on their respective networks. Otherwise, the user must manually alter the routing tables on one or more machines to reflect the change in network topology or addressing. Usually at least one static entry exists for the network interface, and is normally created automatically when the interface is configured.

Dynamic routing uses special routing information protocols to automatically update the routing table with routes known by peer routers. These protocols are grouped according to whether they are Interior Gateway Protocols (IGPs) or Exterior Gateway Protocols. Interior gateway protocols are used to distribute routing information inside of an Autonomous System (AS). An AS is a set of routers inside the domain administered by one authority. Examples of interior gateway protocols are OSPF and RIP. Exterior gateway protocols are used for inter-AS routing, so that each AS may be aware of how to reach others throughout the Internet. Examples of exterior gateway protocols are EGP and BGP. See RFC 1716 [11] for more information on IP router operations.

WANPIPE Routing

WANPIPE® is a network interface, and does not actually route packets according to IP address, or maintain IP routing information. Packet routing between interfaces is accomplished by the protocol stack, which can send IP based dynamic routing protocols over WANPIPE®. The information and protocols needed for dynamic routing are handled by the protocol stack, and not at the WANPIPE® level. In practice, it is almost always better to use explicit static routing table entries rather than relying on dynamic routing.

Contact Sales

Find a Local Distributor

Look for the Empowered by Sangoma symbol when purchasing Empowered by Sangoma
  • Save money on shipping and products
  • Speak in your native language
  • Get faster service in your own time zone
  • Get Sangoma's lifetime warranty
Find a Distributor

About Sangoma

Sangoma is a leading provider of hardware and software components that enable or enhance IP Communications Systems for both telecom and datacom applications. The product line includes data and telecom boards for media and signal processing as well as gateway appliances and software.

Products | Solutions | Ordering | Support | Company | Privacy Policy | Terms of Service

Industry News

  • What to look for in a communications provider
  • VoIP doesn’t need MPLS to thrive
  • Social technology on the rise in enterprises
  • Understand risks, rewards of VoIP
  • Retailers lack UC knowledge, understanding

© Copyright 2013 Sangoma Technologies. All rights reserved.