Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Solaris Logic to transmit traffic to physical interfaces ( eg ce0 and ce1) Post 302720185 by shamrock on Tuesday 23rd of October 2012 02:22:53 PM
Old 10-23-2012
From the routing manpage...
Code:
Routing Algorithm
      The routing table entries are of three types:

           +  Entries for a specific host.
           +  Entries for all hosts on a specific network.
           +  Wildcard entries for any destination not matched by entries of
              the first two types.

      To select a route for forwarding an IP packet, the network facilities
      select the complete set of "matching" routing table entries from the
      routing table. A routing table entry is considered a match, if the
      result of the bit-wise AND operation between the netmask in the
      routing entry and the IP packet's destination address equals to the
      destination address in the routing entry.

      The network facilities then select from the set the routing entries
      that have the longest netmask.  The length of a netmask is defined as
      the number of contiguous 1 bits starting from the leftmost bit
      position in the 32-bit netmask field. In other words, the network
      facilities select the routing entry that specifies the narrowest range
      of IP addresses.  For example, the host route entry that has a
      destination/netmask pair of (147.253.56.1, 0xffffffff), is more
      specific than the network route entry that has a destination/netmask
      pair of (147.253.56.0, 0xfffffe00), therefore the network facilities
      select the host route entry. The default route by default has a
      destination/netmask pair of (0,0). Therefore the default route matches
      all destinations but it is also the least specific.  The default route
      will be selected only if there is not a more specific route.

      There may still be multiple routing entries remaining. In that case
      the IP packet is routed over the first entry displayed by netstat -r.
      Such multiple routes include:

           +  Two or more routes to a host via different gateways.
           +  Two or more routes to a network via different gateways.
           +  Two default routes.

      A superuser can change entries in the table by using the route command
      (see route(1M), or by information received in Internet Control Message
      Protocol (ICMP) redirect messages.

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

adding interfaces in solaris 9

Hi, Have a solaris 9 e420, one onboard nic. Now I added a quad nic card. I have never had more than a single interface. Any help on setting this new card up? or links? PLease? ; thanks! (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

2. Solaris

ce0 and ce1 have the same mac address

i have ce0 and ce1 online, on 2 different networks. im getting a message that says one nic is trying to assume the others IP or something to thta effect. I do ifconfig -a and i see they have the same mac. How do i deal with this? Solaris 9 i beleive 04/04 Thanks, Brian (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

3. UNIX for Dummies Questions & Answers

Configuring networking interfaces on Solaris 10

Hi, I am trying to configure an ip address, netmask, and default gateway on my solaris machine. For example, in Linux I would do the following command: #ifconfig eth0 xx.xx.xx.xx netmask 255.0.0.0 #add route or route add default xxx.xxx.xxx.xxx In Solaris 10, I believe the commands are... (7 Replies)
Discussion started by: annointed3
7 Replies

4. UNIX for Dummies Questions & Answers

Traffic count in Solaris

Hello, Iam looking for a solution to keep track on my traffic usuage, monthly usuage. Anybody could recommend anything? /empty (2 Replies)
Discussion started by: empty
2 Replies

5. Solaris

IPMP on 2 physical interfaces

Hi Community, I've a problem with IPMP: I have 2 physical interfaces, 1 "physical IP" and 1 VirtualIP. My question is: is it possible to have IPMP configuring 2 physical interfaces with the same "physical" IP Address? for example: ce0 10.10.10.10 ce5 10.10.10.10 and VIP... (5 Replies)
Discussion started by: Sunb3
5 Replies

6. Solaris

list of physical net interfaces

hi, Can I listdown all available net interfaces on my system like SF4800 or Netra440. I know there are 4 port physically present but I can't see or list them using either sysdef -v prtconf -vp prtdiag -v dladm kstat may be I'm missing switched on these or may some other command... (8 Replies)
Discussion started by: busyboy
8 Replies

7. IP Networking

Route all traffic between two ethernet interfaces

I have a Linux box with 3 ethernet cards: - eth0 - connected to internet (dhcp) - eth1 - 192.168.0.1 connected to embedded device1 - eth2 - 192.168.0.1 also connected to embedded device2 (both eth1/eth2 have to be in identical, though separate, private networks). Also, on eth0 I have two... (1 Reply)
Discussion started by: kontozebyoszuka
1 Replies

8. Solaris

Solaris 8: Multiple primary interfaces connected to the same network

Hello, I have a machine with Solaris 8, and it has multiple interfaces that are connected to the same network which means they all have metric 0 (1 hop) to the default gateway. assume: * e1000g0: 10.1.1.70 * e1000g2: 10.1.1.72 * e1000g4: 10.1.1.74 * e1000g5: 10.1.1.76 * gateway:... (11 Replies)
Discussion started by: aeg
11 Replies

9. Solaris

Configure ce0 as ce4000 in Solaris 9 ?

can we configure the ce0 and ce1 interface as ce4000 and ce5000 in solaris 9 I have a server configured similar way.. I need to setup another two server in such configuration find the sample output from working server. Please help root@judi::/dev# ifconfig -a lo0:... (3 Replies)
Discussion started by: judi
3 Replies

10. Solaris

Migration of Solaris 10 on physical host to Solaris Zones

Hi All Kindly let me know how can I move Solaris 10 OS running update 10 on physical machine to another machine solaris zone running Solaris 10 update 11 (2 Replies)
Discussion started by: amity
2 Replies
route(7)						 Miscellaneous Information Manual						  route(7)

NAME
route - Kernel packet forwarding database SYNOPSIS
#include <sys/socket.h> #include <net/if.h> #include <net/route.h> int family s = socket(PF_ROUTE, SOCK_RAW, family); DESCRIPTION
The UNIX operating system provides packet routing facilities. The kernel maintains a routing information database, which is used in selecting the appropriate network interface when transmitting packets. A user process (or possibly multiple cooperating processes) maintains this database by sending messages over a special kind of socket. Routing table changes may only be carried out by the superuser. The operating system may spontaneously emit routing messages in response to external events, such as receipt of a redirect, or failure to locate a suitable route for a request. Routing database entries are of two types: those for a specific host, and those for all hosts on a generic subnetwork (as specified by a bit mask and value under the mask). The effect of a wildcard or default route may be achieved by using a mask of all zeros. There may be hierarchical routes. When the system is booted and addresses are assigned to the network interfaces, each protocol family installs a routing table entry for each interface when it is ready for traffic. Normally the protocol specifies the route through each interface as a ``direct'' connection to the destination host or network. If the route is direct, the transport layer of a protocol family usually requests that the packet be sent to the host specified in the packet. Otherwise, the interface is requested to address the packet to the gateway listed in the routing entry (that is, the packet is forwarded). When routing a packet, the kernel first attempts to find a route to the destination host. Failing that, a search is made for a route to the network of the destination. Finally, any route to a default (wildcard) gateway is chosen. If no entry is found, the destination is declared to be unreachable, and an error message is generated if there are any listeners on the routing control socket described later in this section. 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. To open the channel for passing routing control messages, use the socket call shown in the SYNOPSIS section. The family parameter may be AF_UNSPEC which will provide routing information for all address families, or can be restricted to a specific address family by specifying which one is desired. There can be more than one routing socket open per system. Messages are formed by a header followed by a small number of sockaddrs (now variable length), interpreted by position, and delimited by the new length entry in the sockaddr. An example of a message with four addresses might be an ISO redirect: destination, netmask, gateway, and author of the redirect. The interpretation of which addresses are present is given by a bit mask within the header, and the sequence is least significant to most significant bit within the vector. Any messages sent to the kernel are returned, and copies are sent to all interested listeners. The kernel will provide the process ID for the sender, and the sender may use an additional sequence field to distinguish between outstanding messages. However, message replies may be lost when kernel buffers are exhausted. The kernel may reject certain messages, and will indicate this by filling in the rtm_errno field. In the current implementation, all rout- ing process run locally, and the values for rtm_errno are available through the normal errno mechanism, even if the routing reply message is lost. A process may avoid the expense of reading replies to its own messages by issuing a setsockopt() call indicating that the SO_USELOOPBACK option at the SOL_SOCKET level is to be turned off. A process may ignore all messages from the routing socket by shutting down further input with the shutdown() function. If a route is in use when it is deleted, the routing entry will be marked down and removed from the routing table, but the resources asso- ciated with it will not be reclaimed until all references to it are released. User processes can obtain information about the routing entry to a specific destination by using a RTM_GET message, or by reading the /dev/kmem device. ERRORS
If messages are rejected, rtm_errno may be set to one of the following values: The entry to be created already exists. The entry to be deleted does not exist. Insufficient resources were available to install a new route. delim off route(7)
All times are GMT -4. The time now is 12:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy