Bernd Schemmer wrote:
A I understand it I can use the usesrc option of the ifconfig command and a vni 
interface to configure the default source address used for a network interface 
with multiple IP addresses in OpenSolaris/Solaris 10.

And in my understanding to use this feature I must configure the desired IP address twice 
- once for the "physical interface" (bge0, bge0:1 or something like this) and 
once for the vni interface.

e.g.

(bash):[EMAIL PROTECTED]:/root # ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 
index 1
        inet 127.0.0.1 netmask ff000000
vni0: flags=20010100c0<RUNNING,NOARP,NOXMIT,IPv4,VIRTUAL> mtu 0 index 2
        inet 192.168.178.202 netmask ffffff00
bge0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 3
        inet 192.168.178.101 netmask ffffff00 broadcast 192.168.178.255
        ether 0:c0:9f:f4:6a:3c
bge0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.178.202 netmask ffffff00 broadcast 192.168.178.255
bge0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.178.245 netmask ffffff00 broadcast 192.168.178.255

In this example I want to use the IP address 192.168.178.202 as default source 
address for outbound IP traffic on the bge0 interface.

Now a
ifconfig bge0 usesrc vni0

should do it.

Yes, the above will cause the locally generated outbound packets (going out through bge0) to prefer the address hosted on vni0 (i.e 192.168.178.202) as the source address.


It this a correct usage of this feature?

Another question:

If I use the same network adapter for other networks and for zones - which 
source IP address is then used for outbound traffic from inside the zone or if 
I connect to other networks via this network adapter?


Have you taken a look at the zones related examples in the ifconfig(1M) man page ? If that doesn't help, let us know.

ashish

e.g. which source IP address is used after issuing
ifconfig bge0 usesrc vni0:1

in this example?

(bash):[EMAIL PROTECTED]:/root # ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 
index 1
        inet 127.0.0.1 netmask ff000000
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 
index 1
        zone testzone003
        inet 127.0.0.1 netmask ff000000
lo0:2: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 
index 1
        zone testzone004
        inet 127.0.0.1 netmask ff000000
vni0: flags=20010100c1<UP,RUNNING,NOARP,NOXMIT,IPv4,VIRTUAL> mtu 0 index 2
        inet 192.168.199.1 netmask ffffff00
vni0:1: flags=20010100c0<RUNNING,NOARP,NOXMIT,IPv4,VIRTUAL> mtu 0 index 2
        inet 192.168.178.245 netmask ffffff00
bge0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 3
        inet 192.168.178.101 netmask ffffff00 broadcast 192.168.178.255
        ether 0:c0:9f:f4:6a:3c
bge0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 10.11.12.2 netmask fffffff8 broadcast 10.11.12.7
bge0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        zone testzone003
        inet 192.168.1.50 netmask ffffff00 broadcast 192.168.1.255
bge0:3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        zone testzone004
        inet 192.168.178.202 netmask ffffff00 broadcast 192.168.178.255
bge0:4: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.178.245 netmask ffffff00 broadcast 192.168.178.255
(bash):[EMAIL PROTECTED]:/root #

regards

Bernd
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to