Chapter 7

advertisement
SUSE Linux Enterprise Server Administration (Course 3037)
7-1
SUSE Linux Enterprise Server Administration (Course 3037)
1-4188-3731-8
Chapter 7 Answers
Review Questions
1. What must each computer have in order to participate on a TCP/IP network as well as
contact hosts on remote networks by name? (Choose all that apply.)
a. IP address
b. netmask
c. DNS server
d. default gateway
ANSWER: a,b,c,d
2. How long is the host ID by default in a Class A network?
e. 1 byte
f. 2 bytes
g. 3 bytes
h. 4 bytes
ANSWER: c
3. Which of the following are Class B IP addresses? (Choose all that apply.)
i. 192.168.1.1
j. 177.16.41.10
k. 127.0.0.1
l. 133.1.1.2
ANSWER: b,d
4. What network address is reserved for loopback? _____
ANSWER: 127.0.0.1
5. What name is used to identify the first Ethernet network interface in Linux? _____
ANSWER: eth0
6. What file stores the list of DNS servers that your computer can contact to resolve
hostnames into IP addresses?
SUSE Linux Enterprise Server Administration (Course 3037)
7-2
m. /etc/resolv.conf
n. /etc/sysconfig/network/scripts
o. /etc/dns.sysconfig
p. /etc/sysconfig/network/ifcfg-dns
ANSWER: a
7. What command can you use to configure the IP address 192.168.1.1 and default subnet
mask on your first Ethernet network interface? _____
ANSWER: ipconfig eth0 192.168.1.1
8. What command can you use to configure an additional IP address of 192.168.1.2 and
default subnet mask on the same network interface configured in Question 7? _____
ANSWER: ipconfig eth0:1 192.168.1.2
9. Which of the following commands may be used to view IP configuration? (Choose all
that apply.)
q. ifshow eth0
r. ip address show
s. ifconfig -a
t. ifstatus eth0
ANSWER: b,c,d
10. What file contains the information used to configure your second Ethernet network
interface at boot time? _____
ANSWER: /etc/sysconfig/network/scripts/ifcfg-eth-id-hardwareaddress
11. What line would you configure in the file described in Question 10 to obtain an IP
configuration from a DHCP server? _____
ANSWER: BOOTPROTO=”dhcp”
12. How many DNS servers may be listed in /etc/resolv.conf?
u. one
v. three
w. ten
x. unlimited
ANSWER: b
13. Which two commands could you type at a command prompt to add a route to the
188.16.0.0 network via the router 192.168.1.254?
SUSE Linux Enterprise Server Administration (Course 3037)
7-3
y. ip route add 188.16.0.0/16 via 192.168.1.254
z. route add 188.16.0.0 via 192.168.1.254
aa. ip route add gw 192.168.1.254 via 188.16.0.0/16
bb. route add –net 188.16.0.0 netmask 255.255.0.0 gw 192.168.1.254
ANSWER: a,d
14. Which file could you use to configure the static route configured in Question 13 for use
with all network interfaces on your system? _____
ANSWER: /etc/sysconfig/network/routes
15. What command could you use send 5 ICMP echo requests to the host 192.168.1.254?
_____
ANSWER: ping –c 5 192.168.1.254
16. What command could you use to listen to all traffic sent to port 1433 on your computer?
_____
ANSWER: netcat –v –l –p 1433
17. What option(s) to the netstat command could you use to display the routing table? _____
ANSWER: -r (or –rn)
18. What command could you use to listen to all packets received on your first Ethernet
network inteface? _____
ANSWER: tcpdump
Discovery Exercises
Network Interface Commands
a.
b.
c.
d.
ifconfig eth0 10.10.10.x
ifconfig (or ip address show)
ifdown eth0; ifup eth0 (or ifconfig eth0 down; ifconfig eth0 up)
ifconfig (or ip address show), /etc/sysconfig/network/ifcfg-eth-id-MACaddress
Configuring IP Aliases
a. ifconfig eth0:1 10.10.10.x
b. ifconfig (or ip address show)
SUSE Linux Enterprise Server Administration (Course 3037)
c. ping IP_address
d. ifdown eth0; ifup eth0 (or ifconfig eth0 down; ifconfig eth0 up)
Routing Commands
a.
b.
c.
d.
route add –net 42.0.0.0 netmask 255.0.0.0 gw 10.18.11.88
ip route add 43.0.0.0/8 via 10.68.1.9
route (or ip route show or netstat –r)
route del –net 42.0.0.0 netmask 255.0.0.0; route del –net 43.0.0.0 netmast
255.0.0.0 (or ip route del 42.0.0.0/8; ip route del 43.0.0.0/8)
7-4
Download