Question: Case Project 6-1: Configure TCP/IP in Ubuntu Server Take multiple screenshots. In this project, you learn to configure TCP/IP in Ubuntu Server. Ubuntu stores TCP/IP

Case Project 6-1: Configure TCP/IP in Ubuntu Server

Take multiple screenshots.

In this project, you learn to configure TCP/IP in Ubuntu Server. Ubuntu stores TCP/IP configuration settings in the /etc/network/interfaces text file. These settings are persistent, which means they are used each time a NIC reconnects to the network. To use autoconfiguration and dynamic IP addressing for eth0, the first NIC interface, you should see these two lines in the interfaces file:

auto eth0

iface eth0 inet dhcp

To use autoconfiguration and static IP addressing for eth0, here are sample entries you might find in the interfaces file:

auto eth0

iface eth0 inet static

address 10.0.0.10

netmask 255.255.255.0

gateway 10.0.0.1

dns-nameservers 10.0.0.200 10.0.0.210

You can temporarily change TCP/IP settings by using the ifconfig, route, nameserver, and other commands and by editing the /etc/resolv.conf text file. Using the VM you created in Chapter 3, Case Project 3-1, that has Ubuntu Server installed, follow the steps in the table to examine TCP/IP settings and temporarily change these settings.

1. Start the VM and log on to Ubuntu Server.

2. To view the current TCP/IP settings for the network adapter, use this command: ifconfig eth0

3. Write down the IP address, MTU, network mask, and MAC address for eth0.

4. To go to the /etc directory, use this command: cd /etc

5. Ubuntu temporarily stores the IP addresses of name servers in the /etc/resolv.conf file. Use the following cat command to view the contents of this file: cat resolv.conf

6. Write down the IP addresses of the current DNS name server(s).

7. To go to the /etc/network directory, use this command: cd network

8. Use the following cat command to view the contents of the /etc/network/interfaces file: cat interfaces

9. Use the route command to view the IP address of your current default gateway: route -n

10. Recall that 8.8.8.8 is the IP address of one of Google's public DNS servers. Use ping to verify you have Internet connectivity (to stop the ping, press CTRL+C): ping 8.8.8.8

11. Now let's make some temporary changes to the TCP/IP configuration. Change your IP address to 10.0.0.100 and your network mask to 255.255.255.0, using the following command: sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0

12. Most likely you no longer have Internet connectivity. To verify that is the case, use this command: ping 8.8.8.8

13. Use the following ifdown command to release the current TCP/IP settings for eth0: sudo ifdown eth0

14. Use the following ifup command to renew the network interface using the persistent TCP/IP settings for eth0: sudo ifup eth0

15. Verify Internet connectivity is restored: ping 8.8.8.8

16. Verify DNS works: ping google.com

17. Power down your Ubuntu Server VM: sudo poweroff

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!