11-26-2002
the etc/hosts files defines ip address and associates hostnames with those addresses, essentially the hosts file is like a small name server, or more correctly a name database. the first thing your computer looks at when you try to connect to a website or anything on the net with a name, the computer looks at the /etc/hosts file first. so this is not the file where you set up your routing. without that default gateway you cannot connect to the internet. now, to set that up first you must find out what your default gateway is, you have to contact your isp. if you have broadband like dsl or cable, and you are using a router, your default gateway probably is 192.168.1.1 or 192.168.0.1. to set this up you will need to visit the man pages for ifconfig, and route.
man ifconfig
man route
now to set your default gateway, you do that with route. the man page for route does a good job of telling you how to do that. make sure you include the GW parameter when you figure our how to use route, this parameter tells your system that the ip address you supply will be the current default gateway. after that, you should be up and running!
10 More Discussions You Might Find Interesting
1. IP Networking
Hi
I know this problem is more likely some windows problem but it has also something to do with unix.
We have a windows nt environment wich uses AIX (unix) machines as file servers (samba). In our windows network environment we nicely see al the unix file servers via the 10 MB network. Last... (2 Replies)
Discussion started by: Mark Detrez
2 Replies
2. IP Networking
following Problem.
I configured my SuSE Linux 8.0 as a router. I4l, named, ip_forward, iptables (NAT/MASQUERADING) are running or are aktivatet.
I just can get a internet connection about the proxy server squid, but if i want to use other protocols i need functional routing.
(I had this... (1 Reply)
Discussion started by: razor
1 Replies
3. IP Networking
hi,
below is the situation:
my server is in 128.10.200.xxx network.
i have a solaris computer running in a subnet. this computer got 2 nic card.
1 is 172.18.198.xxx , another 1 is 10.100.xxx.11
there is a machine stick with this computer, ip is 10.100.xxx.12
so, 10.100.xxx.11 and... (3 Replies)
Discussion started by: kyhah
3 Replies
4. IP Networking
Hi,
I am trying to set up the following :
- One linux box connected to the net, static address, eth0
- No other eth interface on the box
I want to set up this box in a way it can accept remote connections, like pptp tunnels (which seems the easier to set up unless you have other idea)... (2 Replies)
Discussion started by: aerostar700
2 Replies
5. Solaris
Hi,
I got problem of Sun Solaris 8 routing.
IP of SunA is 10.16.64.164, and have routing table:
10.16.64.0 10.16.64.164 U 1 19236 bge1
10.6.0.0 10.6.0.3 U 1 16534 bge0
224.0.0.0 10.6.0.3 U 1 ... (4 Replies)
Discussion started by: milo
4 Replies
6. Red Hat
hi,
having an issue on a class C network with trying to get a redhat diskless setup going. I am using oracle enterprise 5, which is RHEL 5.3 i believe.
here is the scenario:
sun sparc m4k that i am planning on making the red hat boxes boot off after i get the network issue fixed.
... (3 Replies)
Discussion started by: caddyjoe77
3 Replies
7. AIX
I need the following solution , please help me...
Current situation
ip: 192.168.0.12 persistent and 192.168.254.12 service ip
gateway: 192.168.0.254
subnet: 255.255.255.0
i have added a new ip on a new nic
ip: 10.10.255.40
gateway: 10.10.255.62
subnet: 255.255.255.224
... (1 Reply)
Discussion started by: rajibimran
1 Replies
8. IP Networking
Internet Gateway
192.168.0.201
Server 1
192.168.0.101
192.168.1.101
192.168.2.101
gateway: 192.168.0.201
VIP: 192.168.1.100
VIP: 192.168.2.100
Server 2
192.168.0.102
192.168.1.102
192.168.2.102
gateway: 192.168.0.201
Client 1
192.168.2.201
gateway: 192.168.2.100 (1 Reply)
Discussion started by: hopfensp
1 Replies
9. Solaris
Hi,
I have two physical interfaces on a servers.
We have connected them to differerent subnets.
1) First interface:
10.158.49.87 to newtwork 10.158.49.0, its gateway is 10.158.49.1
(It is added as default gateway)
It is existing set up. It works well
2) Second interface:
... (1 Reply)
Discussion started by: sri243
1 Replies
10. IP Networking
hi folks,
i have a horstbox-router with the following configuration.
it has 4 ethernet ports from wich one (wan0) is configured as an external modem via dhcp. at this port/interface(wan0) it is connected with my home network (other switch).
this configuration results in the following... (14 Replies)
Discussion started by: gencaslan
14 Replies
LEARN ABOUT NETBSD
route.conf
ROUTE.CONF(5) BSD File Formats Manual ROUTE.CONF(5)
NAME
route.conf -- static routes config file
DESCRIPTION
The route.conf file is read by the staticroute rc.d script during system start-up and shutdown, and is intended for adding and removing
static routes.
FILE FORMAT
Lines starting with a hash ('#') are comments and ignored. Lines starting with a plus sign ('+') are run during start-up, while lines start-
ing with a minus sign ('-') are run during system shutdown. If a line starts with a '!', the rest of the line will get evaluated as a shell
script fragment. All other lines are passed to route(8). During start-up, they are passed behind a ``route add -'' command and during shut-
down behind a ``route delete -'' command.
FILES
/etc/route.conf The route.conf file resides in /etc.
/etc/rc.d/staticroute
rc.d(8) script that parses route.conf.
EXAMPLES
In this example, the interface for the desired routing changes is set, the IP address on that interface is determined, and a route is added
during startup, or deleted during system shutdown.
# Set interface and determine current IP address for added route.
!ifname=bnx0
!ipaddr=$(/sbin/ifconfig ${ifname} | awk '$1 == "inet" {print $2}')
net 10.10.1 -interface ${ipaddr}
In this example, IP forwarding is turned on during start-up, and a static route added for 192.168.2.0. During system shutdown, the route is
removed and IP forwarding turned off.
# Turn on/off IP forwarding.
+sysctl -w net.inet.ip.forwarding=1
-sysctl -w net.inet.ip.forwarding=0
net 192.168.2.0 -netmask 255.255.255.0 192.168.150.2
SEE ALSO
rc.conf(5), rc(8), route(8)
BSD
May 1, 2012 BSD