Configuring RH8 to use an ADSL Modem/Router

Rick Stevens rstevens at vitalstream.com
Tue Jun 1 18:07:26 UTC 2004


Graeme Nichols wrote:
> 
> 
> administrator tootai wrote:
> 
>> Graeme Nichols a écrit :
>>
>>> Hello Rick and Folks,
>>
>>
>>
>> Hi Graeme
>>
>>>
>>> Further to the help you have already given me regarding ADSL 
>>> Modem/Routers I now have my ADSL line activated but I have been 
>>> spectacularly unsuccessful in getting it to to work on my RH8 box. I 
>>> have been reduced to using Win98SE for my email at the moment, but 
>>> not Oulook Express :-)
>>>
>>> The ADSL Modem/Router works just fine under Win98SE. I followed the 
>>> configuration sequence from the Modem/Router instructions which are 
>>> as follows:
>>>
>>> 1. Select the Ethernet card from the network devices.
>>
>>
>>
>> So ethernet card to connect to ADSL modem/router
>>
>>> 2. Select dynamically assigned ip address.
>>
>>
>>
>> For modem/router in LAN?
>>
>>> 3. Disable DNS
>>> 4. Fire up a browser and configure the ADSL modem as follows:
>>> a. Router, PPPoA (my ISP informed me this works more reliably than 
>>> PPPoE on Billion ADSL Modem/Routers), LLC, VPI/VCI <values 8/35), 
>>> <username>, <password>, obtain an IP address automatically, connect 
>>> on demand, NAT=SUA (single user). The next screen displays the 
>>> results of your choices on the WAN side and the default router ip 
>>> addr. (192.168.1.254), netmask (255.255.255.0) etc.
>>
>>
>>
>> So your router has 192.168.1.254 as LAN IP. Your ethernet card on 
>> which he is connected to your box must have an 192.168.1.0/24 IP address.
>>
>>>
>>> And away it all went. No problems.
>>>
>>> So I followed the same procedure on my RH8 box and immediately ran 
>>> into problems. By setting eth0 to a dynamically assigned ip address I 
>>> can't activate it.
>>
>>
>>
>> Anf who give an IP address to your eth0? You have an DHCP server on 
>> your LAN? If not, you must have something like
>>
>> DEVICE="eth0"
>> BOOTPROTO="none"
>> IPADDR="192.168.1.1" ;if not already used
>> NETMASK="255.255.255.0"
>> NETWORK="192.168.1.0"
>> ONBOOT="yes"
>>
>> in your ifcfg-eth0 and
>>
>> NETWORKING=yes
>> GATEWAYDEV=eth0
>> FORWARD_IPV4=yes
>>
>> in network file.
>>
>>> Delete that device and create an xDSL device (ppp0) using the eth0 
>>> card, dynamic ip address etc. I can activate it (takes about 40 
>>> secs.) and 10 secs later it becomes inactive. I haven't changed any 
>>> of the ADSL configuration in the Modem/Router as all that should be 
>>> correct as they are the defined settings from my ISP.
>>
>>
>>
>> If I well understand your setup (see below) you don't need to setup an 
>> ppp connection
>>
>>>
>>>
>>> The contents of the network files and log are as follows:
>>>
>>>  Contents of the /etc/sysconfig/network file:-
>>>
>>> [root at localhost graeme]# cat /etc/sysconfig/network
>>> NETWORKING=yes
>>> HOSTNAME=localhost.localdomain
>>> DOMAINNAME=localdomain
>>> GATEWAYDEV=ppp0
>>
>>
>>
>> If your modem is connected to eth0 should be eth0 (see my comments 
>> above about ppp0)
>>
>>>
>>> Contents of the /etc/sysctl.conf file:-
>>>
>>> [root at localhost graeme]# cat /etc/sysctl.conf
>>> # Kernel sysctl configuration file for Red Hat Linux
>>> #
>>> # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
>>> # sysctl.conf(5) for more details.
>>>
>>> # Controls IP packet forwarding
>>> net.ipv4.ip_forward = 0
>>
>>
>>
>> should be =1
>>
>>>
>>> # Controls source route verification
>>> net.ipv4.conf.default.rp_filter = 1
>>>
>>> # Controls the System Request debugging functionality of the kernel
>>> kernel.sysrq = 0
>>>
>>> # Controls whether core dumps will append the PID to the core filename.
>>> # Useful for debugging multi-threaded applications.
>>> kernel.core_uses_pid = 1
>>>
>> [...]
>>
>>> Now all the above must mean something but to me, network novice, it 
>>> doesn't jump out at me.
>>
>>
>>
>> In your logs hotplug id for USB. So is your modem USB or eth?
>>
>>>
>>> In my simple mind all I thought would be necessary would be to 
>>> configure eth0 to dynamic ip address, allow users to start and stop 
>>> it and all would work.
>>>
>>> So, how do I set up this ADSL Modem/Router to work under RH8??
>>>
>>> I desperately need help...
>>>
>> If you setup your modem under win98, the only thing you have to do 
>> with your RH box is to bring up eth0 to be able to discuss with your 
>> modem. With ip_forward set to 1 you will be able to go to internet. 
>> All others settings are done by the modem so no need to do it from 
>> your box.
>>
>> What i say is only true if I well understand your organization like:
>>
>> RH80 box -- Ethernet card eth0 -- Ethernet connector from ADSL 
>> modem/Router -- WAN connector from ADSl modem/Router -- your ISP
>>
>> If your modem is USB, you should have drivers who will create an 
>> pseudo eth connected to ppp. At least it was the case with an USB 
>> SAGEM Fast at 800 that I was using. And this was only a modem, not router.
>>
>> Hope this help.
>>
> 
> Hi, my setup is a single workstation with one ethernet card (eth0). To 
> that card is connected a Billion BIPAC-5100 Adsl Router with 4 port 
> switch. This in turn is connected to an ADSL enabled phone line. The 
> default ip address of the router is 192.168.1.254. Under Win98SE if I 
> query the router the LAN side of the connection shows the ip address of 
> 192.168.1.254 and the WAN side shows the ip address assigned by the ISP.
> 
> Are you saying that I have to assign a static ip address to eth0 equal 
> to the default ip address of the router? and set ip forwarding in 
> /etc/sysctl.conf and in /etc/sysconfig/network file to 
> gateway=192.168.1.254 (the default ip address of the router) rather than 
> gatewaydev=ppp0?
> 
> I will give that a try and see what happens.
> 
> Thank you for your help.

