Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - how to use psudo-interface instead of physcial interface to network: Page 1 of 7 (7 Items)
   
how to use psudo-interface instead of physcial interface to network  
Hi,

the scenario is that the physical interface en0 is up and configured.
The host can reach and be reachable though the IP address that 
configured on en0, e.g. 10.4.0.10

My intention is to remove the IP associate with the physical interface. Instead,
I want to create some vlan interfaces over parent interface en0, say Vlan0.
I configure it's IP address as 10.4.0.20, which is on the same 10.4.x.x lan segment. However this IP is not pingable 
from outside.

This is the original ifconfig:

# ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu 1500
        address: 00:22:e5:1f:12:ea
        media: Ethernet 100baseTX full-duplex
        status: active
        inet 10.4.0.10 netmask 0xfffe0000 broadcast 10.5.255.255

Then I create psudo interface vlan0 with vlan number 2 on parent interface en0.
And then I give it the IP address 10.4.0.20 and netmask 255.254.0.0

#ifconfig vlan0 create
#ifconfig vlan0 vlan2 vlanif en0
#ifconfig vlan0 10.4.0.20 
#ifconfig vlan0 netmask 255.254.0.0

The current configuration is:

# ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu 1500
        address: 00:22:e5:1f:12:ea
        media: Ethernet 100baseTX full-duplex
        status: active
        inet 10.4.0.10 netmask 0xfffe0000 broadcast 10.5.255.255
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1496
        vlan: 2 parent: en0
        address: 00:22:e5:1f:12:ea
        inet 10.4.0.20 netmask 0xff000000 broadcast 10.255.255.255

My questions is
 how to  remove the IP from the physical interface en0 and then make 
the host comunicate with outside with 10.4.0.20 (vlan0)?