方法/步骤
1、进入linux,使用“ cat /etc/services ”命令,可以查看所有服务默认的端口列表信息。
2、使用“netstat”命令,查看正在连接的端口【连接】列表信息。
3、使用“nestat -a”命令,查看所有服务端口【监听、连接】列表信息。
4、套接字的种类除了t(TCP)、u(UDP)之外,还有w(RAW)、x(UNIX)套接字。
5、使用" netstat -ap"查看所有服务端口和对应的程序名称。
Router>enable 进入特权模式Router#configure terminal 进入配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface e 0/0 进入接口以太0/0
Router(config-if)#ip
Router(config-if)#ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码
Router(config-if)#no shutdown 开启端口
%LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
Router(config-if)#exit退出
Router(config)#ip host xiay 192.168.1.2默认域名指向(可以不配置的)
Router(config)#exit退出
Router#show interfaces e 0/0查看以太0/0信息
Ethernet0/0 is up, line protocol is up开启端口
Hardware is Lance, address is 000C.4198.5973 (bia 000C.4198.5973)MAC地址
Internet address is 192.168.1.1/24IP和掩码
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set, keepalive set (10 sec)
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of show interface counters never
Queueing strategy: fifo
Output queue 0/40, 0 dropsinput queue 0/75, 0 drops
5 minute input rate 1000 bits/sec, 2 packets/sec
5 minute output rate 1000 bits/sec, 2 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Router#ping 192.168.1.2pingIP地址
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms通了
Router#ping xiayping 域名(就是刚才定向的那个)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms通了
Router#copy startup-config tftp 拷贝我的配置文件到tftp
Address or name of remote host []?xiay拷贝到这(也可以输入IP)
Destination filename []?1保存文件名
No NVRAM configuration present失败
Router#
Router#show startup-config 检查我的配置 没有
%% Non-volatile configuration memory is not present
Router#copy running-config startup-config 把我ram上的配置copy到nvram上去
Destination filename [startup-config]?
Building configuration...
[OK]
Router#sh startup-config 再查看下 OK东西有了
Current configuration : 677 bytes
!
Version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
!
!
ip subnet-zero
ip host xiay 192.168.1.2
!
!
!
!
!
!
!
!
!
Router#copy startup-config tftp 拷贝 同上
Address or name of remote host []?xiay
Destination filename []?1
!!!!!!!!!!成功了!!!!!!!
[OK]
8390 bytes copied in 7 secs
===================================
boson 行敲出来顺便给你贴上去的 够详细了把 不加分对不起我啊
1、第一步在电脑上打开xshell,建立连接,输入主机名,用户名和密码,如下图所示:
2、第二步可以看到已经远程连接到linux系统服务器了,如下图所示:
3、第三步输入“ifconfig -a”命令,来查看linux系统ip,如下图所示:
4、第四步按回车键之后,可以查看到linux系统的ip地址,在eth0的下方inet旁边就是内网ip地址,如下图所示:
5、第五步也可以看一下按回车键的信息,eth0是网卡名称,lo是本地环回接口,netmask是本机掩码,如下图所示:
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)