我的 Ubuntu 20.04 计算机无法 ping 或打印到本地无线网络上的打印机

我的 Ubuntu 20.04 计算机无法 ping 或打印到本地无线网络上的打印机

我最近搬家了。重置打印机和电脑后,我发现无法打印。

我正在运行 Ubuntu 20.04,我的打印机是 Brother MFC-7860DW。我的本地无线网络使用的是 FIOS 提供的路由器(我认为这并不重要,但我的旧公寓有 Xfinity,这是我的设置中唯一的变化)。

我的打印机正确报告了它应该使用的 SSID (FIOS-XXXXX) 以及已分配的 IP 地址 (10.0.0.150)。运行诊断程序时,它声称已发送并接收了以下内容:

 <Network Statistics>                  <WirelessStatistics>
 Packets Received       325             RX Frames Received OK   323
 Bytes Received      152703             RX Frames Error           2
 Packets Transmitted     56             TX Frames Transmitted OK 58
 Bytes Transmitted    17411             TX Frames Error           0

所以我思考至少打印机正在与我的路由器交互。

我的计算机似乎将打印机视为网络上的服务

$ avahi-browse -a -v -t -r
Server version: avahi 0.7; Host name: Chanticleer.local
E Ifce Prot Name                                          Type                 Domain
: Cache exhausted
+ enp5s0 IPv4 Brother MFC-7860DW                            PDL Printer          local
+ enp5s0 IPv4 Brother MFC-7860DW                            UNIX Printer         local
+ enp5s0 IPv4 Brother MFC-7860DW                            Internet Printer     local
= enp5s0 IPv4 Brother MFC-7860DW                            PDL Printer          local
   hostname = [BRN001BA9F91290.local]
   address = [10.0.0.150]
   port = [9100]
   txt = ["TBCP=T" "Transparent=F" "Binary=T" "PaperCustom=T" "Duplex=F" "Copies=T" "Color=F" "usb_MDL=MFC-7860DW" "usb_MFG=Brother" "priority=25" "adminurl=http://BRN001BA9F91290.local./" "product=(Brother MFC-7860DW)" "ty=Brother MFC-7860DW" "pdl=application/vnd.hp-PCL" "qtotal=1" "txtvers=1"]
= enp5s0 IPv4 Brother MFC-7860DW                            UNIX Printer         local
   hostname = [BRN001BA9F91290.local]
   address = [10.0.0.150]
   port = [515]
   txt = ["TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Duplex=F" "Copies=T" "Color=F" "usb_MDL=MFC-7860DW" "usb_MFG=Brother" "priority=75" "adminurl=http://BRN001BA9F91290.local./" "product=(Brother MFC-7860DW)" "ty=Brother MFC-7860DW" "rp=duerqxesz5090" "pdl=application/vnd.hp-PCL" "qtotal=1" "txtvers=1"]
= enp5s0 IPv4 Brother MFC-7860DW                            Internet Printer     local
   hostname = [BRN001BA9F91290.local]
   address = [10.0.0.150]
   port = [631]
   txt = ["TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Duplex=F" "Copies=T" "Color=F" "usb_MDL=MFC-7860DW" "usb_MFG=Brother" "priority=50" "adminurl=http://BRN001BA9F91290.local./" "product=(Brother MFC-7860DW)" "ty=Brother MFC-7860DW" "rp=duerqxesz5090" "pdl=application/vnd.hp-PCL" "qtotal=1" "txtvers=1"]
+ enp5s0 IPv4 Brother MFC-7860DW                            Web Site             local
= enp5s0 IPv4 Brother MFC-7860DW                            Web Site             local
   hostname = [BRN001BA9F91290.local]
   address = [10.0.0.150]
   port = [80]
   txt = []
: All for now

但是,我无法使用ping打印机,而且它没有显示在nmap

$ ping 10.0.0.150
PING 10.0.0.150 (10.0.0.150) 56(84) bytes of data.
^C
--- 10.0.0.150 ping statistics ---
16 packets transmitted, 0 received, 100% packet loss, time 15360ms


