LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   gentoo net setup (https://www.linuxquestions.org/questions/linux-networking-3/gentoo-net-setup-132726/)

stargazer3451 01-08-2004 10:20 AM

gentoo net setup
 
I am building a gentoo system using net-setup to manually configure my network with static ip. My question is what is a broadcast address. I am using a linksys router to connect my network. I already know what ip address I want to use. Is a broadcast address necessary for a non server machine? I will be running mysql server but no ftp, or web server. VNC may be run on occasion. Any help will be appreciated.

rberry88 01-08-2004 12:17 PM

Copy and pasted from gentoo handbook (don't kill me):

Code:

Manual Static Configuration

We need to setup just enough networking so that we can download sources for the system build, as well as the required localhost interface. The needed information is explained in the next table.
Information        Description        Example value
IP address        The IP address you want to assign to your network card        192.168.1.2
Broadcast address        The IP address which will broadcast the packets to all the hosts in the network        192.168.1.255
Network mask        The mask which is used together with the IP address to see what part of the address is for network-identification and host-identification        255.255.255.0
Gateway        The IP address of the computer which will forward the packets that are not meant for the local network (most of the time the computer which shares the internet connection)        192.168.1.1

Type in the following commands, replacing $IFACE with your network interface (typically eth0), $IPNUM with your IP address, $BCAST with your broadcast address and $NMASK with your network mask. For the route command, replace $GTWAY with your default gateway.

Code listing 4.6: Static IP Network Configuration

# ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK
# route add -net default gw $GTWAY netmask 0.0.0.0 metric 1 $IFACE

Now it is time to create the /etc/resolv.conf file so that name resolution (finding Web/FTP sites by name, rather than just by IP address) will work. You can use nano -w /etc/resolv.conf to create /etc/resolv.conf. nano is a small and easy-to-use editor.

Here is a template to follow for creating your /etc/resolv.conf file:

Code listing 4.7: /etc/resolv.conf template

domain mydomain.com
nameserver 10.0.0.1
nameserver 10.0.0.2

Replace 10.0.0.1 and 10.0.0.2 with the IP addresses of your primary and secondary DNS servers respectively.

Proxy Configuration

If you are behind a proxy, it could be necessary to configure your proxy before you continue. We will export some variables to set up the proxy accordingly.

Code listing 4.8: Setting a Proxy

(If the proxy restricts HTTP traffic:)
# export http_proxy="http://machine.company.com:1234"
(If the proxy restricts FTP traffic:)
# export ftp_proxy="ftp://machine.company.com"
(If the proxy restricts RSYNC traffic:)
# export RSYNC_PROXY="rsync://machine.company.com"

Note: If your proxy requires authentification, use a construct like http://username:password@machine.company.com (note the added "username:password@").

Networking is go!

Networking should now be configured and usable. You should be able to use the included ssh, scp, links, irssi and wget commands to connect to other machines on your LAN or the Internet.


This should get you going in the right direction.

rberry88

thebell 01-08-2004 12:23 PM

The simple solution that works most of the time: set the broadcast address to the IP address of your network card, with the last field changed to 255. So, if your card is 192.168.0.20, set it to 192.168.0.255.

stargazer3451 01-09-2004 03:37 PM

Thanks
 
Thanks for the help, I really appreciate it. Kind of sweet when you can go some where and get some explanations without being flamed. Thanks again!!


All times are GMT -5. The time now is 04:51 AM.