Using an ADSL Router in SUSE Linux 8.0
Novell Cool Solutions: Feature
Digg This -
Posted: 8 Jun 2004
If you have an ADSL router for connecting several hosts to the Internet, and you want to use it to access the Internet, check this out.
First, you must understand this one basic fact: The use of an ADSL router does not constitute a local provider dial-up with an ADSL modem. Rather, an ADSL router provides a local network (LAN). The router enables you to connect to the Internet by way of this LAN.
Accordingly, you need to configure a LAN connection using the network card of your PC or laptop, not a dial-up connection with a DSL modem.
Configuring the ADSL Router
Here are some details regarding the configuration of the ADSL router.
Usually, an ADSL router also assumes the function of a DHCP server that assigns a unique IP address to all machines (clients) connected to the router. This is necessary in order to ensure that the individual queries of multiple clients in the LAN receive the correct responses (e.g., to make sure client A does not receive the response intended for client B).
In order to make use of the DHCP server function, you must set your network card to automatic address assignment via DHCP. From SUSE Linux 8.0, this is the default setting when configuring a network card.
Check if you have received an IP address from your ADSL router. To do this, enter the command "/sbin/ifconfig" in a console. You should receive an output such as the following:
user@linux:~> /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:0B:61:4C:37:26 inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.225.0 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3181388 errors:0 dropped:0 overruns:0 frame:0 TX packets:2750020 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:1329840136 (1268.2 Mb) TX bytes:0 (0.0 b) Interrupt:11 Base address:0x5000
If you cannot find any "inet addr", check the manual of your router for any special settings the router may need for smooth operation of the DHCP server and the DHCP client.
However, the unique address is not sufficient to connect your SUSE Linux system to the Internet via ADSL router. Additionally, you must specify the address of the DNS server and the address of the default gateway.
When you surf the Internet, you use symbolic names like "www.suse.de" in order to load web pages. To access this web page, you need its numeric IP address (in our example: 220.127.116.11), as the servers on the Internet can only be accessed by way of numeric IP addresses. For this purpose, you need access to a DNS server, which serves as a directory service that returns the numeric IP address when you enter a symbolic name.
Here too, DHCP comes into play. A DHCP server not only assigns unique IP addresses to the clients in the LAN, but also specifies the IP address of the DNS server to use.
If your ADSL router does not transmit the DNS server to use, enter the IP address of your provider's name server manually in YaST. Use the following dialog:
- Network Services
- DNS and Host Name
If the IP address of the name server is not specified in the documents you received from your provider, contact your provider to get the needed information.
The last needed information for operating an ADSL router is the IP address of the default gateway. Normally, your SUSE Linux system also receives the IP address of the default gateway from the router via DHCP.
Enter the command "/sbin/route -n" to verify that a default gateway has been set up. Check if the table (such as the one seen below) contains a line beginning with "0.0.0.0" and the flag "UG".
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.10 0.0.0.0 255.255.225.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
The other IP addresses in your system's output will surely be different from the ones shown in this example. However, if the default gateway is missing, manually enter the IP address of your router as the default gateway in the submenu "Routing" in the following module in the YaST Control Center:
- Network Devices
- Network card
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com