Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-06-2003, 11:47 AM
|
#1
|
|
Member
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196
Rep:
|
DSL/Cable modem router IP address
Is there a quick way to determine my routers IP outside address?
Because of the network address translation of the router I cannot see it via traceroute. However if something was coming in from the outside.
Why you may ask? I want to make a cron to check and see if my ISP has changed my IP and if it has email it to myself.
My current thought of a solutions is a PERL script with the HTTP modules talking to my router/switch, logging in and parsing out the DHCP client info from my cablemodem.
There has to be an easier way! This is not that hard, but a little more system intensive then I would like.
My network :
cablemodem - D-Link 905P (4 port switch out) - 4 PC's
|
|
|
|
02-06-2003, 07:29 PM
|
#3
|
|
Member
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196
Original Poster
Rep:
|
Thanks, that is sort of what I did.
I wrote a perl script to grab a web page and parse out the IP address. I plan on attaching it to a cron and any changes in my WAN ip address, it will generate an e-mail.
The perl script is at
http://w3.mivlmd.cablespeed.com/~plewis/wan.html
Cheers
Pete
|
|
|
|
02-07-2003, 02:22 AM
|
#4
|
|
Member
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696
Rep:
|
just include this line in your script
ipppp0=`ifconfig ppp0 | grep "inet addr:" | awk '{print $2}' | awk -F'\:' '{print $2}'`
regards
|
|
|
|
02-10-2003, 03:45 PM
|
#5
|
|
LQ Newbie
Registered: Oct 2002
Posts: 12
Rep:
|
I assume you wanted that IP so you could remote login to your computer.
Try dyndns.org. Its free and all you have to do is run a daemon that will routinely check your router to see what the IP is and update their db with that so you can have a "static" domain name like yourname.dyndns.org.
|
|
|
|
02-10-2003, 09:26 PM
|
#6
|
|
Member
Registered: Feb 2003
Location: New York, USA
Distribution: Trying out several distros.
Posts: 37
Rep:
|
a slightly off topic question
Peter72,
I noticed that you're using a cable modem and some sort of router. Is it safe to assume the following:
- Cablemodem connect to Wan Interface of router box.
- Linux box connect to switch/internal interface of router box
looks like this:
ISP <--> cablemodem <--> router <--> linux box(s)
if the above is totally or partially correct. How did you set up everything? My situation is described above, but I can't get my linux box to talk to the router or any external internet hosts for that matter.
sorry to hit everyone with a potential newb question... but I would greatly appreciate some advice. I will reply with full details anyone has time to answer the questions...
Thanks in advance
|
|
|
|
02-11-2003, 07:54 AM
|
#7
|
|
Member
Registered: Oct 2002
Location: Charlottesville, VA
Distribution: Ubuntu (home), SLES (work)
Posts: 196
Original Poster
Rep:
|
This is exactly what I have set up. You just have to set up your DHCP(bootps). It is quite easy (if you know what you are looking for).
First make sure your Router is set up as a DHCP server (most are by default). Check under the DHCP tab on the top. Make sure the item "DHCP Server" is checked to enable.
Next, on the mandrake box, go through drakconf, and under the network wizard it will autodetect your network card. The last box for lan should be checked. Then hit next, and you will see where you enter your IP address. Don't put one in, there is a option box at the bottom that says something like DHCP/bootps. Check it and hit next. There are some other options, but nothing else is needed.
This should do it. I've set this up on the same router/switch several times.
Another cool this is to enable ip forwarding of ssh. This will allow you secure remote access to your network. Under advance, IP Forwarding, just enter port 22 and the ip address of your linux box you want to log into. WARNING, make sure you are up to date on all security updates for openSSH. I set up this to mantain a server at a small business. Make my life a lot easier. You can also download the client putty to log into the machine from a windows box, and winSCP2 to have access to files on the remote box.
To me, this is what make linux^H^H^H^Hunix so cool. The network is really just an extension of the computer.
Cheers, hope it helped
|
|
|
|
02-22-2003, 08:49 PM
|
#9
|
|
Member
Registered: Feb 2003
Location: New York, USA
Distribution: Trying out several distros.
Posts: 37
Rep:
|
much success everyone
Thanks to everyone. I got my linux box up and running. I had a 3Com 3c905B-TX PCI card installed in my system. I re-seated the NIC into the same slot, screwed it in place and booted the system and it worked. Later I removed that card and re-enabled my embedded Broadcom 4401 10/100 NIC. I configured it as eth0 and all is working well with the NIC.
I later discovered how to get sound working on my system... just plug my speakers into the mic port of my sound card and then there was sound.
In case anynoe is wondering about my setup I have a Asus P4PE motherboard with 10/100 LAN, iEEE1394, USB 2.0, IDE RAID, Serial ATA, AC'97. ($140 US)
So I have sound working and LAN working USB, 1394 working. Very nice indeed. Again thanks everyone.
One last note for any Newbs out there hunting for information and the How-To's aren't working for you:
- don't give up yet.
- look though this site and go to the following sites
- www.mandrake.com
- www.suse.com
- www.redhat.com
- the linux documentation project
- www.justlinux.com
- www.tweakhound.com
- www.freshmeat.com
there are about another 40+ sites I scoured looking for info. In short you will learn alot assuming you dedicate a fews days to getting started.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:34 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|