Linux操作系统基础进阶练习题
Linux操作系统基础进阶练习题
1)设定eth0网卡地址为192.168.0.11,子网为255.255.255.0,MTU的值为6000
#ifconfig eth0 192.168.0.11 netmask 255.255.255.0 mtu 6000
2)用route来增加一个路由,目的网段为192.168.1.0
#route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0
3)删除以上建立的路由信息
#route del -net 192.168.1.0 netmask 255.255.255.0 dev eth0
4)加入默认网关192.168.0.2
#route add default gw 192.168.0.2
5)删除默认网关192.168.0.2
#route del default gw 192.168.0.2
6)用ip命令来操作管理网络
6.1)用ip命令显示eth0的介面信息
6.2)关闭eth0网卡
6.3)更改eth0网卡代号为ckhitler,并查看结果
6.4)更改eht0网卡的MAC地址为bb:bb:bb:bb:bb:bb,并查看结果
6.5)开启eth0网卡
#ip link show
#ip -s link show eth0
#ip link set eth0 down
#ip link set eth0 name ckhiler
#ip link show
#ip link set eth0 address bb:bb:bb:bb:bb:bb
#ip link show
#ip link set eth0 up
7)启用dhcp的client
#dhclient eth0
8)PING网关地址192.168.0.1,判断MTU包,是否在1000以内
#ping -c 2 -s 1000 -M do 192.168.0.1
9)PING网关地址192.168.0.1,判断MTU包,是否在1000以内
#ping -c 2 -s 2000 -M do 192.168.0.1
10)追踪到www.britepic.org的路由表
#traceroute -n www.britepic.org
11)用netstat显示端口信息
11.1)显示TCP/UDP端口状态为LISTEN的信息
11.2)显示TCP/UDP端口状态为ESTABLISHED的信息
#netstat -tunl
#netstat -tun
12)用nslookup来查询www.britepic.org域名的正解信息
#nslookup www.britepic.org
13)用nslookup来查询202.108.9.39地址的反解信息
#nslookup 202.108.9.39
14)用tcpdump来监视网络数据包信息
14.1)只监视网卡eth0的网络数据包
14.2)只监视网卡eth0及端口25的网络数据包
14.3)只监视网卡eth0及端口25的网络数据包,并用16进程方式显示
14.4)只监视网卡eth0及端口25和源地址为192.168.0.3的网络数据包,并用16进程方式显示
14.5)只监视网卡eth0及端口25和源地址为192.168.0.3而长度为10240的网络数据包
14.6)只监视网卡eth0及端口25和源地址为192.168.0.3的网络数据包,以Snarf的形式抓完整的数据包到/tmp/data.cap文件
#tcpdump -i eth0 -nn
#tcpdump -i eth0 -nn port 25
#telnet 192.168.1.12 25
#tcpdump -i lo -nn -X 'port 25'
#tcpdump -i eth0 -nn 'port 25 and src host 192.168.0.3' -X
#tcpdump -i eth0 -s 10240 -nn 'port 25 and src host 192.168.0.3' -X
#tcpdump -i eth0 -nn 'port 25 and src host 192.168.0.3' -s0 -w /tmp/data.cap
15)用nc命令监视本机地址端口22的信息,并将信息写入test.txt文件
#nc -vv -o test.txt 192.168.0.12 22
16)用nmap扫描192.168.0.12地址的TCP/UDP端口
#nmap -sTU 192.168.0.12
17)用nmap扫描192.168.0.0/24网段活跃的主机
#nmap -sP 192.168.0.0/24
18)用nmap扫描192.168.0.0/24网段的端口,端口范围在1-1024
#nmap -p 1-1024 192.168.0.0/24
|
【内容导航】 | |
第1页:Linux网络工具 | 第2页:Linux Shell |
第3页:Linux VI | 第4页:Linux压缩管理 |
第5页:Linux磁盘管理 | 第6页:Linux磁盘配额 |
第7页:Linux防火墙及NAT | 第8页:Linux LVM |
第9页:Linux RPM安装与维护 | 第10页:Linux进程/性能管理 |
第11页:Linux内核编译与模组管理 | 第12页:Linux用户管理 |
第13页:Linux正规表达法 | 第14页:Linux目录操作 |
第15页:Linux chroot配置 | 第16页:Linux远程访问练习题 |
第17页:Linux网络文件系统NFS | 第18页:Linux的softwareRaid |
第19页:Linux的dns配置 | 第20页:Linux的postfix |
第21页:Linux SELinux | 第22页:Linux的ntp服务 |
第23页:Linux samba | 第24页:Linux的vsftpd |
第25页:Linux的DHCP | 第26页:Linux的NIS |
第27页:Linux的apache | 第28页:Linux的autofs |
第29页:Linux的squid | 第30页:Linux的Mysql |
第31页:Linux的mrtg | 第32页:Linux的snmp |
第33页:Linux的gpg加密 | 第34页:Linux的ACL |
第35页:Linux的openvpn |
评论暂时关闭