$ nmap 10.0.0.150
Starting Nmap 7.91 ( https://nmap.org ) at 2021-04-24 16:31 EDT
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.06 seconds
$ nmap -Pn 10.0.0.150
Host discovery disabled (-Pn). All addresses will be marked 'up' and scan times will be slower.
Starting Nmap 7.91 ( https://nmap.org ) at 2021-04-24 16:31 EDT

乍一看,我认为 CUPS 可以看到我的打印机:

$ lpinfo -v
network beh
file cups-brf:/
serial serial:/dev/ttyS0?baud=115200
network lpd
network ipps
network https
network socket
network http
network ipp
direct hp
direct hpfax
network dnssd://Brother%20MFC-7860DW._pdl-datastream._tcp.local/

相似地,

$ sudo /usr/lib/cups/backend/dnssd
[sudo] password for smgutstein:
DEBUG: Querying "Brother\032MFC-7860DW._ipp._tcp.local"...
DEBUG: Querying "Brother\032MFC-7860DW._pdl-datastream._tcp.local"...
DEBUG: Querying "Brother\032MFC-7860DW._printer._tcp.local"...
DEBUG: sent=0, count=3
DEBUG2: query_callback(browser=0x556af61f6c40, interfaceIndex=-1, protocol=-1, event=2, fullName="Brother\032MFC-7860DW._ipp._tcp.local", rrclass=1, rrtype=16, rdata=(nil), rdlen=0, flags=0, context=0x556af61f6180)
DEBUG2: query_callback(browser=0x556af61f6560, interfaceIndex=2, protocol=0, event=0, fullName="Brother\032MFC-7860DW._pdl-datastream._tcp.local", rrclass=1, rrtype=16, rdata=0x556af61f85b8, rdlen=254, flags=5, context=0x556af61f6000)
DEBUG2: query_callback: "txtvers=1".
DEBUG2: query_callback: "qtotal=1".
DEBUG2: query_callback: "pdl=application/vnd.hp-PCL".
DEBUG2: query_callback: "ty=Brother MFC-7860DW".
DEBUG2: query_callback: "product=(Brother MFC-7860DW)".
DEBUG2: query_callback: "adminurl=http://BRN001BA9F91290.local./".
DEBUG2: query_callback: "priority=25".
DEBUG2: query_callback: "usb_MFG=Brother".
DEBUG2: query_callback: "usb_MDL=MFC-7860DW".
DEBUG2: query_callback: "Color=F".
DEBUG2: query_callback: "Copies=T".
DEBUG2: query_callback: "Duplex=F".
DEBUG2: query_callback: "PaperCustom=T".
DEBUG2: query_callback: "Binary=T".
DEBUG2: query_callback: "Transparent=F".
DEBUG2: query_callback: "TBCP=T".
DEBUG2: query_callback(browser=0x556af61f6560, interfaceIndex=-1, protocol=-1, event=2, fullName="Brother\032MFC-7860DW._pdl-datastream._tcp.local", rrclass=1, rrtype=16, rdata=(nil), rdlen=0, flags=0, context=0x556af61f6000)
DEBUG2: query_callback(browser=0x556af61f6680, interfaceIndex=2, protocol=0, event=0, fullName="Brother\032MFC-7860DW._printer._tcp.local", rrclass=1, rrtype=16, rdata=0x556af61f8830, rdlen=271, flags=5, context=0x556af61f6320)
DEBUG2: query_callback: "txtvers=1".
DEBUG2: query_callback: "qtotal=1".
DEBUG2: query_callback: "pdl=application/vnd.hp-PCL".
DEBUG2: query_callback: "rp=duerqxesz5090".
DEBUG2: query_callback: "ty=Brother MFC-7860DW".
DEBUG2: query_callback: "product=(Brother MFC-7860DW)".
DEBUG2: query_callback: "adminurl=http://BRN001BA9F91290.local./".
DEBUG2: query_callback: "priority=75".
DEBUG2: query_callback: "usb_MFG=Brother".
DEBUG2: query_callback: "usb_MDL=MFC-7860DW".
DEBUG2: query_callback: "Color=F".
DEBUG2: query_callback: "Copies=T".
DEBUG2: query_callback: "Duplex=F".
DEBUG2: query_callback: "PaperCustom=T".
DEBUG2: query_callback: "Binary=T".
DEBUG2: query_callback: "Transparent=T".
DEBUG2: query_callback: "TBCP=F".
DEBUG2: query_callback(browser=0x556af61f6680, interfaceIndex=-1, protocol=-1, event=2, fullName="Brother\032MFC-7860DW._printer._tcp.local", rrclass=1, rrtype=16, rdata=(nil), rdlen=0, flags=0, context=0x556af61f6320)
DEBUG2: query_callback(browser=0x556af61f6c40, interfaceIndex=2, protocol=0, event=0, fullName="Brother\032MFC-7860DW._ipp._tcp.local", rrclass=1, rrtype=16, rdata=0x556af61f882c, rdlen=271, flags=4, context=0x556af61f6180)
DEBUG2: query_callback: "txtvers=1".
DEBUG2: query_callback: "qtotal=1".
DEBUG2: query_callback: "pdl=application/vnd.hp-PCL".
DEBUG2: query_callback: "rp=duerqxesz5090".
DEBUG2: query_callback: "ty=Brother MFC-7860DW".
DEBUG2: query_callback: "product=(Brother MFC-7860DW)".
DEBUG2: query_callback: "adminurl=http://BRN001BA9F91290.local./".
DEBUG2: query_callback: "priority=50".
DEBUG2: query_callback: "usb_MFG=Brother".
DEBUG2: query_callback: "usb_MDL=MFC-7860DW".
DEBUG2: query_callback: "Color=F".
DEBUG2: query_callback: "Copies=T".
DEBUG2: query_callback: "Duplex=F".
DEBUG2: query_callback: "PaperCustom=T".
DEBUG2: query_callback: "Binary=T".
DEBUG2: query_callback: "Transparent=T".
DEBUG2: query_callback: "TBCP=F".
network dnssd://Brother%20MFC-7860DW._pdl-datastream._tcp.local/ "Brother MFC-7860DW" "Brother MFC-7860DW" "MFG:Brother;MDL:MFC-7860DW;CMD:PCL;" ""

还,

$ lpstat -t
scheduler is running
system default destination: MFC-7860DW
device for MFC-7860DW: dnssd://Brother%20MFC-7860DW._pdl-datastream._tcp.local/
MFC-7860DW accepting requests since Sat 24 Apr 2021 04:06:38 PM EDT
printer MFC-7860DW is idle.  enabled since Sat 24 Apr 2021 04:06:38 PM EDT

但,

$ /usr/lib/cups/backend/snmp 10.0.0.150

没有响应,尽管打印请求没有引发错误,但也不会打印。

为了检查整体网络健康状况,我尝试了ifconfigroute,结果如下:

$ ifconfig
enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether d0:50:99:7c:ca:b9  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
        device interrupt 20  memory 0xfb400000-fb420000  

enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.158  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::25c2:3940:1906:7a6d  prefixlen 64  scopeid 0x20<link>
        ether d0:50:99:7c:ca:b7  txqueuelen 1000  (Ethernet)
        RX packets 4279  bytes 4318473 (4.3 MB)
        RX errors 0  dropped 16  overruns 0  frame 0
        TX packets 2684  bytes 435733 (435.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 18  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 376  bytes 36871 (36.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 376  bytes 36871 (36.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         G3100.myfiosgat 0.0.0.0         UG    100    0        0 enp5s0
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 enp5s0
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 enp5s0

但是,现在我有点不知所措了。我的打印机在我的网络上。我可以看到它。但我就是无法与它通信。我应该怎么做才能 ping 它,更重要的是,打印到它。

相关内容