Solved

linux router-> hardware router setting

Posted on 2004-09-12
7
172 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
  • 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now