内容导航:

一、怎么查看路由器开放端口

我估计你用的是普通的小型路由器,可能路由器上有防火墙功能,1701至1704为非熟知端口一般不会做限制。

很可能是你pc的上的防火墙上把端口关闭了,检查下防火墙的设置,启动财务软件,在运行里输入cmd,在console窗口里输入netstate

-a

检查端口1701至1704是否是listen状态。

如果是listen状态证明本地端口已经打开可以进行tcp连接,如果还是无法连接。

可能是你的isp提供的接入禁止使用端口1701至1704.联系你的isp。

如果公司有硬件防火墙或者路由器上带有防火墙功能,如果提供web配置方式可以使用web页面进行配置,里面应该有相关选项(图文并茂比较简单直观)。

如果web配置中无法提供对端口过滤功能的配置就采用本地配置方式。

使用rs—232串口线缆连接路由器的console口和pc机的串口。

在pc机上开始->附件->通讯->超级终端,设置好通信参数,通常是波特率9600,8位数据位,1位停止位,无奇偶校验,无流控,不同厂商可能参数不一致,请查看产品手册。

进入后由于可能有不同的操作系统常用的有ios(思科设备)和vrp(华为的设备)两种操作系统大同小异(但是通常的配置都是在第三层上的配置不涉及传输层的配置,打开tcp端口应该是集成有防火墙的路由器的配置)具体配置命令还要查看产品手册。

我能提供的信息就这么多。

二、如何查看路由器端口号

用netstat -a -n命令查看。

用state命令查看相关讯息:

LISTEN:侦听来自远方的TCP端口的连接请求

SYN-SENT:再发送连接请求后等待匹配的连接请求

SYN-RECEIVED:再收到和发送一个连接请求后等待对方对连接请求的确认

ESTABLISHED:代表一个打开的连接

FIN-WAIT-1:等待远程TCP连接中断请求,或先前的连接中断请求的确认

FIN-WAIT-2:从远程TCP等待连接中断请求

CLOSE-WAIT:等待从本地用户发来的连接中断请求

CLOSING:等待远程TCP对连接中断的确认

LAST-ACK:等待原来的发向远程TCP的连接中断请求的确认

TIME-WAIT:等待足够的时间以确保远程TCP接收到连接中断请求的确认

CLOSED:没有任何连接状态

三、如何查询路由端口信息

1.查询机器用了哪个端口

display arp dynamic

Type: S-Static D-Dynamic

IP Address MAC Address VLAN ID Port Name Aging Type

10.248.2.190 0000-5e00-010a 220 GigabitEthernet6/0/48 12 D

10.248.2.189 0018-8288-64be 220 GigabitEthernet6/0/1 19 D

10.248.2.188 0018-8289-87e3 220 GigabitEthernet6/0/48 19 D

10.248.3.244 0018-8270-996b 210 GigabitEthernet6/0/30 4 D

10.248.3.246 0000-5e00-010a 210 GigabitEthernet6/0/30 13 D

10.248.3.245 0018-8287-c277 210 GigabitEthernet6/0/1 16 D

10.248.3.195 000f-e2b2-5a0a 110 GigabitEthernet6/0/1 18 D

或者查看MAC地址对应的端口

display mac-address

MAC ADDR VLAN ID STATE PORT INDEX AGING TIME(s)

0000-5e00-0101 10 Learned GigabitEthernet6/0/1 AGING

0003-b24a-9308 10 Learned GigabitEthernet6/0/1 AGING

001f-290d-a94b 10 Learned GigabitEthernet6/0/1 AGING

001f-290d-a968 10 Learned GigabitEthernet6/0/1 AGING2.通过查询配置信息查询商品名字

display current-configuration

interface GigabitEthernet6/0/42

port access vlan 110

#

interface GigabitEthernet6/0/43

port access vlan 110

#

interface GigabitEthernet6/0/44

port access vlan 20

#

interface GigabitEthernet6/0/45

#

interface GigabitEthernet6/0/46

#

interface GigabitEthernet6/0/47

#

interface GigabitEthernet6/0/48

port access vlan 220

3.查看端口状态

display interface GigabitEthernet6/0/31

GigabitEthernet6/0/31 current state : UP

IP Sending Frames’ Format is PKTFMT_ETHNT_2, Hardware address is 000f-e2b2-5b17

The Maximum Transmit Unit is 1500

Media type is Twisted pair, loopback not set

Port hardware type is 1000_BASE_T

1000Mbps-speed mode, Full-duplex mode

Link speed type is autonegotiation, Link duplex type is autonegotiation

Flow-control is not enabled

The Maximum Frame Length is 1536

Allow jumbo frame to pass

PVID: 110

Mdi type: auto

Port link-type: access

Tagged VLAN ID : none

Untagged VLAN ID : 110

Last 300 seconds input: 0 packets/sec 5 bytes/sec

Last 300 seconds output: 6 packets/sec 1453 bytes/sec

Input(total): 13184423 packets, 2298060871 bytes

– broadcasts, – multicasts

Input(normal): 13184423 packets, – bytes

512120 broadcasts, 10 multicasts

Input: 0 input errors, 0 runts, – giants, 0 throttles, 0 CRC

