1. ifconfig interface [option]: Query sets the relevant parameters such asnetwork card and IP domain, option parameter ,
1) interface: Network card interface code,eg,eth0,eth1,ppp0, etc.
2) up,down: Start or close the network interface
3) MTU: You can set different MUT values, such as 1500
4) netmask: Subnet mask
5) broadcast: Broadcast address
Interpretation of results:
1) eth0: Network card code
2) HWaddr: Network card hardware address, IE MAC
3) inet addr: address of IPV4
4) bcast:broadcast, broadcast address
5) mask:netmask, Mask
6) innet6 addr:IPv6 Address
7) MTU: Maximum Transmission Unit
8) RX: Network by boot up to date packet acceptance,packets, representing the number ofpackets,Erros, representing the amount of packet errors, dropped, Represents the number of packets discarded due to a problem, etc.
9) TX: For the network boot up to the current transmission situation
Collisions: Represents the packet collision situation, if occurring several times, representing the network instability
2. ifup {interface};ifdown Similar: These two instructions are scripts that start the network interface in a simple way that queries the /etc/sysconfig/ Network-scripts the set parameters in the ifcfg-ethx in the script to start
3. Route [-nee];route add [-net|-host] [ domain or host ] netmask [Mask][gw|dev];Route del [-N Et|-host] [ domain or host ]netmask [mask] [Gw|dev]: query, set routing table, parameters,
1)-N: Display addressas IP and Port
2)-ee: Use more detailed information to display
3)-net: Indicates that the following route is a domain
4)-host: Represents a route that is followed by a connection to a single host
5)netmask: Related to the domain, you can set the netmask to determine the size of the domain
6)GW:The Gateway 's shorthand, followed by the IP parameter values.
7)Dev: If you just want to specify which one of the network card to go online, then use this setting, followed by eth0, etc.
Interpretation of results:
1) Destination,genmask: The two are network and netmask, with these two groups synthesizing a complete domain
2) Gateway: Gateways, 0.0.0.0 that the route is transmitted directly from the local computer, that is, the Mac can be directly communicated via the LAN, if there is a display IP, it means that the route needs to go through the router's help to be able to send out.
3) Flag: Flag, options available,
U (Route is up): the route is started
H (target is a host): Destination is a host (IP) rather than a domain
G (use Gateway): Need to pass the packet through an external host (gateway)
R (reinstate route for dynamic routing): Restores the flag of routing information when using dynamic routing
D (dynamically installed by daemon or redirect): Already set to dynamic routing by the Service or port function
M (modified from routing daemon or redirect): The route has been modified
! (Reject route): This route will not be accepted (to withstand insecure domains)
4) Iface: This is the interface for routing packets
4.IP [option] [action] [instruction]: Network parameter synthesis instruction, option options available,
1)-S: Displays statistics of the device, such as the number of packets received
Actions, which can be performed on which network parameters, including,
1) Link: About the device settings, including Mtu,mac address and so on
2) Addr/address: About additional IP protocols, such as the achievement of multiple IPs, etc.
3) route: routing-related settings
IP [-S] link show: Simple access to information about the device
IP [-S] link set [device] [action and parameters], parameters are,
1) Show: Show only the relevant contents of this device, such as adding-S will show more data
2)-set: Can start to set the project, device refers to eth0,eth1 and so on interface code
Actions and Parameters: includes the following actions:
Up|down: Start (UP) or off (down) an interface, other parameters use the default Ethernet network
Address: If the device can change the Mac, this parameter changes
Name: Give this device a special name.
MTU: is the maximum transmission unit
This article is from "Tiger Brother's Blog" blog, please be sure to keep this source http://7613577.blog.51cto.com/7603577/1610166
Linux Common Network Instructions