Jump to content

Configure 2 linux boxes and ADSL router and switch


Arne
 Share

Recommended Posts

Hello Guys,

Clarifying.

In Streeter Howto "Sharing other internet connections" he says the "desktop you are working on" should have 2 network adapters where 1. is the local LAN interface and 2. Internet network interface.

 

I believed if to computers connected trough a switch and the switch is connected to the Router it OK without the second network adapter.

 

Please enlighten me??

Link to comment
Share on other sites

Hi Arne

 

You are correct - the connection sharing howto is written for sharing a dial-up modem connection - i.e. one computer is connected directly to the net and is sharing its connection.

 

With a router and switch, the router is the device doing the connecting and sharing. So you need to set up all the computers connected through the switch as clients.

 

Your setup is the easiest to implement - it often 'just works' !

 

Chris

Link to comment
Share on other sites

Thanks for reply Streeter,

If I understand you right I have to add something into the routers hardware trough (10.0.0.2) which I believe should be the IP address for the 2 computers, maybe 10.0.0.3 and 10.0.0.4 ???.

 

Then setup both computers as clients.

 

With this setup, will I be able to share files and printers trough the switch???

 

How should 'ifcfg-eth0', 'resolv.conf ', 'network', 'sysctl.conf'' and the other files look like on the 2 computers???

 

I have tried and tried and installed many server packages so know I wonder if this will prevent me from achieve the goal.????

 

Network is quite new to me so please be patient.

Link to comment
Share on other sites

In the factory default state, the router will normally have a LAN side IP address of (usually) 192.168.0.1 or 192.168.1.1, but check the manual. It will normally have a built in DHCP server which is enabled and set to issue IP addresses and configuration to computers on demand.

 

If you have set up any software on your PCs to use other IP address ranges, and don't want to change the configs, you will obviouslyneed to change the IP address of the router - in order to do this you will have to temporarily change the IP address of one of your PCs to an address in the same range as the router and use a web browser to log in to it at 192.168.0.1 (or 192.168.1.1).

 

To change a PC IP address, type (as root)

ifconfig eth0 192.168.0.2 up

The IP address may be different - check the manual. Netgear routers usually have it printed on a label, together with the default password and username underneath the device.

 

The howto at client setup goes through how your files should look - this is the howto you should be following.

 

File sharing etc. through the switch will work just fine - you will need to set up file sharing with Samba, NFS or whatever you intend to use.

 

The howto above actually assumes you have been 'fiddling' with the configuration, so yes, it should work!

 

Could you clarify the actual problem for us?

i.e. is the router connected to the net and working, what make/model of router/modem have you got, can you connect with Windows? etc...

 

You may want to reset the router if you have altered any of the firewall or security settings in it, just to make sure.

 

Chris

Link to comment
Share on other sites

The status is:

Router (Aztech ADSL Router DSL305EU with ethernet and (usb for win) connector is connected to the Internet and work fine.The switch (Surecom EP-805SX-C) 5 ethernet ports.

My desktop has a 3Com SOHO nic which work nice. The desktop is a dual bot XP and MDV 2006.0 PP. I have high speed connection in both boots.

 

The notebook (Thinkpad 600 with 233 MB ram) the remaining spec. is at the bottom of my post's. I just installed 2006 Free and use ICE-WM and PCMCIA ethernet card with a Realtek 8139 chip. The notebook is not connected to internet. I know the card is OK since I used it with 10.1 for several months and setup using you simple Howto. It is still OK because when I boot a Puppy linux live 1.07 the internet work like a charm. File and printer do not work.

 

Unfortunately my Router manual only describe connection no detail for network setup.

If you need me post output please tell me. reservation for long listing from the notebook since it not connected and don't allow file-sharing.

 

Thank's for hanging in on this.

Link to comment
Share on other sites

OK - so all we need to do is set up the notebook. Although the card works in other OS's, there may be a problem with this distro or the setup.

 

As I said before, follow the howto for the client set up (Assigning static IP addresses in the pinned post). It is vital to have all the IP addresses in the same group as each other.

 

There is a simple test routine at the end of the post :

 

On the desktop, type ifconfig eth0 into a terminal as root. This will give you the IP address of the desktop, say 10.0.0.2.

 

Do the same on the notebook - make sure you have an IP address and it is in the same group as the desktop, but with a different number at the end. If there is no IP address, the config, card or driver module is at fault.

 

If you have an IP address, try pinging your notebook NIC from the notebook - that's right, ping the notebook from itself (type "ping -c3 10.0.0.2" or whatever your IP address is)

This will either give a positive result (look for 3 packets transmitted, 3 received in the output) or negative (3 packets transmitted, 0 received in the output).

 

If OK - Try pinging the desktop

 

If OK - Try pinging the router

 

If OK - Try browsing - if you cannot reach say, www.google.com, try typing http://216.239.59.99 (IP address of google) into your browser address bar.

(If you cannot reach a site by name, but can get it by IP address, you have a name resolver (DNS) problem - the dns server should probably be set to the IP address of the router. This is in /etc/resolv.conf)

 

If you get errors, post all the IP addresses, any error messages and the results of all the tests above. There is a list of things to post at the bottom of the howto - you may need to copy them to a floppy or USB key to post them. We need as much info as possible.

 

Chris

Link to comment
Share on other sites

Hello Streeter,

 

Thanks for a clear reply.

 

Desktop IP address in liux boot is: 10.0.0.8

Router IP address is: 10.0.0.2

Notebook have no IP address

Yenta_socket is running

"If there is no IP address, the config, card or driver module is at fault."

Running 'lsmod' have a section like this:

8139cp  17344	0
8139too	21760	0
mii    4704	2	8139cp, 8139too

I am wondering about 2 drivers. The right driver is '8139too' but her its loaded after the first one. Could this this be the problem or part of the problem??

This is fresh installation so I have not put it there.

 

I would like to try without this '8139cp' but I don't know how to do it????

 

The live distro do not have this '8139cp' driver when it works. Further more Realtek8139 chip is Certified in mdv2006.0 and should therefore work out of the box.

 

Any tip???

Link to comment
Share on other sites

I installed 'hotplug' and added '8139cp' to 'blacklist'

rebooted but 'lsmod' show it still loaded and

ifconfig eth0 show no second line, where the IP address supposed to be shown.

 

Any other way I can do it????

 

Could it be that that the distro has updated 8139too to 8139cp

 

During installation I can see that the pcmcia is configured at the very beginning of the installation.

Edited by Arne
Link to comment
Share on other sites

When you get problems like this, it is usually best to edit relevent files manually with a text editor (the purpose behind the howto!):

 

Add to /etc/modules.conf:

alias eth0 8139too

 

Should force the module to load - make sure there are no other entries for eth0.

 

Modules can be unloaded with rmmod if you need to, and added manually with modprobe, so try modprobe 8139too.

You may get some output from this command if there is a problem - no output usually means success, but look in your logs.

Hint - add this to the bottom of /etc/syslog.conf :

*.*       	 /dev/tty12

and you can view your system log in real time by pressing control-alt-F12. Control-alt-F7 (or some other F-key) to return to your window manager.

 

If the module is loaded correctly, try (as root) ifconfig eth0 10.0.0.100 up

 

Then see if you have an IP address...

 

Good luck!

Link to comment
Share on other sites

Sorry, I had to reinstall 2006 Power Pack because I had no editor and I could not access my USB thumb drive in the previous installation.

 

I have followed your Howto to the letter (2 times actually) I have implemented all from your 2 last replies. I have added "*.* /dev/tty12" to the end of "/etc/syslog.conf" then the windows disappear and a blank screen appear and nothing shows. Which log is supposed to be shown. Sorry I didn't grasp this.

I am working on the documentation to give all the information I can.

In the mean time her is the ping result. So far. I have not taken out the "8139cp" module yet.

 

From the notebook

ping 10.0.0.4 (8139 nic) OK

ping 10.0.0.8 (desktop) NOT OK (Destination Host Unreachable)

ping 10.0.0.2 (router) NOT OK (Destination Host Unreachable)

 

From the desktop

ping 10.0.0.8 (desktop nic) OK

Ping 10.0.0.4 (notebook) NOT OK (Destination Host Unreachable)

ping 10.0.0.2 (router) OK

 

In short, the notebook nic do not have any contact with the desktop or the router.

I will take out the "8139cp" and try this after I have sent you the documentation.

 

Any other ideas??????

Link to comment
Share on other sites

The syslog thingy should show output from your system log, and is simply an easier way to view this output when you are troubleshooting. You will only get output if there has been something logged. For instance - I just ran out of paper in my printer, so the last entry is:

Jan 29 17:36:56 iwpcs kernel: lp0 out of paper
It's just easier than typing tail /var/log/syslog all the time...

 

Now, you have an IP address assigned to your NIC, and can ping it from itself - so far, so good, that means the NIC and networking is (probably) working OK.

 

You say you have had the network working with a CD distro, so we can rule out cabling/connections. Just to be 100% sure though, swap the patch leads from the 2 PCs over, and check the pings again.

 

Check the speed/duplex settings in the output of mii-tool eth0 on both computers - they should match. If not, they can be forced with something like

mii-tool -F 100baseTx-FD eth0

 

I definitely think it is worth removing the 8139cp module before going any further. You may just need to edit the /etc/modprobe.conf file. Reboot afterwards, check it is gone with lsmod | grep 8139

 

The output from the route -n command and your firewall would be the next things to check.

 

I know it is not easy copying output from commands with no networking, but it is very important we can see it - that's why it's there!

 

Chris

Link to comment
Share on other sites

Streeter,

I have not added anything from your last mail. The 'iptables.... line in your script invoke an error message, howto remedy?????

 

When I booted this morning (I am 7 hours before you in time) the ping error messages was changed since yesterday. Why is that???

 

All this is from the NOTEBOOK.

If you need the same for the desktop just give me a sign. I understand very well that you need as much information as possible and I am happy to satisfy that need.

 

[root@ast2 arne]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

IPADDR=10.0.0.4

NETMASK=255.0.0.0

NETWORK=10.0.0.0

BROADCAST=10.255.255.255

ONBOOT=yes

# METRIC=10

# NETMASK=255.255.255.0

 

[root@ast2 arne]# cat /etc/resolv.conf

nameserver 10.0.0.217

 

[root@ast2 arne]# cat /etc/sysconfig/network

HOSTNAME=ast2

NETWORKING=yes

GATEWAY=10.0.0.2

GATEDEV=eth0

 

iptables..... # dont work

....rc.local # skipped add

 

[root@ast2 arne]# ifconfig

eth0 Link encap:Ethernet HWaddr 00:50:FC:B9:79:E0

inet addr:10.0.0.4 Bcast:10.255.255.255 Mask:255.0.0.0

inet6 addr: fe80::250:fcff:feb9:79e0/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:578 errors:30 dropped:8660 overruns:1 frame:0

TX packets:376 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:35068 (34.2 KiB) TX bytes:22560 (22.0 KiB)

Interrupt:9 Base address:0xa000

 

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:4398 errors:0 dropped:0 overruns:0 frame:0

TX packets:4398 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:249220 (243.3 KiB) TX bytes:249220 (243.3 KiB)

 

[root@ast2 arne]# route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0

0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0 0 eth0

 

[root@ast2 arne]# iptables -nvL

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)

