Solved

linux router-> hardware router setting

Posted on 2004-09-12
7
215 Views
Last Modified: 2010-03-18
i using a linux router which has 2 NIC...first NIC is connected to internet and the second is i want to connected it to the router which has wan port and 4 lan port.

my eth0 = is connected to the modem

my eth1 = ip : 192.168.1.1
                netmask : 255.255.255.0
                gateway : blank
( i didn't setup a dhcp )

so i succesfully connect this eth1 to a single pc by using cross cable. the pc is xp where i set the ip as 192.168.1.2, netmask 255.255.255.0 and gateway 192.168.1.1

but how do i connect the eth1 to the router? thru WAN port or to the LAN port?...if thru WAN port..which setting do i need to choose?...static ip, dynamic ip? or else?...what are the configuration do i need to set in the router such as ip netmask and gateway?

the router ip is 192.168.0.1 where i configure thru web configuration...

thanks
0
Comment
Question by:emlily
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12039041
It all depends on what sort of router you have and what it's capabilites are. It sounds like you've got a simple router intended for use as a home Internet gateway. In that case you could connect it's WAN ethernet port to eth1, configure the router for a static WAN IP of 192.168.1.2, a default gateway of 192.168.1.1, and the name server of your ISP. Most of those routers will hand out DHCP addresses to their inside clients.
0
 

Author Comment

by:emlily
ID: 12040678
previously i connect to the old router which has uplink, it works. but now, the give me a basic router with 1 wan port and 4 lan port...i can connect the eth1 using cross cable to a xp pc but in the network configuration of the pc i have to do the manual and not the dhcp. but i want the cross cable connected to router and the router it self using dhcp to spread the internet connection or lan to client...

i want to know...if the cross cable i connect it to WAN port...what are the configuration will be?

my eth0 = is connected to the modem

my eth1 = ip : 192.168.1.1
                netmask : 255.255.255.0
                gateway : blank
( i didn't setup a dhcp )
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12044213
On most the simple routers a connections directly to the LAN ports are equivalent to using a switch/hub. The router may or may not do dhcp for the internal net in that configuration. If you connect the router's WAN port to eth1 and configure the router for a static outside IP of say 192.168.1.2, using 192.168.1.1 as the default gateway and your ISP's nameservers it should work just as it would if the router was going straight to your ISP.

Whether you need a cross over or straight connection from the WAN port to eth1 depends the router. Some have a built in crossover and others don't. Check your router's docs.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:emlily
ID: 12051286
i will try
0
 

Author Comment

by:emlily
ID: 12061026
i connect the eth1 to the router

my eth1
ip: 192.168.1.1
netmask: 255.255.255.0
gateway: 192.168.1.1

router static ip setting
ip: 192.168.1.2
netmask: 255.255.255.0
gateway: 192.168.1.1

still cannot spread the internet from the router...but from eth1 to a single pc using cross cable, the pc can recieve the internet...but using the router static ip setting at the network configuration
0
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 12067411
From the Linux box can you ping the router's IP? From the router can you see the Linux box, or an Internet IP?

One possible complication here that could prevent it from working is that some of these routers have anti-spoofing protection. That means that the router won't talk to an IP from any of the RFC1918 private networks on it's WAN port. I don't know if your router does that or not, check the docs.

Another place you could run into trouble is if the inside LAN on the router is set for 192.168.0.0/16 (netmask 255.255.0.0). It must be configured to have a Class C range other than 192.168.1.0/24. Configuring the LAN side for 192.168.2.0/24 (netmask 255.255.255.0) should be fine.

I didn't mention it before, because I assumed it would be obvious, but you do need the router configured as if it were connecting directly to the Internet with a single outside IP. That means that it will be NAT'ing the IP's on the inside LAN onto 192.168.1.2.
0
 

Author Comment

by:emlily
ID: 12071828
i try
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question