Linux基础06-网络命令
发布时间:2020-12-14 01:21:24 所属栏目:Linux 来源:网络整理
导读:查看Ipi地址: [email?protected]:~ $ ifconfigeth2: flags = 4163 UP,BROADCAST,RUNNING,MULTICAST mtu 1500 inet 192.168 . 237.1 netmask 255.255 . 255.0 broadcast 192.168 . 237.255 inet6 fe80::41dd:7cda:6cc8:525b prefixlen 64 scopeid 0x0 global
查看Ipi地址: [email?protected]:~$ ifconfig eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.237.1 netmask 255.255.255.0 broadcast 192.168.237.255 inet6 fe80::41dd:7cda:6cc8:525b prefixlen 64 scopeid 0x0<global> ether 00:50:56:c0:00:01 (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 eth3: flags=4163<UP,MULTICAST> mtu 1500 inet 192.168.93.1 netmask 255.255.255.0 broadcast 192.168.93.255 inet6 fe80::b4ca:766:f4fd:9787 prefixlen 64 scopeid 0x0<global> ether 00:50:56:c0:00:08 (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 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 1500 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x0<global> loop (Local Loopback) 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 wifi0: flags=4163<UP,MULTICAST> mtu 1500 inet 192.168.0.105 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::615e:5438:ddf1:2ca9 prefixlen 64 scopeid 0x0<global> unspec 9C-B6-D0-0F-7F-3F-00-00-00-00-00-00-00-00-00-00 (UNSPEC) 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 测试两台主机是否能通信 ping ip地址 [email?protected]:~$ ping 192.168.237.1 PING 192.168.237.1 (192.168.237.1) 56(84) bytes of data. 64 bytes from 192.168.237.1: icmp_seq=1 ttl=128 time=0.207 ms 64 bytes from 192.168.237.1: icmp_seq=2 ttl=128 time=0.202 ms 64 bytes from 192.168.237.1: icmp_seq=3 ttl=128 time=0.194 ms 64 bytes from 192.168.237.1: icmp_seq=4 ttl=128 time=0.192 ms ^C --- 192.168.237.1 ping statistics --- 4 packets transmitted,4 received,0% packet loss,time 3002ms rtt min/avg/max/mdev = 0.192/0.198/0.207/0.018 ms ping ip地址 -c 4? ping4次后就停止 [email?protected]:~$ ping 192.168.237.1 -c 4 PING 192.168.237.1 (192.168.237.1) 56(84) bytes of data. 64 bytes from 192.168.237.1: icmp_seq=1 ttl=128 time=0.175 ms 64 bytes from 192.168.237.1: icmp_seq=2 ttl=128 time=0.199 ms 64 bytes from 192.168.237.1: icmp_seq=3 ttl=128 time=0.155 ms 64 bytes from 192.168.237.1: icmp_seq=4 ttl=128 time=0.161 ms --- 192.168.237.1 ping statistics --- 4 packets transmitted,time 3002ms rtt min/avg/max/mdev = 0.155/0.172/0.199/0.021 ms 可以用Ping查看是否能够连接internet [email?protected]:~$ ping www.baidu.com -c 4 PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data. 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=55 time=18.1 ms 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=55 time=18.3 ms 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=55 time=21.2 ms 64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=55 time=17.9 ms --- www.a.shifen.com ping statistics --- 4 packets transmitted,time 3003ms rtt min/avg/max/mdev = 17.945/18.910/21.211/1.347 ms 查看域名对应ip地址 nslookup 网址 [email?protected]:~$ nslookup www.baidu.com Server: 222.246.129.80 Address: 222.246.129.80#53 Non-authoritative answer: www.baidu.com canonical name = www.a.shifen.com. Name: www.a.shifen.com Address: 14.215.177.38 Name: www.a.shifen.com Address: 14.215.177.39 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 任务1:Linux Kernel提权(50分)[2019年信息安全管理与评估
- 如何使用coreboot,SeaBIOS,GRUB和Linux内核启动x86系统?
- anyproxy-修改返回内容(beforeSendResponse)
- 以root身份运行的多个Linux系统管理员
- ssh – rsync与脚本提供的密码
- linux – 从eth0到tun0(OpenVPN)的隧道流量Ububtu 12.04
- 实施系统调用时,如何将系统调用号公开给用户区?
- rsync备份被认为是危险的?
- linux – 为什么Apache PHP需要执行权限才能写入文件?
- linux – Bash:返回引号和eval令人困惑的行为