IDKCS007954
The Complete Guide to Linux Routing WrittenSep 12, 2017

 
Attachments0
  

Product Categories
Operating System

 Objective
This article describes the recommended method for setting up Linux Routing. The article is intended to address all routing scenarios that are common place on Teradata nodes.

Environment/Conditions/Configuration
​SLES


Procedure
Step 1: Configure the CLAN (Customer LAN) Interface First

  • Step 1a: The default gateway should be the CLAN gateway since that will be the gateway that knows how to route to most if not all subnets in the customer network. Make sure it is the same on all nodes. The default gateway is configured in /etc/sysconfig/network/routes and should look similar to this. Replace the IP Address with your default gateway IP Address. Note the two dashes at the end separated by a space. There is no need to specify an interface name.

    • default 153.64.115.254 - -

    Do not add more than one entry to /etc/sysconfig/network/routes.

    Step 1b: If you have more than one interface on the same CLAN subnet then Source IP Routing must be setup for all interfaces on this subnet to ensure return traffic is routed back out the NIC it came in on. This is described in KAP1ABEF6.


Step 2: Configure any Additional Network Interfaces

  • Step 2a: If there is more than one interface on the same subnet and this is a private network then you should change the configuration to use multiple subnets. Subnets segregate traffic. This simplifies the configuration since you would no longer have to configure any of the steps below.

    Step 2b: If there is more than one interface on the same subnet then Source IP Routing must be setup for all interfaces on this subnet to ensure return traffic is routed back out the NIC it came in on. This is described in KAP1ABEF6.

    Step 2c: If the subnet has its own gateway then Source IP Routing must be setup on this interface to ensure return traffic is routed back out the NIC it came in on and then to this subnets gateway. This is described in KAP1ABEF6.

    Step 2d: This is normally a rare case because Teradata nodes generally receive connections from client machines. However, if the Teradata node will be initiating connections to subnets that are unknown to the node and these connections must be routed through a subnets gateway then configure a static route. For example, if the eth4 interface had a gateway 10.213.8.1 and the Teradata node had to initiate a connection to the 192.10.0.0/16 network through this gateway then you would create /etc/sysconfig/network/ifroute-eth4 with the following line:


    • 192.10.0.0/16 10.213.8.1

    You may add more than one static route to an ifroute-ethX file.

Special Considerations

Additional Information
For a given IP address and netmask, you can use ipcalc to display some useful information such as the range of IP addresses for that network, the network address and the netmask in dotted or prefixlen format.

  • # ipcalc 142.117.118.232/22
    # ipcalc 142.117.118.232/255.255.252.0


    Address:   142.117.118.232      10001110.01110101.011101 10.11101000
    Netmask:   255.255.252.0 = 22   11111111.11111111.111111 00.00000000
    Wildcard:  0.0.3.255            00000000.00000000.000000 11.11111111
    =>
    Network:   142.117.116.0/22     10001110.01110101.011101 00.00000000
    HostMin:   142.117.116.1        10001110.01110101.011101 00.00000001
    HostMax:   142.117.119.254      10001110.01110101.011101 11.11111110
    Broadcast: 142.117.119.255      10001110.01110101.011101 11.11111111
    Hosts/Net: 1022                  Class B