<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://clonwiki0.jlab.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=129.57.166.11</id>
	<title>CLONWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://clonwiki0.jlab.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=129.57.166.11"/>
	<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Special:Contributions/129.57.166.11"/>
	<updated>2026-04-13T13:01:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://clonwiki0.jlab.org/wiki/index.php?title=Routing&amp;diff=4451</id>
		<title>Routing</title>
		<link rel="alternate" type="text/html" href="https://clonwiki0.jlab.org/wiki/index.php?title=Routing&amp;diff=4451"/>
		<updated>2009-08-21T16:36:03Z</updated>

		<summary type="html">&lt;p&gt;129.57.166.11: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Solaris&#039;&#039;&#039;: routing can be checked by command:&lt;br /&gt;
&lt;br /&gt;
 netstat -nr&lt;br /&gt;
&lt;br /&gt;
To check traffic for example on &#039;e1000g1&#039; interface type following command, it will show every 2 seconds:&lt;br /&gt;
&lt;br /&gt;
 netstat -I e1000g1 -i 2&lt;br /&gt;
&lt;br /&gt;
For example on &#039;&#039;clondaq2&#039;&#039; it shows following:&lt;br /&gt;
&lt;br /&gt;
 Routing Table: IPv4&lt;br /&gt;
   Destination           Gateway           Flags  Ref   Use   Interface&lt;br /&gt;
 -------------------- -------------------- ----- ----- ------ ---------&lt;br /&gt;
 129.57.68.0          129.57.68.24         U         1      6  e1000g1&lt;br /&gt;
 129.57.69.0          129.57.69.202        U         1      3  e1000g2&lt;br /&gt;
 129.57.167.0         129.57.167.109       U         1    546  e1000g0&lt;br /&gt;
 129.57.16.0          129.57.68.100        UG        1      4  &lt;br /&gt;
 224.0.0.0            129.57.167.109       U         1      0  e1000g0&lt;br /&gt;
 default              129.57.167.99        UG        1    356  &lt;br /&gt;
 127.0.0.1            127.0.0.1            UH        5    180  lo0&lt;br /&gt;
&lt;br /&gt;
In that example traffic was routed to subnet 16 to serve SILO. It was achieved by script &#039;&#039;/etc/rc3.d/S99manualroute&#039;&#039; with following contents:&lt;br /&gt;
&lt;br /&gt;
 #!/sbin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # This script adds a manual route to force traffic to the 16 net&lt;br /&gt;
 # out the NIC that is on the 129.57.68.x lan. &lt;br /&gt;
 #   - P. Letta 04/06/2006&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
 start)&lt;br /&gt;
         /usr/sbin/route add -net 129.57.16.0 -netmask 255.255.252.0 129.57.68.100&lt;br /&gt;
         /usr/sbin/route add -net 129.57.166.0 -netmask 255.255.255.0 129.57.68.100&lt;br /&gt;
         ;;&lt;br /&gt;
 stop)&lt;br /&gt;
         ;;&lt;br /&gt;
 *)&lt;br /&gt;
         echo &amp;quot;Usage: $0 { start }&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Linux&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
== from web ==&lt;br /&gt;
&lt;br /&gt;
If you know there is always going to be a permanent route for a destination then a static route can be a viable option.To add a persistent static route in Redhat Enterprise Linux create a file called route-&amp;lt;int&amp;gt;X in the directory&lt;br /&gt;
 /etc/sysconfig/network-scripts/&lt;br /&gt;
where &amp;lt;int&amp;gt; is the interface number and X is the interface number. As you would expect, these are specified in seperate file for each of the available interface. Example:&lt;br /&gt;
 /etc/sysconfig/network-scripts/route-eth0&lt;br /&gt;
 /etc/sysconfig/network-scripts/route-eth1&lt;br /&gt;
Every entry or a route has three entities as follows:&lt;br /&gt;
 GATEWAY&amp;lt;N&amp;gt;=xxx.xxx.xxx.xxx&lt;br /&gt;
 NETMASK&amp;lt;N&amp;gt;=yyy.yyy.yyy.yyy&lt;br /&gt;
 ADDRESS&amp;lt;N&amp;gt;=zzz.zzz.zzz.zzz&lt;br /&gt;
As the names implies, they are the gateway IP, Netmask and the IP/Network Address. Note the &amp;lt;N&amp;gt; next to each of the three entities. This number defines the route entry number and should be the same on all the entities. Example:&lt;br /&gt;
 GATEWAY0=192.168.1.1&lt;br /&gt;
 NETMASK0=255.255.255.0&lt;br /&gt;
 ADDRESS0=10.10.10.0&lt;br /&gt;
&lt;br /&gt;
 GATEWAY1=192.168.1.1&lt;br /&gt;
 NETMASK1=255.255.255.0&lt;br /&gt;
 ADDRESS1=20.20.20.2&lt;br /&gt;
&lt;br /&gt;
A sample file /etc/sysconfig/static-routes is available for your reference.&lt;br /&gt;
&lt;br /&gt;
Once the file is created, restart the network service as follows:&lt;br /&gt;
&lt;br /&gt;
 # service network restart&lt;br /&gt;
&lt;br /&gt;
To view the routes type&lt;br /&gt;
&lt;br /&gt;
 # route&lt;br /&gt;
 Kernel IP routing table&lt;br /&gt;
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;
 192.168.1.0     *               255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 192.168.2.0     *               255.255.255.0   U     0      0        0 eth1&lt;br /&gt;
 10.10.10.0      *               255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 20.20.20.2      *               255.255.255.0   U     0      0        0 eth0&lt;br /&gt;
 169.254.0.0     *               255.255.0.0     U     0      0        0 eth1&lt;br /&gt;
 default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 # ip route show&lt;br /&gt;
 192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1&lt;br /&gt;
 192.168.2.0/24 dev eth1  proto kernel  scope link  src 192.168.2.1&lt;br /&gt;
 10.10.10.0/24 via 192.168.1.1 dev eth0&lt;br /&gt;
 20.20.20.2/24 via 192.168.1.1 dev eth0&lt;br /&gt;
 default via 192.168.1.1 dev eth0&lt;br /&gt;
&lt;br /&gt;
To dynamically add a route, try the folowing:&lt;br /&gt;
&lt;br /&gt;
 Syntax:&lt;br /&gt;
    # ip route add &amp;lt;Net/IP&amp;gt;/&amp;lt;Mask&amp;gt; via &amp;lt;Gateway&amp;gt; dev &amp;lt;Int&amp;gt;X&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
    # ip route add 10.10.10.0/24 via 192.168.1.1 dev eth0&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 Syntax:&lt;br /&gt;
    # route add [-net|-host] &amp;lt;IP/Net&amp;gt; netmask &amp;lt;Mask&amp;gt; gw &amp;lt;Gateway IP&amp;gt; dev &amp;lt;Int&amp;gt;X&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
    # route add -net 10.10.10.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0&lt;br /&gt;
&lt;br /&gt;
== advise ==&lt;br /&gt;
&lt;br /&gt;
Specify two gateways for two network destinations: (i.e. one external, one internal private network. Two routers/gateways will be specified.)&lt;br /&gt;
 Add internet gateway as before: route add default gw 201.51.31.1 eth0&lt;br /&gt;
 Add second private network: route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.10.254 eth0&lt;br /&gt;
&lt;br /&gt;
See more [http://www.yolinux.com/TUTORIALS/LinuxTutorialNetworking.html here].&lt;/div&gt;</summary>
		<author><name>129.57.166.11</name></author>
	</entry>
</feed>