• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 392
  • Last Modified:

How do i enable the routing?

I'm new learner on the linux. Now i want to make the web server  can connect to the internet. I  have 2 ethernet card eth0 and eth1.
eth0: 202.157.213.131
eth1: 192.168.2.201
ipAddress: 202.157.213.131
gateway address: 202.157.204.77

after ifconfig  eth0: 202.157.213.131  mask: 255.255.255.248
broadcast: 202.157.213.135

after ifconfig  eth1: 192.168.2.201 mask:255.255.255.0
broadcast: 192.168.2.255

Then, i go to main menu-->system setting --> network. I set the ipAddress, network address and subentmask address but still cannot connect to the internet? what command should i type or i have to set the route? What is the solution?
Thank you.
0
joanpe
Asked:
joanpe
1 Solution
 
greg14unixCommented:
Hello,

To setup a default router so your system can get out, you need to make edit the /etc/sysconfig/network file and specify a default gateway using the IP of the router that will route your traffic out.

GATEWAY=X.X.X.X


To have your system act as a router between 2 different networks, you  will want to check out the routing howto here http://lartc.org/howto/
0
 
bobgunzelCommented:
ifconfig  eth0: 202.157.213.131  mask: 255.255.255.248 sets up a network block ranging from 202.157.213.128 to 202.157.213.135.
(according to WHOIS Atlas One has a block of 16 IP addresses ranging from 202.157.213.128 to 202.157.213.143 so the mask should be  255.255.255.240, unless you divided it into two blocks)
The gateway address 202.157.204.77 falls outside this block and is therefore not accessable. In fact it belongs to another network block from Atlas One.
A gateway should be on the same network block as the clients are. So there must be a gateway with an address within your block connecting you to the internet directly or there must be a router connecting you to the other network block.

Bob Gunzel
0

Featured Post

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!

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