Results 1 to 3 of 3
hi,
1.How does Linux automatically configure the network interface with the appropriate networking parameters?
2.What is the function of ‘/etc/hosts’ file
3.What is the function of ‘/etc/resolv.conf’?
4.What is the ...
- 09-29-2003 #1Just Joined!
- Join Date
- Sep 2003
- Posts
- 6
Linux-Networking questions
hi,
1.How does Linux automatically configure the network interface with the appropriate networking parameters?
2.What is the function of ‘/etc/hosts’ file
3.What is the function of ‘/etc/resolv.conf’?
4.What is the command line for starting up and bringing down the network
interface using the script(s) available
in ‘/etc/sysconfig/networking/devices’.
5. How to display the routing table in numeric format using 'netstat'. What is the command line?Also what is the default route?
regards
pongsu
- 09-29-2003 #2Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
The /etc/hosts file are using for namelooking and hostlookup things. The host first looks at its /etc/hostsfile before asking DNS-servers.
The /etc/resolv.conf containing the DNS-servers to ask if not the answer exists in /etc/hosts Also which domain to search on/expand question on.
To start and stop nic:s use /etc/init.d/network stop/start/restart every nic with onboot=yes set will be started. The configfiles are located under /etc/sysconfig/network-scripts/ifcfg-eth* (On redhat) can differ depending on which dist you are running.
With thecommand you can se which routes you have enabled, also which ip that is your df gateway, entry tagged with default.Code:route
Tryand see if you like that format.Code:netstat -anp
Regards
Andutt
- 10-06-2003 #3Linux Newbie
- Join Date
- Aug 2003
- Posts
- 113
To bring up an interface that has already be configured previously you can issue:
or to bring it down:Code:ifup eth0
Thats assuming your nic is eth0. or say you have a modem. Classic example. When I first started using linux...(seems like yesterdayCode:ifdown eth0
), I was issued a work laptop. This had a pcmcia nic and an builtin modem. When I would come home and try to use the modem the modem would initialize but would always try and route out through the pcmcia nic.
Ofcourse unplugging the pcm/cia nic before powering up would solve the issue but all that was needed before dialing up was bringing down eth0 first via (ifdown eth0), then everything would route properly through ppp0 (modem).JB


Reply With Quote
