View Full Version : How to network
reeksy
2008-06-02, 01:42 PM CDT
Hi
I have just installed Fedora 9 on two machines. Both fresh installs. No dual boot; just Fedora.
I now wish to create a wired network between the two. I have a hub and two cat5 cables. All are connected. From here, I'm stuck!
I've been fiddling about for ages with the various iwconfig and ifconfig commands but all I've ended up doing is brining down my wireless internet connection which isn't very handy!
Can anyone point me in the right direction!?!
Here's my ifconfig if it helps:
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:12886 errors:0 dropped:0 overruns:0 frame:0
TX packets:12886 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:644460 (629.3 KiB) TX bytes:644460 (629.3 KiB)
wlan0 Link encap:Ethernet HWaddr 00:17:3F:8E:03:33
inet addr:192.168.1.64 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::217:3fff:fe8e:333/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1531 errors:0 dropped:0 overruns:0 frame:0
TX packets:1501 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:760806 (742.9 KiB) TX bytes:297465 (290.4 KiB)
wmaster0 Link encap:UNSPEC HWaddr 00-17-3F-8E-03-33-F4-CF-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Regards,
Jon
hyperspace
2008-06-02, 02:14 PM CDT
Hi
I have just installed Fedora 9 on two machines. Both fresh installs. No dual boot; just Fedora.
I now wish to create a wired network between the two. I have a hub and two cat5 cables. All are connected. From here, I'm stuck!
I've been fiddling about for ages with the various iwconfig and ifconfig commands but all I've ended up doing is brining down my wireless internet connection which isn't very handy!
Can anyone point me in the right direction!?!
Here's my ifconfig if it helps:
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:12886 errors:0 dropped:0 overruns:0 frame:0
TX packets:12886 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:644460 (629.3 KiB) TX bytes:644460 (629.3 KiB)
wlan0 Link encap:Ethernet HWaddr 00:17:3F:8E:03:33
inet addr:192.168.1.64 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::217:3fff:fe8e:333/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1531 errors:0 dropped:0 overruns:0 frame:0
TX packets:1501 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:760806 (742.9 KiB) TX bytes:297465 (290.4 KiB)
wmaster0 Link encap:UNSPEC HWaddr 00-17-3F-8E-03-33-F4-CF-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Regards,
Jon
You said wired and all we see is wireless. This only shows one system. What does the other system's ifconfig look like?
reeksy
2008-06-02, 11:55 PM CDT
Ah right, that's probably because i ran ifconfig eth1 down and forgot to bring it back up! Sorry!
As requested; here's both ifconfigs:
[root@localhost jon]# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:14:85:79:65:59
inet6 addr: fe80::214:85ff:fe79:6559/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:468 (468.0 b)
Interrupt:21 Base address:0x6000
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:12332 errors:0 dropped:0 overruns:0 frame:0
TX packets:12332 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:616760 (602.3 KiB) TX bytes:616760 (602.3 KiB)
wlan0 Link encap:Ethernet HWaddr 00:17:3F:8E:03:33
inet addr:192.168.1.64 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::217:3fff:fe8e:333/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3710 errors:0 dropped:0 overruns:0 frame:0
TX packets:3570 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3051194 (2.9 MiB) TX bytes:668306 (652.6 KiB)
wmaster0 Link encap:UNSPEC HWaddr 00-17-3F-8E-03-33-F4-CF-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[root@localhost serveradmin]# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:4B:80:80:03
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:22 Base address:0x8000
eth1 Link encap:Ethernet HWaddr 00:60:08:54:46:38
inet6 addr: fe80::260:8ff:fe54:4638/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:168 (168.0 b)
Interrupt:16 Base address:0xc000
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:2950 errors:0 dropped:0 overruns:0 frame:0
TX packets:2950 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:147660 (144.1 KiB) TX bytes:147660 (144.1 KiB)
Any help would be great,
Regards,
Jon
stevea
2008-06-03, 01:52 AM CDT
So what exactly are you trying to do - draw us a picture.
Is your wireless connection part of the same LAN as the wired ? It's a really bad idea to put two interfaces on the same LAN unless you are doing binding.
As a quick thumbnail ... You can assign compatible IP addresses and masks to each interface on the LAN. Then you should be able to send IP traffic (ping or telnet or ssh) between systems using the IP address.
You might setup an interface on system1 like
ip link set eth0 up
ip addr add 192.168.40.7/24 dev eth0
and the other on system2 like
ip link set eth0 up
ip addr add 192.168.40.8/24 dev eth0
If there is a router connected to the internet or another lan you'll need to setup an "ip route" command for it.
So then system1 can do "ping 192.168.40.8" or ssh to the contact system2.
--
If would be nicer to use the system names and there are two ways to do this. If you r LAN has fixed IP assignment you can just make entries in /etc/hosts like
192.168.40.7 system1
192.168.40.8 system2
then you can do "ping system2" or "ssh me@system2" to connect to system2.
========
If you have a dhcp/dns serving router or want to setup dnsmasq you can avoid the static assignments and "do things right".
reeksy
2008-06-03, 12:47 PM CDT
OK, I don't have Wine and Photoshop installed yet so I'll have to 'write' you a picture! I'll be as descriptive as possible!
I have a workstation (computer A) with a wireless USB card. This card then connects to a my 'BT Internet home hub' (hub A) so I can connect to the internet using computer A.
I recently acquired a new computer (computer B), which I now want to network with computer A. Once I've achieved this I''ll use the computer B as my main file storage system.
To link computer A and computer B together I've got two cat5 cables and a separate hub (hub B). Both computers have cat5 cables connected from them into hub B. So my question is; how do I get computer A connected to computer B using hub B? I'm not precious about computer B having an internet connection.
Regards,
Jon
roachy
2008-06-03, 01:42 PM CDT
Firstly......try Dia, Inkscape and GIMP.... ;)
Secondly, the easiest way, given that it looks like your wireless card is working and configured ok already on Comp A is just to configure Comp B to be part of that network....
I'm guessing this is where the problem lies as confusion between the 2 interfaces on Comp B. Its likely that you've assigned addresses to a card that isn't connected....
The good news is the the BT Home Hub behaves as a DHCP server as well, so all you need to do is configure both eth0 and eth1 to get an address via DHCP then connect a Cat5 cable to the Home Hub...
reeksy
2008-06-03, 11:56 PM CDT
Secondly, the easiest way, given that it looks like your wireless card is working and configured ok already on Comp A is just to configure Comp B to be part of that network....
OK, how do you suggest I do that? Would I do this with a separate wireless USB adapter? Or can i achieve this with the Cat5 cable and Hub B?
Regards,
Jon
roachy
2008-06-04, 12:26 AM CDT
If I remember rightly, BT Home Hubs have 4 ethernet ports, so you shouldn't need Hub B......
If this isn't the case, there is definitely 1 ethernet port, so assuming you might want to add extra computers in future, you can connect as follows:
.................................................. ................................. /----CAT5-->COMP B
WWW -> BT HOME HUB --CAT5--> HUB B--
...........................|...................... ..................................\-----CAT5-->COMP C
.........................WIFI
...........................|
...........................V
.....................COMP A
NOTE - If you don't want to add extra computers in future, you can disregard HUB B and replace that in the diagram with Comp B
If all are set to DHCP, you should be able to see each of the computers IP address. Try pinging the respective computers from each other (for example comp A was given an address of 192.168.1.64 in your previous post, so you could go to a command line and type:
ping 192.168.1.64
from Comp B
This should give you a response....if you can do this, then you should be able to connect to the net from both machines and share files between them....just reply to this thread if that all works and I'll explain how to do that
Hope this helps
reeksy
2008-06-04, 01:46 PM CDT
Fantastic!
I'm getting somewhere! Thanks for all the help! I'm now able to SSH to from one computer to the other and visa versa!
I still have a question though! I want to be able to navigate the Apache's files on computer B from computer A within a web browser.
Computer A has an IP address of 192.168.40.7
Computer B has an IP address of 192.168.40.8
So, my thought was; if (on computer A) I go to http://192.168.40.8/ I would see the localhost files of computer B - but this isn't the case. I receive a 'Failed to Connect' error stating: 'Firefox can't establish a connection to the server at 192.168.40.8.'
So my question is; how to I configure computer A to be able to navigate the Apache's files on computer B via a web browser?
Regards,
Jon
hyperspace
2008-06-04, 01:52 PM CDT
"http://192.168.40.8" is like trying to access a WEB page. Are you excepting to see like, files and directories, or what? I'm confused.
reeksy
2008-06-04, 01:57 PM CDT
I'm hoping to see computer B's (192.168.40.8) local web pages.
What I mean by this is; if I'm on computer B and navigate to "http://127.0.0..1" I see Apache's default web pages. So then if i go to computer A and type "http://192.168.40.8" i want to see computer B's local web pages that i viewed on "http://127.0.0..1".
I hope that makes sense!
soxfan
2008-06-04, 02:08 PM CDT
Sounds like either a firewall or apache config issue. I'd check to see if the firewall is enabled on 192.168.40.8. If it is check to see if remote http connections are allowed. If that looks OK check the apache config to make sure that it is setup to listen on all interfaces, not just the loopback.
hyperspace
2008-06-04, 02:17 PM CDT
I'm hoping to see computer B's (192.168.40.8) local web pages.
What I mean by this is; if I'm on computer B and navigate to "http://127.0.0..1" I see Apache's default web pages. So then if i go to computer A and type "http://192.168.40.8" i want to see computer B's local web pages that i viewed on "http://127.0.0..1".
I hope that makes sense!It does. I was confused. Sorry.
reeksy
2008-06-04, 03:14 PM CDT
Sounds like either a firewall or apache config issue. I'd check to see if the firewall is enabled on 192.168.40.8. If it is check to see if remote http connections are allowed.
How do I do both of the above?
If that looks OK check the apache config to make sure that it is setup to listen on all interfaces, not just the loopback
And how do i do that!?
Thanks,
Jon
soxfan
2008-06-04, 03:46 PM CDT
For the firewall, I'm on KDE so to get to the configuration I go to KDE menu --> Applications --> Administration --> Firewall. There should be a similar program under GNOME, and you could also do it at the command line, but I don't have the specifics at this point. Others may disagree, but if you are already behind a firewall then I would recommend totally disabling the local firewall on your PC. Under the Firewall GUI you can do this just by clicking the "Disable" button and then click "Apply". If you would rather not disable the firewall then look in the list of Trusted Services and make sure WWW and probably Secure WWW are checked. To be safe you might want to reboot after making any changes to the firewall settings.
As far as Apache, I only know how to edit the config file at the command line level. On Fedora 9 the config file iis in /etc/httpd/conf.d and is called httpd.conf. Open the file with your favorite text editor and then look for a line that starts with "Listen". Make sure it does not say something like "Listen 127.0.0.1:80".
I think it is probably the firewall over the Apache config. By default Fedora turns on the firewall and prohibits http/https connections, but Apache defaults to listen on all network interfaces. So unless you or someone else has changed this your Apache config is probably OK.
reeksy
2008-06-05, 12:43 PM CDT
I'm not getting any luck with this. I've completed disabled my firewall on both machines and tripple checked my apache configuration file. All are fine.
I still receive an 'Firefox can't establish a connection to the server at 192.168.40.8.' error.
Any ideas? Something is blocking the connection somewhere! Just cant figure out what!
I can SSH between both computers fine by the way.
Regards,
Jon
hyperspace
2008-06-05, 01:00 PM CDT
What is the LISTEN statement in the httpd.conf file.
reeksy
2008-06-05, 01:03 PM CDT
It's :
Listen 80
hyperspace
2008-06-05, 01:17 PM CDT
It's :
Listen 80
I got the same error you did until I started httpd. My LISTEN statement is same as yours.
service httpd start
Man, I'm glad my dual KVM has Fedora 8 and XP connected to it. :)
soxfan
2008-06-05, 01:25 PM CDT
Do you have a proxy server configured in Firefox by chance?
Try this. Go to a command prompt in a terminal session and type 'telnet 192.168.40.8 80'. If you get an error message back saying something like 'telnet: connect to address 192.168.40.8: Connection refused' then either apache isn't running or it's not listening on this address. Based on your "Listen" in httpd.conf it seems that it should be listening on all interfaces.
If you get another type of error message post back with the information.
If you get:
Trying 192.168.40.8
Connected to xxxxxx
Escape character is '^]'.
then you are connected and this would indicate a Firefox issue.
reeksy
2008-06-05, 01:26 PM CDT
Hi
I've run:
# /sbin/service httpd start
But still no luck!
Is there something else ive missed!?
reeksy
2008-06-05, 01:28 PM CDT
Hi
Thanks for the info. Here's the result:
[root@localhost jon]# telnet 192.168.40.8 80
Trying 192.168.40.8...
telnet: connect to address 192.168.40.8: No route to host
soxfan
2008-06-05, 01:54 PM CDT
No route to host? That's strange. Are you sure the network is still running and ssh is still working? Also, are you 100% sure the firewall is disabled on both systems?
hyperspace
2008-06-05, 02:01 PM CDT
F.Y.I. My firewall is running and WWW(http) is allowed.
reeksy
2008-06-05, 02:04 PM CDT
Hi, yes the firewall is disabled on both. I just double checked.
I can still SSH; here's the commands:
[root@localhost jon]# ssh serveradmin@192.168.40.8
serveradmin@192.168.40.8's password:
Last login: Thu Jun 5 20:23:06 2008 from 192.168.40.7
[serveradmin@localhost ~]$ logout
Connection to 192.168.40.8 closed.
[root@localhost jon]# telnet 192.168.40.8 80
Trying 192.168.40.8...
telnet: connect to address 192.168.40.8: No route to host
[root@localhost jon]#
I don't know, but after googleing around am i right in thinking it could be an "iptables" issue? If it is I'm don't know anything about iptables!
Thanks,
Jon
hyperspace
2008-06-05, 02:08 PM CDT
See if there are any errors in /var/log/messages. They should be near the end of the file.
soxfan
2008-06-05, 02:44 PM CDT
I don't know, but after googleing around am i right in thinking it could be an "iptables" issue? If it is I'm don't know anything about iptables!
Exactly, iptables is the firewall. So, when you say the firewall is disabled on both were the systems setup that way, or did you disable them in the process of troubleshooting this issue? If it is the later, have you rebooted your system since you made the changes.
Do an 'iptables --list' from the command line on both systems. If you get back anything other than headings then your firewall is not disabled.
reeksy
2008-06-07, 11:56 AM CDT
Do an 'iptables --list' from the command line on both systems. If you get back anything other than headings then your firewall is not disabled.
Hi Here's my iptables for computer A and B, they both appear the same:
[root@localhost jon]# /sbin/iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@localhost jon]#
So does this output suggest that the firewall's are not disabled?
Regards,
Jon
soxfan
2008-06-08, 10:28 AM CDT
So does this output suggest that the firewall's are not disabled?
Yes, to me this output indicates that the firewall is not totally disabled. Now, I do see rules in there related to http and https, but honestly I don't know if they are allowing connections on these ports or not because I always totally disable the firewall, and don't see any rules like this.
stevea
2008-06-08, 12:35 PM CDT
Not only that - but I have no idea which system we are talking abt. Is it the apache server that still has the firewall partly enabled ?
i strongly urge that you give each system a distinct hostname (in system-config-network) and also make entries in /etc/host for each system.
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.