Wen Xu
|
how to use psudo-interface instead of physcial interface to network
|
Wen Xu
12/20/2011 4:02 PM
post90699
|
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)?
|
|
|
Sean Boudreau(deleted)
|
Re: how to use psudo-interface instead of physcial interface to
network
|
Sean Boudreau(deleted)
12/20/2011 4:14 PM
post90700
|
Re: how to use psudo-interface instead of physcial interface to
network
Never assign one to en0 to begin with or:
# ifconfig en0 delete
Or
# ifconfig en0 -alias 10.4.0.10
-seanb
----- Original Message -----
From: Wen Xu [mailto:community-noreply@qnx.com]
Sent: Tuesday, December 20, 2011 04:02 PM
To: technology-networking <post90699@community.qnx.com>
Subject: 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)?
_______________________________________________
Technology
http://community.qnx.com/sf/go/post90699
|
|
|
Wen Xu
|
Re: how to use psudo-interface instead of physcial interface to network
|
Wen Xu
12/20/2011 5:35 PM
post90702
|
Re: how to use psudo-interface instead of physcial interface to network
Hi Sean. Thank you for your reply.
I tried the "delete". The host could not ping outside any more.
e.g.
# 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
# ping 10.4.0.6
PING 10.4.0.6 (10.4.0.6): 56 data bytes
64 bytes from 10.4.0.6: icmp_seq=0 ttl=128 time=0 ms
64 bytes from 10.4.0.6: icmp_seq=1 ttl=128 time=0 ms
64 bytes from 10.4.0.6: icmp_seq=2 ttl=128 time=0 ms
64 bytes from 10.4.0.6: icmp_seq=3 ttl=128 time=0 ms
----10.4.0.6 PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms variance = 0 ms^2
# ifconfig en0 delete
# 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>
address: 00:22:e5:1f:12:ea
media: Ethernet 100baseTX full-duplex
status: active
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 14
vlan: 2 parent: en0
address: 00:22:e5:1f:12:ea
inet 10.4.0.20 netmask 0xff000000 broadcast 10.255.255.2
#
#
# ping 10.4.0.6
PING 10.4.0.6 (10.4.0.6): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
----10.4.0.6 PING Statistics----
6 packets transmitted, 0 packets received, 100% packet loss
|
|
|
Sean Boudreau(deleted)
|
Re: how to use psudo-interface instead of physcial interface to
network
|
Sean Boudreau(deleted)
12/20/2011 6:40 PM
post90703
|
Re: how to use psudo-interface instead of physcial interface to
network
The host in question has to be on the same vlan.
Regards,
-seanb
----- Original Message -----
From: Wen Xu [mailto:community-noreply@qnx.com]
Sent: Tuesday, December 20, 2011 05:35 PM
To: technology-networking <post90702@community.qnx.com>
Subject: Re: how to use psudo-interface instead of physcial interface to network
Hi Sean. Thank you for your reply.
I tried the "delete". The host could not ping outside any more.
e.g.
# 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
# ping 10.4.0.6
PING 10.4.0.6 (10.4.0.6): 56 data bytes
64 bytes from 10.4.0.6: icmp_seq=0 ttl=128 time=0 ms
64 bytes from 10.4.0.6: icmp_seq=1 ttl=128 time=0 ms
64 bytes from 10.4.0.6: icmp_seq=2 ttl=128 time=0 ms
64 bytes from 10.4.0.6: icmp_seq=3 ttl=128 time=0 ms
----10.4.0.6 PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms variance = 0 ms^2
# ifconfig en0 delete
# 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>
address: 00:22:e5:1f:12:ea
media: Ethernet 100baseTX full-duplex
status: active
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 14
vlan: 2 parent: en0
address: 00:22:e5:1f:12:ea
inet 10.4.0.20 netmask 0xff000000 broadcast 10.255.255.2
#
#
# ping 10.4.0.6
PING 10.4.0.6 (10.4.0.6): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
----10.4.0.6 PING Statistics----
6 packets transmitted, 0 packets received, 100% packet loss
_______________________________________________
Technology
http://community.qnx.com/sf/go/post90702
|
|
|
Wen Xu
|
Re: how to use psudo-interface instead of physcial interface to network
|
Wen Xu
12/21/2011 5:18 PM
post90730
|
Re: how to use psudo-interface instead of physcial interface to network
Sean,
I set up another box with similar configuration, both on vlan 2. But they still could not ping each other. The two boxes
are connected to the same LAN.
e.g.
one box:
# 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 1
address: 00:22:e5:1f:1a:4c
media: Ethernet none full-duplex
status: active
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1496
vlan: 2 parent: en0
address: 00:22:e5:1f:1a:4c
inet 10.4.0.14 netmask 0xff000000 broadcast 10.255.255.255
# ping 10.4.0.10
PING 10.4.0.10 (10.4.0.10): 56 data bytes
----10.4.0.10 PING Statistics----
76 packets transmitted, 0 packets received, 100% packet loss
#########
the other box
# 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
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.10 netmask 0xff000000 broadcast 10.255.255.255
# ping 10.4.0.14
PING 10.4.0.14 (10.4.0.14): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
...
----10.4.0.14 PING Statistics----
30 packets transmitted, 0 packets received, 100% packet loss
###########
Anything is wrong with the configuration?
Thanks.
|
|
|
Wen Xu
|
Re: how to use psudo-interface instead of physcial interface to network
|
Wen Xu
12/21/2011 5:43 PM
post90731
|
Re: how to use psudo-interface instead of physcial interface to network
Sean,
if I configure the same IPs on the physical itnerfaces, ping works well.
e.g.
one box:
# 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:1a:4c
media: Ethernet none full-duplex
status: active
inet 10.4.0.14 netmask 0xfffe0000 broadcast 10.5.255.255
# ping 10.4.0.10
PING 10.4.0.10 (10.4.0.10): 56 data bytes
----10.4.0.10 PING Statistics----
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 2/5/20 ms variance = 39 ms^2
########
The other box:
# 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
# ping 10.4.0.14
PING 10.4.0.14 (10.4.0.14): 56 data bytes
64 bytes from 10.4.0.14: icmp_seq=0 ttl=128 time=1 ms
64 bytes from 10.4.0.14: icmp_seq=1 ttl=255 time=1 ms
----10.4.0.14 PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 1/1/1 ms variance = 0 ms^2
|
|
|
Wen Xu
|
Re: how to use psudo-interface instead of physcial interface to network
|
Wen Xu
12/21/2011 10:50 PM
post90734
|
Re: how to use psudo-interface instead of physcial interface to network
Sean,
in the other post, there seems to be the similar problem:
http://community.qnx.com/sf/discussion/do/listPosts/projects.networking/discussion.technology.topc3860
The thing I don't understand is that Santosh said he used " revision 400 of trunk"..
What is that?
In my case, the two boxes are plugged into two ports of a same switch. I don't know
whether the switch has dot1q vlan enabled. If both boxes can ping each other with IP addr associated with physical
interfaces. However if they use VLAN interfaces (on the same vlan),they cannot ping each other.
Thanks and happy holidays!
|
|
|
|