2. Set a fixed IP address and DNS on Ubuntu.
1) Open a terminal.
2) set a fixed IP Address
Enter sudo VI/etc/Network/interfaces on the terminal, which is usually displayed:
Auto Lo
Iface lo Inet loopback
Add the following content below:
Auto eth0
Iface eth0 Inet static
Address 192.168.0.120 # The fixed IP address you want to set
Gateway 192.168.0.1 # Gateway
Netmask 255.255.255.0 # Subnet Mask
Note two points here. Some users do not need to modify the settings. You can use ifconfig-A on the terminal to check whether eth0 or eth1. the gateway and subnet mask are used, and the next DNS to be modified, you can enter the CMD command ipconfig-all on Windows XP to get it.
3) set DNS
As mentioned above, after obtaining DNS through the command ipconfig-all in Windows XP via cmd, the/etc/resolv. conf file in Ubuntu will be displayed.
The specific command is as follows:
Sudo VI/etc/resolv. conf
Modify the nameserver. For example, modify it to nameserver 208.96.128.88.
3. In the last step, restart the Ubuntu Nic.
Enter the restart command in the terminal, as shown below:
Sudo/etc/init. d/networking restart
Then, you can ping the web site of another machine on Windows XP or Ubuntu, and there will also be ssh.