Network commands for Linux are organized in the update

Source: Internet
Author: User

Network commands for Linux are organized in the update


1. Install the package:


    • Net-tools main commands: Netstat, ifconfig, route, Iptunnel

    • Iproute Main commands: ss, IP addr, ip route, IP tunnel


2.net-tools Series Main usage:


    • Netstat

#查看本机开启的 Tcp[-t] udp[-u] listener [-l] port, in digital form [-n], display pid| process name [-p]# netstat-tunlpproto recv-q send-q Local Address F               Oreign Address State Pid/program name TCP 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 25/httpd


        Ifconfig

 #查看本机网络ip信息 #ifconfig eth0eth0: flags=4163<up,broadcast, running,multicast>  mtu 1500        inet  172.17.0.2  netmask 255.255.0.0  broadcast 0.0.0.0         ether 02:42:ac:11:00:02  txqueuelen 0   (Ethernet)          RX packets 5344  bytes 7795340  (7.4 mib )         RX errors 0  dropped 0   overruns 0  frame 0        tx packets  1157  bytes 78876  (77.0 kib)         TX  Errors 0  dropped 0 overruns 0  carrier 0  collisions  0 


    • Route

#查看本机路由信息 #routekernel IP Routing tabledestination Gateway genmask Flags Metric Ref use Ifacedefault     Gateway 0.0.0.0 UG 0 0 0 eth0172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0


    • Iptunnel

Null


3.iproute Series Main usage:


    • Ss

 #查看本机开启的  tcp4[-t4]  monitoring [-l]  port, [-n]  display in digital form # ss  -ln -t4Netid  State      Recv-Q Send-Q       Local Address:Port                      Peer Address:Port               tcp    LISTEN      0      128                      *:80                                    *:* 


    • IP addr

#查看本机网络ip信息 # IP Addr 34:eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc noqueue State up Link/ether 02:4 2:AC:11:00:02 BRD ff:ff:ff:ff:ff:ff inet 172.17.0.2/16 scope global eth0 Valid_lft forever Preferred_lft Forever


    • IP route

#查看本机路由信息 # ip Routedefault via 172.17.0.1 dev eth0 172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.2


    • IP Tunnel

Null


#

This article is from the "Frog Technology Archive" blog, so be sure to keep this source http://frogtwo.blog.51cto.com/3805708/1937385

Network commands for Linux are organized in the update

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.