Sponsored Content
Full Discussion: UNIX Routing Tables
Top Forums UNIX for Dummies Questions & Answers UNIX Routing Tables Post 302960336 by cjcox on Friday 13th of November 2015 06:23:59 PM
Old 11-13-2015
Doesn't really make much sense to say which is closer, however you could at least say that the default gateway of 10.0.0.1 is out through eth1 on the 10.0.0.0/24 network.

Your host knows where the default gateway is and how to get there.... so closeness isn't an issue.

Your host knows about the 10.0.0.0/24 network on eth1 and knows about the 10.1.1.0/24 network on eth0.

All internet traffic will go out eth1 because it doesn't know about those networks and that's where the default gateway can be found.

(assumes that the default gateway knows how to get to those Internet addresses)
This User Gave Thanks to cjcox For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Routing DSL to Unix from Windows

I'm brand new to this forum AND Unix. For obvious reasons. I don't know much at all. I'm 14 and i just got my first UNIX SPARCstation5 SUN computer. Something like that. i set up Solaris 9.1(With the help from my dad), now that i've gotten pertty much everything settled, i would like to route my... (8 Replies)
Discussion started by: SoulCheese
8 Replies

2. UNIX for Advanced & Expert Users

writing database tables into a file in unix

I want to collect the database tables(Ex: Emp,Sal,Bonus...etc) in a file & give this file at the command prompt, when prompted for the tables list at command prompt. How can i do that ? Ex:- Import jason/jason1 tables=emp,sal,bonus log=j1.log i want to change this into Ex:- Import... (3 Replies)
Discussion started by: dreams5617
3 Replies

3. IP Networking

any system call in unix to access ip routing table

hi is there any system call by which ip routing table can be accessed. (1 Reply)
Discussion started by: vinodkumar
1 Replies

4. UNIX for Dummies Questions & Answers

Routing tables

Hey guys, I needed to add a route to my routing table and I got it to work but on reboot it gets removed. Anyone know what file I can add this route to so it stays on the machine after a reboot? (9 Replies)
Discussion started by: kingdbag
9 Replies

5. Shell Programming and Scripting

Converting tables of row data into columns of tables

I am trying to transpose tables listed in the format into format. Any help would be greatly appreciated. Input: test_data_1 1 2 90% 4 3 91% 5 4 90% 6 5 90% 9 6 90% test_data_2 3 5 92% 5 4 92% 7 3 93% 9 2 92% 1 1 92% ... Output:... (7 Replies)
Discussion started by: justthisguy
7 Replies

6. UNIX for Dummies Questions & Answers

HELP me please. UNIX Routing

Hello everybody, I need help: I have to make routing between two different LAN. I have the IP for first network 81.180.75.70 and the mask is 255.255.255.192 and for the second network: 192.168.1.1 and the mask 255.255.255.0 So, each network has only one PC with windows (this is for test),... (0 Replies)
Discussion started by: meorfi
0 Replies

7. UNIX for Advanced & Expert Users

HELP me please. UNIX Routing

Hello everybody, I need help: I have to make routing between two different LAN. I have the IP for first network 81.180.75.70 and the mask is 255.255.255.192 and for the second network: 192.168.1.1 and the mask 255.255.255.0 So, each network has only one PC with windows (this is for test),... (11 Replies)
Discussion started by: meorfi
11 Replies

8. Shell Programming and Scripting

Howto compare the columns of 2 diff tables of 2 different schemas in UNIX shell script

HI All, I am new to Unix shell scripts.. Could you please post the unix shell script for for the below request., There are two different tables(sample1, sample2) in different schemas(s_schema1, s_schema2). Unix shell script to compare the columns of two different tables of two... (2 Replies)
Discussion started by: Rajkumar Gopal
2 Replies

9. Shell Programming and Scripting

How to use V$tables in UNIX shell script?