pkts bytes target prot opt in out source destination

 

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)

pkts bytes target prot opt in out source destination

 

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)

pkts bytes target prot opt in out source destination

 

 

[root@ast2 arne]# iptables -nvL -t nat

Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)

pkts bytes target prot opt in out source destination

 

Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)

pkts bytes target prot opt in out source destination

 

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)

pkts bytes target prot opt in out source destination

 

 

PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data.

64 bytes from 10.0.0.4: icmp_seq=1 ttl=64 time=0.141 ms

64 bytes from 10.0.0.4: icmp_seq=2 ttl=64 time=0.127 ms

64 bytes from 10.0.0.4: icmp_seq=3 ttl=64 time=0.123 ms

 

--- 10.0.0.4 ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2000ms

rtt min/avg/max/mdev = 0.123/0.130/0.141/0.012 ms

 

[root@ast2 arne]# ping -c3 10.0.0.8

connect: No buffer space available

 

[root@ast2 arne]# ping -c3 10.0.0.2

connect: No buffer space available

 

The 2 last pings is changed since yeaterday. Then I got Destination Host Unreachable.

Is that a good or bad sign?????????

Edited by Arne
Link to comment
Share on other sites

One of the last section of "syslog" look like this and in ctrl+alt+F12 this is an ongoing process. I hope it's relevant for the problem on hand.

 

Jan 30 11:58:37 ast2 kernel: NETDEV WATCHDOG: eth0: transmit timed out

Jan 30 11:58:37 ast2 kernel: eth0: Transmit timeout, status 0d 0004 c07f media 00.

Jan 30 11:58:37 ast2 kernel: eth0: Tx queue start entry 4 dirty entry 0.

Jan 30 11:58:37 ast2 kernel: eth0: Tx descriptor 0 is 0008a03c. (queue head)

Jan 30 11:58:37 ast2 kernel: eth0: Tx descriptor 1 is 0008a03c.

Jan 30 11:58:37 ast2 kernel: eth0: Tx descriptor 2 is 0008a03c.

Jan 30 11:58:37 ast2 kernel: eth0: Tx descriptor 3 is 0008a03c.

Jan 30 11:58:37 ast2 kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

Jan 30 11:58:41 ast2 kernel: printk: 10756 messages suppressed.

Jan 30 11:58:41 ast2 kernel: Neighbour table overflow.

Jan 30 11:58:46 ast2 kernel: printk: 10627 messages suppressed.

Jan 30 11:58:46 ast2 kernel: Neighbour table overflow.

Jan 30 11:58:49 ast2 kernel: NETDEV WATCHDOG: eth0: transmit timed out

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...