Internet protocol commands

Source: Internet
Author: User
Tags unix domain socket

Internet protocol command ifconfig: configure the network interface tool usage: 1. view the interface status ifconfig: If no parameters are received, the current network interface is displayed; ifgon1_g-: ifconfig eth0: status of all network interfaces of the host. If the status of the eht0 interface is only followed by the port device name when the ifconfig command is called, the port configuration is displayed; if no parameters are included, the ifconfig command displays all information about the interfaces configured so far. If the-a option is included, the currently inactive interfaces can also be displayed. Example: helokity @ helokity-Lenovo :~ $ Ifconfig eth0eth0 Link encap: Ethernet hardware address ec: a8: 6b: 62: 94: f8 inet address: 202.38.79.100 broadcast: 202.38.79.255 mask: 255.255.255.0 inet6 address: 2001: da8: d800: 790: eea8: 6bff: fe62: 94f8/64 Scope: Global inet6 address: 2001: da8: d800: 75: eea8: 6bff: fe62: 94f8/64 Scope: Global inet6 address: fe80: eea8: 6bff: fe62: 94f8/64 Scope: Link up broadcast running multicast mtu: 1500 hops: 1 received packets: 287248 error: 0 discard: 0 overload: 0 frames: 0 sent packets: 134636 error: 0 discarded: 0 overload: 0 carrier: 0 collision: 0 sending queue length: 1000 receiving Bytes: 404980807 (404.9 MB) Sending Bytes: 12021088 (12.0 MB) interrupt: 43 MTU and Metric (Active points) these two columns show the maximum data transfer value and interface measurement value of the current eth0 interface. The interface metric value indicates the cost of sending a group in this path. Currently, no route is used in the kernel, but it may be used later. The RX (number of receiving groups) and TX (number of transfer groups) rows show the number of receive and transfer groups, as well as the number of group errors, the number of lost groups (one possible cause is a small amount of memory) and the number of overrun (usually occurs when the receiver receives data faster than the core processing speed ). 2. Configure the IP address of the ifconfig network port hw <HW> MAC address netmask mask address broadcast address [up/down]: Where hw is followed by the network interface type HW, ether indicates Ethernet, and also supports ifconfig down, such as ax25, ARCnet, and netrom: If eth0 is activated, it will be DOWN. This command is equivalent to ifdown eth0; ifconfig eh0 IP Address: Use ifconfig to configure the eth0 IP address, broadcast address, and network mask; ifconfig up: Enable eth0; this command is equivalent to ifup eth0 3. Configure the virtual network interface ifconfig eth1: 0 192.168.1.250 hw ether 00: 11: 00: 00: 11: 44 netmask 255.255.255.0 broadcast 192.168.1.255 upifcon Fig eth1: 1 192.168.1.249 hw ether 00: 11: 00: 00: 11: 55 netmask 255.255.255.0 broadcast 192.168.1.255 up above is the network interface of eth1, set two virtual interfaces; each interface has its own physical address and IP address ...... 4. the command line parameter Parameters of ifconfig indicates the various Parameters supported by ifconfig. These Parameters can be used to conveniently monitor and change the status of network interfaces. Up to activate the specified interface down to close the specified interface. This parameter can effectively block the IP information stream through the specified interface. If you want to permanently disable an interface, we also need to delete all the routing information for this interface from the Core routing table. netmask mask sets the IP network mask for the interface. The mask can be a 32-bit hexadecimal number with a prefix of 0x, or four decimal numbers separated by dots. If you do not want to divide the network into subnets, skip this option. If you want to use subnets, remember that each system in the network must have the same subnet mask. Pointpoint enables the point-to-point mode of the specified interface. It tells the core that this interface is a direct connection to another machine. When an address is included, the address is assigned to the machine at the other end of the list. If no address is provided, open the POINTPOINT option of the specified interface. Add a negative sign to disable the pointpoint option. Broadcast address when an address is used, set the broadcast address of this interface. If no address is provided, enable the IFF_BROADCAST option of the specified interface. Add a negative sign to disable this option. Metric number sets the interface metric value to an integer number. The measurement value indicates the cost of sending a group to this path. At present, there is no routing cost in the kernel, but it will be in the future. Mtu bytes sets the maximum number of bytes that can be processed by the interface during one transmission to an integer bytes. Currently, the core network code does not process IP segments. Therefore, you must set the MTU (maximum data transmission unit) value to a sufficiently large arp value to enable or disable the ARP protocol used on the specified interface. Add a negative sign to disable this option. Allmuti enables the normal mode of the specified interface. In this mode, the interface sends all the information flows on the network to the core, not just the information of your machine to the core. Add a negative sign to disable this option. hw sets the hardware address for the specified interface. ASCII characters that match the hardware type and sub-hardware address must be followed by this keyword. Ethernet (ether), AMPR, AX.25, and PPP traliers are currently supported to enable the tracker on the Ethernet frame. These configurations are not yet implemented in LINUX networks. Ifconfig can only set everything required by the interface name, network mask, and assigned IP address. When ifconfig misses or has a complex network, you only need to reset most parameters. Use netstat to check the network status. Next we will introduce netstat, a useful command to monitor the TCP/IP network configuration and working conditions. It displays the kernel route table, active network status, and useful statistics for each network interface. For more information, see man page. -A: displays information about all Internet connections, including those being monitored.-I: displays statistics about all network devices.-c: displays the network Update Status continuously. This parameter uses netstat to output the network status list once per second until the program is interrupted-n displays the remote address, local address, and port information in digital/raw form, instead of parsing host names and server-o display the end time of the counter and the back off of each network connection-r display the kernel route table-t only displays TCP socket information, including information being monitored-u only displays UDP socket information-v displays netstat version information-w displays raw socket information-x displays UNIX domain socket Information

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.