Looks like there's lots of help here, but there are several things that
must be set up for DHCP stuff to work.  It's easiest to use the
"redhat-config-network" tool to set these up, but should you wish to do
it manually, the files that are affected are:

/etc/sysconfig/network:

	HOSTNAME=your.host.name
	NETWORKING=yes

/etc/sysconfig/network-scripts/ifcfg-eth0:

	DEVICE=eth0
	BOOTPROTO=dhcp
	ONBOOT=yes

/etc/dhclient/dhclient.conf

	timeout 60;
	retry 60;
	reboot 10;
	select-timeout 5;
	initial-interval 2;

	interface "eth0" {
	    request subnet-mask, broadcast-address, routers;
	    request domain-name-servers;
	    require subnet-mask, routers, domain-name-servers;
	}

Since DHCP requires the help of a DHCP client program (under RH8.0 and
9, this is "dhclient"), you must set up the dhclient.conf file as I show
above.  Your router must also have its DHCP server bit enabled.  The
dhclient program actually fetches the IP address, netmask, default route
and DNS server data and applies it.

If you want to manually set up a fixed IP address, you need to tweak
three files:

/etc/sysconfig/network:

	HOSTNAME=your.host.name
	NETWORKING=yes
	GATEWAY=192.168.0.254	(the LAN address of your router)

/etc/sysconfig/network-scripts/ifcfg-eth0:

	DEVICE=eth0
	BOOTPROTO=static
	ONBOOT=yes
	IPADDR=192.168.0.1 (or choose one from .1 to .253, inclusive)
	NETMASK=255.255.255.0 (choose one as appropriate)
	NETWORK=192.168.0.0 (OPTIONAL -- you really don't need this)
	BROADCAST=192.168.0.255 (OPTIONAL -- you really don't need this)

/etc/resolv.conf:
	nameserver IPaddress-of-a-DNS-server
	nameserver IPaddress-of-a-second-DNS-server (OPTIONAL)
	nameserver IPaddress-of-a-third-DNS-server (OPTIONAL)

The "IPaddress-of-a-DNS-server" should be the IP address(es) of your
ISP's DNS server(s).  These should NOT be addresses in the 192.168
network.

To verify that things are set up correctly (regarless of static or DHCP
address settings), you should be able to:

	ifconfig eth0

and see an address in the 192.168.0.something range.  It should be "UP"
and have a reasonable netmask.  Next,

	netstat -rn

should show a line such as:

	0.0.0.0  192.168.0.254   0.0.0.0  UG        0 0          0 eth0

The important bit is the "UG", which indicates your default gateway, and
that "192.168.0.254" is the gateway itself.  Finally, take a look at
/etc/resolv.conf.  If things are correct, it should have one or more
"nameserver" lines with the IP addresses of the DNS servers you'll use
(yes, dhclient will rewrite this file if you use DHCP).

If that's all good, you should be able to "dig some-site-name" and get
the IP address of the site (proves that DNS is working), and you should
be able to ping both your router's LAN IP (in this case, 192.168.0.254)
AND it's WAN interface (you'll need to check which address that is with
your router).  You can also verify the NAT mechanism by visiting:

	http://www.rhil.net/fancywhatip.html

That page will show you which IP you're coming from (it should match the
WAN address of your router).
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-   Which is worse: ignorance or apathy?  I don't know.  Who cares?  -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list