Ifconfig-route-netstat

Source: Internet
Author: User
Tags nameserver

Ifconfig command

Ifconfig-a

Ifconfig eth0 [Up|down]

Ifconfig eth0 172.16.6.14/16 [up]

Ifconfig eth0 172.16.6.14/16 (16 subnet mask length)

Ifconfig eth0 172.16.6.14 netmask 255.255.0.0

Note: effective immediately.

Enable promiscuous mode: [-]promisc

Route command

Routing Management Commands

View Route-n

Adding a route add

Route add-host 192.168.1.44 GW 172.16.6.1 Dev eth0 (destination host routing)

Route add-net 192.168.0.0 netmask 255.255.255.0 gw 172.16.6.1 Dev eth0

Default route, Gateway:

Route add-net 0.0.0.0 netmask 0.0.0.0 GW 172.16.6.1

Route add default GW 172.16.6.1

Route Del-host 192.168.1.44

Route del-net 192.168.0.0 netmask 255.255.255.0

DNS server Specifies

/etc/resolv.cnfg

NameServer DNS_IP1

NameServer DNS_IP2

NameServer DNS_IP3

Positive solution: Fqdn-->ip

Dig-t A FQDN

Host-t A FQDN

Inverse solution: Ip-->fqdn

Dig-x IP

Host-x IP

Netstat: Network Status View command

Netstat-print network connections, routing tables, interface statis-

Tics, masquerade connections, and multicast memberships

Show Network Connections:

Netstat-t

Netstat-tn

Netstat-atn

-t:tcp

-u:udp

-r:raw socket

-L: Monitor

-A: all States

-N: Displayed in numeric format, not reversed

-e: Extended format information

-P: Show dependent process PID

Common combinations:

-TAN,-UAN,-TNL,-UNL

Show route Table

Netstat-rn


Display interface Statistics

Netstat-i

Netstat-ieth0


Ifconfig-route-netstat

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.