История изменений
Исправление Suntechnic, (текущая версия) :
Чего-то я совсем запутался:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:54:a7:5e:24
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19
lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:366 errors:0 dropped:0 overruns:0 frame:0
TX packets:366 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:28196 (28.1 KB) TX bytes:28196 (28.1 KB)
wlan0 Link encap:Ethernet HWaddr e8:39:df:08:f8:16
inet addr:192.168.13.11 Bcast:192.168.13.255 Mask:255.255.255.0
inet6 addr: fe80::ea39:dfff:fe08:f816/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71655 errors:0 dropped:0 overruns:0 frame:0
TX packets:44594 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64340584 (64.3 MB) TX bytes:11095944 (11.0 MB)
root@alex-laptop /h/alex# ip netns add LEFT
root@alex-laptop /h/alex# ip netns exec LEFT ip link set dev lo up
root@alex-laptop /h/alex# ip link set eth0 netns LEFT
root@alex-laptop /h/alex#
А вот и нет:
root@alex-laptop /h/alex# ip netns exec LEFT ifconfig
lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 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)
root@alex-laptop /h/alex#
root@alex-laptop /h/alex# ifconfig
lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:366 errors:0 dropped:0 overruns:0 frame:0
TX packets:366 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:28196 (28.1 KB) TX bytes:28196 (28.1 KB)
wlan0 Link encap:Ethernet HWaddr e8:39:df:08:f8:16
inet addr:192.168.13.11 Bcast:192.168.13.255 Mask:255.255.255.0
inet6 addr: fe80::ea39:dfff:fe08:f816/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:72089 errors:0 dropped:0 overruns:0 frame:0
TX packets:44799 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64456535 (64.4 MB) TX bytes:11130231 (11.1 MB)
root@alex-laptop /h/alex#
root@alex-laptop /h/alex# ip netns exec LEFT ip link set dev eth0 up
root@alex-laptop /h/alex# ip netns exec LEFT ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:54:a7:5e:24
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19
lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 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)
Исходная версия Suntechnic, :
Чего-то я совсем запутался:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:54:a7:5e:24
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19
lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:366 errors:0 dropped:0 overruns:0 frame:0
TX packets:366 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:28196 (28.1 KB) TX bytes:28196 (28.1 KB)
wlan0 Link encap:Ethernet HWaddr e8:39:df:08:f8:16
inet addr:192.168.13.11 Bcast:192.168.13.255 Mask:255.255.255.0
inet6 addr: fe80::ea39:dfff:fe08:f816/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71655 errors:0 dropped:0 overruns:0 frame:0
TX packets:44594 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64340584 (64.3 MB) TX bytes:11095944 (11.0 MB)
root@alex-laptop /h/alex# ip netns add LEFT
root@alex-laptop /h/alex# ip netns exec LEFT ip link set dev lo up
root@alex-laptop /h/alex# ip link set eth0 netns LEFT
root@alex-laptop /h/alex#
А вот и нет:
root@alex-laptop /h/alex# ip netns exec LEFT ifconfig
lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 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)
root@alex-laptop /h/alex#
root@alex-laptop /h/alex# ifconfig
lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:366 errors:0 dropped:0 overruns:0 frame:0
TX packets:366 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:28196 (28.1 KB) TX bytes:28196 (28.1 KB)
wlan0 Link encap:Ethernet HWaddr e8:39:df:08:f8:16
inet addr:192.168.13.11 Bcast:192.168.13.255 Mask:255.255.255.0
inet6 addr: fe80::ea39:dfff:fe08:f816/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:72089 errors:0 dropped:0 overruns:0 frame:0
TX packets:44799 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64456535 (64.4 MB) TX bytes:11130231 (11.1 MB)
root@alex-laptop /h/alex#