Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
Are you using a cable/dsl router?
If so do you know the IP you use to connect to your router from the lan side?
If you do then do this. If it is say 192.168.1.1 then you want to use and ip like 192.168.1.10 with a subnet of 255.255.255.0 and a gateway of 192.168.1.1. For you DNS you could use your routers IP or your providers DNS numbers. The numbers the router sees on the wan side. Once done then you can port forward to the internal lan PC.
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
#here on down is my work
BROADCAST=192.168.1.241
IPADDR=192.168.1.281
NETMASK=255.255.255.0
NETWORK=192.168.1.0
TYPE=Ethernet
GATEWAY=192.168.1.1
What else should I need or is this ok? and do I have to restart any processes?
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
IP address is to incorrect for IPv4 format. You can only have values from 1-255. Normally 255 is reserved for broadcast. So your IP of 192.168.1.281 will not work it needs to be 192.168.1.2-254. Also bootpront needs to be none not dhcp. If a standard store bought router then make broadcats 192.168.1.255.
Just copy the contents of my upper post to your ifcfg-eth0. Before doing this run the command ' ifdown eth0 ', edit ifcfg-eth0, then run ' ifup eth0 '
From what I have read you want it to look like this:
Code:
DEVICE=eth0
BOOTPROTO=none
onBOOT=yes
#here on down is my work
BROADCAST=192.168.1.255
IPADDR=192.168.1.234
NETMASK=255.255.255.0
NETWORK=192.168.1.0
TYPE=Ethernet
GATEWAY=192.168.1.1
you need to add a DNS IP to /etc/resolv.conf
seems most routers will forward DNS provided dynamically by the isp, so you simply use the router address. If the router is at 192.168.1.1, this line, and perhaps the only line, should be in your /etc/resolv.conf
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.