Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

linux router-> hardware router setting

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
emlily
Asked:
emlily
  • 4
  • 3
1 Solution
 
jlevieCommented:
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
 
emlilyAuthor Commented:
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
 
jlevieCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
emlilyAuthor Commented:
i will try
0
 
emlilyAuthor Commented:
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
 
jlevieCommented:
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
 
emlilyAuthor Commented:
i try
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now