Instructions for using the ip address and tcpdump commands in Linux

Source: Internet
Author: User
1. ip commands the ip commands integrate the ifconfig and rout commands and are more powerful. Ip [-s] link/address/route1) iplinkset/show [device] [action and parameter] 2) ipaddress [add | del] [IP parameter] [dev device name] [related parameter] related parameter: broadcast: sets the broadcast address. 1. ip commands
The ip commands integrate the ifconfig and rout commands and are more powerful.
Ip [-s] link/address/route
1) ip link set/show [device] [action and parameter]
2) ip address [add | del] [IP parameters] [dev device name] [related parameters]
Related parameters:
Broadcast: sets the broadcast address. if the value is +, it indicates "Auto calculation by the system 』
Label: the alias of the device. for example, eth0: 0!
Scope: The domain of this interface, usually the following categories:
Global: allow connections from all sources;
Site: only IPv6 is supported. only local connections are allowed;
Link: allow self-connection only for this device
Host: only connections within the host are allowed;
3) ip route [add | del] [IP or domain] [via gateway] [dev device]
Parameters:
Show: displays the route table. you can also use list
Add | del: add or delete a route
IP address or domain: you can use a domain such as 192.168.50.0/24 or a simple IP address.
Via: The gateway is not required.
Dev: The device connects out. this is required.
Mtu: you can set an additional MTU.

2,TcpdumpCommand
1) tcpdump-w x. cap can be used to capture packets to files. wireshark can be used for more intuitive analysis.
2) keywords of tcpdump
The first type keyword mainly includes host, net, port
The second type is the key words for determining the transmission direction, including src and dst, which indicate the transmission direction.
The third type is the protocol keyword, which mainly includes fddi, ip, arp, rarp, tcp, udp, and other types.
In addition to the three types of keywords, other important keywords are as follows: gateway, broadcast, less, greater,
There are three other logical operations. The non-operation is 'not ''! ', And the operation is 'and',' & '; or the operation is 'or',' │'
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.