Re: [Vserver] interfaces show ip addresses?
On Wed, Oct 06, 2004 at 11:24:18PM -0400, Gregory (Grisha) Trubetskoy wrote: > > OK, this isn't over yet :-) > > I just compiled and installed 2.6.8.1-vs1.9.3-rc2.1, with > util-vserver-0.30.195 on a freshly installed FC1 machine. > > Created a vserver, created a config (using the new utils method) when i > start it (with or without hide_netif in the flags file), the interface is > NOT created (ifconfig does not show it from either outside or inside), yet > I can ping the IP number and ssh to the vserver from outside. > > I noticed a listdevip tool in utils, it shows: > > # ./listdevip > 127.0.0.1/255.0.0.0 > 192.168.1.105/255.255.255.0 > 192.168.1.130/255.255.255.0 > > The .130 address is the vserver. > > Is this normal? yes ;) probably the missing piece you are looking for is the 'alias' option, if you use that for an ip assigned to a vserver, a named alias (e.g. eth0:0) will be created for this IP, this alias will be visible with ifconfig and will also be shown inside the vserver (with ifconfig and friends), the 'default' is to create just the IP (no alias) and this should be showns inside and outside with 'ip addr show' HTH, Herbert PS: 2.6.8.1-vs1.9.3-rc2.1 is a backport and it might have some issues, so if you can not get this working please keep buging me ;) > More info: > > The exact config: > > # find . -type f -print -exec cat {} \; > ./context > 1000 > ./flags > lock > ./uts/nodename > test.ispol.com > ./nice > 9 > ./interfaces/0/dev > eth0 > ./interfaces/0/ip > 192.168.1.130 > ./interfaces/0/bcast > 192.168.1.255 > ./interfaces/0/mask > 255.255.255.0 > ./fstab > none/dev/ptsdevpts gid=5,mode=620 0 0 > none/proc procdefaults0 0 > > >From inside the vserver: > > # ifconfig -a > eth0 Link encap:Ethernet HWaddr 00:30:1B:33:8E:9E > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:590 errors:0 dropped:0 overruns:0 frame:0 > TX packets:367 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:55077 (53.7 Kb) TX bytes:75701 (73.9 Kb) > Interrupt:209 Base address:0x9000 > > >From outside: > > # ifconfig -a > eth0 Link encap:Ethernet HWaddr 00:30:1B:33:8E:9E > inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0 > inet6 addr: fe80::230:1bff:fe33:8e9e/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:626 errors:0 dropped:0 overruns:0 frame:0 > TX packets:387 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:58251 (56.8 Kb) TX bytes:79517 (77.6 Kb) > Interrupt:209 Base address:0x9000 > > loLink encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > inet6 addr: ::1/128 Scope:Host > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:16 errors:0 dropped:0 overruns:0 frame:0 > TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:1240 (1.2 Kb) TX bytes:1240 (1.2 Kb) > > sit0 Link encap:IPv6-in-IPv4 > NOARP MTU:1480 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) > > > > > Thanks, > > Grisha > > On Wed, 6 Oct 2004, Herbert Poetzl wrote: > > >On Wed, Oct 06, 2004 at 04:28:03PM -0400, Gregory (Grisha) Trubetskoy > >wrote: > >> > >>In vs 1.9.3 I noticed that ifconfig from within a vserver shows the inet > >>addr of eth0 and lo (in 1.2x it did not) - is this the way it's supposed > >>to be, or am I missing a configuration option of some kind? > > > >yes! (yes or yes) > > > >it is supposed to be so, and you are probably looking > >for VXF_HIDE_NETIF ... > > > >HTH, > >Herbert > > > >>Thanks! > >> > >>Grisha > >>___ > >>Vserver mailing list > >>[EMAIL PROTECTED] > >>http://list.linux-vserver.org/mailman/listinfo/vserver > > ___ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] interfaces show ip addresses?
After some script reading, this tuns out to be documented: name When this file exists, the interface will be named with the text in this file. Without such an entry, the IP will not be shown by 'ifconfig' but by 'ip addr ls' only. Such a labeled interface is known as an "alias" also (e.g. 'eth0:foo'). ...sorry to clutter the list, but perhaps someone will find it helpful. Grisha On Wed, 6 Oct 2004, Gregory (Grisha) Trubetskoy wrote: OK, this isn't over yet :-) I just compiled and installed 2.6.8.1-vs1.9.3-rc2.1, with util-vserver-0.30.195 on a freshly installed FC1 machine. Created a vserver, created a config (using the new utils method) when i start it (with or without hide_netif in the flags file), the interface is NOT created (ifconfig does not show it from either outside or inside), yet I can ping the IP number and ssh to the vserver from outside. I noticed a listdevip tool in utils, it shows: # ./listdevip 127.0.0.1/255.0.0.0 192.168.1.105/255.255.255.0 192.168.1.130/255.255.255.0 The .130 address is the vserver. Is this normal? More info: The exact config: # find . -type f -print -exec cat {} \; ./context 1000 ./flags lock ./uts/nodename test.ispol.com ./nice 9 ./interfaces/0/dev eth0 ./interfaces/0/ip 192.168.1.130 ./interfaces/0/bcast 192.168.1.255 ./interfaces/0/mask 255.255.255.0 ./fstab none/dev/ptsdevpts gid=5,mode=620 0 0 none/proc procdefaults0 0 From inside the vserver: # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:30:1B:33:8E:9E UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:590 errors:0 dropped:0 overruns:0 frame:0 TX packets:367 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:55077 (53.7 Kb) TX bytes:75701 (73.9 Kb) Interrupt:209 Base address:0x9000 From outside: # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:30:1B:33:8E:9E inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::230:1bff:fe33:8e9e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:626 errors:0 dropped:0 overruns:0 frame:0 TX packets:387 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:58251 (56.8 Kb) TX bytes:79517 (77.6 Kb) Interrupt:209 Base address:0x9000 loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1240 (1.2 Kb) TX bytes:1240 (1.2 Kb) sit0 Link encap:IPv6-in-IPv4 NOARP MTU:1480 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Thanks, Grisha On Wed, 6 Oct 2004, Herbert Poetzl wrote: On Wed, Oct 06, 2004 at 04:28:03PM -0400, Gregory (Grisha) Trubetskoy wrote: In vs 1.9.3 I noticed that ifconfig from within a vserver shows the inet addr of eth0 and lo (in 1.2x it did not) - is this the way it's supposed to be, or am I missing a configuration option of some kind? yes! (yes or yes) it is supposed to be so, and you are probably looking for VXF_HIDE_NETIF ... HTH, Herbert Thanks! Grisha ___ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver ___ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] interfaces show ip addresses?
OK, this isn't over yet :-) I just compiled and installed 2.6.8.1-vs1.9.3-rc2.1, with util-vserver-0.30.195 on a freshly installed FC1 machine. Created a vserver, created a config (using the new utils method) when i start it (with or without hide_netif in the flags file), the interface is NOT created (ifconfig does not show it from either outside or inside), yet I can ping the IP number and ssh to the vserver from outside. I noticed a listdevip tool in utils, it shows: # ./listdevip 127.0.0.1/255.0.0.0 192.168.1.105/255.255.255.0 192.168.1.130/255.255.255.0 The .130 address is the vserver. Is this normal? More info: The exact config: # find . -type f -print -exec cat {} \; ./context 1000 ./flags lock ./uts/nodename test.ispol.com ./nice 9 ./interfaces/0/dev eth0 ./interfaces/0/ip 192.168.1.130 ./interfaces/0/bcast 192.168.1.255 ./interfaces/0/mask 255.255.255.0 ./fstab none/dev/ptsdevpts gid=5,mode=620 0 0 none/proc procdefaults0 0 From inside the vserver: # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:30:1B:33:8E:9E UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:590 errors:0 dropped:0 overruns:0 frame:0 TX packets:367 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:55077 (53.7 Kb) TX bytes:75701 (73.9 Kb) Interrupt:209 Base address:0x9000 From outside: # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:30:1B:33:8E:9E inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::230:1bff:fe33:8e9e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:626 errors:0 dropped:0 overruns:0 frame:0 TX packets:387 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:58251 (56.8 Kb) TX bytes:79517 (77.6 Kb) Interrupt:209 Base address:0x9000 loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1240 (1.2 Kb) TX bytes:1240 (1.2 Kb) sit0 Link encap:IPv6-in-IPv4 NOARP MTU:1480 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Thanks, Grisha On Wed, 6 Oct 2004, Herbert Poetzl wrote: On Wed, Oct 06, 2004 at 04:28:03PM -0400, Gregory (Grisha) Trubetskoy wrote: In vs 1.9.3 I noticed that ifconfig from within a vserver shows the inet addr of eth0 and lo (in 1.2x it did not) - is this the way it's supposed to be, or am I missing a configuration option of some kind? yes! (yes or yes) it is supposed to be so, and you are probably looking for VXF_HIDE_NETIF ... HTH, Herbert Thanks! Grisha ___ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver ___ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] interfaces show ip addresses?
Strange... after a reboot it behaves differently - pretty much gives me what I need - hide the IP of eth0, but show the vserver IP. Before it would hide all interfaces sompletely. Not sure what happened there... Grisha On Wed, 6 Oct 2004, Gregory (Grisha) Trubetskoy wrote: On Wed, 6 Oct 2004, Herbert Poetzl wrote: On Wed, Oct 06, 2004 at 04:28:03PM -0400, Gregory (Grisha) Trubetskoy wrote: In vs 1.9.3 I noticed that ifconfig from within a vserver shows the inet addr of eth0 and lo (in 1.2x it did not) - is this the way it's supposed to be, or am I missing a configuration option of some kind? yes! (yes or yes) it is supposed to be so, and you are probably looking for VXF_HIDE_NETIF ... But this appears to be hiding all interfaces, so that ifconfig shows nothing at all? What can I do to get it to behave more like 1.2x, where it shows the IP address of the vserver but not much else ? TIA, Grisha ___ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] interfaces show ip addresses?
On Wed, 6 Oct 2004, Herbert Poetzl wrote: On Wed, Oct 06, 2004 at 04:28:03PM -0400, Gregory (Grisha) Trubetskoy wrote: In vs 1.9.3 I noticed that ifconfig from within a vserver shows the inet addr of eth0 and lo (in 1.2x it did not) - is this the way it's supposed to be, or am I missing a configuration option of some kind? yes! (yes or yes) it is supposed to be so, and you are probably looking for VXF_HIDE_NETIF ... But this appears to be hiding all interfaces, so that ifconfig shows nothing at all? What can I do to get it to behave more like 1.2x, where it shows the IP address of the vserver but not much else ? TIA, Grisha ___ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] interfaces show ip addresses?
On Wed, Oct 06, 2004 at 04:28:03PM -0400, Gregory (Grisha) Trubetskoy wrote: > > In vs 1.9.3 I noticed that ifconfig from within a vserver shows the inet > addr of eth0 and lo (in 1.2x it did not) - is this the way it's supposed > to be, or am I missing a configuration option of some kind? yes! (yes or yes) it is supposed to be so, and you are probably looking for VXF_HIDE_NETIF ... HTH, Herbert > Thanks! > > Grisha > ___ > Vserver mailing list > [EMAIL PROTECTED] > http://list.linux-vserver.org/mailman/listinfo/vserver ___ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver
[Vserver] interfaces show ip addresses?
In vs 1.9.3 I noticed that ifconfig from within a vserver shows the inet addr of eth0 and lo (in 1.2x it did not) - is this the way it's supposed to be, or am I missing a configuration option of some kind? Thanks! Grisha ___ Vserver mailing list [EMAIL PROTECTED] http://list.linux-vserver.org/mailman/listinfo/vserver