Manage the Network Configuration

386 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
386
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Manage the Network Configuration

  1. 1. Manage the Network Configuration SECTION 9 Manage the Network Configuration In this section of the workbook, you learn how to do the following: ■ “Manage the Network Configuration Information from YaST” on 9-1 ■ “Configure and Test Your Network Connection” on 9-3 Exercise 9-1 Manage the Network Configuration Information from YaST Configuring the network card using YaST is an easy task. In most of the cases it will work without any problems. The configuration is stored in files below /etc/sysconfig/network/. To manage the network configuration information from YaST, do the following: You need to complete this 1. Open a terminal window and su to root (su -) with a password of exercise for Exercise 9-2 to work novell. properly. In the VMWare machine the 2. Use the ifconfig eth0 and hostname commands to record the values may already be set as following information for your SLES 9 server: given in this exercise. In this case ❑ IP address: just verify that they are set right and correct any differences. ❑ Hostname: Do this with both VMWare 3. Close the terminal window. machines, da1 and da10. 4. From the KDE Desktop, select the YaST icon; then enter a password of novell and select OK. The YaST Control Center appears. 5. Start the network card module by selecting Network Devices > Network Card Version 1 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Workbook 9-1 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  2. 2. Manage the Network Configuration SECTION 9 Manage the Network Configuration In this section of the workbook, you learn how to do the following: ■ “Manage the Network Configuration Information from YaST” on 9-1 ■ “Configure and Test Your Network Connection” on 9-3 Exercise 9-1 Manage the Network Configuration Information from YaST Configuring the network card using YaST is an easy task. In most of the cases it will work without any problems. The configuration is stored in files below /etc/sysconfig/network/. To manage the network configuration information from YaST, do the following: You need to complete this 1. Open a terminal window and su to root (su -) with a password of exercise for Exercise 9-2 to work novell. properly. In the VMWare machine the 2. Use the ifconfig eth0 and hostname commands to record the values may already be set as following information for your SLES 9 server: given in this exercise. In this case ❑ IP address: just verify that they are set right and correct any differences. ❑ Hostname: Do this with both VMWare 3. Close the terminal window. machines, da1 and da10. 4. From the KDE Desktop, select the YaST icon; then enter a password of novell and select OK. The YaST Control Center appears. 5. Start the network card module by selecting Network Devices > Network Card Version 1 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Workbook 9-1 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  3. 3. Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ / Self-Study Workbook Your network card is listed under Already configured devices. 6. Change the configuration of your network card by selecting Change. Your network card is displayed in a list of configured cards. 7. Make sure your network card is selected; then select Edit. 8. Switch the setup by selecting Static Address Setup. 9. In the IP Address field, enter the IP address from Step 2. 10. In the Subnet mask field, enter 255.255.255.0. 11. Select Host Name and Name Sserver. 12. (Conditional) If a dialog appears indicating that the resolv.conf files has been temporarily modified, continue by selecting Modify. 13. In the Host Name field, enter the hostname from Step 2. 14. In the Domain Name field, enter digitalairlines.com. 15. In the Name Server 1 field, enter the IP address of your DNS server (10.0.0.254). 16. If there are values in the other Name Server text fields, remove them. 17. In the Domain Search 1 field, enter digitalairlines.com. 18. If there are values in the other Domain Search text fields, remove them. 19. Select OK. 20. Select Routing. 21. In the Default Gateway field, enter the IP address of your Internet gateway (10.0.0.254). 22. Select OK. 23. Select Next. 24. Select Finish. Workbook 9-2 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 1 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  4. 4. Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ / Self-Study Workbook Your network card is listed under Already configured devices. 6. Change the configuration of your network card by selecting Change. Your network card is displayed in a list of configured cards. 7. Make sure your network card is selected; then select Edit. 8. Switch the setup by selecting Static Address Setup. 9. In the IP Address field, enter the IP address from Step 2. 10. In the Subnet mask field, enter 255.255.255.0. 11. Select Host Name and Name Sserver. 12. (Conditional) If a dialog appears indicating that the resolv.conf files has been temporarily modified, continue by selecting Modify. 13. In the Host Name field, enter the hostname from Step 2. 14. In the Domain Name field, enter digitalairlines.com. 15. In the Name Server 1 field, enter the IP address of your DNS server (10.0.0.254). 16. If there are values in the other Name Server text fields, remove them. 17. In the Domain Search 1 field, enter digitalairlines.com. 18. If there are values in the other Domain Search text fields, remove them. 19. Select OK. 20. Select Routing. 21. In the Default Gateway field, enter the IP address of your Internet gateway (10.0.0.254). 22. Select OK. 23. Select Next. 24. Select Finish. Workbook 9-2 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 1 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  5. 5. Manage the Network Configuration 25. Close the YaST Control Center. (End of Exercise) Exercise 9-2 Configure and Test Your Network Connection The purpose of this exercise is to show you where to find information on the network configuration and how to troubleshoot networking problems. ■ Part I: View and Record Network Configuration ■ Part II: Test the Network Card Configuration Part I: View and Record Network Configuration In this part of the exercise, you fill in the following table by entering commands at a shell prompt: Table 9-1 Item Network Setting Host Name Domain Name IP Address Subnet Mask Default Gateway DNS Server Do the following to find the information you need to fill in the table: 1. From a terminal window, su to root (su -) with a password of novell. Version 1 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Workbook 9-3 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  6. 6. Manage the Network Configuration 25. Close the YaST Control Center. (End of Exercise) Exercise 9-2 Configure and Test Your Network Connection The purpose of this exercise is to show you where to find information on the network configuration and how to troubleshoot networking problems. ■ Part I: View and Record Network Configuration ■ Part II: Test the Network Card Configuration Part I: View and Record Network Configuration In this part of the exercise, you fill in the following table by entering commands at a shell prompt: Table 9-1 Item Network Setting Host Name Domain Name IP Address Subnet Mask Default Gateway DNS Server Do the following to find the information you need to fill in the table: 1. From a terminal window, su to root (su -) with a password of novell. Version 1 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Workbook 9-3 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  7. 7. Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ / Self-Study Workbook 2. View information about the network interfaces by entering ifconfig -a 3. View information about the loopback network interface by entering ifstatus lo 4. View information about the eth0 network interface by entering ifstatus eth0 5. Change to the directory /etc/sysconfig/network by entering cd /etc/sysconfig/network 6. List the configuration file for the eth0 network interface by entering ls -l ifcfg-eth-id* Note the ID number associated with the filename. 7. View the contents of the configuration file by entering cat ifcfg-eth-id-number 8. View network interface statistics by entering netstat -i 9. View the routing in numeric format by entering netstat -nr 10. Remove the default route by entering route del default 11. View the routing in numeric format by entering route -n 12. Add a default route with a gateway of 10.0.0.254 by entering route add default gw 10.0.0.254 dev eth0 13. View the routing in numeric format by entering Workbook 9-4 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 1 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  8. 8. Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ / Self-Study Workbook 2. View information about the network interfaces by entering ifconfig -a 3. View information about the loopback network interface by entering ifstatus lo 4. View information about the eth0 network interface by entering ifstatus eth0 5. Change to the directory /etc/sysconfig/network by entering cd /etc/sysconfig/network 6. List the configuration file for the eth0 network interface by entering ls -l ifcfg-eth-id* Note the ID number associated with the filename. 7. View the contents of the configuration file by entering cat ifcfg-eth-id-number 8. View network interface statistics by entering netstat -i 9. View the routing in numeric format by entering netstat -nr 10. Remove the default route by entering route del default 11. View the routing in numeric format by entering route -n 12. Add a default route with a gateway of 10.0.0.254 by entering route add default gw 10.0.0.254 dev eth0 13. View the routing in numeric format by entering Workbook 9-4 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 1 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  9. 9. Manage the Network Configuration route -n 14. Shut down eth0 by entering ifdown eth0 15. Bring up eth0 by entering ifup eth0 16. View the system host name by entering hostname 17. View the system DNS domain name by entering dnsdomainname 18. View the DNS configuration by entering cat /etc/resolv.conf If you don’t have the VMWare 19. Verify that the default route is accessible by pinging the default machine for da1 running, skip step gateway (ping -c 3 10.0.0.254). 19. Part II: Test the Network Card Configuration Do the following: If you are using the SLES 9 1. Test the connection to da1.digitalairlines.com by entering VMware server, you might need to return to Network Devices > ping 10.0.0.254 Network Card and set the 2. Stop the ping process by pressing Ctrl + c. configuration back to Automatic address setup (via DHCP) for this 3. Test the connection to the host www.novell.com by entering exercise to work properly. ping 130.57.4.27 If you don’t have the VMWare 4. Test the name resolution and the connection to the host machine for da1 running, skip the www.novell.com by entering steps mentioning da1. ping www.novell.com 5. Test the connection to the host www.novell.com by entering Version 1 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Workbook 9-5 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  10. 10. Manage the Network Configuration route -n 14. Shut down eth0 by entering ifdown eth0 15. Bring up eth0 by entering ifup eth0 16. View the system host name by entering hostname 17. View the system DNS domain name by entering dnsdomainname 18. View the DNS configuration by entering cat /etc/resolv.conf If you don’t have the VMWare 19. Verify that the default route is accessible by pinging the default machine for da1 running, skip step gateway (ping -c 3 10.0.0.254). 19. Part II: Test the Network Card Configuration Do the following: If you are using the SLES 9 1. Test the connection to da1.digitalairlines.com by entering VMware server, you might need to return to Network Devices > ping 10.0.0.254 Network Card and set the 2. Stop the ping process by pressing Ctrl + c. configuration back to Automatic address setup (via DHCP) for this 3. Test the connection to the host www.novell.com by entering exercise to work properly. ping 130.57.4.27 If you don’t have the VMWare 4. Test the name resolution and the connection to the host machine for da1 running, skip the www.novell.com by entering steps mentioning da1. ping www.novell.com 5. Test the connection to the host www.novell.com by entering Version 1 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Workbook 9-5 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  11. 11. Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ / Self-Study Workbook traceroute 130.57.4.27 6. Verify that the file /etc/HOSTNAME contains the correct hostname by entering cat /etc/HOSTNAME 7. Check the listening sockets on your server, and the PID and name of the program to which each socket belongs by entering netstat -lp 8. Query the ports 20-80 on da1 to display the service responses by entering netcat -v -w 2 -z da1 20-80 9. In the original terminal window, capture packets by entering tcpdump -i eth0 10. Open a Konqueror browser window; then enter www.novell.com 11. When you are finished viewing the traffic from the tcpdump screen, press Ctrl + c to kill the trace. 12. When you finish, close all open windows. (End of Exercise) Workbook 9-6 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 1 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
  12. 12. Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ / Self-Study Workbook traceroute 130.57.4.27 6. Verify that the file /etc/HOSTNAME contains the correct hostname by entering cat /etc/HOSTNAME 7. Check the listening sockets on your server, and the PID and name of the program to which each socket belongs by entering netstat -lp 8. Query the ports 20-80 on da1 to display the service responses by entering netcat -v -w 2 -z da1 20-80 9. In the original terminal window, capture packets by entering tcpdump -i eth0 10. Open a Konqueror browser window; then enter www.novell.com 11. When you are finished viewing the traffic from the tcpdump screen, press Ctrl + c to kill the trace. 12. When you finish, close all open windows. (End of Exercise) Workbook 9-6 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 1 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.

×