With the recent release of the DDK version 1.32.0.0(beta), the Atlas 200 DK could be connected to the Ubuntu server in three modes:
Using a USB cable: this mode is only meant to communicate with the Ubuntu server, the Atlas 200 DK will have no Internet access.
Using a router and a network cable: this mode allow Atlas 200 DK to access Internet, it would require the router to serve as the medium between the Atlas 200 DK and your PC.
Using a network cable: this mode is only meant to communicate with the Ubuntu server, the Atlas 200 DK will have no Internet access.
Assume that you have connected the Atlas 200 DK using one of the methods above, you can now configure the IP adress of the Atlas 200 DK.
Connect using a USB cable:
Download configure_usb_ehernet.sh from https://gitee.com/HuaweiAscend/tools or https://github.com/Ascend-Huawei/tools to any directory in Ubuntu (in here we will use /home/ascend/config_usb_ip/).
Open a terminal in the directory mentioned in the previous step.
Run ifconfig to query the name of the USB virtual NIC, if there are multiple USB NICs then try remove and insert the Atlas 200 DK.
Run the following command (assume the USB virtual NIC name is enp0s20f0u8, and IP address to be changed is 192.168.1.223):
bash configure_usb_ethernet.sh -s enp0s20f0u8 192.168.1.223
Run the ifconfig to check if the IP address have been changed successfully.
(Optional) The above procdures using the script can just be used for the first time, reconfigure the IP adress would need manual changes in the following steps.
Log in to Ubuntu and switch to root user:
su – root
Obtain the name of the USB virtual NIC:
ifconfig –a
Open the network interfaces file:
vi /etc/network/interfaces
Add the following lines into the interfaces file (assume the USB virtual NIC name enp0s20f0u4):
auto enp0s20f0u4
iface enp0s20f0u4 inet static
address 192.168.1.3
netmask 255.255.255.0
Modify the NetworkManager.conf file to prevent the configuration become invalid:
vi /etc/NetworkManager/NetworkManager.conf
Change managed=false to managed=true
Restart the network service:
ifdown enp0s20f0u4
ifup enp0s20f0u4
service NetworkManager restart
Connect using a router and network cable:
Change the IP address obtaining mode of the virtual NIC on the Atlas 200 DK to DHCP:
ssh HwHiAiUser@192.168.1.2
The default IP address of virtual NIC on Atlas 200 DK is 192.168.1.2, the default login password is Mind@123.
su root
vi /etc/network/interfaces
Modify the configuration of eth0 to the following:
auto eth0
iface eth0 inet dhcp
Save the modifications and exit:
:wq
Modify the NetworkManager.conf to prevent the configuration become invalid:
vi /etc/NetworkManager/NetworkManager.conf
Change managed=false to managed=true
Restart the network service:
service networking restart
service NetworkManager restart
Run ifconfig to obtain the IP address of eth0, this IP address can be used to communicate with the Ubuntu.
Connect using a network cable:
The IP address of Atlas 200 DK on Ubuntu can be changed to 192.168.0.x (x can be 0-1 or 3-255)
Log in to Ubuntu and switch to root user:
su – root
Open the network interfaces file:
vi /etc/network/interfaces
Add the following lines into the interfaces file (assume the virtual NIC name is eth0:1 and its static IP address 192.168.0.223):
auto eth0:1
iface eth0:1 inet static
address 192.168.0.223
netmask 255.255.255.0
Modify the NetworkManager.conf to prevent the configuration become invalid:
vi /etc/NetworkManager/NetworkManager.conf
Change managed=false to managed=true
Restart the network service:
service networking restart
service NetworkManager restart
*Note: If the IP address is set to be the same as the Atlas 200 DK (192.168.1.2 or 192.168.0.2) then it will result in IP conflict on your Ubuntu.