Hi All, In my script I have used the below code to retrieve the instance name V_INSTANCE_NAME=`sqlplus -s ${APPS_USR_PSWD} <<+ set pagesize 0 linesize 256 feedback off verify off head off echo off set serveroutput off select... (2 Replies)
Discussion started by: kalidoss
2 Replies

10. HP-UX

Unable to send attachment with html tables in UNIX shell script

Heyy, any help would be grateful.... LOOKING FOR THE WAYS TO SEND AN EMAIL WITH ATTACHMENT & HTML TABLES IN BODY THROUGH SHELL SCRIPT (LINUX)..NOT SURE, IF WE HAVE ANY INBUILT HTML TAG OR UNIX COMMAND TO SEND THE ATTACHMENTS. KINDLY HELP below is small script posted for our understanding..... (2 Replies)
Discussion started by: Harsha Vardhan
2 Replies
routing(7P)							     Protocols							       routing(7P)

NAME
routing - system support for packet network routing DESCRIPTION
The network facilities provide general packet routing. The routing interface described here can be used to maintain the system's IPv4 rout- ing table. It has been maintained for compatibility with older applications. The recommended interface for maintaining the system's routing tables is the routing socket, described at route(7P). The routing socket can be used to manipulate both the IPv4 and IPv6 routing tables of the system. Routing table maintenance may be implemented in applications processes. A simple set of data structures compose a "routing table" used in selecting the appropriate network interface when transmitting packets. This table contains a single entry for each route to a specific network or host. The routing table was designed to support routing for the Internet Protocol (IP), but its implementation is protocol independent and thus it may serve other protocols as well. User programs may manipulate this data base with the aid of two ioctl(2) commands, SIOCADDRT and SIOCDELRT. These commands allow the addition and deletion of a single routing table entry, respectively. Routing table manipulations may only be carried out by privileged user. A routing table entry has the following form, as defined in /usr/include/net/route.h: struct rtentry { unit_t rt_hash; /* to speed lookups */ struct sockaddr rt_dst; /* key */ struct sockaddr rt_gateway; /* value */ short rt_flags; /* up/down?, host/net */ short rt_refcnt; /* # held references */ unit_t rt_use; /* raw # packets forwarded */ /* * The kernel does not use this field, and without it the structure is * datamodel independent. */ #if !defined(_KERNEL) struct ifnet *rt_ifp; /* the answer: interface to use */ #endif /* !defined(_KERNEL) */ }; with rt_flags defined from: #define RTF_UP 0x1 /* route usable */ #define RTF_GATEWAY 0x2 /* destination is a gateway */ #define RTF_HOST 0x4 /* host entry (net otherwise) */ There are three types of routing table entries: those for a specific host, those for all hosts on a specific network, and those for any destination not matched by entries of the first two types, called a wildcard route. Each network interface installs a routing table entry when it is initialized. Normally the interface specifies if the route through it is a "direct" connection to the destination host or net- work. If the route is direct, the transport layer of a protocol family usually requests the packet be sent to the same host specified in the packet. Otherwise, the interface may be requested to address the packet to an entity different from the eventual recipient; essen- tially, the packet is forwarded. Routing table entries installed by a user process may not specify the hash, reference count, use, or interface fields; these are filled in by the routing routines. If a route is in use when it is deleted, meaning its rt_refcnt is non-zero, the resources associated with it will not be reclaimed until all references to it are removed. User processes read the routing tables through the /dev/ip device. The rt_use field contains the number of packets sent along the route. This value is used to select among multiple routes to the same desti- nation. When multiple routes to the same destination exist, the least used route is selected. A wildcard routing entry is specified with a zero destination address value. Wildcard routes are used only when the system fails to find a route to the destination host and network. The combination of wildcard routes and routing redirects can provide an economical mechanism for routing traffic. ERRORS
EEXIST A request was made to duplicate an existing entry. ESRCH A request was made to delete a non-existent entry. ENOBUFS Insufficient resources were available to install a new route. ENOMEM Insufficient resources were available to install a new route. ENETUNREACH The gateway is not directly reachable. For example, it does not match the destination/subnet on any of the network inter- faces. FILES
/dev/ip IP device driver SEE ALSO
route(1M), ioctl(2), route(7P) SunOS 5.11 9 Nov 1999 routing(7P)
All times are GMT -4. The time now is 07:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy