View Single Post
  #1   (View Single Post)  
Old 22nd August 2010
bsdplus bsdplus is offline
Real Name: Alan Cheng
Port Guard
 
Join Date: Jun 2009
Location: Shanghai, China
Posts: 21
Default How to add static route using virtual NIC

Hello,

I'd like to add a route on a solaris 10 for the multicast subnet (224.0.0.0) using virtual NIC device, but was not able to do so. "route add" command can add a routing entry using physical NIC. Any help or advices on how to do that on a virtual NIC are appreciated.

some backgroup information:

Here is a solaris 10 that has such route entry configured already, but don't konw how it was done:
$ netstat -rn

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 10.15.44.1 UG 1 191974
10.15.44.0 10.15.44.227 U 1 762935 e1000g0:1
10.15.44.0 10.15.44.207 U 1 0 e1000g0
10.15.44.0 10.15.44.207 U 1 619630 e1000g3
224.0.0.0 10.15.44.227 U 1 0 e1000g0:1 ### (This entry is what I want on another machine)
127.0.0.1 127.0.0.1 UH 6 331210 lo0

NIC configuration on the machine that I want to add static route on:
$ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv 4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=209040843<UP,BROADCAST,RUNNING,MULTICAST,DEP RECATED,IPv4,NOFAILOVER,CoS> mtu 1500 index 2
inet 10.15.44.206 netmask ffffff00 broadcast 10.15.44.255
groupname net1
e1000g0:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv 4,CoS> mtu 1500 index 2
inet 10.15.44.233 netmask ffffff00 broadcast 10.15.44.255
e1000g3: flags=209040843<UP,BROADCAST,RUNNING,MULTICAST,DEP RECATED,IPv4,NOFAILOVER,CoS> mtu 1500 index 3
inet 10.15.44.213 netmask ffffff00 broadcast 10.15.44.255
groupname net1

routing table on the machine I want to add route:
$ route -p show
No persistent routes are defined$ netstat -rn

I tried the following, but "netstat -rn" shows its interface is still e1000g0:

route add -net 224.0.0.0 -netmask 240.0.0.0 10.15.44.233 -ifp e1000g0:1 ( this will add route using device e1000g0, instead of e1000g0:1)
Reply With Quote