LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-21-2003, 03:12 PM   #1
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Rep: Reputation: 15
connecting workstation to a ROUTER


Hi all,
Can anybody please tell me a step-by-step methodology to connect a linux workstation to a ROUTER and get it working.
I have searched the web but can not find the answer for this question ? All I could find was how to configure a linux machine as a router.
I really need help on this .... as I am kind of stuck..
Thanks a lot
Vijayant

 
Old 07-21-2003, 03:20 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Hoe about just puting a piece of cat 5e between them (may need to be a crossover - it depends on your setup)
If your router has dhcp running then you may not need to do anything else. If you are using fixed IP addresses then you will need to give the machine a fixed ip and DNS server then set the gateway to the ip of the router.
 
Old 07-21-2003, 03:32 PM   #3
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Original Poster
Rep: Reputation: 15
thanks for the prompt reply.
about dhcp.. how should I configure my network connection in linux.
Should I just say dhcp and then erase everything like the dns addresses, hostname etc.. and then try..
can u also tell me how to do dhcp ? I am using the network configuration gui in kde.
Vijayant
 
Old 07-21-2003, 03:42 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Personnaly I would avoid dhcp unless this is a mobile machine that is likely to be on other networks. You will just need to assign an ip address within the asme subnet range as your routers internal IP. Then like I said before - use your ISPs DNS servers and set our gateway to the ip of the router.
 
Old 07-21-2003, 03:52 PM   #5
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
Personnaly I would avoid dhcp unless this is a mobile machine that is likely to be on other networks. You will just need to assign an ip address within the asme subnet range as your routers internal IP. Then like I said before - use your ISPs DNS servers and set our gateway to the ip of the router.
Thanks for the reply. My machine is a workstation and so, I would not like to enable DHCP.
Few questions on your guidelines ?
1. How do I find out my router's internal IP.
2. How do I create an IP address from the router's subnet range?
3. Given that I know my ISP DNS server address... I could not get the last part about setting the gateway to the IP..

sorry for bothering u a lot but hope u will understand
Vijlovely
 
Old 07-21-2003, 04:10 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
1) depends on your router. If you haven't set it up yet then look at the docs that came with it
2) If the router's ip is 172.31.1.1 then you can use 172.31.1.2 (3, 17, 34, 234 etc) if it is 192.168.1.45 then use 192.168.1.47 etc etc.
3) Once you know the ip of the router you can use that as the value for the gateway.
 
Old 07-21-2003, 04:41 PM   #7
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
1) depends on your router. If you haven't set it up yet then look at the docs that came with it
2) If the router's ip is 172.31.1.1 then you can use 172.31.1.2 (3, 17, 34, 234 etc) if it is 192.168.1.45 then use 192.168.1.47 etc etc.
3) Once you know the ip of the router you can use that as the value for the gateway.
Thanks a lot. That worked ..
This works fine.. I am finally able to surf the internet from the machine and am also able to ssh to a different linux machine but somehow am not able to ping the machine.
I am able to ping the router but none of the machines connected to the router respond to any ping commands from another linux computer.

what could be wrong ?
 
Old 07-21-2003, 05:04 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Try:
cat /proc/sys/net/ipv4/icmp_echo_ignore_all
cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

If they return 1 not 0 then:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

Can you traceroute to the machine?
 
Old 07-22-2003, 10:53 AM   #9
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
Try:
cat /proc/sys/net/ipv4/icmp_echo_ignore_all
cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

If they return 1 not 0 then:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

Can you traceroute to the machine?
I tried the cat commands and they both returned zero and so then I tried the echo commands but when later I checked using the cat commands they still returned zero for both the icmp files.
I was working as root..
What could be wrong
Vijlovely

p.s. - how do u traceroute to the machine ?
 
Old 07-22-2003, 11:04 AM   #10
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by vijlovely
I tried the cat commands and they both returned zero and so then I tried the echo commands but when later I checked using the cat commands they still returned zero for both the icmp files.
I was working as root..
What could be wrong
Vijlovely

p.s. - how do u traceroute to the machine ?
I got the echo commands to work by
putting "" around 1
i.e.
echo "1"<......

But I am still not able to ping from an external machine though I am able to browse the internet.
Vijlovely
 
Old 07-22-2003, 12:29 PM   #11
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Sorry - I meant to say if they report 1 then echo 0 to them - I think I must have been asleep there. Can you access any services that are running on the other machines? ftp etc.

Can you post the output of this on the 2 machines you are trying to connect:
ifconfig
route -n
 
Old 07-22-2003, 12:58 PM   #12
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
Sorry - I meant to say if they report 1 then echo 0 to them - I think I must have been asleep there. Can you access any services that are running on the other machines? ftp etc.

Can you post the output of this on the 2 machines you are trying to connect:
ifconfig
route -n
Oh.. I got confused.. I now echoed "0" to both of them and then confirmed using cat that they were indeed 0 now..
Here is the output of the commands u asked me to run

ifconfig

eth0 Link encap:Ethernet HWaddr 00:06:5B:BD:30A
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48135 errors:0 dropped:0 overruns:24 frame:0
TX packets:3928 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:15561171 (14.8 Mb) TX bytes:579392 (565.8 Kb)
Interrupt:23 Base address:0xec80

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:192 errors:0 dropped:0 overruns:0 frame:0
TX packets:192 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16366 (15.9 Kb) TX bytes:16366 (15.9 Kb)

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0


One more thing. I am now able to ping between both the machines connected to the router but pinging from any external machine to either of these machines does not work.
One machine is a windows workstation while the other is a linux machine

Thanks a lot
Vijlovely

 
Old 07-22-2003, 01:18 PM   #13
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You will not be able to ping these machines from an external source since they are on a private address range.
 
Old 07-22-2003, 07:01 PM   #14
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Original Poster
Rep: Reputation: 15
by the private ip range, u mean the ip range created by the router.. right
In that case, what changes need to be made to be able to access these machines from an external machine
Thanks a lot for your help
Vijlovely
 
Old 07-23-2003, 12:27 PM   #15
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Assuming this is a basic internet connection then you probably only have one public IP address. You will need to look at the configuration of the router and forward the relevant ports on the router to the relevant ports on the internal ip addresses of the machines.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting PC to router through another PC freek sanders Linux - Wireless Networking 5 06-16-2005 03:23 PM
Linux as DSL router which is better workstation or server? marvc Linux - General 6 03-03-2003 02:48 PM
Connecting to router Falcon 213 Slackware 5 02-16-2003 09:22 PM
RPC error connecting from Win2000 workstation cruella Linux - Networking 0 11-22-2002 09:57 AM
Connecting through the router but,.... Jase Linux - Networking 10 01-27-2002 09:38 PM


All times are GMT -5. The time now is 07:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration