18.04 网络重启后服务器无法上线

18.04 网络重启后服务器无法上线

我在卧室里设置了一台个人 Web 开发服务器,我更改了网络的 DHCP 设置,为该机器提供了一个静态本地 IP 地址。一段时间内一切都很顺利,然后一个混乱之神出现了。我正从客厅的电脑上启动 SSH 会话到服务器上,这时一只猫走过了为电脑和显示器、灯、路由器/调制解调器和打印机供电的电源板。电源板是内置有电涌保护器的电源板之一,所以当然一​​切都断电了几秒钟。服务器很好,因为它在不同的电路上。

当我通过拨动插板上的开关恢复电源,路由器终于完成重新启动后,我尝试重新启动 SSH 会话,但连接失败。跳过很多不必要的故事,下面是我目前的情况:

服务器确实连接到了网络,如盒子背面的活动 LED 所示。服务器无法与网络通信,网络也无法与服务器通信。“# lshw”显示以太网接口设备是桥接类而不是网络类。它实际上没有显示任何网络类设备。

nobody
    description: Desktop Computer
    product: HP Compaq dx2450 Microtower PC (KR612UT#ABA)
    vendor: Hewlett-Packard
    version: Chassis Version
    serial: MXL85019JL
    width: 64 bits
    capabilities: smbios-2.4 dmi-2.4 vsyscall32
    configuration: boot=normal chassis=desktop family=103C_53307F sku=KR612UT#ABA uuid=006E0D58-1216-1310-A14D-9130BC8BB186
  *-core
       description: Motherboard
       product: 2A72h
       vendor: OEM_MB
       physical id: 0
       version: 3.02
       serial: MS1C89R60403872
     *-firmware
          description: BIOS
          vendor: Phoenix Technologies, LTD
          physical id: 0
          version: 5.19
          date: 11/03/2008
          size: 128KiB
          capacity: 960KiB
          capabilities: pci pnp apm upgrade shadowing cdboot bootselect socketedrom edd int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification netboot
     *-cpu
          description: CPU
          product: AMD Sempron(tm) Processor LE-1200
          vendor: Advanced Micro Devices [AMD]
          physical id: 3
          bus info: cpu@0
          version: AMD Sempron(tm) Processor LE-1200
          slot: Socket AM2
          size: 2100MHz
          capacity: 3700MHz
          width: 64 bits
          clock: 200MHz
          capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt rdtscp x86-64 3dnowext 3dnow rep_good nopl cpuid extd_apicid pni cx16 lahf_lm extapic cr8_legacy 3dnowprefetch vmmcall cpufreq
        *-cache:0
             description: L1 cache
             physical id: 5
             slot: L1 Cache
             size: 128KiB
             capacity: 128KiB
             capabilities: synchronous internal write-back data
             configuration: level=1
        *-cache:1
             description: L2 cache
             physical id: 6
             slot: L2 Cache
             size: 512KiB
             capacity: 512KiB
             capabilities: synchronous internal write-back unified
             configuration: level=2
     *-memory:0
          description: System Memory
          physical id: 4
          slot: System board or motherboard
          size: 2GiB
        *-bank:0
             description: DIMM DDR2 667 MHz (1.5 ns)
             product: HYMP112U64CP8-S6
             vendor: Hynix Semiconductor (Hyundai Electronics)
             physical id: 0
             serial: None
             slot: A0
             size: 1GiB
             width: 64 bits
             clock: 667MHz (1.5ns)
        *-bank:1
             description: DIMM DDR2 667 MHz (1.5 ns)
             product: 1G-UDIMM
             vendor: Kingston
             physical id: 1
             serial: None
             slot: A1
             size: 1GiB
             width: 64 bits
             clock: 667MHz (1.5ns)
        *-bank:2
             description: DIMM [empty]
             product: None
             vendor: None
             physical id: 2
             serial: None
             slot: A2
             width: 64 bits
        *-bank:3
             description: DIMM [empty]
             product: None
             vendor: None
             physical id: 3
             serial: None
             slot: A3
             width: 64 bits
     *-memory:1 UNCLAIMED
          description: RAM memory
          product: MCP61 Memory Controller
          vendor: NVIDIA Corporation
          physical id: 6
          bus info: pci@0000:00:00.0
          version: a1
          width: 32 bits
          clock: 66MHz (15.2ns)
          capabilities: ht bus_master cap_list
          configuration: latency=0
     *-isa
          description: ISA bridge
          product: MCP61 LPC Bridge
          vendor: NVIDIA Corporation
          physical id: 1
          bus info: pci@0000:00:01.0
          version: a2
          width: 32 bits
          clock: 66MHz
          capabilities: isa bus_master
          configuration: latency=0
     *-serial
          description: SMBus
          product: MCP61 SMBus
          vendor: NVIDIA Corporation
          physical id: 1.1
          bus info: pci@0000:00:01.1
          version: a2
          width: 32 bits
          clock: 66MHz
          capabilities: pm cap_list
          configuration: driver=nForce2_smbus latency=0
          resources: irq:10 ioport:ff00(size=64) ioport:1c00(size=64) ioport:1c40(size=64)
     *-memory:2 UNCLAIMED
          description: RAM memory
          product: MCP61 Memory Controller
          vendor: NVIDIA Corporation
          physical id: 1.2
          bus info: pci@0000:00:01.2
          version: a2
          width: 32 bits
          clock: 66MHz (15.2ns)
          configuration: latency=0
     *-usb:0
          description: USB controller
          product: MCP61 USB 1.1 Controller
          vendor: NVIDIA Corporation
          physical id: 2
          bus info: pci@0000:00:02.0
          version: a3
          width: 32 bits
          clock: 66MHz
          capabilities: pm ohci bus_master cap_list
          configuration: driver=ohci-pci latency=0 maxlatency=1 mingnt=3
          resources: irq:23 memory:fe02f000-fe02ffff
        *-usbhost
             product: OHCI PCI host controller
             vendor: Linux 4.15.0-66-generic ohci_hcd
             physical id: 1
             bus info: usb@2
             logical name: usb2
             version: 4.15
             capabilities: usb-1.10
             configuration: driver=hub slots=10 speed=12Mbit/s
     *-usb:1
          description: USB controller
          product: MCP61 USB 2.0 Controller
          vendor: NVIDIA Corporation
          physical id: 2.1
          bus info: pci@0000:00:02.1
          version: a3
          width: 32 bits
          clock: 66MHz
          capabilities: debug pm ehci bus_master cap_list
          configuration: driver=ehci-pci latency=0 maxlatency=1 mingnt=3
          resources: irq:22 memory:fe02e000-fe02e0ff
        *-usbhost
             product: EHCI Host Controller
             vendor: Linux 4.15.0-66-generic ehci_hcd
             physical id: 1
             bus info: usb@1
             logical name: usb1
             version: 4.15
             capabilities: usb-2.00
             configuration: driver=hub slots=10 speed=480Mbit/s
           *-usb
                description: Mass storage device
                product: Cruzer Glide
                vendor: SanDisk
                physical id: 6
                bus info: usb@1:6
                logical name: scsi4
                version: 2.01
                serial: 200512339111BA611C6F
                capabilities: usb-2.00 scsi emulated scsi-host
                configuration: driver=usb-storage maxpower=200mA speed=480Mbit/s
              *-disk
                   description: SCSI Disk
                   product: Cruzer Glide
                   vendor: SanDisk
                   physical id: 0.0.0
                   bus info: scsi@4:0.0.0
                   logical name: /dev/sdb
                   version: 2.01
                   serial: 200512339111BA611C6F
                   size: 59GiB (64GB)
                   capabilities: gpt-1.00 partitioned partitioned:gpt
                   configuration: ansiversion=6 guid=93f49ea3-3531-429d-a512-39d1addafce7 logicalsectorsize=512 sectorsize=512
                 *-volume:0
                      description: reserved partition
                      vendor: Windows
                      physical id: 1
                      bus info: scsi@4:0.0.0,1
                      logical name: /dev/sdb1
                      serial: 3e37eaab-911e-463d-88a0-f8b954a73b1a
                      capacity: 15MiB
                      capabilities: nofs
                      configuration: name=Microsoft reserved partition
                 *-volume:1
                      description: Windows NTFS volume
                      vendor: Windows
                      physical id: 2
                      bus info: scsi@4:0.0.0,2
                      logical name: /dev/sdb2
                      logical name: /mnt
                      version: 3.1
                      serial: 6658-8c32
                      size: 59GiB
                      capacity: 59GiB
                      capabilities: ntfs initialized
                      configuration: clustersize=4096 created=2019-11-13 22:04:29 filesystem=ntfs label=Flash Drive modified_by_chkdsk=true mount.fstype=fuseblk mount.options=rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096 mounted_on_nt4=true name=Basic data partition resize_log_file=true state=mounted upgrade_on_mount=true
     *-pci:0
          description: PCI bridge
          product: MCP61 PCI bridge
          vendor: NVIDIA Corporation
          physical id: 100
          bus info: pci@0000:00:04.0
          version: a1
          width: 32 bits
          clock: 66MHz
          capabilities: pci ht subtractive_decode bus_master cap_list
          resources: ioport:e000(size=4096) memory:fd700000-fd7fffff memory:fde00000-fdefffff
     *-multimedia
          description: Audio device
          product: MCP61 High Definition Audio
          vendor: NVIDIA Corporation
          physical id: 5
          bus info: pci@0000:00:05.0
          version: a2
          width: 32 bits
          clock: 66MHz
          capabilities: pm msi ht bus_master cap_list
          configuration: driver=snd_hda_intel latency=0 maxlatency=5 mingnt=2
          resources: irq:23 memory:fe024000-fe027fff
     *-bridge
          description: Ethernet interface
          product: MCP61 Ethernet
          vendor: NVIDIA Corporation
          physical id: 7
          bus info: pci@0000:00:07.0
          logical name: enp0s7
          version: a2
          serial: 00:22:64:25:cf:14
          capacity: 1000000000
          width: 32 bits
          clock: 66MHz
          capabilities: bridge pm msi ht bus_master cap_list ethernet physical mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
          configuration: autonegotiation=on broadcast=yes driver=forcedeth driverversion=0.64 latency=0 link=no maxlatency=20 mingnt=1 multicast=yes port=MII
          resources: irq:24 memory:fe02d000-fe02dfff ioport:fc00(size=8)
     *-ide:0
          description: IDE interface
          product: MCP61 SATA Controller
          vendor: NVIDIA Corporation
          physical id: 8
          bus info: pci@0000:00:08.0
          version: a2
          width: 32 bits
          clock: 66MHz
          capabilities: ide pm msi ht pci_native_mode-only_controller__supports_bus_mastering bus_master cap_list
          configuration: driver=sata_nv latency=0 maxlatency=1 mingnt=3
          resources: irq:20 ioport:9f0(size=8) ioport:bf0(size=4) ioport:970(size=8) ioport:b70(size=4) ioport:f700(size=16) memory:fe02c000-fe02cfff
     *-ide:1
          description: IDE interface
          product: MCP61 SATA Controller
          vendor: NVIDIA Corporation
          physical id: 8.1
          bus info: pci@0000:00:08.1
          version: a2
          width: 32 bits
          clock: 66MHz
          capabilities: ide pm msi ht pci_native_mode-only_controller__supports_bus_mastering bus_master cap_list
          configuration: driver=sata_nv latency=0 maxlatency=1 mingnt=3
          resources: irq:21 ioport:9e0(size=8) ioport:be0(size=4) ioport:960(size=8) ioport:b60(size=4) ioport:f200(size=16) memory:fe02b000-fe02bfff
     *-pci:1
          description: PCI bridge
          product: MCP61 PCI Express bridge
          vendor: NVIDIA Corporation
          physical id: 9
          bus info: pci@0000:00:09.0
          version: a2
          width: 32 bits
          clock: 33MHz
          capabilities: pci pm msi ht pciexpress normal_decode bus_master cap_list
          configuration: driver=pcieport
          resources: irq:0 ioport:d000(size=4096) memory:fdd00000-fddfffff ioport:fdc00000(size=1048576)
     *-pci:2
          description: PCI bridge
          product: MCP61 PCI Express bridge
          vendor: NVIDIA Corporation
          physical id: b
          bus info: pci@0000:00:0b.0
          version: a2
          width: 32 bits
          clock: 33MHz
          capabilities: pci pm msi ht pciexpress normal_decode bus_master cap_list
          configuration: driver=pcieport
          resources: irq:0 ioport:c000(size=4096) memory:fdb00000-fdbfffff ioport:fda00000(size=1048576)
     *-pci:3
          description: PCI bridge
          product: MCP61 PCI Express bridge
          vendor: NVIDIA Corporation
          physical id: 101
          bus info: pci@0000:00:0c.0
          version: a2
          width: 32 bits
          clock: 33MHz
          capabilities: pci pm msi ht pciexpress normal_decode bus_master cap_list
          configuration: driver=pcieport
          resources: irq:0 ioport:b000(size=4096) memory:fd900000-fd9fffff ioport:fd800000(size=1048576)
     *-display
          description: VGA compatible controller
          product: C61 [GeForce 6150SE nForce 430]
          vendor: NVIDIA Corporation
          physical id: d
          bus info: pci@0000:00:0d.0
          version: a2
          width: 64 bits
          clock: 66MHz
          capabilities: pm msi vga_controller bus_master cap_list rom
          configuration: driver=nouveau latency=0
          resources: irq:22 memory:fb000000-fbffffff memory:e0000000-efffffff memory:fc000000-fcffffff memory:c0000-dffff
     *-pci:4
          description: Host bridge
          product: K8 [Athlon64/Opteron] HyperTransport Technology Configuration
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 102
          bus info: pci@0000:00:18.0
          version: 00
          width: 32 bits
          clock: 33MHz
     *-pci:5
          description: Host bridge
          product: K8 [Athlon64/Opteron] Address Map
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 103
          bus info: pci@0000:00:18.1
          version: 00
          width: 32 bits
          clock: 33MHz
     *-pci:6
          description: Host bridge
          product: K8 [Athlon64/Opteron] DRAM Controller
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 104
          bus info: pci@0000:00:18.2
          version: 00
          width: 32 bits
          clock: 33MHz
     *-pci:7
          description: Host bridge
          product: K8 [Athlon64/Opteron] Miscellaneous Control
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 105
          bus info: pci@0000:00:18.3
          version: 00
          width: 32 bits
          clock: 33MHz
          configuration: driver=k8temp
          resources: irq:0
     *-scsi:0
          physical id: a
          logical name: scsi0
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: WDC WD2500AAKX-0
             vendor: Western Digital
             physical id: 0.0.0
             bus info: scsi@0:0.0.0
             logical name: /dev/sda
             version: 1H15
             serial: WD-WCC2EP529232
             size: 232GiB (250GB)
             capabilities: gpt-1.00 partitioned partitioned:gpt
             configuration: ansiversion=5 guid=319aec2e-22a3-406f-894b-c7bc21206b53 logicalsectorsize=512 sectorsize=512
           *-volume:0
                description: BIOS Boot partition
                vendor: EFI
                physical id: 1
                bus info: scsi@0:0.0.0,1
                logical name: /dev/sda1
                serial: 65de594a-0d7a-4eb6-9022-aba32dcd45e9
                capacity: 1023KiB
                capabilities: nofs
           *-volume:1
                description: EXT4 volume
                vendor: Linux
                physical id: 2
                bus info: scsi@0:0.0.0,2
                logical name: /dev/sda2
                logical name: /
                version: 1.0
                serial: dfd79953-3e29-4d6e-aff3-bb06fc6b6d82
                size: 232GiB
                capabilities: journaled extended_attributes large_files huge_files dir_nlink 64bit extents ext4 ext2 initialized
                configuration: created=2019-08-30 19:04:01 filesystem=ext4 lastmountpoint=/ modified=2019-08-30 19:12:06 mount.fstype=ext4 mount.options=rw,relatime,data=ordered mounted=2019-11-21 19:24:47 state=mounted
     *-scsi:1
          physical id: c
          logical name: scsi1
          capabilities: emulated
        *-cdrom
             description: DVD reader
             product: DVD-ROM TS-H353B
             vendor: TSSTcorp
             physical id: 0.0.0
             bus info: scsi@1:0.0.0
             logical name: /dev/cdrom
             logical name: /dev/dvd
             logical name: /dev/sr0
             version: bc03
             capabilities: removable audio dvd
             configuration: ansiversion=5 status=nodisc

此时我认为我需要将设备重新配置为网络级,但我不知道从哪里开始。

答案1

经过更多的猜测和网络论坛的建议,我设法让它再次上线。板载网络适配器仍然被列为桥接设备,仍然处于禁用状态。我找到了一个以太网 <-> USB 适配器,是我在一家垃圾店买的。我把它插上电源,打开机器,它识别了适配器,但没有自己启用它。所以我猜测配置 netplan 来使用它(不知道该用什么设备名)。它不起作用,所以我为了以防万一重启了。启动屏幕(之后不得不打开启动日志,因为它太快了)给了我一个新东西,可以放入 netplan 配置中。我试了一下,它立刻就起作用了。

相关内容