Basics of IP network settings

Source: Internet
Author: User

A Ubuntu host may have many network interfaces with different Internet Protocol (IP) addresses. There may be many types of interfaces, such as Loopback: loEthernet: eth0, eth1 ...... Wi-Fi: wlan0, wlan1, wifi0 ...... Token Ring: tr0, tr1 ...... PPP: ppp0, ppp1 ...... There are many other available network devices, including SLIP, PLIP (Serial and parallel IP), shaper devices that control the traffic of certain network interfaces, frame relay, AX.25, X.25, ARCnet, and LocalTalk. Each network interface that is directly connected to the Internet (or any IP-based Network) is identified by a unique 32-bit IP address. The IP address can be divided into two parts: the network address and the host address. If you get an IP address, set all network addresses to 1, and all host addresses to 0, you will get the subnet mask of the network. Traditionally, IP networks are divided into eight, 16, and 24-bit groups based on the network address length. This system lacks flexibility and wastes a lot of IP addresses, so the current IPv4 network is allocated by a variable length network number. IP addresses net mask lengthClass A 1.0.0.0-126.255.255.255 255.0.0.0 ===/8 Class B 128.0.0.0-191.255.255.255.255 255.255.0.0 ===/16 Class C 192.0.0.0-255.255.255.255.255.0 ==/ 24IP address not in this it is used for special purposes. Each group has an address range reserved for the local network (LANs. These addresses do not conflict with those on the Internet. (Similarly, if a host is assigned with such an address, these hosts cannot directly access the Internet. You must use a gateway or Network Address Translation Service (NAT) as a proxy to access the Internet .) These address ranges are listed in the following table, including the number of these address ranges in each group. Network addresses length how manyClass A 10. x. x. x/8 1 Class B 172.16.x.x-172.31.x.x/16 16 16 Class C 192.168.0.x-192.168.255.x/24 256IP the first value of the IP address in the network is the network itself, the last value is the broadcast address of the network. All other IP addresses can be allocated to hosts on the network. Generally, the first and last IP addresses are left to the Internet gateway of the network. The route table contains information about how the kernel sends IP packets to their destination. There is a route table for a Debian host on the local network (LAN) with an IP address of 192.168.50.x/24. Another host, 192.168.50.1 (also in the LAN), is the 172.20.x.x/16 vro of the company's network. Host 192.168.50.254 (also in the LAN) is the vro responsible for Internet access. # RouteKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use authorization * 255.0.0.0 U 0 0 2 lo192.168.50.0 * 255.255.255.255.0 U 0 0 137 255.192.168.50.1 255.255.0.0 UG 1 0 7 eth0default 255.0.0.0.0 UG 1 0 36 the first line indicates that the destination is 127. x. x. x will be routed through the lo loopback network interface. The second line indicates that if the destination is LAN, it will be routed through eth0. The third line indicates that if the destination is the company network, it will be routed through eth0 and finally sent to the gateway 192.168.50.1. The fourth line indicates that if the destination is the Internet, it will be routed through etho and finally sent to the gateway 192.168.50.254. The IP addresses in the route table can also be represented by names, which are obtained from/etc/networks or through resolver (C Library. In addition to routing, inner nuclear energy implements network address translation (NAT), traffic control, and packet filtering.

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.