Добавить сетевую карту линукс

Добавить сетевую карту линукс

Втыкаем сетевуху, грузимся, дальше смотрим

Вывод будет примерно такой

00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (
rev 03)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (re
v 03)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 02)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139 C+ (rev 10)
00:0b.0 Ethernet controller: MYSON Technology Inc SURECOM EP-320X-S 100/10M Ethernet PCI Adapter
01:00.0 VGA compatible controller: S3 Inc. 86c368 [Trio 3D/2X] (rev 02)

Тут мы видим, нужное или не нужное число сетевых, показаны устройства, которые видит ядро.

Вывод будет примерно таким

eth0 Link encap:Ethernet HWaddr 00:c0:26:2c:e6:ae 
inet addr:192.168.5.36 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:26ff:fe2c:e6ae/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:440 errors:0 dropped:0 overruns:0 frame:0
TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:39563 (38.6 KB) TX bytes:14378 (14.0 KB)
Interrupt:10 Base address:0xe400

eth2 Link encap:Ethernet HWaddr 00:02:44:4e:67:c0
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:5 Base address:0xe800

Вот тут то и видим, что сетевуха то нашлась но завётся не так как мы ожидали.

Читайте также:  Install apache on linux with modules

Как переименовать сетевые интерфейсы

где ХХ любые произвольные числа.

переименовываем и ребут либо перезапуск сетевых интерфейсов

Источник

Шпаргалки админа

Втыкаем сетевуху, грузимся, дальше смотрим
[cc lang=”bash”]lspci[/cc]
Вывод будет примерно такой
[cc lang=”bash”]00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX – 82443BX/ZX/DX Host bridge (
rev 03)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX – 82443BX/ZX/DX AGP bridge (re
v 03)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 02)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139 C+ (rev 10)
00:0b.0 Ethernet controller: MYSON Technology Inc SURECOM EP-320X-S 100/10M Ethernet PCI Adapter
01:00.0 VGA compatible controller: S3 Inc. 86c368 [Trio 3D/2X] (rev 02)[/cc]
Тут мы видим, нужное или не нужное число сетевых, показаны устройства, которые видит ядро.

Дальше смотрим
[cc lang=”bash”]ifconfig -a[/cc]
Вывод будет примерно таким
[cc lang=”bash”]
eth0 Link encap:Ethernet HWaddr 00:c0:26:2c:e6:ae
inet addr:192.168.5.36 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:26ff:fe2c:e6ae/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:440 errors:0 dropped:0 overruns:0 frame:0
TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:39563 (38.6 KB) TX bytes:14378 (14.0 KB)
Interrupt:10 Base address:0xe400

eth2 Link encap:Ethernet HWaddr 00:02:44:4e:67:c0
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:5 Base address:0xe800[/cc]
Вот тут то и видим, что сетевуха то нашлась но завётся не так как мы ожидали.

Как переименовать сетевые интерфейсы

Теперь идём в
[cc lang=”bash”]/etc/udev/rules.d/ХХ_persistent-net.rules[/cc]
где ХХ любые произвольные числа.

Читайте также:  Using linux at home

переименовываем и ребут либо перезапуск сетевых интерфейсов

Источник

Configuring network adapter in Ubuntu or Debian

This guideline describes how to configure the network adapter by editing the file: /etc /network/interfaces and Netplan.

After connecting the server to a private network in the control panel, an additional virtual network adapter will be added to it. For the proper work of the connected interface, it must be configured.

Connect to a virtual server as superuser and run the command:

A list of connected interfaces will be displayed:

ens160
Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:255.255.255.0
inet6 addr: yyyy::yyy:yyy:yyyy:yyy/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7011 errors:0 dropped:0 overruns:0 frame:0
TX packets:2862 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6661547 (6.6 MB) TX bytes:234861 (234.8 KB)

ens192
Link encap:Ethernet HWaddr 00:50:56:01:2e:ca
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)

lo
Link encap:Local 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:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)

In the network settings, find MAC field with the value of HWaddr parameter equal to one of those contained in the displayed network interface list. Note the interface name (ens192 in our case).

Important: before configuring the adapter in the operating system, check the control panel whether the DHCP option is enabled or disabled for your network. You can find this option in the network settings.

Editing the file: /etc /network /interfaces

To change network interface settings, open /etc/network/interfaces file:

Читайте также:  Python linux install numpy

DHCP is enabled

If DHСP option was enabled during private network creation, then configure Ubuntu/Debian network adapter to obtain network settings automatically:

DHCP is disabled

If DHCP is disabled, then configure the interface manually (as in the example below). You may find local address and subnet mask in network settings in control panel:

Save changes, exit text editor, and restart network service (ens192 is adapter name, which you have noted):

To check correctness of network adapter settings, execute ping to a gateway address shown in control panel, such as:

Netplan

To change the network interface settings, open the /etc/netplan/99-netcfg-vmware.yaml file:

DHCP is enabled

If the DHCP function has been enabled when creating a private network, go to the Ubuntu/Debian network adapter settings and make sure you select to receive network settings automatically as well as the gateway address:

DHCP is disabled

If the DHCP function has been disabled, then specify the interface parameters manually, as shown in the example below. The local address of the subnet mask can be found in the network settings in the control panel:

ens192:
dhcp4: no
dhcp6: no
addresses:
— 10.0.1.2/24
gateway4: 10.0.1.1
nameservers:
addresses:
— 10.0.1.1

After you save the changes and exit the editor, you need to verify the interface configuration and then reboot the network services:

Источник

Оцените статью
Adblock
detector