Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Zainstalowalem QEMU na nim zaczolem instalowac wirtualna maszyne pfSense, ktora domaga sie 2 interfejsow dla LAN i WAN.
Wpisuje:
mike@mike-desktop:~$ lspci | grep Ethernet 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09) mike@mike-desktop:~$ ifconfig enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.182 netmask 255.255.255.0 broadcast 192.168.0.255 ether 60:a4:4c:64:a8:bd txqueuelen 1000 (Ethernet) RX packets 70092 bytes 87183874 (87.1 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 26598 bytes 2890039 (2.8 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 1 (Local Loopback) RX packets 15180 bytes 897738 (897.7 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 15180 bytes 897738 (897.7 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 00:00:00:00:00:00 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 mike@mike-desktop:~$ dmesg | grep r8169 [ 1.964914] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded [ 1.964924] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control [ 1.965701] r8169 0000:02:00.0 eth0: RTL8168f/8111f at 0xffffb54bc1b8a000, 60:a4:4c:64:a8:bd, XID 08000800 IRQ 45 [ 1.965702] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko] [ 1.996374] r8169 0000:02:00.0 enp2s0: renamed from eth0 [ 19.816172] r8169 0000:02:00.0 enp2s0: link down [ 19.816225] r8169 0000:02:00.0 enp2s0: link down [ 21.935531] r8169 0000:02:00.0 enp2s0: link up mike@mike-desktop:~$ sudo du /sys/ | grep eth0 [sudo] password for mike: mike@mike-desktop:~$ sudo du /sys/ | grep eth0 mike@mike-desktop:~$ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback mike@mike-desktop:~$ ifup eth0 Unknown interface eth0 mike@mike-desktop:~$ sudo service networking restart mike@mike-desktop:~$ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback mike@mike-desktop:~$ sudo service networking restart mike@mike-desktop:~$
I jeszcze tak:
mike@mike-desktop:~$ ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 60:a4:4c:64:a8:bd brd ff:ff:ff:ff:ff:ff inet 192.168.0.182/24 brd 192.168.0.255 scope global dynamic enp2s0 valid_lft 81883sec preferred_lft 81883sec 3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 valid_lft forever preferred_lft forever 4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 52:54:00:e5:22:90 brd ff:ff:ff:ff:ff:ff
mike@mike-desktop:~$ lshw -C network WARNING: you should run this program as super-user. *-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 logical name: enp2s0 version: 09 serial: 60:a4:4c:64:a8:bd size: 1Gbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168f-1_0.0.5 06/18/12 ip=192.168.0.182 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s resources: irq:45 ioport:e000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff *-network:0 description: Ethernet interface physical id: 1 logical name: virbr0 capabilities: ethernet physical configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=192.168.122.1 link=no multicast=yes *-network:1 DISABLED description: Ethernet interface physical id: 2 logical name: virbr0-nic serial: 52:54:00:e5:22:90 size: 10Mbit/s capabilities: ethernet physical configuration: autonegotiation=off broadcast=yes driver=tun driverversion=1.6 duplex=full link=no multicast=yes port=twisted pair speed=10Mbit/s WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
mike@mike-desktop:~$ ifconfig eth0 eth0: error fetching interface information: Device not found
Znalazlem cos takiego:
root@mike-desktop:/home/mike# dmesg | grep eth0 [ 1.974188] r8169 0000:02:00.0 eth0: RTL8168f/8111f at 0xffffc52281bd0000, 60:a4:4c:64:a8:bd, XID 08000800 IRQ 45 [ 1.974189] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko] [ 2.002494] r8169 0000:02:00.0 enp2s0: renamed from eth0
czyli eth0 (LAN interface) teraz nazywa sie enp2s0 ?
Czyli co teraz jest WAN interface?
Skoro mam polaczenie z Internetem to musze miec i WAN interface ?
Ostatnio edytowany przez Novi-cjusz (2017-02-22 22:57:20)
Offline
To nie instalacja qemu/kvm rozwaliła interfejsy tylko zabawy z virt-managerem. Poczytaj o kvm https://wiki.debian.org/KVM zupełnie nie zaszkodzi https://wiki.debian.org/QEMU , https://wiki.debian.org/BridgeNetworkConnections oraz http://wiki.libvirt.org/page/Main_Page
Nowe nazewnictwo interfejsów to skutek działania systemd https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
Offline
[quote=andreq].....
Nowe nazewnictwo interfejsów to skutek działania systemd https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/[/quote]
To nie Systemd tylko zmiana w kernelu.
Jest opcja, która to pozwala wyłączyć, ale w tej chwili nie pamiętam nazwy.
W ogóle nie mam Systemd tylko OpenRC i Eudev, a karta dostaje nazwę eth0, na jaju obecnie 4.9.12, sprawdzone na sterownikach R8169 Realteka i e1000e Intela.
dmesg | egrep 'e1000|eth0' [ 0.495717] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k [ 0.495718] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 0.495906] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode [ 0.820307] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 90:1b:0e:0b:bd:9f [ 0.820312] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection [ 0.820333] e1000e 0000:00:19.0 eth0: MAC: 7, PHY: 6, PBA No: FFFFFF-0FF [ 41.160193] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 41.162656] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None [ 41.162764] e1000e 0000:00:19.0 eth0: 10/100 speed: disabling TSO [ 41.162793] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 41.210230] IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready [ 41.251853] IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready [ 46.102655] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None [ 48.078656] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
Także nowe nazewnictwo kart nie jest obowiązkowe, chociaż bezpośrednio po zmianie nazewnictwa też musiałem w /etc/udev/rules.d/ to poprawiać, ale przy jakiejś awarii eudeva udało mi się to przypadkowo poprawić na poziomie kernela.
Ostatnio edytowany przez Jacekalex (2017-02-24 19:35:44)
Offline
[quote=Jacekalex][quote=andreq].....
Nowe nazewnictwo interfejsów to skutek działania systemd https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/[/quote]
To nie Systemd tylko zmiana w kernelu.
Jest opcja, która to pozwala wyłączyć, ale w tej chwili nie pamiętam nazwy.[/quote]
Do parametrów startowych dopisać net.ifnames=0 lub stworzyć własne reguły /etc/udev/rules.d/70-persistent-net.rules
lub 3 opcja poniżej.
I don't like this, how do I disable this?
You basically have three options:
You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's .link file for the default policy: ln -s /dev/null /etc/systemd/network/99-default.link
You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own .link files in /etc/systemd/network/, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. See systemd.link(5) for more information.
You pass the net.ifnames=0 on the kernel command line[/quote]Ostatnio edytowany przez arecki (2017-02-24 19:53:28)
Offline
Wszystko pieknie, ale obawiam sie rozwalic system przez niewiedze jeszcze bardziej.
Bardzo prosze, napiszcie dwa slowa jak to zrobic lub podajcie linka do strony z taka wiedza.
Offline
Czemu nie użyjesz wyszukiwarki?
Wpisujesz "debian ifnames" i otrzymujesz wyniki prowadzące za rączkę.
Jak się boisz, że coś zepsujesz to zrób kopię systemu.
Offline
Time (s) | Query |
---|---|
0.00014 | SET CHARSET latin2 |
0.00005 | SET NAMES latin2 |
0.00167 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.144.93.34' WHERE u.id=1 |
0.00071 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.144.93.34', 1732725418) |
0.00053 | SELECT * FROM punbb_online WHERE logged<1732725118 |
0.00068 | DELETE FROM punbb_online WHERE ident='3.145.58.158' |
0.00057 | SELECT topic_id FROM punbb_posts WHERE id=308975 |
0.00028 | SELECT id FROM punbb_posts WHERE topic_id=29384 ORDER BY posted |
0.00090 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=29384 AND t.moved_to IS NULL |
0.00009 | SELECT search_for, replace_with FROM punbb_censoring |
0.00071 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=29384 ORDER BY p.id LIMIT 0,25 |
0.00078 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=29384 |
Total query time: 0.00711 s |