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.
Just got a broadband access to my house. Only problem is that it uses static IP from which I don't have any experience.
So I need aid getting my linux laptop to connect into the internet.
I have the following info:
IP
Subnet
Gateway
Pri DNS
sec DNS
The line works as I am typing this from my friends laptop(WinXP).
I have tried this with route and ifconfig commands but no luck so far as I don't know the correct syntax and such. Been reading through the man pages but still no luck.
So give the proper command to connect the laptop to internet. I'm using Gentoo.
I put the DNS things to resolv.conf. Was it done correctly?
whats the ip address and gateway you are going to use? If for slackware I know you edit /etc/rc.d/rc.inet1.conf and put in the proper ip address and netmask and then at the bottem you put in the gateway. in /etc/resolve you put in the dns and reboot
Are you using a USB modem? If so, I would suggest looking up a guide on how to set up your model of modem with Linux. The fact that it's a static IP shouldn't make any difference, as it should be assigned by your ISP's server when you connect to them. I didn't have to make any changes when switching from dynamic to static IP at home, but I am using a separate ethernet modem/router, not a USB or internal one.
Gentoo doesn't have the /etc/rc.d/ folder but has /etc/init.d/ folder with similar files. Only it's syntax is way more cryptic than slacks and doesn't seem to offer same solutions.
I need the command to tell the connection to route the packets through the gateway. I can issue "ifconfig eth0 xxx.xxx.xxx.xxx" to get a static ip but that doesn't work. This should be able to be done without a reboot.
The signal is coming through ethernet so I don't have to work with USB-modem (been there and gotten a new modem).
I got close with the route command. Something like following:
"route add net xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gw xxx.xxx.xxx.xxx dev eth0" but when I issue plain "route" and check the routing tables it tells it's not using any gateway and IP is wrong.
Most likely, your modem gets the external IP assigned by your ISP. Your computer will only get an internal network IP. Assuming your modem is set up as a dhcp server, all you should need to do is set your computer to get its IP from dhcp. Can't remember how to do this in Gentoo, it was a while ago I set my box up. You might need to add the nameservers in /etc/resolv.conf but that's all. If you need to set the gateway for accessing the net, it should be the internal network address of your modem, not the external address assigned by your ISP.
The instructions which I have state that I have to set static IP and DNS servers with gateway in windows so I think it applies to the linux as well.
The set is that I have wireless broadband, meaning that I have receiver installed on the roof and cable coming down to my room where it connects to a box which looks like extension cord box. Then from there to my computer runs a ethernet cable.
I just asked this same thing on IRC and have configured /etc/conf.d/net to those guidelines but I'd still like to know how this is done manually.
Gentoo doesn't have the /etc/rc.d/ folder but has /etc/init.d/ folder with similar files. Only it's syntax is way more cryptic than slacks and doesn't seem to offer same solutions.
I need the command to tell the connection to route the packets through the gateway. I can issue "ifconfig eth0 xxx.xxx.xxx.xxx" to get a static ip but that doesn't work. This should be able to be done without a reboot.
The signal is coming through ethernet so I don't have to work with USB-modem (been there and gotten a new modem).
I got close with the route command. Something like following:
"route add net xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gw xxx.xxx.xxx.xxx dev eth0" but when I issue plain "route" and check the routing tables it tells it's not using any gateway and IP is wrong.
make sure your subnet mask is correct, when you issue a ifconfig eth0 x.x.x.x netmask x.x.x.x
Also, It might help to put your server's ip in the hosts file. In the route command are you are putting the correct network number which most likely will have a 0 in the last octet.
I'm no expert, I'm trying to put together a small network in my school. I hope this helps.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.