0 frame, – overruns, – aborts, – ignored, – parity errors

Output(total): 102676481 packets, 32553486104 bytes

– broadcasts, – multicasts, – pauses

Output(normal): 102676481 packets, – bytes

850988 broadcasts, 48393324 multicasts, 0 pauses

Output: 0 output errors, – underruns, – buffer failures

0 aborts, 0 deferred, 0 collisions, 0 late collisions

– lost carrier, – no carrier

Receive Packet Peak Value Info: 50985214 bytes/sec, happened at 16:8:31 4-8-2010

Transmit Packet Peak Value Info: 95747209 bytes/sec, happened at 10:32:16 12-15-20094.对于一个端口对应多个IP的需要查到这个网卡地址

先登陆第一台路由器,查看IP

display arp dynamic

Type: S-Static D-Dynamic

IP Address MAC Address VLAN ID Port Name Aging Type

10.248.2.190 0000-5e00-010a 220 GigabitEthernet6/0/48 12 D

10.248.2.189 0018-8288-64be 220 GigabitEthernet6/0/1 19 D

10.248.2.188 0018-8289-87e3 220 GigabitEthernet6/0/48 19 D

10.248.3.244 0018-8270-996b 210 GigabitEthernet6/0/30 4 D

10.248.3.246 0000-5e00-010a 210 GigabitEthernet6/0/30 13 D

10.248.3.245 0018-8287-c277 210 GigabitEthernet6/0/1 16 D

10.248.3.195 000f-e2b2-5a0a 110 GigabitEthernet6/0/1 18 D

10.248.2.3 000f-e2b2-5a0a 10 GigabitEthernet6/0/1 13 D

10.248.2.13 001f-290d-a96c 10 GigabitEthernet6/0/1 13 D

10.248.2.31 0023-7da9-9f8d 10 GigabitEthernet6/0/18 14 D

10.248.2.36 0023-7da9-9f5c 10 GigabitEthernet6/0/21 14 D

10.248.2.14 001f-290d-a968 10 GigabitEthernet6/0/1 15 D

10.248.2.28 0023-7da9-8ff7 10 GigabitEthernet6/0/17 15 D

10.248.2.32 0023-7da9-9f8d 10 GigabitEthernet6/0/18 15 D

10.248.2.40 0023-7da9-9f3b 10 GigabitEthernet6/0/22 15 D

10.248.2.20 001f-290d-a94b 10 GigabitEthernet6/0/1 15 D

10.248.2.62 0000-5e00-0101 10 GigabitEthernet6/0/1 15 D

10.248.2.41 0000-5e00-0101 10 GigabitEthernet6/0/1 15 D

10.248.2.16 001f-290d-a91e 10 GigabitEthernet6/0/35 15 D

10.248.2.24 001f-290d-a957 10 GigabitEthernet6/0/36 15 D

10.248.2.11 001f-290d-a96c 10 GigabitEthernet6/0/1 19 D

10.248.2.55 0000-5e00-0101 10 GigabitEthernet6/0/1 19 D

10.248.2.19 001f-290d-a94b 10 GigabitEthernet6/0/1 19 D

10.248.2.23 001f-290d-a957 10 GigabitEthernet6/0/36 20 D

10.248.2.35 0023-7da9-9f5c 10 GigabitEthernet6/0/21 20 D

10.248.2.61 0003-b24a-9308 10 GigabitEthernet6/0/1 20 D

10.248.2.60 0003-b24a-9548 10 GigabitEthernet6/0/38 20 D

再登陆第二台路由器

display mac-address vlan 10

MAC ADDR VLAN ID STATE PORT INDEX AGING TIME(s)

0000-5e00-010a 10 Learned GigabitEthernet6/0/1 AGING

0003-b24a-9548 10 Learned GigabitEthernet6/0/1 AGING

000f-e2b2-5b18 10 Learned GigabitEthernet6/0/1 AGING

001f-290d-a91e 10 Learned GigabitEthernet6/0/1 AGING

001f-290d-a94f 10 Learned GigabitEthernet6/0/1 AGING

001f-290d-a957 10 Learned GigabitEthernet6/0/1 AGING

001f-290d-a961 10 Learned GigabitEthernet6/0/1 AGING

0023-7da9-8ff7 10 Learned GigabitEthernet6/0/1 AGING

0023-7da9-9f3b 10 Learned GigabitEthernet6/0/1 AGING

0023-7da9-9f5c 10 Learned GigabitEthernet6/0/1 AGING

0023-7da9-9f8d 10 Learned GigabitEthernet6/0/1 AGING

001f-290d-a96c 10 Learned GigabitEthernet6/0/33 AGING

001f-290d-a968 10 Learned GigabitEthernet6/0/34 AGING

001f-290d-a94b 10 Learned GigabitEthernet6/0/37 AGING

0000-5e00-0101 10 Learned GigabitEthernet6/0/38 AGING

0003-b24a-9308 10 Learned GigabitEthernet6/0/38 AGING— 16 mac address(es) found in vlan 10 — 这样就可以查出10.248.2.13这个IP用的是GigabitEthernet6/0/33这个端口