Tag Archives: ip

Raspberry pie view IP address (command ifconfig) and exit Ping

1.1 raspberry pie view IP address with the following command:

ifconfig

The results are as follows

 

Note: Raspberry pie uses the command ifconfig to view the IP address, while the windows CMD command ipconfig to view the IP address.

 

1.2 the raspberry pie will continue to loop after the IP address is specified. If you want to exit the Ping loop, press the keyboard assembly: Ctrl + Z.

 

 

Reference content:

http://www.cnblogs.com/ma6174/archive/2013/09/29/3345278.html (Reference: View raspberry pie address command ifconfig)

Ubuntu network configuration+Fixing “Failed to bring up eth0” in Ubuntu

When I installed Ubuntu Server on one machine, the installation process skipped the step of network configuration, and When I logged in this machine via SSH on another machine, I was still unable to connect. Looking through the list of router DHCP Client Table, I found that the machine installing Ubuntu Server was not connected to the network, which was very strange.
$ifconfig
returns lo instead of eth0, which may be related to skipping network configuration during installation. Simply configure this machine to join the network normally.
$sudo pico /etc/network/interfaces
this will launch a simple text editor to edit Linux network configuration files
which you should see here:

auth lo
iface lo inet loopback

is exactly the lo loop. I need this machine running Ubuntu Server to get IP through DHCP to join the network. Then I just need to add the following configuration content of the lo loop above:

auth eth0
iface eth0 inet dhcp

press
Ctrl+O to save, press Ctrl+X to exit.

There are two ways to get your network configuration files into effect:
1, restart Ubuntu:

$sudo reboot
2, restart network components:

$sudo /etc/init.d/networking restart

as long as shown
Reconfiguring network interfaces… [OK]

is a successful restart of the network component.

if the IP is required instead of being obtained by DHCP
Manually specify the IP (such as 192.168.1.1) and specify the gateway (such as 192.168.1.254), then configure as follows:

Auth eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254

if you are manually specifying IP and you also need to access the Internet, such as wget download, then you also need to set DNS:

$sudo pico /etc/resolv.conf

to add configuration content here:

nameserver xxx.xxx.xxx.xxx

just save.

The attached:
Fixing “Failed to bring up eth0” in Ubuntu

1.
sudo /etc/init.d/networking restart

 

2,
ifconfig -a

3,
sudo vi /etc/network/interface

4.
sudo /etc/init.d/networking restart

5,
ifconfig

 

or

 

sudo rm /etc/udev/rules.d/70-persistent-net.rulessudo rm /etc/udev/rules.d/70-persistent-net.rulessudo rm /etc/udev/rules.d/70-persistent-net.rulessudo rm /etc/udev/rules.d/70-persistent-net.rules

The network card is fine after the reboot.

Determining IP information for eth0… failed; no link present. Check cable?

recently, there are too many things in my life, I have been wanting to learn Linux operating system well, but I have no time.

last night, ready to configure the FTP server, the results found that the virtual machine and the local network connection is not connected, baidu online once, the problem was quickly solved, so will solve the problem to share out.

>

1, use ifconfig command to check the RedHat network device (network interface card), found that eth0 network card did not start.

2. So I use the ifup eth0 command to enable the network interface eth0, and I realize that I cannot start today. failed; no link present. Check cable?”

solution:

1. The connection mode between the virtual machine and the machine is: host-only mode. I will not introduce the differences between several connection modes. If the previous connection was not host-only, the virtual machine will need to be restarted after the change.

2. Start the two virtual network CARDS of the machine.

3. Add the following script in /etc/sysconfig/network-scripts/ifcfg-eth0:
check_link_down() {
return 1;
}

specific operation is as follows:

enter the following command:

[root@localhost root]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# vi ifcfg-eth0


return 1;
check_link_down() {
return 1;
check_link_down() {
return 1;
check_link_down() {
return 1;
}

Next, restart the network (if it doesn’t work, restart the system!).
[root@localhost network-scripts]# ifup eth0
Determining IP information for eth0… done.


ok, see the above prompt indicates that it has been successful, you can check if you have got a valid IP by ifconfig.

Finally, check on the machine to see if you can PING the Linux operating system in the virtual machine