Solved

How do i enable the routing?

Posted on 2004-04-22
2
345 Views
Last Modified: 2010-03-18
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
Comment
Question by:joanpe
2 Comments
 
LVL 1

Accepted Solution

by:
greg14unix earned 50 total points
Comment Utility
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
 
LVL 4

Expert Comment

by:bobgunzel
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 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

9 Experts available now in Live!

Get 1:1 Help Now