1910 views|1 replies

298

Posts

1

Resources
The OP
 

Exynos4412 development board - Network - Same network segment [Copy link]

1.1 Same network segment
In many experiments, some basic knowledge of LAN is needed. In the process of technical support, it is found that many users are
very vague about this concept, which leads to the inability to implement experiments if the IP address or network environment changes slightly. If
you have not been exposed to this concept, it is recommended to read this document carefully. It is best to manually calculate and verify whether the two IP addresses are in the
same network segment. The concept of "same network segment" is often used in
LAN communication
. To understand this concept, you need to combine IP address and subnet mask.
This article is based on iTOP-4412 development board
1.1.1 IP address
There are a lot of articles on the Internet about the theoretical knowledge of IP address.
Here we mainly introduce the IP addresses that need to be paid attention to related to the development board.
As shown in the figure below, using IF config, you can view the IP under the Ubuntu system. The figure below shows that the IP address of Ubuntu is 192.168.0.226.

(, downloads: 0)

When using SSH software to connect to Ubuntu to transfer files, you need to check the IP address in Ubuntu first.
Let's take a look at the IP of the development board, as shown below. When checking the etc file of the minimum file system, you can see that the default IP address is 192.168.1.230.

(, downloads: 0)

The above picture is the minimum system without packaging and compilation. The following picture is the minimum running Linux system, which can also query and modify the IP address.

(, downloads: 0)

When the minimum system is running on the development board, you can also use the vi command to modify the IP address. 1.1.2 Subnet Mask The query method of the subnet mask is exactly the same as the query method of the IP.

As shown in the figure below, use ifconfig to view the subnet mask under the Ubuntu system. The figure below shows that the subnet mask of Ubuntu is 255.255.255.0.

(, downloads: 0)

Let's take a look at the subnet mask of the development board. As shown in the figure below, you can see the default subnet mask by viewing the etc/eth0-setting file in the minimum file system.

(, downloads: 0)

The above picture is the minimum system without packaging and compilation. The picture below is the minimum running Linux system, which can also query and modify the subnet mask.

(, downloads: 0)

When the minimum system is running on the development board, you can also use the vi command to modify the subnet mask.

2.1 Confirm that the IP is in the same network segment

This section mainly introduces how to confirm whether two IPs are in the same network segment.

If you find that the IP of the Ubuntu system and the IP of the development board are not in the same network segment, you need to modify the IP of the development board.

Simply two IPs cannot be used to directly confirm whether they are in the same network segment. A conclusion can only be drawn through calculation in combination with the subnet mask.

The calculation method is: perform AND operation on the two IPs and the corresponding subnet mask respectively. If the results are equal, it means they are in the same network segment.

Here we use the IP and subnet mask in the development board and Ubuntu system in Sections 2.1 and 3.1 for demonstration.

The IP and subnet mask of the Ubuntu system are: 192.168.0.226 and 255.255.255.0

The IP address and subnet mask of the development board are: 192.168.1.230 and 255.255.255.0

To perform AND operations, you need to convert to binary

Ubuntu systems:

IP: 11000000 10101000 00000000 11100010

MASK: 11111111 11111111 11111111 00000000

Result Binary: 11000000 10101000 00000000 00000000

Result Hexadecimal: 192.168.0.0

Development Board:

IP: 11000000 10101000 00000001 11100110

MASK: 11111111 11111111 11111111 00000000

Result Binary: 11000000 10101000 00000001 00000000

Result Hexadecimal: 192.168.1.0

Comparing the two hexadecimal results above, we can find that the IP addresses in these two examples are not in the same network segment.

The board needs to modify the IP according to the router or switch.

3.1 Modify IP and subnet mask according to actual situation

As shown in the figure below, the author's router address is 192.168.0.1.

Log in to the router according to the actual situation.

This address is usually there, if not check the manual of the router.

(, downloads: 0)

Note that the gateway in the WAN settings interface in the figure above is 192.168.1.1, which is the gateway of the wide area network and is used in the experiment.

If it is the gateway of the local area network, you need to select "LAN port settings" and then find the gateway.

As shown in the figure below, select DHCP server, and there will be an IP range for allocating LAN.

Set it to the range of 192.168.0.220 to 192.168.0.250.

(, downloads: 0)

As shown in the figure below, select "LAN Port Settings" and then search, the subnet mask is 255.255.255.0.

In addition, the address 192.168.0.1 above will be needed in the subsequent NFS file system experiments.

The address should be considered as the gateway of the LAN, and the gateway in the WAN cannot be used!

(, downloads: 0)

After understanding the IP address, subnet mask, and checking the router settings, you can first determine the subnet mask.

255.255.255.0, and the IP address can be in the range of 192.168.0.220 to 192.168.0.250.

Take an address in this interval to calculate.

Finally, according to everyone's actual situation, after confirming the IP address and MASK address, modify the minimum Linux system

etc/eth0-settings file, set their IPs to the same network segment!

After understanding the concept of "same network segment", subsequent network-related experiments will be much simpler.

This post is from ARM Technology

Latest reply

  Details Published on 2019-12-12 14:27
Personal signature更多开发板详情了解哦

1.https://arm-board.taobao.com
2.www.topeetboard.com
Q: 2551456065
 

11

Posts

0

Resources
2
 

This post is from ARM Technology
 
Personal signature

进项票管理   

 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list