LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-16-2003, 01:25 AM   #1
slipsy
LQ Newbie
 
Registered: Feb 2003
Distribution: Mandrake 8.2 Redhat
Posts: 20

Rep: Reputation: 0
eth0 eth1 routers and redhat help


I am trying to setup a redhat based server on ADSL with a LAN. I am familiar with some networking stuff but overall a newbie. Below is a list of basic configurations involved and problems I could do with some pointers on.

[LAN] eth0
192.168.100.2
255.255.255.0
Gateway? eth1 or router?

eth1
192.168.0.0
255.0.0.0
Gateway:10.0.0.1 [points to router?]

ADSL Router [eTec]
10.0.0.11
connected to ADSL

Static IP 81.120.198.71

Problem 1:
I can't assign a dynamic IP address to eth1 to pick up the routers web interface to configure it.
I have done once but subsequently the card became inactive and would not allow me to assign its IP dynamically thru the Network config.

Problem 2 When i did get the eth1 talking to the router and configured it the tests showed the router to work fine with adsl and connect ok. But still no internet access from the box. Why?
Do i need to specify something in /etc/hosts ?
I have stopped iptables running to try to avoid any firewall conflicts

Problem 3:
Network config - what should the hosts specified here be? These get written to /etc/hosts right?
What should the DNS info contain in this setup?

Many thanks

Alans
 
Old 04-16-2003, 12:43 PM   #2
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
Assumptions: You have a router connected to your isp and the internal IP for the router is 10.0.0.11 and the external is 81.120.X.X. You have a Linux machine that you want to set up as another router that gives out ip's in the range of 192.168.0.1 - 192.168.255.254 (helluva lot of IPs to give out). Eth 1 is connected to the router (the DSL/Cable router) and Eth0 is connected to another private network. If any of this is wrong let me know because the rest depends on it.


A copule things, the netmask and IP for eth1 are off, all 0's specify a network and should not be used as an IP address and also 192.168.0.0 is class B and therefore cannot have a mask of 255.0.0.0, it should be 192.168.0.0/16 or 192.168.0.0/255.255.0.0 as a matter of fact, any IP address that begins with anything over 126. is a class B or C but that's another discussion.

Problem 1:
You can TRY 2 things: to set up DHCP on an interface, use the command dhcpcd (NOT dhcpd)

$dhcpcd eth1

which has me wondering why you have it set up as 192.168.0.0

a second thing to try is hard coding an IP into the interface that is on the same subnet as the DSL ROUTER (i.e. 10.0.0.100). I don't know how to set the ip of an interface through command line, double check this line, i've never used it:

#ifconfig eth1 10.0.0.100/8

note: your router probably only gives out adress from 10.0.0.1 to 10.0.0.254 in which case your line would be:

#ifconfig eth1 10.0.0.100/24

try both of those to get into the web configuration thiny on the router. I'ts linux so you shouldn't have to restart the computer or anything for the changes to take effect.

Problem 2:
When you get into the router, make sure it's setup for DHCP and check the status to make sure you have a connection to the internet through the router. From the linux machine you should be able to ping the router:

#ping 10.0.0.11

If you hard coded the ip using the ifconfig method then you will also have to hard code the DNS servers and gateway. The DNS servers will be given to you by your isp and the gateway is 10.0.0.11 (the router). I have never put in a gateway manually from command line but the DNS serves can be planced in a file called resolv.conf (/etc/resolv.conf)

Yo, just get DHCP working. If you just cant get DHCP working, I'll post more detail on hardcoding everything later. If you have DHCP working and the router is connected to the isp, the router will automagically handle the DNS info and gateway info for you. So just try dhcpcd eth1

You dont need to mess with the hosts file to get a network connection, that's just for resolving host names (converting a machine's name to an IP address). We are dealing only with IP's so its cool.

as far as that iptables thing goes, you just gave away your ip address and network topology, you better hope there are no malicious hacker types reading this post.

Problem 3:
huh?? Just to get an internet connection off the DSL router you dont need to mess with the host file, and DNS goes in /etc/resolv.conf but if you have DHCP working on the router you dont need to touch that either.

Last edited by Robert0380; 04-16-2003 at 12:57 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 05:57 PM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 12:12 PM
redhat+eth0+eth1 aristeidis Red Hat 5 03-20-2004 05:37 AM
Kernel 2.4.22 finds eth0 and eth1 but 2.6.0 does not find eth1 coollink Linux - Networking 3 01-13-2004 07:32 PM
Setting Up Redhat 7.0 Eth0 and Eth1 =/ cpender Linux - Networking 1 02-22-2002 01:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration